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

Unified Diff: tools/llvm-mc/llvm-mc.cpp

Issue 1181263004: subclassed MCAsmStreamer (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 6 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 | « test/MC/X86/nacl-test-ret.s ('k') | no next file » | 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 96d3206a78316c1cca6bdad27097c095111352f3..049db4ce490093c7a352f9e8b278a1db1eb5242c 100644
--- a/tools/llvm-mc/llvm-mc.cpp
+++ b/tools/llvm-mc/llvm-mc.cpp
@@ -466,10 +466,21 @@ int main(int argc, char **argv) {
MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, MCPU);
}
auto FOut = llvm::make_unique<formatted_raw_ostream>(*OS);
- Str.reset(TheTarget->createAsmStreamer(
- Ctx, std::move(FOut), /*asmverbose*/ true,
- /*useDwarfDirectory*/ true, IP, CE, MAB, ShowInst));
+ if (T.isOSNaCl()) {
+ Str.reset(TheTarget->createNaClAsmStreamer(
+ Ctx, std::move(FOut), /*asmverbose*/ true,
+ /*useDwarfDirectory*/ true, IP, CE, MAB, ShowInst));
+ if (NoExecStack)
+ Str->InitSections(true);
+
+ Str->InitSections(NoExecStack);
+ initializeNaClMCStreamer(*Str.get(), Ctx, T);
+ } else {
+ Str.reset(TheTarget->createAsmStreamer(
+ Ctx, std::move(FOut), /*asmverbose*/ true,
+ /*useDwarfDirectory*/ true, IP, CE, MAB, ShowInst));
+ }
} else if (FileType == OFT_Null) {
Str.reset(TheTarget->createNullStreamer(Ctx));
} else {
« no previous file with comments | « test/MC/X86/nacl-test-ret.s ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698