[llvm] [nfc] Improve testability of PGOInstrumentationGen (PR #104490)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 16 09:43:02 PDT 2024


================
@@ -53,15 +53,18 @@ class PGOInstrumentationGenCreateVar
   bool ProfileSampling;
 };
 
+enum class PGOInstrumentationType { Invalid = 0, FDO, CSFDO, CTXPROF };
----------------
mtrofin wrote:

The guideline is for cases where one can ambiguously reference the enum member directly, hence the "unless defined in their own small namespace or inside a class" where one's forced to prefix with the container name (esp. in the case of a class). That's why I made it an `enum class`.

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


More information about the llvm-commits mailing list