summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit136bd719f0711b7c08ea2b1cfe699c6f77026f73 (patch)
tree0d6cb6c9e5559686944cb48c880668e0490be147 /llvm/lib/Analysis
parentd52dddf02261ea1a5e3ab9f6c084569597ebca4d (diff)
downloadbcm5719-llvm-136bd719f0711b7c08ea2b1cfe699c6f77026f73.tar.gz
bcm5719-llvm-136bd719f0711b7c08ea2b1cfe699c6f77026f73.zip
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. llvm-svn: 72741
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/ConstantFolding.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index e5ab3226ce4..261c635feb4 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/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));
OpenPOWER on IntegriCloud