diff options
author | Owen Anderson <resistor@mac.com> | 2011-01-14 22:31:13 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-01-14 22:31:13 +0000 |
commit | e95a32ce40f8c189e939788a82fd54ca9280f973 (patch) | |
tree | 352c46810b7bedc8d8a3810507409302a61c9cc6 | |
parent | ca5f61676956cff088c225c3c166a589410b3101 (diff) |
Fix a false-positive warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123480 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/IPO/GlobalOpt.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index b74c12e488..07fe1b802e 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -2143,7 +2143,7 @@ static bool isSimpleEnoughPointerToCommit(Constant *C) { // external globals. return GV->hasUniqueInitializer(); - if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) + if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { // Handle a constantexpr gep. if (CE->getOpcode() == Instruction::GetElementPtr && isa<GlobalVariable>(CE->getOperand(0)) && @@ -2179,6 +2179,8 @@ static bool isSimpleEnoughPointerToCommit(Constant *C) { return true; } + } + return false; } |