[llvm-commits] [llvm] r84002 - /llvm/trunk/lib/AsmParser/LLParser.cpp

Devang Patel dpatel at apple.com
Tue Oct 13 11:49:55 PDT 2009


Author: dpatel
Date: Tue Oct 13 13:49:55 2009
New Revision: 84002

URL: http://llvm.org/viewvc/llvm-project?rev=84002&view=rev
Log:
Parse GEP with attached custom metadata. This happens during libprofile_rt.bca build.

Modified:
    llvm/trunk/lib/AsmParser/LLParser.cpp

Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=84002&r1=84001&r2=84002&view=diff

==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Tue Oct 13 13:49:55 2009
@@ -3554,11 +3554,15 @@
 
   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()))





More information about the llvm-commits mailing list