diff options
author | Dan Gohman <dan433584@gmail.com> | 2015-11-25 16:44:29 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2015-11-25 16:44:29 +0000 |
commit | 2c8fe6a428668f8fdbdb88d98104f591ff142ad8 (patch) | |
tree | 2521f21bfc3622c0fbdc9f6495e00b2377ca1acd /llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp | |
parent | 7bca3db8b9763ac71f4c3e7d9c18b074e6ed1c00 (diff) | |
download | bcm5719-llvm-2c8fe6a428668f8fdbdb88d98104f591ff142ad8.tar.gz bcm5719-llvm-2c8fe6a428668f8fdbdb88d98104f591ff142ad8.zip |
[WebAssembly] Codegen support for ISD::ExternalSymbol
llvm-svn: 254075
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp index 4226a5385ce..0bfef443245 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp @@ -34,6 +34,11 @@ WebAssemblyMCInstLower::GetGlobalAddressSymbol(const MachineOperand &MO) const { return Printer.getSymbol(MO.getGlobal()); } +MCSymbol * +WebAssemblyMCInstLower::GetExternalSymbolSymbol(const MachineOperand &MO) const { + return Printer.GetExternalSymbolSymbol(MO.getSymbolName()); +} + MCOperand WebAssemblyMCInstLower::LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const { @@ -90,6 +95,9 @@ void WebAssemblyMCInstLower::Lower(const MachineInstr *MI, case MachineOperand::MO_GlobalAddress: MCOp = LowerSymbolOperand(MO, GetGlobalAddressSymbol(MO)); break; + case MachineOperand::MO_ExternalSymbol: + MCOp = LowerSymbolOperand(MO, GetExternalSymbolSymbol(MO)); + break; } OutMI.addOperand(MCOp); |