[llvm] 8983127 - [Support] Use "static constexpr" for a constant in ProcessInfo (NFC) (#165192)

via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 26 22:10:01 PDT 2025


Author: Kazu Hirata
Date: 2025-10-26T22:09:55-07:00
New Revision: 8983127af58d9a121775759ba5cf1d2d78d27e68

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

LOG: [Support] Use "static constexpr" for a constant in ProcessInfo (NFC) (#165192)

Added: 
    

Modified: 
    llvm/include/llvm/Support/Program.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/Program.h b/llvm/include/llvm/Support/Program.h
index da5685dd0b8b5..53c2e7597b2b4 100644
--- a/llvm/include/llvm/Support/Program.h
+++ b/llvm/include/llvm/Support/Program.h
@@ -45,7 +45,7 @@ typedef procid_t process_t;
 
 /// This struct encapsulates information about a process.
 struct ProcessInfo {
-  enum : procid_t { InvalidPid = 0 };
+  static constexpr procid_t InvalidPid = 0;
 
   procid_t Pid;      /// The process identifier.
   process_t Process; /// Platform-dependent process object.


        


More information about the llvm-commits mailing list