[llvm-branch-commits] [cfe-branch] r340437 - Merging r339667:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Aug 22 11:44:17 PDT 2018


Author: hans
Date: Wed Aug 22 11:44:16 2018
New Revision: 340437

URL: http://llvm.org/viewvc/llvm-project?rev=340437&view=rev
Log:
Merging r339667:
------------------------------------------------------------------------
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.
------------------------------------------------------------------------

Modified:
    cfe/branches/release_70/   (props changed)
    cfe/branches/release_70/lib/AST/MicrosoftMangle.cpp

Propchange: cfe/branches/release_70/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 22 11:44:16 2018
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:338552-338553,338602,338627,338749,338934,338942,339074,339128,339170,339210,339264,339281,339317,339372-339374,339379,339428,339494,339597,339603,340048,340079,340101,340181,340191
+/cfe/trunk:338552-338553,338602,338627,338749,338934,338942,339074,339128,339170,339210,339264,339281,339317,339372-339374,339379,339428,339494,339597,339603,339667,340048,340079,340101,340181,340191
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_70/lib/AST/MicrosoftMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_70/lib/AST/MicrosoftMangle.cpp?rev=340437&r1=340436&r2=340437&view=diff
==============================================================================
--- cfe/branches/release_70/lib/AST/MicrosoftMangle.cpp (original)
+++ cfe/branches/release_70/lib/AST/MicrosoftMangle.cpp Wed Aug 22 11:44:16 2018
@@ -940,8 +940,14 @@ void MicrosoftCXXNameMangler::mangleUnqu
 
     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)) {




More information about the llvm-branch-commits mailing list