diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2018-08-14 10:04:36 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2018-08-14 10:04:36 +0000 |
commit | 060a789c844dc1f3a4a1843766bbdaafe40f87d7 (patch) | |
tree | 5a0ffb8a2944bc930a0b9c6863edbc57e415ee34 /clang/lib/AST/MicrosoftMangle.cpp | |
parent | 7bae71a209e8c82e1e13afb4fdc9f057186e69b7 (diff) | |
download | bcm5719-llvm-060a789c844dc1f3a4a1843766bbdaafe40f87d7.tar.gz bcm5719-llvm-060a789c844dc1f3a4a1843766bbdaafe40f87d7.zip |
Add a stub mangling for ObjC selectors in the Microsoft ABI.
This mangling is used only for outlined SEH finally blocks, which have
internal linkage.
This fixes the failure of CodeGenObjC/2007-04-03-ObjcEH.m on builds with
expensive checks enabled, on Windows. This test should probably be
specifying a triple: it currently picks up whatever the host environment
is using. Unfortunately, I have no idea what it is trying to test,
because it contains no comments and predates Clang having working
Objective-C IR generation.
llvm-svn: 339667
Diffstat (limited to 'clang/lib/AST/MicrosoftMangle.cpp')
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 40281481f1d..8067c42dff5 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -905,8 +905,14 @@ void MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND, case DeclarationName::ObjCZeroArgSelector: case DeclarationName::ObjCOneArgSelector: - case DeclarationName::ObjCMultiArgSelector: - llvm_unreachable("Can't mangle Objective-C selector names here!"); + case DeclarationName::ObjCMultiArgSelector: { + // This is reachable only when constructing an outlined SEH finally + // block. Nothing depends on this mangling and it's used only with + // functinos with internal linkage. + llvm::SmallString<64> Name; + mangleSourceName(Name.str()); + break; + } case DeclarationName::CXXConstructorName: if (isStructorDecl(ND)) { |