summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Globals.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2017-05-15 18:28:29 +0000
committerTeresa Johnson <tejohnson@google.com>2017-05-15 18:28:29 +0000
commit41db92f9ae038a62fa0c8994746ad951e1ab0295 (patch)
tree4ffe0196a34d86017b586d89ffef3f718d258e90 /llvm/lib/IR/Globals.cpp
parentce4b17fdf3912e955e9ace443a687b9df4e16a7d (diff)
downloadbcm5719-llvm-41db92f9ae038a62fa0c8994746ad951e1ab0295.tar.gz
bcm5719-llvm-41db92f9ae038a62fa0c8994746ad951e1ab0295.zip
Add support for handling ifuncs to GlobalValue::getBaseObject
Summary: All GlobalIndirectSymbol types (not just GlobalAlias) should return their base object. Without this patch LTO would warn "Unable to determine comdat of alias!" for an ifunc. Reviewers: pcc Subscribers: mehdi_amini, inglorion, llvm-commits Differential Revision: https://reviews.llvm.org/D33202 llvm-svn: 303096
Diffstat (limited to 'llvm/lib/IR/Globals.cpp')
-rw-r--r--llvm/lib/IR/Globals.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Globals.cpp b/llvm/lib/IR/Globals.cpp
index 10ba1a64ad0..17d27b016cf 100644
--- a/llvm/lib/IR/Globals.cpp
+++ b/llvm/lib/IR/Globals.cpp
@@ -255,7 +255,7 @@ bool GlobalValue::canIncreaseAlignment() const {
const GlobalObject *GlobalValue::getBaseObject() const {
if (auto *GO = dyn_cast<GlobalObject>(this))
return GO;
- if (auto *GA = dyn_cast<GlobalAlias>(this))
+ if (auto *GA = dyn_cast<GlobalIndirectSymbol>(this))
return GA->getBaseObject();
return nullptr;
}
OpenPOWER on IntegriCloud