aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMTargetObjectFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/ARM/ARMTargetObjectFile.cpp')
-rw-r--r--lib/Target/ARM/ARMTargetObjectFile.cpp10
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());