diff options
author | Derek Schuff <dschuff@chromium.org> | 2012-11-29 09:35:45 -0800 |
---|---|---|
committer | Derek Schuff <dschuff@chromium.org> | 2012-11-29 09:35:45 -0800 |
commit | a75f6d81a9d7d19b38120758a4d0445adbfac13b (patch) | |
tree | d1961790df7b3aeb5c55e493e3ff3fd094a4476d /lib/Target/ARM/ARMTargetObjectFile.cpp | |
parent | f9b328eacabf0920770d3ef87bcd5682b10dd502 (diff) |
Fix LibCall simplification and ARM EH
Prevent the libcall simplifier from modifying the implementation of libcalls
(causes problems when newlib is included in LTO)
Use the generic DWARF rather than ARM EH ABI for nacl
Diffstat (limited to 'lib/Target/ARM/ARMTargetObjectFile.cpp')
-rw-r--r-- | lib/Target/ARM/ARMTargetObjectFile.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMTargetObjectFile.cpp b/lib/Target/ARM/ARMTargetObjectFile.cpp index 3c6a72bdb5..8d478a0137 100644 --- a/lib/Target/ARM/ARMTargetObjectFile.cpp +++ b/lib/Target/ARM/ARMTargetObjectFile.cpp @@ -9,6 +9,8 @@ #include "ARMTargetObjectFile.h" #include "ARMSubtarget.h" +#include "llvm/ADT/Triple.h" // @LOCALMOD +#include "llvm/CodeGen/MachineModuleInfo.h" // @LOCALMOD #include "llvm/MC/MCContext.h" #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCSectionELF.h" @@ -48,7 +50,13 @@ getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang, MachineModuleInfo *MMI, unsigned Encoding, MCStreamer &Streamer) const { assert(Encoding == DW_EH_PE_absptr && "Can handle absptr encoding only"); - + // @LOCALMOD-BEGIN + // FIXME: There has got to be a better way to get this info. + Triple T(MMI->getModule()->getTargetTriple()); + if (T.getOS() == Triple::NativeClient) + return TargetLoweringObjectFileELF::getTTypeGlobalReference(GV, Mang, + MMI, Encoding, Streamer); + // @LOCALMOD-END return MCSymbolRefExpr::Create(Mang->getSymbol(GV), MCSymbolRefExpr::VK_ARM_TARGET2, getContext()); |