diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO/GlobalConstifier.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/GlobalConstifier.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalConstifier.cpp b/llvm/lib/Transforms/IPO/GlobalConstifier.cpp index c30ec5f47c1..3478d9de41b 100644 --- a/llvm/lib/Transforms/IPO/GlobalConstifier.cpp +++ b/llvm/lib/Transforms/IPO/GlobalConstifier.cpp @@ -48,8 +48,8 @@ static bool isStoredThrough(Value *V) { if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { if (isStoredThrough(CE)) return true; - } else if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(C)) { - if (isStoredThrough(CPR)) return true; + } else if (GlobalValue *GV = dyn_cast<GlobalValue>(C)) { + if (isStoredThrough(GV)) return true; } else { // Must be an element of a constant array or something. return true; |