diff options
| author | Dan Gohman <gohman@apple.com> | 2010-08-24 02:05:17 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-08-24 02:05:17 +0000 |
| commit | 4623767e72eca1eb1c1815b79955ad6c1d7529a0 (patch) | |
| tree | 0032c41b1a518a68fb135658545cfac8d61cddbe /lib/AsmParser/LLParser.cpp | |
| parent | 1ca1d3883fb01bc495c6705cffff77044f50f780 (diff) | |
| download | external_llvm-4623767e72eca1eb1c1815b79955ad6c1d7529a0.zip external_llvm-4623767e72eca1eb1c1815b79955ad6c1d7529a0.tar.gz external_llvm-4623767e72eca1eb1c1815b79955ad6c1d7529a0.tar.bz2 | |
Give ParseInstructionMetadata access to the PerFunctionState object.
This is in preparation for generalizing its parsing of function-local
values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111893 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
| -rw-r--r-- | lib/AsmParser/LLParser.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 0c5e049..028c2bb 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -1117,7 +1117,8 @@ bool LLParser::ParseOptionalCallingConv(CallingConv::ID &CC) { /// ParseInstructionMetadata /// ::= !dbg !42 (',' !dbg !57)* -bool LLParser::ParseInstructionMetadata(Instruction *Inst) { +bool LLParser::ParseInstructionMetadata(Instruction *Inst, + PerFunctionState *PFS) { do { if (Lex.getKind() != lltok::MetadataVar) return TokError("expected metadata after comma"); @@ -2981,7 +2982,7 @@ bool LLParser::ParseBasicBlock(PerFunctionState &PFS) { // With a normal result, we check to see if the instruction is followed by // a comma and metadata. if (EatIfPresent(lltok::comma)) - if (ParseInstructionMetadata(Inst)) + if (ParseInstructionMetadata(Inst, &PFS)) return true; break; case InstExtraComma: @@ -2989,7 +2990,7 @@ bool LLParser::ParseBasicBlock(PerFunctionState &PFS) { // If the instruction parser ate an extra comma at the end of it, it // *must* be followed by metadata. - if (ParseInstructionMetadata(Inst)) + if (ParseInstructionMetadata(Inst, &PFS)) return true; break; } |
