1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

AsmParser: Don't allow null bytes in BB labels

Since Value objects can't have null bytes in their name, we shouldn't
allow them in the labels of basic blocks.

llvm-svn: 223907
This commit is contained in:
David Majnemer 2014-12-10 02:10:35 +00:00
parent 2fceb99340
commit 6f52870a48
2 changed files with 6 additions and 1 deletions

View File

@ -393,7 +393,12 @@ lltok::Kind LLLexer::LexQuote() {
if (CurPtr[0] == ':') {
++CurPtr;
kind = lltok::LabelStr;
if (StringRef(StrVal).find_first_of(0) != StringRef::npos) {
Error("Null bytes are not allowed in names");
kind = lltok::Error;
} else {
kind = lltok::LabelStr;
}
}
return kind;

Binary file not shown.