summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-04 18:51:31 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-04 18:51:31 +0000
commit4dc5dfc56b7da3308247e8c3bb929d8d0d23ad70 (patch)
treed87dfe470e728ffe49939c484133ddb45e812e91 /llvm/lib/Transforms
parent8501e39a8505b164e7952ac4389cff855718ebaf (diff)
downloadbcm5719-llvm-4dc5dfc56b7da3308247e8c3bb929d8d0d23ad70.tar.gz
bcm5719-llvm-4dc5dfc56b7da3308247e8c3bb929d8d0d23ad70.zip
Clauses in a landingpad are always Constant. Use a stricter type.
llvm-svn: 210203
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstructionCombining.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 9b8fdb27002..0fffc5a1548 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -2099,7 +2099,7 @@ Instruction *InstCombiner::visitLandingPadInst(LandingPadInst &LI) {
// Simplify the list of clauses, eg by removing repeated catch clauses
// (these are often created by inlining).
bool MakeNewInstruction = false; // If true, recreate using the following:
- SmallVector<Value *, 16> NewClauses; // - Clauses for the new instruction;
+ SmallVector<Constant *, 16> NewClauses; // - Clauses for the new instruction;
bool CleanupFlag = LI.isCleanup(); // - The new instruction is a cleanup.
SmallPtrSet<Value *, 16> AlreadyCaught; // Typeinfos known caught already.
@@ -2107,7 +2107,7 @@ Instruction *InstCombiner::visitLandingPadInst(LandingPadInst &LI) {
bool isLastClause = i + 1 == e;
if (LI.isCatch(i)) {
// A catch clause.
- Value *CatchClause = LI.getClause(i);
+ Constant *CatchClause = LI.getClause(i);
Constant *TypeInfo = cast<Constant>(CatchClause->stripPointerCasts());
// If we already saw this clause, there is no point in having a second
@@ -2137,7 +2137,7 @@ Instruction *InstCombiner::visitLandingPadInst(LandingPadInst &LI) {
// equal (for example if one represents a C++ class, and the other some
// class derived from it).
assert(LI.isFilter(i) && "Unsupported landingpad clause!");
- Value *FilterClause = LI.getClause(i);
+ Constant *FilterClause = LI.getClause(i);
ArrayType *FilterType = cast<ArrayType>(FilterClause->getType());
unsigned NumTypeInfos = FilterType->getNumElements();
@@ -2287,7 +2287,7 @@ Instruction *InstCombiner::visitLandingPadInst(LandingPadInst &LI) {
continue;
// If Filter is a subset of LFilter, i.e. every element of Filter is also
// an element of LFilter, then discard LFilter.
- SmallVectorImpl<Value *>::iterator J = NewClauses.begin() + j;
+ SmallVectorImpl<Constant *>::iterator J = NewClauses.begin() + j;
// If Filter is empty then it is a subset of LFilter.
if (!FElts) {
// Discard LFilter.
OpenPOWER on IntegriCloud