diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp --- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -844,7 +844,6 @@ continue; // TODO: Functions using scope-based EH are currently not supported. if (isUsingScopeBasedEH(F)) continue; - if (!Result) Result = true; DenseMap, unsigned> EdgeToCounter; unsigned Edges = 0; @@ -939,6 +938,7 @@ Builder.CreateRetVoid(); appendToGlobalCtors(*M, F, 0); + Result = true; } return Result;