MIR Parser: parseIRValue should take in a constant pointer. NFC.
llvm-svn: 245520
This commit is contained in:
parent
55dc6f8165
commit
36593ac51b
|
@ -150,7 +150,7 @@ public:
|
||||||
bool parseOffset(int64_t &Offset);
|
bool parseOffset(int64_t &Offset);
|
||||||
bool parseAlignment(unsigned &Alignment);
|
bool parseAlignment(unsigned &Alignment);
|
||||||
bool parseOperandsOffset(MachineOperand &Op);
|
bool parseOperandsOffset(MachineOperand &Op);
|
||||||
bool parseIRValue(Value *&V);
|
bool parseIRValue(const Value *&V);
|
||||||
bool parseMemoryOperandFlag(unsigned &Flags);
|
bool parseMemoryOperandFlag(unsigned &Flags);
|
||||||
bool parseMemoryPseudoSourceValue(const PseudoSourceValue *&PSV);
|
bool parseMemoryPseudoSourceValue(const PseudoSourceValue *&PSV);
|
||||||
bool parseMachinePointerInfo(MachinePointerInfo &Dest);
|
bool parseMachinePointerInfo(MachinePointerInfo &Dest);
|
||||||
|
@ -1523,7 +1523,7 @@ bool MIParser::parseOperandsOffset(MachineOperand &Op) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MIParser::parseIRValue(Value *&V) {
|
bool MIParser::parseIRValue(const Value *&V) {
|
||||||
switch (Token.kind()) {
|
switch (Token.kind()) {
|
||||||
case MIToken::NamedIRValue: {
|
case MIToken::NamedIRValue: {
|
||||||
V = MF.getFunction()->getValueSymbolTable().lookup(Token.stringValue());
|
V = MF.getFunction()->getValueSymbolTable().lookup(Token.stringValue());
|
||||||
|
@ -1631,7 +1631,7 @@ bool MIParser::parseMachinePointerInfo(MachinePointerInfo &Dest) {
|
||||||
}
|
}
|
||||||
if (Token.isNot(MIToken::NamedIRValue))
|
if (Token.isNot(MIToken::NamedIRValue))
|
||||||
return error("expected an IR value reference");
|
return error("expected an IR value reference");
|
||||||
Value *V = nullptr;
|
const Value *V = nullptr;
|
||||||
if (parseIRValue(V))
|
if (parseIRValue(V))
|
||||||
return true;
|
return true;
|
||||||
if (!V->getType()->isPointerTy())
|
if (!V->getType()->isPointerTy())
|
||||||
|
|
Loading…
Reference in New Issue