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 /clang/lib/CodeGen/BackendUtil.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 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 62a0e3c..7557cb8 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -595,7 +595,7 @@ static void setCommandLineOpts(const CodeGenOptions &CodeGenOpts) { void EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) { // Create the TargetMachine for generating code. std::string Error; - std::string Triple = TheModule->getTargetTriple().str(); + const llvm::Triple &Triple = TheModule->getTargetTriple(); const llvm::Target *TheTarget = TargetRegistry::lookupTarget(Triple, Error); if (!TheTarget) { if (MustCreateTM) |