diff options
author | Hans Wennborg <hans@hanshq.net> | 2018-08-22 18:44:16 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2018-08-22 18:44:16 +0000 |
commit | 623c252055788783027c05397b89ab4fba50e82a (patch) | |
tree | 84e7b96b0ffeb8363d6b1cbc8e6f1ea8aecd0c5a | |
parent | 780e7970fed857275e727d01b8d97476386b6c4c (diff) |
Merging r339667:upstream/llvmorg-7.0.0-rc2llvmorg-7.0.0-rc2
------------------------------------------------------------------------
r339667 | theraven | 2018-08-14 12:04:36 +0200 (Tue, 14 Aug 2018) | 11 lines
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: 340437
-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 d1a5c6edc78a..d5332ba7db54 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -940,8 +940,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)) { |