forked from OSchip/llvm-project
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:
parent
ff0f23dd41
commit
6f3be2e155
|
@ -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.
Loading…
Reference in New Issue