mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
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
This commit is contained in:
@@ -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())
|
||||
|
Reference in New Issue
Block a user