From 8990daf237a48fa2eed3d0546687fc097a004db6 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 22 Sep 2011 20:32:54 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140335 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGException.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp index bd5ae7582e..5e4fb98819 100644 --- a/lib/CodeGen/CGException.cpp +++ b/lib/CodeGen/CGException.cpp @@ -777,13 +777,9 @@ llvm::BasicBlock *CodeGenFunction::EmitLandingPad() { EHFilterScope &filter = cast(*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; }