aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CommandFlags.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2025-03-12 17:35:09 +0100
committerGitHub <noreply@github.com>2025-03-12 17:35:09 +0100
commitf137c3d592e96330e450a8fd63ef7e8877fc1908 (patch)
tree458344fadf0c64d777a03d2f326597b8c1282cb9 /llvm/lib/CodeGen/CommandFlags.cpp
parent71582c6667a6334c688734cae628e906b3c1ac1d (diff)
downloadllvm-f137c3d592e96330e450a8fd63ef7e8877fc1908.zip
llvm-f137c3d592e96330e450a8fd63ef7e8877fc1908.tar.gz
llvm-f137c3d592e96330e450a8fd63ef7e8877fc1908.tar.bz2
[TargetRegistry] Accept Triple in createTargetMachine() (NFC) (#130940)
This avoids doing a Triple -> std::string -> Triple round trip in lots of places, now that the Module stores a Triple.
Diffstat (limited to 'llvm/lib/CodeGen/CommandFlags.cpp')
-rw-r--r--llvm/lib/CodeGen/CommandFlags.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/CommandFlags.cpp b/llvm/lib/CodeGen/CommandFlags.cpp
index 023656c..9512f79 100644
--- a/llvm/lib/CodeGen/CommandFlags.cpp
+++ b/llvm/lib/CodeGen/CommandFlags.cpp
@@ -764,7 +764,7 @@ codegen::createTargetMachineForTriple(StringRef TargetTriple,
if (!TheTarget)
return createStringError(inconvertibleErrorCode(), Error);
auto *Target = TheTarget->createTargetMachine(
- TheTriple.getTriple(), codegen::getCPUStr(), codegen::getFeaturesStr(),
+ TheTriple, codegen::getCPUStr(), codegen::getFeaturesStr(),
codegen::InitTargetOptionsFromCodeGenFlags(TheTriple),
codegen::getExplicitRelocModel(), codegen::getExplicitCodeModel(),
OptLevel);