summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-10-13 18:49:55 +0000
committerDevang Patel <dpatel@apple.com>2009-10-13 18:49:55 +0000
commit52b1745a96b7970051c08422c3f905a221ba9e58 (patch)
tree8f42f8ebc82625b36ad5f46604bebe5495e71ab6 /llvm/lib/AsmParser/LLParser.cpp
parent113d959f1bc143ec9add158b3b9bb858927214b5 (diff)
downloadbcm5719-llvm-52b1745a96b7970051c08422c3f905a221ba9e58.tar.gz
bcm5719-llvm-52b1745a96b7970051c08422c3f905a221ba9e58.zip
Parse GEP with attached custom metadata. This happens during libprofile_rt.bca build.
llvm-svn: 84002
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 93f0a1848d8..a1186ac9c7b 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -3554,11 +3554,15 @@ bool LLParser::ParseGetElementPtr(Instruction *&Inst, PerFunctionState &PFS) {
SmallVector<Value*, 16> Indices;
while (EatIfPresent(lltok::comma)) {
+ if (Lex.getKind() == lltok::NamedOrCustomMD)
+ break;
if (ParseTypeAndValue(Val, EltLoc, PFS)) return true;
if (!isa<IntegerType>(Val->getType()))
return Error(EltLoc, "getelementptr index must be an integer");
Indices.push_back(Val);
}
+ if (Lex.getKind() == lltok::NamedOrCustomMD)
+ if (ParseOptionalCustomMetadata()) return true;
if (!GetElementPtrInst::getIndexedType(Ptr->getType(),
Indices.begin(), Indices.end()))
OpenPOWER on IntegriCloud