Skip to content

Commit 3f267f3

Browse files
committed
fix auto copy
1 parent aa0068b commit 3f267f3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4369,7 +4369,7 @@ void FunctionStackPoisoner::processStaticAllocas() {
43694369
AI->replaceAllUsesWith(NewAllocaPtr);
43704370
}
43714371

4372-
auto TargetTriple = Triple(F.getParent()->getTargetTriple());
4372+
const auto &TargetTriple = Triple(F.getParent()->getTargetTriple());
43734373

43744374
// The left-most redzone has enough space for at least 4 pointers.
43754375
Value *BasePlus0 = IRB.CreateIntToPtr(LocalStackBase, IntptrPtrTy);

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ class MemorySanitizerOnSpirv {
783783
public:
784784
MemorySanitizerOnSpirv(Module &M)
785785
: M(M), C(M.getContext()), DL(M.getDataLayout()) {
786-
auto TargetTriple = Triple(M.getTargetTriple());
786+
const auto &TargetTriple = Triple(M.getTargetTriple());
787787
IsSPIRV = TargetTriple.isSPIROrSPIRV();
788788

789789
IntptrTy = DL.getIntPtrType(C);
@@ -1250,7 +1250,7 @@ PreservedAnalyses MemorySanitizerPass::run(Module &M,
12501250
if (checkIfAlreadyInstrumented(M, "nosanitize_memory"))
12511251
return PreservedAnalyses::all();
12521252
bool Modified = false;
1253-
auto TargetTriple = Triple(M.getTargetTriple());
1253+
const auto &TargetTriple = Triple(M.getTargetTriple());
12541254

12551255
if (!Options.Kernel && !TargetTriple.isSPIROrSPIRV()) {
12561256
insertModuleCtor(M);

0 commit comments

Comments
 (0)