Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Unified Diff: lib/Target/ARM/ARMTargetObjectFile.cpp

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/Target/ARM/ARMTargetMachine.cpp ('k') | lib/Target/ARM/CMakeLists.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Target/ARM/ARMTargetObjectFile.cpp
diff --git a/lib/Target/ARM/ARMTargetObjectFile.cpp b/lib/Target/ARM/ARMTargetObjectFile.cpp
index 48238bfcf696b25d85fbfac71d415732fe290f56..5beb7e2cd09d4f7bd3f7aa14fc83cd85092048a6 100644
--- a/lib/Target/ARM/ARMTargetObjectFile.cpp
+++ b/lib/Target/ARM/ARMTargetObjectFile.cpp
@@ -10,6 +10,8 @@
#include "ARMTargetObjectFile.h"
#include "ARMSubtarget.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/ADT/Triple.h" // @LOCALMOD
+#include "llvm/CodeGen/MachineModuleInfo.h" // @LOCALMOD
#include "llvm/IR/Mangler.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
@@ -31,7 +33,9 @@ void ARMElfTargetObjectFile::Initialize(MCContext &Ctx,
TargetLoweringObjectFileELF::Initialize(Ctx, TM);
InitializeELF(isAAPCS_ABI);
- if (isAAPCS_ABI) {
+ // @LOCALMOD-BEGIN
+ if (isAAPCS_ABI && !TM.getSubtarget<ARMSubtarget>().isTargetNaCl()) {
+ // @LOCALMOD-END
LSDASection = nullptr;
}
@@ -51,6 +55,13 @@ const MCExpr *ARMElfTargetObjectFile::getTTypeGlobalReference(
GV, Encoding, Mang, TM, MMI, Streamer);
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.isOSNaCl())
+ return TargetLoweringObjectFileELF::getTTypeGlobalReference(
+ GV, Encoding, Mang, TM, MMI, Streamer);
+ // @LOCALMOD-END
return MCSymbolRefExpr::Create(TM.getSymbol(GV, Mang),
MCSymbolRefExpr::VK_ARM_TARGET2, getContext());
« no previous file with comments | « lib/Target/ARM/ARMTargetMachine.cpp ('k') | lib/Target/ARM/CMakeLists.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698