summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRParser/MIParser.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-08-21 21:54:12 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-08-21 21:54:12 +0000
commitc1136ef3b843a6b0ced314f29e85aa88ca0cf7fd (patch)
treecba603cbb279cc5d4b19c8bc277a0ea14d3e5692 /llvm/lib/CodeGen/MIRParser/MIParser.cpp
parent366dd9fd2b0b39d6649de0ff29f9097c14a1d616 (diff)
downloadbcm5719-llvm-c1136ef3b843a6b0ced314f29e85aa88ca0cf7fd.tar.gz
bcm5719-llvm-c1136ef3b843a6b0ced314f29e85aa88ca0cf7fd.zip
MIR Serialization: Serialize the pointer IR expression values in the machine
memory operands. llvm-svn: 245745
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MIParser.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRParser/MIParser.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIParser.cpp b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
index e7fb4378121..83ba5a2c90b 100644
--- a/llvm/lib/CodeGen/MIRParser/MIParser.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
@@ -982,7 +982,8 @@ bool MIParser::parseIRConstant(StringRef::iterator Loc, StringRef StringValue,
const Constant *&C) {
auto Source = StringValue.str(); // The source has to be null terminated.
SMDiagnostic Err;
- C = parseConstantValue(Source.c_str(), Err, *MF.getFunction()->getParent());
+ C = parseConstantValue(Source.c_str(), Err, *MF.getFunction()->getParent(),
+ &IRSlots);
if (!C)
return error(Loc + Err.getColumnNo(), Err.getMessage());
return false;
@@ -1557,6 +1558,13 @@ bool MIParser::parseIRValue(const Value *&V) {
V = GV;
break;
}
+ case MIToken::QuotedIRValue: {
+ const Constant *C = nullptr;
+ if (parseIRConstant(Token.location(), Token.stringValue(), C))
+ return true;
+ V = C;
+ break;
+ }
default:
llvm_unreachable("The current token should be an IR block reference");
}
@@ -1662,7 +1670,8 @@ bool MIParser::parseMachinePointerInfo(MachinePointerInfo &Dest) {
}
if (Token.isNot(MIToken::NamedIRValue) && Token.isNot(MIToken::IRValue) &&
Token.isNot(MIToken::GlobalValue) &&
- Token.isNot(MIToken::NamedGlobalValue))
+ Token.isNot(MIToken::NamedGlobalValue) &&
+ Token.isNot(MIToken::QuotedIRValue))
return error("expected an IR value reference");
const Value *V = nullptr;
if (parseIRValue(V))
OpenPOWER on IntegriCloud