diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 955bcc2d3ff27..bd8c0f197c94a 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -1322,7 +1322,7 @@ static void ExtendSpirKernelArgs(Module &M, FunctionAnalysisManager &FAM, SmallVector SpirFixupKernels; SmallVector SpirKernelsMetadata; - auto DL = M.getDataLayout(); + const auto &DL = M.getDataLayout(); Type *IntptrTy = DL.getIntPtrType(M.getContext()); // SpirKernelsMetadata only saves fixed kernels, and is described by