[llvm] ec8fe7a - [LTO] Use enum class for ImportFailureReason (NFC) (#105564)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 16:53:05 PDT 2024


Author: Kazu Hirata
Date: 2024-08-21T16:53:01-07:00
New Revision: ec8fe7ad81af6c211fb26c34824092e5bca08f5e

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

LOG: [LTO] Use enum class for ImportFailureReason (NFC) (#105564)

It turns out that all uses of the enum values here are already
qualified like FunctionImporter::ImportFailureReason::None, so we can
switch to enum class without touching the rest of the codebase.

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/IPO/FunctionImport.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/IPO/FunctionImport.h b/llvm/include/llvm/Transforms/IPO/FunctionImport.h
index 6df597c300c180..5dad572532c8ae 100644
--- a/llvm/include/llvm/Transforms/IPO/FunctionImport.h
+++ b/llvm/include/llvm/Transforms/IPO/FunctionImport.h
@@ -42,7 +42,7 @@ class FunctionImporter {
 
   /// The 
diff erent reasons selectCallee will chose not to import a
   /// candidate.
-  enum ImportFailureReason {
+  enum class ImportFailureReason {
     None,
     // We can encounter a global variable instead of a function in rare
     // situations with SamplePGO. See comments where this failure type is


        


More information about the llvm-commits mailing list