summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-04-01 04:45:52 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-04-01 04:45:52 +0000
commit1f192e26fd5471035bee2a721340f2344873d625 (patch)
treecedd0d3bd0d46c579d84eef13b7e849372095b12 /clang/lib/CodeGen
parent5a9808b7ed76e3e569ffac99396cd7406bfa5219 (diff)
downloadbcm5719-llvm-1f192e26fd5471035bee2a721340f2344873d625.tar.gz
bcm5719-llvm-1f192e26fd5471035bee2a721340f2344873d625.zip
[MS ABI] Disregard restrictive exception specifications
MSVC treats all non-empty exception specifications the same way: all exceptions are permitted. The .xdata tables provide a way to efficiently lower exception specifications *but* this probably has to be implemented as a catch-all/rethrow mechanism instead of the Itanium way. This fixes PR23092. llvm-svn: 233787
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGException.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index 1925c57d1bd..f10d2e1ecc6 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -458,6 +458,10 @@ void CodeGenFunction::EmitStartEHSpec(const Decl *D) {
EHStack.pushTerminate();
}
} else if (EST == EST_Dynamic || EST == EST_DynamicNone) {
+ // TODO: Revisit exception specifications for the MS ABI. There is a way to
+ // encode these in an object file but MSVC doesn't do anything with it.
+ if (getTarget().getCXXABI().isMicrosoft())
+ return;
unsigned NumExceptions = Proto->getNumExceptions();
EHFilterScope *Filter = EHStack.pushFilter(NumExceptions);
@@ -532,6 +536,10 @@ void CodeGenFunction::EmitEndEHSpec(const Decl *D) {
EHStack.popTerminate();
}
} else if (EST == EST_Dynamic || EST == EST_DynamicNone) {
+ // TODO: Revisit exception specifications for the MS ABI. There is a way to
+ // encode these in an object file but MSVC doesn't do anything with it.
+ if (getTarget().getCXXABI().isMicrosoft())
+ return;
EHFilterScope &filterScope = cast<EHFilterScope>(*EHStack.begin());
emitFilterDispatchBlock(*this, filterScope);
EHStack.popFilter();
OpenPOWER on IntegriCloud