[llvm] ffee804 - Correctly track GCOVProfiling IR update

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 1 00:31:13 PDT 2020


Author: serge-sans-paille
Date: 2020-07-01T09:30:59+02:00
New Revision: ffee8040534495fa739808e6c66a7fc73eca27bb

URL: https://github.com/llvm/llvm-project/commit/ffee8040534495fa739808e6c66a7fc73eca27bb
DIFF: https://github.com/llvm/llvm-project/commit/ffee8040534495fa739808e6c66a7fc73eca27bb.diff

LOG: Correctly track GCOVProfiling IR update

Differential Revision: https://reviews.llvm.org/D82742

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp

Removed: 
    


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


        


More information about the llvm-commits mailing list