aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LTO/LTO.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2023-09-14 14:10:14 -0700
committerGitHub <noreply@github.com>2023-09-14 14:10:14 -0700
commit0a1aa6cda2758b0926a95f87d39ffefb1cb90200 (patch)
tree766dc35b70235864f287a9f0a2cef45d487203ad /llvm/lib/LTO/LTO.cpp
parentae84b160d2fe61a7211817262ce717a17d27c0ae (diff)
downloadllvm-0a1aa6cda2758b0926a95f87d39ffefb1cb90200.zip
llvm-0a1aa6cda2758b0926a95f87d39ffefb1cb90200.tar.gz
llvm-0a1aa6cda2758b0926a95f87d39ffefb1cb90200.tar.bz2
[NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes (#66295)
This will make it easy for callers to see issues with and fix up calls to createTargetMachine after a future change to the params of TargetMachine. This matches other nearby enums. For downstream users, this should be a fairly straightforward replacement, e.g. s/CodeGenOpt::Aggressive/CodeGenOptLevel::Aggressive or s/CGFT_/CodeGenFileType::
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r--llvm/lib/LTO/LTO.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index 2a3f44d..3e008ed 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -142,8 +142,8 @@ void llvm::computeLTOCacheKey(
AddUnsigned(-1);
for (const auto &S : Conf.MllvmArgs)
AddString(S);
- AddUnsigned(Conf.CGOptLevel);
- AddUnsigned(Conf.CGFileType);
+ AddUnsigned(static_cast<int>(Conf.CGOptLevel));
+ AddUnsigned(static_cast<int>(Conf.CGFileType));
AddUnsigned(Conf.OptLevel);
AddUnsigned(Conf.Freestanding);
AddString(Conf.OptPipeline);