summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Globals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Globals.cpp')
-rw-r--r--llvm/lib/IR/Globals.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/Globals.cpp b/llvm/lib/IR/Globals.cpp
index 5ad96b2ce3a..ee882c3eace 100644
--- a/llvm/lib/IR/Globals.cpp
+++ b/llvm/lib/IR/Globals.cpp
@@ -40,6 +40,10 @@ void GlobalValue::Dematerialize() {
getParent()->Dematerialize(this);
}
+const DataLayout *GlobalValue::getDataLayout() const {
+ return getParent()->getDataLayout();
+}
+
/// Override destroyConstant to make sure it doesn't get called on
/// GlobalValue's because they shouldn't be treated like other constants.
void GlobalValue::destroyConstant() {
OpenPOWER on IntegriCloud