[llvm] ed801ab - [Transforms] Fix an unused variable warning

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 23:11:24 PDT 2024


Author: Kazu Hirata
Date: 2024-03-27T23:11:16-07:00
New Revision: ed801ab460f387a4e125ccfaa5ccdea1dd499ebf

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

LOG: [Transforms] Fix an unused variable warning

  llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h:89:28:
  error: private field 'LTOPhase' is not used
  [-Werror,-Wunused-private-field]

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h b/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
index bd7496a799c579..048b97c34ee2ae 100644
--- a/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
+++ b/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
@@ -134,6 +134,7 @@ class PseudoProbeManager {
                 F.hasFnAttribute("profile-checksum-mismatch")) &&
            "In post-link, profile checksum matching state doesn't match "
            "function 'profile-checksum-mismatch' attribute.");
+    (void)LTOPhase;
     // The desc for import function is unavailable. Check the function attribute
     // for mismatch.
     return (!Desc && !F.hasFnAttribute("profile-checksum-mismatch")) ||


        


More information about the llvm-commits mailing list