diff options
author | Alex Lorenz <arphaman@gmail.com> | 2015-08-14 21:14:50 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2015-08-14 21:14:50 +0000 |
commit | c3ba7508f686178fd843c51b19bd72b3b64745a2 (patch) | |
tree | 414964f86db57af3f574722e2f3d915f233929f2 /llvm/lib | |
parent | 50b826fb7503be5e9eafbd11569c195f5e307108 (diff) | |
download | bcm5719-llvm-c3ba7508f686178fd843c51b19bd72b3b64745a2.tar.gz bcm5719-llvm-c3ba7508f686178fd843c51b19bd72b3b64745a2.zip |
MIR Serialization: Serialize the external symbol call entry pseudo source
values.
llvm-svn: 245098
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/MIRParser/MIParser.cpp | 8 | ||||
-rw-r--r-- | llvm/lib/CodeGen/MIRPrinter.cpp | 7 |
2 files changed, 10 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIParser.cpp b/llvm/lib/CodeGen/MIRParser/MIParser.cpp index 31046b91cf8..b27a55b705d 100644 --- a/llvm/lib/CodeGen/MIRParser/MIParser.cpp +++ b/llvm/lib/CodeGen/MIRParser/MIParser.cpp @@ -1445,7 +1445,10 @@ bool MIParser::parseMemoryPseudoSourceValue(const PseudoSourceValue *&PSV) { PSV = MF.getPSVManager().getGlobalValueCallEntry(GV); break; } - // TODO: Parse the other pseudo source values. + case MIToken::ExternalSymbol: + PSV = MF.getPSVManager().getExternalSymbolCallEntry( + MF.createExternalSymbolName(Token.stringValue())); + break; default: llvm_unreachable("The current token should be pseudo source value"); } @@ -1457,7 +1460,8 @@ bool MIParser::parseMachinePointerInfo(MachinePointerInfo &Dest) { if (Token.is(MIToken::kw_constant_pool) || Token.is(MIToken::kw_stack) || Token.is(MIToken::kw_got) || Token.is(MIToken::kw_jump_table) || Token.is(MIToken::FixedStackObject) || Token.is(MIToken::GlobalValue) || - Token.is(MIToken::NamedGlobalValue)) { + Token.is(MIToken::NamedGlobalValue) || + Token.is(MIToken::ExternalSymbol)) { const PseudoSourceValue *PSV = nullptr; if (parseMemoryPseudoSourceValue(PSV)) return true; diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index 7e546eb845f..d70b5c412f1 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -767,9 +767,10 @@ void MIPrinter::print(const MachineMemOperand &Op) { cast<GlobalValuePseudoSourceValue>(PVal)->getValue()->printAsOperand( OS, /*PrintType=*/false, MST); break; - default: - // TODO: Print the other pseudo source values. - OS << "<unserializable pseudo value>"; + case PseudoSourceValue::ExternalSymbolCallEntry: + OS << '$'; + printLLVMNameWithoutPrefix( + OS, cast<ExternalSymbolPseudoSourceValue>(PVal)->getSymbol()); break; } } |