aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorAlexis Engelke <engelke@in.tum.de>2024-08-13 12:15:13 +0200
committerGitHub <noreply@github.com>2024-08-13 12:15:13 +0200
commit2b077ede083b4185f51a2fe648a27e4c85352a2f (patch)
treeeca30369e74cd89c30d3acb32f022872807b4174 /llvm/lib/MC/MCObjectFileInfo.cpp
parent3fa946a8442e1b8d4fdbdc9b9b7e8c12a0f77dcc (diff)
downloadllvm-2b077ede083b4185f51a2fe648a27e4c85352a2f.zip
llvm-2b077ede083b4185f51a2fe648a27e4c85352a2f.tar.gz
llvm-2b077ede083b4185f51a2fe648a27e4c85352a2f.tar.bz2
[MC] Avoid useless triple copy (#103026)
Copying a triple is cheap, but not free, so let's not do that if there's no reason to do so. Trivial cleanup.
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--llvm/lib/MC/MCObjectFileInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp
index 6dadd97..f37e138 100644
--- a/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -1024,7 +1024,7 @@ void MCObjectFileInfo::initMCObjectFileInfo(MCContext &MCCtx, bool PIC,
DwarfAccelNamespaceSection = nullptr; // Used only by selected targets.
DwarfAccelTypesSection = nullptr; // Used only by selected targets.
- Triple TheTriple = Ctx->getTargetTriple();
+ const Triple &TheTriple = Ctx->getTargetTriple();
switch (Ctx->getObjectFileType()) {
case MCContext::IsMachO:
initMachOMCObjectFileInfo(TheTriple);