File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1241,9 +1241,13 @@ static void performEndOfPipelineActions(CompilerInstance &Instance) {
1241
1241
if (auto *stats = ctx.Stats )
1242
1242
countASTStats (*stats, Instance);
1243
1243
1244
+ // Report mangling stats if there was no error.
1245
+ if (!ctx.hadError ())
1246
+ Mangle::printManglingStats ();
1247
+
1244
1248
// Make sure we didn't load a module during a parse-only invocation, unless
1245
1249
// it's -emit-imported-modules, which can load modules.
1246
- auto action = Instance. getInvocation (). getFrontendOptions () .RequestedAction ;
1250
+ auto action = opts .RequestedAction ;
1247
1251
if (FrontendOptions::shouldActionOnlyParse (action) &&
1248
1252
action != FrontendOptions::ActionType::EmitImportedModules) {
1249
1253
assert (ctx.getNumLoadedModules () == 1 &&
@@ -2219,10 +2223,6 @@ int swift::performFrontend(ArrayRef<const char *> Args,
2219
2223
2220
2224
int ReturnValue = 0 ;
2221
2225
bool HadError = performCompile (*Instance, Args, ReturnValue, observer);
2222
- if (!HadError) {
2223
- Mangle::printManglingStats ();
2224
- }
2225
-
2226
2226
if (!HadError && !Invocation.getFrontendOptions ().DumpAPIPath .empty ()) {
2227
2227
HadError = dumpAPI (Instance->getMainModule (),
2228
2228
Invocation.getFrontendOptions ().DumpAPIPath );
You can’t perform that action at this time.
0 commit comments