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

Unified Diff: lib/Target/X86/X86TargetMachine.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/X86/X86Subtarget.cpp ('k') | lib/Target/X86/X86TargetObjectFile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Target/X86/X86TargetMachine.cpp
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp
index 8802febfc03a2a67f0ae47ff2197cbe585add91b..313cacb4cc05159bac2554b7f4a2b05cf5ea05f9 100644
--- a/lib/Target/X86/X86TargetMachine.cpp
+++ b/lib/Target/X86/X86TargetMachine.cpp
@@ -38,6 +38,10 @@ static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
if (TT.isOSLinux())
return make_unique<X86LinuxTargetObjectFile>();
+ // @LOCALMOD-BEGIN
+ if (TT.isOSNaCl())
+ return make_unique<TargetLoweringObjectFileNaCl>();
+ // @LOCALMOD-END
if (TT.isOSBinFormatELF())
return make_unique<TargetLoweringObjectFileELF>();
if (TT.isKnownWindowsMSVCEnvironment())
@@ -215,5 +219,12 @@ bool X86PassConfig::addPreEmitPass() {
ShouldPrint = true;
}
+ // @LOCALMOD-START
+ if (getX86Subtarget().isTargetNaCl()) {
+ addPass(createX86NaClRewritePass());
+ ShouldPrint = true;
+ }
+ // @LOCALMOD-END
+
return ShouldPrint;
}
« no previous file with comments | « lib/Target/X86/X86Subtarget.cpp ('k') | lib/Target/X86/X86TargetObjectFile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698