[llvm] b01d393 - Fix MSVC int64_t -> uint64_t "narrowing conversion" warning.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 10 03:09:25 PDT 2021
Author: Simon Pilgrim
Date: 2021-06-10T10:55:24+01:00
New Revision: b01d393fc0350bf85e35d07d7b02fe6fdfffbdac
URL: https://github.com/llvm/llvm-project/commit/b01d393fc0350bf85e35d07d7b02fe6fdfffbdac
DIFF: https://github.com/llvm/llvm-project/commit/b01d393fc0350bf85e35d07d7b02fe6fdfffbdac.diff
LOG: Fix MSVC int64_t -> uint64_t "narrowing conversion" warning.
Added:
Modified:
llvm/lib/Transforms/Utils/MemoryOpRemark.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/MemoryOpRemark.cpp b/llvm/lib/Transforms/Utils/MemoryOpRemark.cpp
index 8ee7e0cb5e4a..77f8a98004e4 100644
--- a/llvm/lib/Transforms/Utils/MemoryOpRemark.cpp
+++ b/llvm/lib/Transforms/Utils/MemoryOpRemark.cpp
@@ -295,7 +295,7 @@ void MemoryOpRemark::visitVariable(const Value *V,
SmallVectorImpl<VariableInfo> &Result) {
if (auto *GV = dyn_cast<GlobalVariable>(V)) {
auto *Ty = cast<PointerType>(GV->getType())->getElementType();
- int64_t Size = DL.getTypeSizeInBits(Ty).getFixedSize();
+ uint64_t Size = DL.getTypeSizeInBits(Ty).getFixedSize();
VariableInfo Var{nameOrNone(GV), Size};
if (!Var.isEmpty())
Result.push_back(std::move(Var));
More information about the llvm-commits
mailing list