aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r--lib/Target/ARM/ARMAsmPrinter.cpp15
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp10
2 files changed, 13 insertions, 12 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp
index c48df8a96f..0143d95c19 100644
--- a/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -40,6 +40,7 @@
#include "llvm/MC/MCELFStreamer.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstBuilder.h"
+#include "llvm/MC/MCNaCl.h"
#include "llvm/MC/MCObjectStreamer.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCStreamer.h"
@@ -733,11 +734,15 @@ void ARMAsmPrinter::EmitStartOfAsmFile(Module &M) {
emitAttributes();
// @LOCALMOD-BEGIN
- if (Subtarget->isTargetNaCl() && OutStreamer.hasRawTextSupport()) {
- std::string str;
- raw_string_ostream OS(str);
- EmitSFIHeaders(OS);
- OutStreamer.EmitRawText(StringRef(OS.str()));
+ if (Subtarget->isTargetNaCl()) {
+ if (OutStreamer.hasRawTextSupport()) {
+ std::string str;
+ raw_string_ostream OS(str);
+ EmitSFIHeaders(OS);
+ OutStreamer.EmitRawText(StringRef(OS.str()));
+ }
+ initializeNaClMCStreamer(OutStreamer, OutContext,
+ Subtarget->getTargetTriple());
}
// @LOCALMOD-END
}
diff --git a/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp b/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
index 2c155aaf40..3d6e99f664 100644
--- a/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
+++ b/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
@@ -208,13 +208,9 @@ static MCStreamer *createMCStreamer(const Target &T, StringRef TT,
if (TheTriple.isOSWindows()) {
llvm_unreachable("ARM does not support Windows COFF format");
}
- // @LOCALMOD-BEGIN
- MCStreamer *Streamer = createARMELFStreamer(Ctx, MAB, OS, Emitter, false,
- NoExecStack, TheTriple.getArch() == Triple::thumb);
- if (TheTriple.isOSNaCl())
- Streamer->EmitBundleAlignMode(4);
- return Streamer;
- // @LOCALMOD-END
+
+ return createARMELFStreamer(Ctx, MAB, OS, Emitter, false, NoExecStack,
+ TheTriple.getArch() == Triple::thumb);
}
static MCInstPrinter *createARMMCInstPrinter(const Target &T,