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

via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 26 20:37:42 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-support

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/165192.diff


1 Files Affected:

- (modified) llvm/include/llvm/Support/Program.h (+1-1) 


``````````diff
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.

``````````

</details>


https://github.com/llvm/llvm-project/pull/165192


More information about the llvm-commits mailing list