diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-28 23:57:18 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-28 23:57:18 +0000 |
| commit | b8a2042aa938069e862750553db0e4d82d25822c (patch) | |
| tree | 8acb3313c9e21902b08a931a708ba405aa157b31 /lib/Target/X86/X86WinEHState.cpp | |
| parent | b2b7c066a48f61ec67332fb797a20bb04901c83d (diff) | |
Diffstat (limited to 'lib/Target/X86/X86WinEHState.cpp')
| -rw-r--r-- | lib/Target/X86/X86WinEHState.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/X86/X86WinEHState.cpp b/lib/Target/X86/X86WinEHState.cpp index 0472a85f50da..6d6dedc60736 100644 --- a/lib/Target/X86/X86WinEHState.cpp +++ b/lib/Target/X86/X86WinEHState.cpp @@ -149,6 +149,12 @@ void WinEHStatePass::getAnalysisUsage(AnalysisUsage &AU) const { } bool WinEHStatePass::runOnFunction(Function &F) { + // Don't insert state stores or exception handler thunks for + // available_externally functions. The handler needs to reference the LSDA, + // which will not be emitted in this case. + if (F.hasAvailableExternallyLinkage()) + return false; + // Check the personality. Do nothing if this personality doesn't use funclets. if (!F.hasPersonalityFn()) return false; |
