aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit6225d64ba244cdf4af3c44e113fc8c589fa39508 (patch)
tree89aac2dceaf581d91fafc8482098a00d1304203b /lib/AsmParser/LLParser.cpp
parentdb9d3206c0752b5c461489bab75e977b2d4c867a (diff)
downloadexternal_llvm-6225d64ba244cdf4af3c44e113fc8c589fa39508.zip
external_llvm-6225d64ba244cdf4af3c44e113fc8c589fa39508.tar.gz
external_llvm-6225d64ba244cdf4af3c44e113fc8c589fa39508.tar.bz2
Parse GEP with attached custom metadata. This happens during libprofile_rt.bca build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84002 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
-rw-r--r--lib/AsmParser/LLParser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index 93f0a18..a1186ac 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/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()))