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

Unified Diff: tools/llvm-mc/llvm-mc.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 | « tools/llvm-link/CMakeLists.txt ('k') | tools/llvm-nm/CMakeLists.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/llvm-mc/llvm-mc.cpp
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp
index 5da9e8662353bd9bb8220754da072b09f6f9a2b5..e056d03a598bd9046783df6b0a1a3d7b54b4a7f3 100644
--- a/tools/llvm-mc/llvm-mc.cpp
+++ b/tools/llvm-mc/llvm-mc.cpp
@@ -18,6 +18,7 @@
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCInstPrinter.h"
#include "llvm/MC/MCInstrInfo.h"
+#include "llvm/MC/MCNaCl.h"
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCParser/AsmLexer.h"
#include "llvm/MC/MCRegisterInfo.h"
@@ -446,7 +447,9 @@ int main(int argc, char **argv) {
std::unique_ptr<MCSubtargetInfo> STI(
TheTarget->createMCSubtargetInfo(TripleName, MCPU, FeaturesStr));
- MCInstPrinter *IP = nullptr;
+ Triple T(TripleName); // @LOCALMOD
+
+ MCInstPrinter *IP = NULL;
if (FileType == OFT_AssemblyFile) {
IP =
TheTarget->createMCInstPrinter(OutputAsmVariant, *MAI, *MCII, *MRI, *STI);
@@ -457,7 +460,7 @@ int main(int argc, char **argv) {
// Set up the AsmStreamer.
MCCodeEmitter *CE = nullptr;
MCAsmBackend *MAB = nullptr;
- if (ShowEncoding) {
+ if (ShowEncoding || T.isOSNaCl()) { // @LOCALMOD
CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx);
MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, MCPU);
}
@@ -475,6 +478,14 @@ int main(int argc, char **argv) {
*STI, RelaxAll));
if (NoExecStack)
Str->InitSections(true);
+ // @LOCALMOD-BEGIN
+ if (T.isOSNaCl()) {
+ // If the above non-localmod does InitSections unconditionally,
+ // we can use that.
+ Str->InitSections(NoExecStack);
+ initializeNaClMCStreamer(*Str.get(), Ctx, T);
+ }
+ // @LOCALMOD-END
}
int Res = 1;
« no previous file with comments | « tools/llvm-link/CMakeLists.txt ('k') | tools/llvm-nm/CMakeLists.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698