aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/StackProtector.cpp
diff options
context:
space:
mode:
authorHarvin Iriawan <25712785+harviniriawan@users.noreply.github.com>2023-10-24 18:18:51 +0100
committerGitHub <noreply@github.com>2023-10-24 18:18:51 +0100
commit211dc4ad400cd86a0c19742c738264462c169e1b (patch)
tree6c9c9d35905e46d2ffa86037d71fd301fc251dcb /llvm/lib/CodeGen/StackProtector.cpp
parent86b4388c90726f4d8b3364969780e91f7e38a9aa (diff)
downloadllvm-211dc4ad400cd86a0c19742c738264462c169e1b.zip
llvm-211dc4ad400cd86a0c19742c738264462c169e1b.tar.gz
llvm-211dc4ad400cd86a0c19742c738264462c169e1b.tar.bz2
[Analysis] Add Scalable field in MemoryLocation.h (#69716)
This is the first of a series of patch to improve Alias Analysis on Scalable quantities. Keep Scalable information from TypeSize which will be used in Alias Analysis.
Diffstat (limited to 'llvm/lib/CodeGen/StackProtector.cpp')
-rw-r--r--llvm/lib/CodeGen/StackProtector.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/StackProtector.cpp b/llvm/lib/CodeGen/StackProtector.cpp
index 387b653..3ba85bc 100644
--- a/llvm/lib/CodeGen/StackProtector.cpp
+++ b/llvm/lib/CodeGen/StackProtector.cpp
@@ -178,8 +178,7 @@ static bool HasAddressTaken(const Instruction *AI, TypeSize AllocSize,
// the bounds of the allocated object.
std::optional<MemoryLocation> MemLoc = MemoryLocation::getOrNone(I);
if (MemLoc && MemLoc->Size.hasValue() &&
- !TypeSize::isKnownGE(AllocSize,
- TypeSize::getFixed(MemLoc->Size.getValue())))
+ !TypeSize::isKnownGE(AllocSize, MemLoc->Size.getValue()))
return true;
switch (I->getOpcode()) {
case Instruction::Store: