aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Analysis
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2025-05-27 12:23:12 -0700
committerGitHub <noreply@github.com>2025-05-27 12:23:12 -0700
commit645f0e6723f21aef8099d8d65f5719fd9feb125e (patch)
treef39b5cfe6a4d9c59ab7cd07c77943ae2c4275c12 /llvm/unittests/Analysis
parentea8838446678a1163b361b0598b1259e9f476900 (diff)
downloadllvm-645f0e6723f21aef8099d8d65f5719fd9feb125e.zip
llvm-645f0e6723f21aef8099d8d65f5719fd9feb125e.tar.gz
llvm-645f0e6723f21aef8099d8d65f5719fd9feb125e.tar.bz2
IR: Make Module::getOrInsertGlobal() return a GlobalVariable.
After pointer element types were removed this function can only return a GlobalVariable, so reflect that in the type and comments and clean up callers. Reviewers: nikic Reviewed By: nikic Pull Request: https://github.com/llvm/llvm-project/pull/141323
Diffstat (limited to 'llvm/unittests/Analysis')
-rw-r--r--llvm/unittests/Analysis/BasicAliasAnalysisTest.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/unittests/Analysis/BasicAliasAnalysisTest.cpp b/llvm/unittests/Analysis/BasicAliasAnalysisTest.cpp
index 4e96b66..f5c73ff 100644
--- a/llvm/unittests/Analysis/BasicAliasAnalysisTest.cpp
+++ b/llvm/unittests/Analysis/BasicAliasAnalysisTest.cpp
@@ -81,8 +81,7 @@ TEST_F(BasicAATest, AliasInstWithObjectOfImpreciseSize) {
Value *IncomingI32Ptr = F->arg_begin();
- auto *GlobalPtr =
- cast<GlobalVariable>(M.getOrInsertGlobal("some_global", B.getInt8Ty()));
+ auto *GlobalPtr = M.getOrInsertGlobal("some_global", B.getInt8Ty());
// Without sufficiently restricted linkage/an init, some of the object size
// checking bits get more conservative.