diff options
author | Arthur Eubanks <aeubanks@google.com> | 2023-09-14 14:10:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 14:10:14 -0700 |
commit | 0a1aa6cda2758b0926a95f87d39ffefb1cb90200 (patch) | |
tree | 766dc35b70235864f287a9f0a2cef45d487203ad /llvm/lib/Target/TargetMachine.cpp | |
parent | ae84b160d2fe61a7211817262ce717a17d27c0ae (diff) | |
download | llvm-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/Target/TargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/TargetMachine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index 323b7c0..0b4a251 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -198,9 +198,9 @@ TLSModel::Model TargetMachine::getTLSModel(const GlobalValue *GV) const { } /// Returns the optimization level: None, Less, Default, or Aggressive. -CodeGenOpt::Level TargetMachine::getOptLevel() const { return OptLevel; } +CodeGenOptLevel TargetMachine::getOptLevel() const { return OptLevel; } -void TargetMachine::setOptLevel(CodeGenOpt::Level Level) { OptLevel = Level; } +void TargetMachine::setOptLevel(CodeGenOptLevel Level) { OptLevel = Level; } TargetTransformInfo TargetMachine::getTargetTransformInfo(const Function &F) const { |