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 | a4fcd2418dc7f0b425a3c1b4fb873fbe4e2e7f72 (patch) | |
tree | 962968e998866ffb0bf159c77c4f85e4bc509f3a /llvm/lib/Analysis/ConstantFolding.cpp | |
parent | a51174af72e0ff8ccff9e5fc04b11a4c44f4d99c (diff) | |
download | llvm-a4fcd2418dc7f0b425a3c1b4fb873fbe4e2e7f72.zip llvm-a4fcd2418dc7f0b425a3c1b4fb873fbe4e2e7f72.tar.gz llvm-a4fcd2418dc7f0b425a3c1b4fb873fbe4e2e7f72.tar.bz2 |
Move Value::getUnderlyingObject to be a standalone
function so that it can live in Analysis instead of
VMCore.
llvm-svn: 121885
Diffstat (limited to 'llvm/lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index 68a55b6..73ee5cd 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/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()) |