From ded9f398c77e85acbc300245ef286602e2fe7378 Mon Sep 17 00:00:00 2001 From: Andrew Browne Date: Mon, 12 Dec 2022 01:22:05 -0800 Subject: [PATCH] Fix 5bb06c7cce6bdcffb3ced29fa733c0dbb1b63c41 build on windows. ``` C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\lib\Transforms\Instrumentation\DataFlowSanitizer.cpp(1062,37): error: call to constructor of 'llvm::APInt' is ambiguous llvm::APInt(32, dbgloc.getLine(), false)); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\include\llvm/ADT/APInt.h(108,3): note: candidate constructor APInt(unsigned numBits, uint64_t val, bool isSigned = false) ^ C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\include\llvm/ADT/APInt.h(134,3): note: candidate constructor APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]); ^ 1 error generated. ``` --- llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp index b62f150..d589624 100644 --- a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp @@ -1054,12 +1054,12 @@ void DFSanFunction::addReachesFunctionCallbacksIfEnabled(IRBuilder<> &IRB, llvm::Value *FilePathPtr; if (dbgloc.get() == nullptr) { - CILine = llvm::ConstantInt::get(I.getContext(), llvm::APInt(32, 0, false)); + CILine = llvm::ConstantInt::get(I.getContext(), llvm::APInt(32, 0)); FilePathPtr = IRB.CreateGlobalStringPtr( I.getFunction()->getParent()->getSourceFileName()); } else { CILine = llvm::ConstantInt::get(I.getContext(), - llvm::APInt(32, dbgloc.getLine(), false)); + llvm::APInt(32, dbgloc.getLine())); FilePathPtr = IRB.CreateGlobalStringPtr(dbgloc->getFilename()); } -- 2.7.4