summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2018-12-23 02:50:08 +0000
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2018-12-23 02:50:08 +0000
commit1329cf1791d48fa6559f4eec34ac3bab2b5d34c8 (patch)
treec9dbf40b75e09111aca6d9b66f274588bea27bcb /llvm/lib
parent685e781d5505e07dece8731ae5e1f3df1bfb5cbe (diff)
downloadbcm5719-llvm-1329cf1791d48fa6559f4eec34ac3bab2b5d34c8.tar.gz
bcm5719-llvm-1329cf1791d48fa6559f4eec34ac3bab2b5d34c8.zip
[Lint] Use LocationSize instead of ints; NFC
Keeping these patches super small so they're easily post-commit verifiable, as requested in D44748. llvm-svn: 350015
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/Lint.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/Lint.cpp b/llvm/lib/Analysis/Lint.cpp
index db919bd233b..5d0a627f842 100644
--- a/llvm/lib/Analysis/Lint.cpp
+++ b/llvm/lib/Analysis/Lint.cpp
@@ -330,12 +330,12 @@ void Lint::visitCallSite(CallSite CS) {
// Check that the memcpy arguments don't overlap. The AliasAnalysis API
// isn't expressive enough for what we really want to do. Known partial
// overlap is not distinguished from the case where nothing is known.
- uint64_t Size = 0;
+ auto Size = LocationSize::unknown();
if (const ConstantInt *Len =
dyn_cast<ConstantInt>(findValue(MCI->getLength(),
/*OffsetOk=*/false)))
if (Len->getValue().isIntN(32))
- Size = Len->getValue().getZExtValue();
+ Size = LocationSize::precise(Len->getValue().getZExtValue());
Assert(AA->alias(MCI->getSource(), Size, MCI->getDest(), Size) !=
MustAlias,
"Undefined behavior: memcpy source and destination overlap", &I);
OpenPOWER on IntegriCloud