aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-07-20 22:57:01 -0700
committerFangrui Song <i@maskray.me>2024-07-20 22:57:01 -0700
commit52e79ed1e078f69103dcd9234c2494e7dd64b5f7 (patch)
tree0d93aca07b164c24e22d6752dd96a6b584f7357b /llvm/lib/CodeGen/LLVMTargetMachine.cpp
parentaefe411dae156350721268161e6cac36a8d29333 (diff)
downloadllvm-52e79ed1e078f69103dcd9234c2494e7dd64b5f7.zip
llvm-52e79ed1e078f69103dcd9234c2494e7dd64b5f7.tar.gz
llvm-52e79ed1e078f69103dcd9234c2494e7dd64b5f7.tar.bz2
[MC] MCAsmStreamer: use MCTargetOptions
Some bool parameters duplicate MCTargetOptions and might cause inconsistency/confusion.
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index 562821d..819187c 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -167,25 +167,12 @@ Expected<std::unique_ptr<MCStreamer>> LLVMTargetMachine::createMCStreamer(
if (Options.MCOptions.ShowMCEncoding)
MCE.reset(getTarget().createMCCodeEmitter(MII, Context));
- bool UseDwarfDirectory = false;
- switch (Options.MCOptions.MCUseDwarfDirectory) {
- case MCTargetOptions::DisableDwarfDirectory:
- UseDwarfDirectory = false;
- break;
- case MCTargetOptions::EnableDwarfDirectory:
- UseDwarfDirectory = true;
- break;
- case MCTargetOptions::DefaultDwarfDirectory:
- UseDwarfDirectory = MAI.enableDwarfFileDirectoryDefault();
- break;
- }
-
std::unique_ptr<MCAsmBackend> MAB(
getTarget().createMCAsmBackend(STI, MRI, Options.MCOptions));
auto FOut = std::make_unique<formatted_raw_ostream>(Out);
MCStreamer *S = getTarget().createAsmStreamer(
- Context, std::move(FOut), Options.MCOptions.AsmVerbose,
- UseDwarfDirectory, InstPrinter, std::move(MCE), std::move(MAB),
+ Context, std::move(FOut), Options.MCOptions.AsmVerbose, true,
+ InstPrinter, std::move(MCE), std::move(MAB),
Options.MCOptions.ShowMCInst);
AsmStreamer.reset(S);
break;