Skip to content

Commit 8c4b716

Browse files
committed
Don't remove filters.
It's not valid to remove filters from landingpad instructions, even if we catch the type. The metadata won't be set up correctly. Testcase is projects/llvm-test/SingleSource/UnitTests/EH/filter-2.cpp. llvm-svn: 140335
1 parent eb4089a commit 8c4b716

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

clang/lib/CodeGen/CGException.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -777,13 +777,9 @@ llvm::BasicBlock *CodeGenFunction::EmitLandingPad() {
777777
EHFilterScope &filter = cast<EHFilterScope>(*I);
778778
hasFilter = true;
779779

780-
// Add all the filter values which we aren't already explicitly
781-
// catching.
782-
for (unsigned i = 0, e = filter.getNumFilters(); i != e; ++i) {
783-
llvm::Value *filterType = filter.getFilter(i);
784-
if (!catchTypes.count(filterType))
785-
filterTypes.push_back(filterType);
786-
}
780+
// Add all the filter values.
781+
for (unsigned i = 0, e = filter.getNumFilters(); i != e; ++i)
782+
filterTypes.push_back(filter.getFilter(i));
787783
goto done;
788784
}
789785

0 commit comments

Comments
 (0)