[llvm-branch-commits] [cfe-branch] r244116 - Merging r243085:
Hans Wennborg
hans at hanshq.net
Wed Aug 5 13:40:28 PDT 2015
Author: hans
Date: Wed Aug 5 15:40:28 2015
New Revision: 244116
URL: http://llvm.org/viewvc/llvm-project?rev=244116&view=rev
Log:
Merging r243085:
------------------------------------------------------------------------
r243085 | steven_wu | 2015-07-23 19:12:43 -0700 (Thu, 23 Jul 2015) | 5 lines
Fix the cc1as crash when it outputs assembly
In clang cc1as_main, when the output file type is ?\226?\128?\156asm?\226?\128?\157, AsmStreamer
owns a formatted_raw_ostream which has a reference to FDOS
(raw_ostream), so AsmStreamer must be closed before FDOS is closed.
------------------------------------------------------------------------
Added:
cfe/branches/release_37/test/Misc/cc1as-asm.s
- copied unchanged from r243085, cfe/trunk/test/Misc/cc1as-asm.s
Modified:
cfe/branches/release_37/ (props changed)
cfe/branches/release_37/tools/driver/cc1as_main.cpp
Propchange: cfe/branches/release_37/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 5 15:40:28 2015
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:242244,242285,242293,242297,242313,242382,242422,242499,242574,242600,242660,242662,242667,242678,242766,242854,242905,242973,243018,243048,243098,243101,243105,243144,243153,243196,243206,243277,243280,243285,243289,243343,243417,243463,243538,243594,243642-243644,243964
+/cfe/trunk:242244,242285,242293,242297,242313,242382,242422,242499,242574,242600,242660,242662,242667,242678,242766,242854,242905,242973,243018,243048,243085,243098,243101,243105,243144,243153,243196,243206,243277,243280,243285,243289,243343,243417,243463,243538,243594,243642-243644,243964
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_37/tools/driver/cc1as_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_37/tools/driver/cc1as_main.cpp?rev=244116&r1=244115&r2=244116&view=diff
==============================================================================
--- cfe/branches/release_37/tools/driver/cc1as_main.cpp (original)
+++ cfe/branches/release_37/tools/driver/cc1as_main.cpp Wed Aug 5 15:40:28 2015
@@ -406,6 +406,9 @@ static bool ExecuteAssembler(AssemblerIn
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();
More information about the llvm-branch-commits
mailing list