From 5e27856a85716b582916fea559770a4fe89158bf Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Wed, 19 Aug 2015 23:27:07 +0000 Subject: [PATCH] MIR Parser: parseIRValue should take in a constant pointer. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245520 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MIRParser/MIParser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/MIRParser/MIParser.cpp b/lib/CodeGen/MIRParser/MIParser.cpp index a17bc40fe86..4dfa793e730 100644 --- a/lib/CodeGen/MIRParser/MIParser.cpp +++ b/lib/CodeGen/MIRParser/MIParser.cpp @@ -150,7 +150,7 @@ public: bool parseOffset(int64_t &Offset); bool parseAlignment(unsigned &Alignment); bool parseOperandsOffset(MachineOperand &Op); - bool parseIRValue(Value *&V); + bool parseIRValue(const Value *&V); bool parseMemoryOperandFlag(unsigned &Flags); bool parseMemoryPseudoSourceValue(const PseudoSourceValue *&PSV); bool parseMachinePointerInfo(MachinePointerInfo &Dest); @@ -1523,7 +1523,7 @@ bool MIParser::parseOperandsOffset(MachineOperand &Op) { return false; } -bool MIParser::parseIRValue(Value *&V) { +bool MIParser::parseIRValue(const Value *&V) { switch (Token.kind()) { case MIToken::NamedIRValue: { V = MF.getFunction()->getValueSymbolTable().lookup(Token.stringValue()); @@ -1631,7 +1631,7 @@ bool MIParser::parseMachinePointerInfo(MachinePointerInfo &Dest) { } if (Token.isNot(MIToken::NamedIRValue)) return error("expected an IR value reference"); - Value *V = nullptr; + const Value *V = nullptr; if (parseIRValue(V)) return true; if (!V->getType()->isPointerTy()) -- 2.34.1