diff options
author | Dan Gohman <gohman@apple.com> | 2010-12-15 20:02:24 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-12-15 20:02:24 +0000 |
commit | 5034dd318a9dfa0dc45a3ac01e58e60f2aa2498d (patch) | |
tree | 85f466bd781bcb1865313cc739b252f02116c838 /lib/Analysis/ConstantFolding.cpp | |
parent | d5f4bc2c339a88c331dd7ecaa36833358bc1d3b1 (diff) |
Move Value::getUnderlyingObject to be a standalone
function so that it can live in Analysis instead of
VMCore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121885 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | lib/Analysis/ConstantFolding.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp index 68a55b6b94..73ee5cd1c3 100644 --- a/lib/Analysis/ConstantFolding.cpp +++ b/lib/Analysis/ConstantFolding.cpp @@ -467,7 +467,7 @@ Constant *llvm::ConstantFoldLoadFromConstPtr(Constant *C, // If this load comes from anywhere in a constant global, and if the global // is all undef or zero, we know what it loads. - if (GlobalVariable *GV = dyn_cast<GlobalVariable>(CE->getUnderlyingObject())){ + if (GlobalVariable *GV = dyn_cast<GlobalVariable>(GetUnderlyingObject(CE))){ if (GV->isConstant() && GV->hasDefinitiveInitializer()) { const Type *ResTy = cast<PointerType>(C->getType())->getElementType(); if (GV->getInitializer()->isNullValue()) |