summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/Analysis.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2019-08-02 17:43:45 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2019-08-02 17:43:45 +0000
commit4dcf8800e2b8c2e43a9022054c6463a775851226 (patch)
tree631f9f7b3fd0f1f9e994987e7156e774cf4ae026 /llvm/lib/CodeGen/Analysis.cpp
parent9ce5f41851fe8016b6495ef514d772c6bc72cad2 (diff)
downloadbcm5719-llvm-4dcf8800e2b8c2e43a9022054c6463a775851226.tar.gz
bcm5719-llvm-4dcf8800e2b8c2e43a9022054c6463a775851226.zip
CodeGen: Don't follow aliases when extracting type info.
This fixes a crash in the case where the type info object is an alias pointing to a non-zero offset within a global or is otherwise unanalyzable by the stripPointerCasts() function. Looking through the alias is not the right thing to do anyway for similar reasons as D65118. Differential Revision: https://reviews.llvm.org/D65314 llvm-svn: 367696
Diffstat (limited to 'llvm/lib/CodeGen/Analysis.cpp')
-rw-r--r--llvm/lib/CodeGen/Analysis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/Analysis.cpp b/llvm/lib/CodeGen/Analysis.cpp
index d158e70b86a..e72938ba9be 100644
--- a/llvm/lib/CodeGen/Analysis.cpp
+++ b/llvm/lib/CodeGen/Analysis.cpp
@@ -156,7 +156,7 @@ void llvm::computeValueLLTs(const DataLayout &DL, Type &Ty,
/// ExtractTypeInfo - Returns the type info, possibly bitcast, encoded in V.
GlobalValue *llvm::ExtractTypeInfo(Value *V) {
- V = V->stripPointerCasts();
+ V = V->stripPointerCastsNoFollowAliases();
GlobalValue *GV = dyn_cast<GlobalValue>(V);
GlobalVariable *Var = dyn_cast<GlobalVariable>(V);
OpenPOWER on IntegriCloud