diff options
author | Nikita Popov <npopov@redhat.com> | 2025-03-12 17:35:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-12 17:35:09 +0100 |
commit | f137c3d592e96330e450a8fd63ef7e8877fc1908 (patch) | |
tree | 458344fadf0c64d777a03d2f326597b8c1282cb9 /llvm/lib/CodeGen/CommandFlags.cpp | |
parent | 71582c6667a6334c688734cae628e906b3c1ac1d (diff) | |
download | llvm-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.cpp | 2 |
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); |