summaryrefslogtreecommitdiff
path: root/tools/driver/cc1as_main.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-09-06 18:36:24 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-09-06 18:36:24 +0000
commit36c5ade2f4674b544039d78db4c466756cf142b0 (patch)
tree3d3ed1e1987dbe6444294b1b4e249814b97b97a5 /tools/driver/cc1as_main.cpp
parent51ece4aae5857052d224ce52277924c74685714e (diff)
Notes
Diffstat (limited to 'tools/driver/cc1as_main.cpp')
-rw-r--r--tools/driver/cc1as_main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp
index aa92541953fa..fd0fbb4c5a26 100644
--- a/tools/driver/cc1as_main.cpp
+++ b/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();