[cfe-commits] r140335 - /cfe/trunk/lib/CodeGen/CGException.cpp
Bill Wendling
isanbard at gmail.com
Thu Sep 22 13:32:54 PDT 2011
Author: void
Date: Thu Sep 22 15:32:54 2011
New Revision: 140335
URL: http://llvm.org/viewvc/llvm-project?rev=140335&view=rev
Log:
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.
Modified:
cfe/trunk/lib/CodeGen/CGException.cpp
Modified: cfe/trunk/lib/CodeGen/CGException.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGException.cpp?rev=140335&r1=140334&r2=140335&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGException.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGException.cpp Thu Sep 22 15:32:54 2011
@@ -777,13 +777,9 @@
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;
}
More information about the cfe-commits
mailing list