aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-06-02 21:48:15 +0000
committerDan Gohman <gohman@apple.com>2009-06-02 21:48:15 +0000
commitebe2d0079b086caa4d68ea9b63397751e4df6564 (patch)
treec8c2337a78ffb65fb9401c45017780ed3a127c2c /lib/Analysis
parent8d1ab3e2a7fe8adcec3db9576aa84d34be679033 (diff)
downloadexternal_llvm-ebe2d0079b086caa4d68ea9b63397751e4df6564.zip
external_llvm-ebe2d0079b086caa4d68ea9b63397751e4df6564.tar.gz
external_llvm-ebe2d0079b086caa4d68ea9b63397751e4df6564.tar.bz2
Change ConstantFoldConstantExpression to accept a null
TargetData pointer. The only thing it's used for are calls to ConstantFoldCompareInstOperands and ConstantFoldInstOperands, which both already accept a null TargetData pointer. This makes ConstantFoldConstantExpression easier to use in clients where TargetData is optional. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/ConstantFolding.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp
index e5ab322..261c635 100644
--- a/lib/Analysis/ConstantFolding.cpp
+++ b/lib/Analysis/ConstantFolding.cpp
@@ -317,8 +317,6 @@ Constant *llvm::ConstantFoldInstruction(Instruction *I, const TargetData *TD) {
/// result is returned, if not, null is returned.
Constant *llvm::ConstantFoldConstantExpression(ConstantExpr *CE,
const TargetData *TD) {
- assert(TD && "ConstantFoldConstantExpression requires a valid TargetData.");
-
SmallVector<Constant*, 8> Ops;
for (User::op_iterator i = CE->op_begin(), e = CE->op_end(); i != e; ++i)
Ops.push_back(cast<Constant>(*i));