projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
AsmParser: Make sure GlobalVariables have sane types
[oota-llvm.git]
/
lib
/
AsmParser
/
LLParser.cpp
diff --git
a/lib/AsmParser/LLParser.cpp
b/lib/AsmParser/LLParser.cpp
index 159bbccc87db9a56036de73c5eabb589f3b2a5e9..7818586dfa45d80723ae6b62ca3c62ca47e27c18 100644
(file)
--- a/
lib/AsmParser/LLParser.cpp
+++ b/
lib/AsmParser/LLParser.cpp
@@
-749,7
+749,7
@@
bool LLParser::ParseGlobal(const std::string &Name, LocTy NameLoc,
return true;
}
- if (Ty->isFunctionTy() ||
Ty->isLabelTy(
))
+ if (Ty->isFunctionTy() ||
!PointerType::isValidElementType(Ty
))
return Error(TyLoc, "invalid type for global variable");
GlobalValue *GVal = nullptr;