Skip to content

Commit

Permalink
[cc1as] Close MCAsmParser before MCStreamer
Browse files Browse the repository at this point in the history
This is a pre-existing problem exposed by D90511 (asan failurs with
clang/test/Driver/relax.s and a few other tests).
  • Loading branch information
MaskRay committed Nov 2, 2020
1 parent b68994b commit bc847b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/tools/driver/cc1as_main.cpp
Expand Up @@ -520,8 +520,8 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
Failed = Parser->Run(Opts.NoInitialTextSection);
}

// Close Streamer first.
// It might have a reference to the output stream.
// Parser has a reference to the output stream (Str), so close Parser first.
Parser.reset();
Str.reset();
// Close the output stream early.
BOS.reset();
Expand Down

0 comments on commit bc847b3

Please sign in to comment.