summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 159bbccc87d..7818586dfa4 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud