Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4369,7 +4369,7 @@ void FunctionStackPoisoner::processStaticAllocas() {
AI->replaceAllUsesWith(NewAllocaPtr);
}

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

// The left-most redzone has enough space for at least 4 pointers.
Value *BasePlus0 = IRB.CreateIntToPtr(LocalStackBase, IntptrPtrTy);
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ class MemorySanitizerOnSpirv {
public:
MemorySanitizerOnSpirv(Module &M)
: M(M), C(M.getContext()), DL(M.getDataLayout()) {
auto TargetTriple = Triple(M.getTargetTriple());
const auto &TargetTriple = Triple(M.getTargetTriple());
IsSPIRV = TargetTriple.isSPIROrSPIRV();

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

if (!Options.Kernel && !TargetTriple.isSPIROrSPIRV()) {
insertModuleCtor(M);
Expand Down