[llvm] [AMDGPU][Attributor] Add `ThinOrFullLTOPhase` as an argument (PR #123994)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri May 2 10:35:32 PDT 2025
================
@@ -86,6 +86,23 @@ enum class ThinOrFullLTOPhase {
FullLTOPostLink
};
+#ifndef NDEBUG
+static inline const char *to_string(ThinOrFullLTOPhase Phase) {
+ switch (Phase) {
+ case ThinOrFullLTOPhase::None:
+ return "None";
+ case ThinOrFullLTOPhase::ThinLTOPreLink:
+ return "ThinLTOPreLink";
+ case ThinOrFullLTOPhase::ThinLTOPostLink:
+ return "ThinLTOPostLink";
+ case ThinOrFullLTOPhase::FullLTOPreLink:
+ return "FullLTOPreLink";
+ case ThinOrFullLTOPhase::FullLTOPostLink:
+ return "FullLTOPostLink";
+ }
+}
----------------
RKSimon wrote:
MSVC is complaining :) Can you just move the implementation to Pass.cpp (and drop constexpr)?
https://github.com/llvm/llvm-project/pull/123994
More information about the llvm-commits
mailing list