summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/GVN.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-12-15 20:02:24 +0000
committerDan Gohman <gohman@apple.com>2010-12-15 20:02:24 +0000
commita4fcd2418dc7f0b425a3c1b4fb873fbe4e2e7f72 (patch)
tree962968e998866ffb0bf159c77c4f85e4bc509f3a /llvm/lib/Transforms/Scalar/GVN.cpp
parenta51174af72e0ff8ccff9e5fc04b11a4c44f4d99c (diff)
downloadbcm5719-llvm-a4fcd2418dc7f0b425a3c1b4fb873fbe4e2e7f72.tar.gz
bcm5719-llvm-a4fcd2418dc7f0b425a3c1b4fb873fbe4e2e7f72.zip
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/Transforms/Scalar/GVN.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/GVN.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index 6b25eb5c0c9..d8629e68b8d 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -1076,7 +1076,7 @@ static int AnalyzeLoadFromClobberingMemInst(const Type *LoadTy, Value *LoadPtr,
Constant *Src = dyn_cast<Constant>(MTI->getSource());
if (Src == 0) return -1;
- GlobalVariable *GV = dyn_cast<GlobalVariable>(Src->getUnderlyingObject());
+ GlobalVariable *GV = dyn_cast<GlobalVariable>(GetUnderlyingObject(Src));
if (GV == 0 || !GV->isConstant()) return -1;
// See if the access is within the bounds of the transfer.
OpenPOWER on IntegriCloud