diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2025-09-08 12:41:22 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-08 03:41:22 +0000 |
commit | 67823469bd1c5f5416c4b009a895dcaffa971b69 (patch) | |
tree | b44e387020fdd5d9f269db179f6dad6e3b6a4737 /llvm/tools/llvm-dwp/llvm-dwp.cpp | |
parent | 727e9f5ea5b2bb9d2fa37619ad2f19b21af7ce4d (diff) | |
download | llvm-67823469bd1c5f5416c4b009a895dcaffa971b69.zip llvm-67823469bd1c5f5416c4b009a895dcaffa971b69.tar.gz llvm-67823469bd1c5f5416c4b009a895dcaffa971b69.tar.bz2 |
MC: Add Triple overloads for more MC constructors (#157321)
Avoids more Triple->string->Triple round trip. This
is a continuation of f137c3d592e96330e450a8fd63ef7e8877fc1908
Diffstat (limited to 'llvm/tools/llvm-dwp/llvm-dwp.cpp')
-rw-r--r-- | llvm/tools/llvm-dwp/llvm-dwp.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/tools/llvm-dwp/llvm-dwp.cpp b/llvm/tools/llvm-dwp/llvm-dwp.cpp index e34fcad..61ba82d 100644 --- a/llvm/tools/llvm-dwp/llvm-dwp.cpp +++ b/llvm/tools/llvm-dwp/llvm-dwp.cpp @@ -217,20 +217,21 @@ int llvm_dwp_main(int argc, char **argv, const llvm::ToolContext &) { if (!TheTarget) return error(ErrorStr, Context); std::string TripleName = ErrOrTriple->getTriple(); + Triple TheTriple(TripleName); // Create all the MC Objects. - std::unique_ptr<MCRegisterInfo> MRI(TheTarget->createMCRegInfo(TripleName)); + std::unique_ptr<MCRegisterInfo> MRI(TheTarget->createMCRegInfo(TheTriple)); if (!MRI) return error(Twine("no register info for target ") + TripleName, Context); MCTargetOptions MCOptions = llvm::mc::InitMCTargetOptionsFromFlags(); std::unique_ptr<MCAsmInfo> MAI( - TheTarget->createMCAsmInfo(*MRI, TripleName, MCOptions)); + TheTarget->createMCAsmInfo(*MRI, TheTriple, MCOptions)); if (!MAI) return error("no asm info for target " + TripleName, Context); std::unique_ptr<MCSubtargetInfo> MSTI( - TheTarget->createMCSubtargetInfo(TripleName, "", "")); + TheTarget->createMCSubtargetInfo(TheTriple, "", "")); if (!MSTI) return error("no subtarget info for target " + TripleName, Context); |