aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/ConstantMerge.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-19 18:20:44 +0000
committerDan Gohman <gohman@apple.com>2009-08-19 18:20:44 +0000
commit8255573835970e7130ba93271972172fb335f2ec (patch)
tree23947e9eb17b05ed32f1b29c234ae91aa610fbcc /lib/Transforms/IPO/ConstantMerge.cpp
parentde0e587e63f71afb2ac53c9880c262089fe798bb (diff)
Use hasDefinitiveInitializer() instead of testing the same thing
by hand, and fix a few places that were using hasInitializer() that appear to depend on the initializer value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/ConstantMerge.cpp')
-rw-r--r--lib/Transforms/IPO/ConstantMerge.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/ConstantMerge.cpp b/lib/Transforms/IPO/ConstantMerge.cpp
index 237e6db1d3..c1a1045005 100644
--- a/lib/Transforms/IPO/ConstantMerge.cpp
+++ b/lib/Transforms/IPO/ConstantMerge.cpp
@@ -78,7 +78,7 @@ bool ConstantMerge::runOnModule(Module &M) {
}
// Only process constants with initializers.
- if (GV->isConstant() && GV->hasInitializer()) {
+ if (GV->isConstant() && GV->hasDefinitiveInitializer()) {
Constant *Init = GV->getInitializer();
// Check to see if the initializer is already known.