diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-25 21:26:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-25 21:26:00 +0000 |
commit | 040f758e3abc75bdf6ddb1ce7bea1e1ed1293ccf (patch) | |
tree | 971d2575f1d1cdc1927f8fec5c2cd7e4693cc3e7 /lib/AsmParser/LLParser.cpp | |
parent | a2165ed6ee7f73b5cf272a0b5d5d4ed448f52665 (diff) |
testcase and asmparser fix for PR4066
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70080 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 7 |
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. |