aboutsummaryrefslogtreecommitdiff
path: root/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
-rw-r--r--lib/AsmParser/LLParser.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index af309926af..a2edf05050 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -357,7 +357,9 @@ bool LLParser::ParseNamedGlobal() {
/// ParseAlias:
/// ::= GlobalVar '=' OptionalVisibility 'alias' OptionalLinkage Aliasee
/// Aliasee
-/// ::= TypeAndValue | 'bitcast' '(' TypeAndValue 'to' Type ')'
+/// ::= TypeAndValue
+/// ::= 'bitcast' '(' TypeAndValue 'to' Type ')'
+/// ::= 'getelementptr' '(' ... ')'
///
/// Everything through visibility has already been parsed.
///
@@ -379,7 +381,8 @@ bool LLParser::ParseAlias(const std::string &Name, LocTy NameLoc,
Constant *Aliasee;
LocTy AliaseeLoc = Lex.getLoc();
- if (Lex.getKind() != lltok::kw_bitcast) {
+ if (Lex.getKind() != lltok::kw_bitcast &&
+ Lex.getKind() != lltok::kw_getelementptr) {
if (ParseGlobalTypeAndValue(Aliasee)) return true;
} else {
// The bitcast dest type is not present, it is implied by the dest type.