summaryrefslogtreecommitdiff
path: root/mlir/lib/Target/LLVM/ModuleToObject.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 /mlir/lib/Target/LLVM/ModuleToObject.cpp
parent71582c6667a6334c688734cae628e906b3c1ac1d (diff)
[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 'mlir/lib/Target/LLVM/ModuleToObject.cpp')
-rw-r--r--mlir/lib/Target/LLVM/ModuleToObject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Target/LLVM/ModuleToObject.cpp b/mlir/lib/Target/LLVM/ModuleToObject.cpp
index 7f90167cd556..04e870acfc5f 100644
--- a/mlir/lib/Target/LLVM/ModuleToObject.cpp
+++ b/mlir/lib/Target/LLVM/ModuleToObject.cpp
@@ -68,8 +68,8 @@ ModuleToObject::getOrCreateTargetMachine() {
}
// Create the target machine using the target.
- targetMachine.reset(
- target->createTargetMachine(triple, chip, features, {}, {}));
+ targetMachine.reset(target->createTargetMachine(llvm::Triple(triple), chip,
+ features, {}, {}));
if (!targetMachine)
return std::nullopt;
return targetMachine.get();