[llvm] ded9f39 - Fix 5bb06c7cce6bdcffb3ced29fa733c0dbb1b63c41 build on windows.
Andrew Browne via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 12 01:23:57 PST 2022
Author: Andrew Browne
Date: 2022-12-12T01:23:34-08:00
New Revision: ded9f398c77e85acbc300245ef286602e2fe7378
URL: https://github.com/llvm/llvm-project/commit/ded9f398c77e85acbc300245ef286602e2fe7378
DIFF: https://github.com/llvm/llvm-project/commit/ded9f398c77e85acbc300245ef286602e2fe7378.diff
LOG: 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.
```
Added:
Modified:
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
index b62f15014bf6..d5896246a367 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());
}
More information about the llvm-commits
mailing list