mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-27 15:29:51 +00:00
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
This commit is contained in:
parent
db9d3206c0
commit
6225d64ba2
@ -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()))
|
||||
|
Loading…
Reference in New Issue
Block a user