forked from OSchip/llvm-project
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
This commit is contained in:
parent
eb4089ad01
commit
8c4b716352
|
@ -777,13 +777,9 @@ llvm::BasicBlock *CodeGenFunction::EmitLandingPad() {
|
|||
EHFilterScope &filter = cast<EHFilterScope>(*I);
|
||||
hasFilter = true;
|
||||
|
||||
// Add all the filter values which we aren't already explicitly
|
||||
// catching.
|
||||
for (unsigned i = 0, e = filter.getNumFilters(); i != e; ++i) {
|
||||
llvm::Value *filterType = filter.getFilter(i);
|
||||
if (!catchTypes.count(filterType))
|
||||
filterTypes.push_back(filterType);
|
||||
}
|
||||
// Add all the filter values.
|
||||
for (unsigned i = 0, e = filter.getNumFilters(); i != e; ++i)
|
||||
filterTypes.push_back(filter.getFilter(i));
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue