diff options
-rw-r--r-- | clang/test/Misc/cc1as-asm.s | 3 | ||||
-rw-r--r-- | clang/tools/driver/cc1as_main.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Misc/cc1as-asm.s b/clang/test/Misc/cc1as-asm.s new file mode 100644 index 00000000000..af92644073a --- /dev/null +++ b/clang/test/Misc/cc1as-asm.s @@ -0,0 +1,3 @@ +// Run cc1as asm output path just to make sure it works +// REQUIRES: x86-registered-target +// RUN: %clang -cc1as -triple x86_64-apple-macosx10.10.0 -filetype asm %s -o /dev/null diff --git a/clang/tools/driver/cc1as_main.cpp b/clang/tools/driver/cc1as_main.cpp index aa92541953f..fd0fbb4c5a2 100644 --- a/clang/tools/driver/cc1as_main.cpp +++ b/clang/tools/driver/cc1as_main.cpp @@ -406,6 +406,9 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, Failed = Parser->Run(Opts.NoInitialTextSection); } + // Close Streamer first. + // It might have a reference to the output stream. + Str.reset(); // Close the output stream early. BOS.reset(); FDOS.reset(); |