aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LTO/LTO.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-03-06 23:19:59 -0800
committerFangrui Song <i@maskray.me>2024-03-06 23:19:59 -0800
commita3319371970b599ef65ef1567c440fbdc3a330f4 (patch)
treed63abccdc3bddef6511079dc71585ca5485fa789 /llvm/lib/LTO/LTO.cpp
parent886ecb3078e5f3a5cffc70408a637242c223c363 (diff)
downloadllvm-a3319371970b599ef65ef1567c440fbdc3a330f4.zip
llvm-a3319371970b599ef65ef1567c440fbdc3a330f4.tar.gz
llvm-a3319371970b599ef65ef1567c440fbdc3a330f4.tar.bz2
[MC] Move CompressDebugSections/RelaxELFRelocations from TargetOptions/MCAsmInfo to MCTargetOptions
The convention is for such MC-specific options to reside in MCTargetOptions. However, CompressDebugSections/RelaxELFRelocations do not follow the convention: `CompressDebugSections` is defined in both TargetOptions and MCAsmInfo and there is forwarding complexity. Move the option to MCTargetOptions and hereby simplify the code. Rename the misleading RelaxELFRelocations to X86RelaxRelocations. llvm-mc -relax-relocations and llc -x86-relax-relocations can now be unified.
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 9c93ec7..b58418c 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -124,9 +124,9 @@ void llvm::computeLTOCacheKey(
AddString(Conf.CPU);
// FIXME: Hash more of Options. For now all clients initialize Options from
// command-line flags (which is unsupported in production), but may set
- // RelaxELFRelocations. The clang driver can also pass FunctionSections,
+ // X86RelaxRelocations. The clang driver can also pass FunctionSections,
// DataSections and DebuggerTuning via command line flags.
- AddUnsigned(Conf.Options.RelaxELFRelocations);
+ AddUnsigned(Conf.Options.MCOptions.X86RelaxRelocations);
AddUnsigned(Conf.Options.FunctionSections);
AddUnsigned(Conf.Options.DataSections);
AddUnsigned((unsigned)Conf.Options.DebuggerTuning);