[llvm] [NFC][CodeGen] Change CodeGenOpt::{Level,FileType} into enum classes (PR #66295)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 15:50:53 PDT 2023


================
@@ -54,7 +54,7 @@ namespace llvm {
   /// Type for the unique integer IDs of code generation optimization levels.
   using IDType = int;
   /// Code generation optimization level.
-  enum Level : IDType {
+  enum class Level : IDType {
----------------
rnk wrote:

Would you consider dropping the `namespace CodeGenOpt` and making this `enum class CodeGenOptLevel`? Then run `s/CodeGenOpt::Level/CodeGenOptLevel/` across the codebase. It is similar to `CodeGenFileType`. I would leave `parseLevel` and `getLevel` in their namespace.

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


More information about the llvm-commits mailing list