<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.gmail-stdout
        {mso-style-name:gmail-stdout;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi David,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I made an attempt to fix the Windows bot test failures in r339494 by making the checks for the section boundaries not depend on the order they were emitted.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">It seems that when using Visual Studio to build clang, the compiler that is generated emits the __stop_ section boundaries before the __start_ ones, thus causing
 your checks to fail. For example, you were checking for the following:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:#1F497D">@__start___objc_selectors = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_selectors$a", comdat, align 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:#1F497D">@__stop__objc_selectors = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_selectors$z", comdat, align 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:#1F497D">@__start___objc_classes = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_classes$a", comdat, align 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:#1F497D">@__stop__objc_classes = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_classes$z", comdat, align 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">However the Visual Studio built clang was producing the following output:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">@__stop__objc_selectors = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_selectors$z", comdat, align 1<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">@__start___objc_selectors = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_selectors$a", comdat, align 1<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">@__stop__objc_classes = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_classes$z", comdat, align 1<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">@__start___objc_classes = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_classes$a", comdat, align 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I don’t think that the order matters, only that they are actually emitted, but if I am wrong, I apologize, and please revert my change and look into the problem.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Douglas Yung<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> cfe-commits [mailto:cfe-commits-bounces@lists.llvm.org]
<b>On Behalf Of </b>Tom Weaver via cfe-commits<br>
<b>Sent:</b> Friday, August 10, 2018 10:01<br>
<b>To:</b> David Chisnall<br>
<b>Cc:</b> cfe-commits@lists.llvm.org<br>
<b>Subject:</b> Re: r339428 - Add Windows support for the GNUstep Objective-C ABI V2.<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi David,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">revision 339428 seems to have caused failing tests on a couple of windows build bots, any chance you can take a look please?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/18985">http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/18985</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<pre style="text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-stdout"><span style="font-size:13.5pt;color:black">********************<o:p></o:p></span></span></pre>
<pre><span class="gmail-stdout"><span style="font-size:13.5pt;color:black">Failing Tests (1):<o:p></o:p></span></span></pre>
<pre><span class="gmail-stdout"><span style="font-size:13.5pt;color:black">    Clang :: CodeGenObjC/gnu-init.m<o:p></o:p></span></span></pre>
<pre><span class="gmail-stdout"><span style="font-size:13.5pt;color:black"><o:p> </o:p></span></span></pre>
<pre><span class="gmail-stdout"><span style="font-size:13.5pt;color:black">  Expected Passes    : 30627<o:p></o:p></span></span></pre>
<pre><span class="gmail-stdout"><span style="font-size:13.5pt;color:black">  Expected Failures  : 65<o:p></o:p></span></span></pre>
<pre><span class="gmail-stdout"><span style="font-size:13.5pt;color:black">  Unsupported Tests  : 12223<o:p></o:p></span></span></pre>
<pre><span class="gmail-stdout"><span style="font-size:13.5pt;color:black">  Unexpected Failures: 1</span></span><span style="font-size:13.5pt;color:black"><o:p></o:p></span></pre>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Tom Weaver<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 10 August 2018 at 13:53, David Chisnall via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">Author: theraven<br>
Date: Fri Aug 10 05:53:13 2018<br>
New Revision: 339428<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=339428&view=rev" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=339428&view=rev</a><br>
Log:<br>
Add Windows support for the GNUstep Objective-C ABI V2.<br>
<br>
Summary:<br>
Introduces funclet-based unwinding for Objective-C and fixes an issue<br>
where global blocks can't have their isa pointers initialised on<br>
Windows.<br>
<br>
After discussion with Dustin, this changes the name mangling of<br>
Objective-C types to prevent a C++ catch statement of type struct X*<br>
from catching an Objective-C object of type X*.<br>
<br>
Reviewers: rjmccall, DHowett-MSFT<br>
<br>
Reviewed By: rjmccall, DHowett-MSFT<br>
<br>
Subscribers: mgrang, mstorsjo, smeenai, cfe-commits<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D50144" target="_blank">
https://reviews.llvm.org/D50144</a><br>
<br>
Modified:<br>
    cfe/trunk/include/clang/Driver/Options.td<br>
    cfe/trunk/lib/AST/MicrosoftMangle.cpp<br>
    cfe/trunk/lib/CodeGen/CGException.cpp<br>
    cfe/trunk/lib/CodeGen/CGObjCGNU.cpp<br>
    cfe/trunk/lib/CodeGen/CGObjCRuntime.cpp<br>
    cfe/trunk/lib/CodeGen/CGObjCRuntime.h<br>
    cfe/trunk/lib/CodeGen/CodeGenFunction.h<br>
    cfe/trunk/lib/Driver/ToolChains/Clang.cpp<br>
    cfe/trunk/test/CodeGenObjC/gnu-init.m<br>
    cfe/trunk/test/CodeGenObjC/gnustep2-proto.m<br>
    cfe/trunk/test/CodeGenObjCXX/<a href="http://arc-marker-funclet.mm" target="_blank">arc-marker-funclet.mm</a><br>
    cfe/trunk/test/CodeGenObjCXX/<a href="http://microsoft-abi-arc-param-order.mm" target="_blank">microsoft-abi-arc-param-order.mm</a><br>
    cfe/trunk/test/CodeGenObjCXX/<a href="http://msabi-objc-extensions.mm" target="_blank">msabi-objc-extensions.mm</a><br>
    cfe/trunk/test/CodeGenObjCXX/<a href="http://msabi-objc-types.mm" target="_blank">msabi-objc-types.mm</a><br>
<br>
Modified: cfe/trunk/include/clang/Driver/Options.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=339428&r1=339427&r2=339428&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=339428&r1=339427&r2=339428&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Driver/Options.td (original)<br>
+++ cfe/trunk/include/clang/Driver/Options.td Fri Aug 10 05:53:13 2018<br>
@@ -1488,7 +1488,7 @@ def fobjc_weak : Flag<["-"], "fobjc-weak<br>
   HelpText<"Enable ARC-style weak references in Objective-C">;<br>
<br>
 // Objective-C ABI options.<br>
-def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group<f_Group>, Flags<[CC1Option]>,<br>
+def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,<br>
   HelpText<"Specify the target Objective-C runtime kind and version">;<br>
 def fobjc_abi_version_EQ : Joined<["-"], "fobjc-abi-version=">, Group<f_Group>;<br>
 def fobjc_nonfragile_abi_version_EQ : Joined<["-"], "fobjc-nonfragile-abi-version=">, Group<f_Group>;<br>
<br>
Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=339428&r1=339427&r2=339428&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=339428&r1=339427&r2=339428&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)<br>
+++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Fri Aug 10 05:53:13 2018<br>
@@ -445,7 +445,7 @@ void MicrosoftCXXNameMangler::mangle(con<br>
     mangleFunctionEncoding(FD, Context.shouldMangleDeclName(FD));<br>
   else if (const VarDecl *VD = dyn_cast<VarDecl>(D))<br>
     mangleVariableEncoding(VD);<br>
-  else<br>
+  else if (!isa<ObjCInterfaceDecl>(D))<br>
     llvm_unreachable("Tried to mangle unexpected NamedDecl!");<br>
 }<br>
<br>
@@ -1884,13 +1884,13 @@ void MicrosoftCXXNameMangler::mangleType<br>
     llvm_unreachable("placeholder types shouldn't get to name mangling");<br>
<br>
   case BuiltinType::ObjCId:<br>
-    mangleArtificalTagType(TTK_Struct, "objc_object");<br>
+    mangleArtificalTagType(TTK_Struct, ".objc_object");<br>
     break;<br>
   case BuiltinType::ObjCClass:<br>
-    mangleArtificalTagType(TTK_Struct, "objc_class");<br>
+    mangleArtificalTagType(TTK_Struct, ".objc_class");<br>
     break;<br>
   case BuiltinType::ObjCSel:<br>
-    mangleArtificalTagType(TTK_Struct, "objc_selector");<br>
+    mangleArtificalTagType(TTK_Struct, ".objc_selector");<br>
     break;<br>
<br>
 #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \<br>
@@ -2570,9 +2570,10 @@ void MicrosoftCXXNameMangler::mangleType<br>
<br>
 void MicrosoftCXXNameMangler::mangleType(const ObjCInterfaceType *T, Qualifiers,<br>
                                          SourceRange) {<br>
-  // ObjC interfaces have structs underlying them.<br>
+  // ObjC interfaces are mangled as if they were structs with a name that is<br>
+  // not a valid C/C++ identifier<br>
   mangleTagTypeKind(TTK_Struct);<br>
-  mangleName(T->getDecl());<br>
+  mangle(T->getDecl(), ".objc_cls_");<br>
 }<br>
<br>
 void MicrosoftCXXNameMangler::mangleType(const ObjCObjectType *T, Qualifiers,<br>
@@ -2590,11 +2591,11 @@ void MicrosoftCXXNameMangler::mangleType<br>
<br>
   Out << "?$";<br>
   if (T->isObjCId())<br>
-    mangleSourceName("objc_object");<br>
+    mangleSourceName(".objc_object");<br>
   else if (T->isObjCClass())<br>
-    mangleSourceName("objc_class");<br>
+    mangleSourceName(".objc_class");<br>
   else<br>
-    mangleSourceName(T->getInterface()->getName());<br>
+    mangleSourceName((".objc_cls_" + T->getInterface()->getName()).str());<br>
<br>
   for (const auto &Q : T->quals())<br>
     mangleObjCProtocol(Q);<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CGException.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGException.cpp?rev=339428&r1=339427&r2=339428&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGException.cpp?rev=339428&r1=339427&r2=339428&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CGException.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CGException.cpp Fri Aug 10 05:53:13 2018<br>
@@ -1829,7 +1829,7 @@ void CodeGenFunction::startOutlinedSEHHe<br>
   SmallString<128> Name;<br>
   {<br>
     llvm::raw_svector_ostream OS(Name);<br>
-    const FunctionDecl *ParentSEHFn = ParentCGF.CurSEHParent;<br>
+    const NamedDecl *ParentSEHFn = ParentCGF.CurSEHParent;<br>
     assert(ParentSEHFn && "No CurSEHParent!");<br>
     MangleContext &Mangler = CGM.getCXXABI().getMangleContext();<br>
     if (IsFilter)<br>
@@ -1972,6 +1972,11 @@ llvm::Value *CodeGenFunction::EmitSEHAbn<br>
   return Builder.CreateZExt(&*AI, Int32Ty);<br>
 }<br>
<br>
+void CodeGenFunction::pushSEHCleanup(CleanupKind Kind,<br>
+                                     llvm::Function *FinallyFunc) {<br>
+  EHStack.pushCleanup<PerformSEHFinally>(Kind, FinallyFunc);<br>
+}<br>
+<br>
 void CodeGenFunction::EnterSEHTryStmt(const SEHTryStmt &S) {<br>
   CodeGenFunction HelperCGF(CGM, /*suppressNewContext=*/true);<br>
   if (const SEHFinallyStmt *Finally = S.getFinallyHandler()) {<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=339428&r1=339427&r2=339428&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=339428&r1=339427&r2=339428&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Fri Aug 10 05:53:13 2018<br>
@@ -18,6 +18,7 @@<br>
 #include "CGCleanup.h"<br>
 #include "CodeGenFunction.h"<br>
 #include "CodeGenModule.h"<br>
+#include "CGCXXABI.h"<br>
 #include "clang/CodeGen/ConstantInitBuilder.h"<br>
 #include "clang/AST/ASTContext.h"<br>
 #include "clang/AST/Decl.h"<br>
@@ -178,6 +179,9 @@ protected:<br>
   /// runtime provides some LLVM passes that can use this to do things like<br>
   /// automatic IMP caching and speculative inlining.<br>
   unsigned msgSendMDKind;<br>
+  /// Does the current target use SEH-based exceptions? False implies<br>
+  /// Itanium-style DWARF unwinding.<br>
+  bool usesSEHExceptions;<br>
<br>
   /// Helper to check if we are targeting a specific runtime version or later.<br>
   bool isRuntime(ObjCRuntime::Kind kind, unsigned major, unsigned minor=0) {<br>
@@ -217,6 +221,7 @@ protected:<br>
       llvm::Constant *value = llvm::ConstantDataArray::getString(VMContext,Str);<br>
       auto *GV = new llvm::GlobalVariable(TheModule, value->getType(), true,<br>
               llvm::GlobalValue::LinkOnceODRLinkage, value, name);<br>
+      GV->setComdat(TheModule.getOrInsertComdat(name));<br>
       if (Private)<br>
         GV->setVisibility(llvm::GlobalValue::HiddenVisibility);<br>
       ConstStr = GV;<br>
@@ -810,8 +815,12 @@ class CGObjCGNUstep : public CGObjCGNU {<br>
       // Slot_t objc_slot_lookup_super(struct objc_super*, SEL);<br>
       SlotLookupSuperFn.init(&CGM, "objc_slot_lookup_super", SlotTy,<br>
                              PtrToObjCSuperTy, SelectorTy);<br>
-      // If we're in ObjC++ mode, then we want to make<br>
-      if (CGM.getLangOpts().CPlusPlus) {<br>
+      // If we're in ObjC++ mode, then we want to make <br>
+      if (usesSEHExceptions) {<br>
+          llvm::Type *VoidTy = llvm::Type::getVoidTy(VMContext);<br>
+          // void objc_exception_rethrow(void)<br>
+          ExceptionReThrowFn.init(&CGM, "objc_exception_rethrow", VoidTy);<br>
+      } else if (CGM.getLangOpts().CPlusPlus) {<br>
         llvm::Type *VoidTy = llvm::Type::getVoidTy(VMContext);<br>
         // void *__cxa_begin_catch(void *e)<br>
         EnterCatchFn.init(&CGM, "__cxa_begin_catch", PtrTy, PtrTy);<br>
@@ -888,22 +897,25 @@ class CGObjCGNUstep : public CGObjCGNU {<br>
 /// This is the ABI that provides a clean break with the legacy GCC ABI and<br>
 /// cleans up a number of things that were added to work around 1980s linkers.<br>
 class CGObjCGNUstep2 : public CGObjCGNUstep {<br>
-  /// The section for selectors.<br>
-  static constexpr const char *const SelSection = "__objc_selectors";<br>
-  /// The section for classes.<br>
-  static constexpr const char *const ClsSection = "__objc_classes";<br>
-  /// The section for references to classes.<br>
-  static constexpr const char *const ClsRefSection = "__objc_class_refs";<br>
-  /// The section for categories.<br>
-  static constexpr const char *const CatSection = "__objc_cats";<br>
-  /// The section for protocols.<br>
-  static constexpr const char *const ProtocolSection = "__objc_protocols";<br>
-  /// The section for protocol references.<br>
-  static constexpr const char *const ProtocolRefSection = "__objc_protocol_refs";<br>
-  /// The section for class aliases<br>
-  static constexpr const char *const ClassAliasSection = "__objc_class_aliases";<br>
-  /// The section for constexpr constant strings<br>
-  static constexpr const char *const ConstantStringSection = "__objc_constant_string";<br>
+  enum SectionKind<br>
+  {<br>
+    SelectorSection = 0,<br>
+    ClassSection,<br>
+    ClassReferenceSection,<br>
+    CategorySection,<br>
+    ProtocolSection,<br>
+    ProtocolReferenceSection,<br>
+    ClassAliasSection,<br>
+    ConstantStringSection<br>
+  };<br>
+  static const char *const SectionsBaseNames[8];<br>
+  template<SectionKind K><br>
+  std::string sectionName() {<br>
+    std::string name(SectionsBaseNames[K]);<br>
+    if (CGM.getTriple().isOSBinFormatCOFF())<br>
+      name += "$m";<br>
+    return name;<br>
+  }<br>
   /// The GCC ABI superclass message lookup function.  Takes a pointer to a<br>
   /// structure describing the receiver and the class, and a selector as<br>
   /// arguments.  Returns the IMP for the corresponding method.<br>
@@ -1069,7 +1081,7 @@ class CGObjCGNUstep2 : public CGObjCGNUs<br>
           isNamed ? StringRef(StringName) : ".objc_string",<br>
           Align, false, isNamed ? llvm::GlobalValue::LinkOnceODRLinkage<br>
                                 : llvm::GlobalValue::PrivateLinkage);<br>
-    ObjCStrGV->setSection(ConstantStringSection);<br>
+    ObjCStrGV->setSection(sectionName<ConstantStringSection>());<br>
     if (isNamed) {<br>
       ObjCStrGV->setComdat(TheModule.getOrInsertComdat(StringName));<br>
       ObjCStrGV->setVisibility(llvm::GlobalValue::HiddenVisibility);<br>
@@ -1247,9 +1259,10 @@ class CGObjCGNUstep2 : public CGObjCGNUs<br>
       assert(!TheModule.getGlobalVariable(RefName));<br>
       // Emit a reference symbol.<br>
       auto GV = new llvm::GlobalVariable(TheModule, ProtocolPtrTy,<br>
-          false, llvm::GlobalValue::ExternalLinkage,<br>
+          false, llvm::GlobalValue::LinkOnceODRLinkage,<br>
           llvm::ConstantExpr::getBitCast(Protocol, ProtocolPtrTy), RefName);<br>
-      GV->setSection(ProtocolRefSection);<br>
+      GV->setComdat(TheModule.getOrInsertComdat(RefName));<br>
+      GV->setSection(sectionName<ProtocolReferenceSection>());<br>
       GV->setAlignment(CGM.getPointerAlign().getQuantity());<br>
       Ref = GV;<br>
     }<br>
@@ -1282,9 +1295,22 @@ class CGObjCGNUstep2 : public CGObjCGNUs<br>
<br>
     EmittedProtocol = true;<br>
<br>
+    auto SymName = SymbolForProtocol(ProtocolName);<br>
+    auto *OldGV = TheModule.getGlobalVariable(SymName);<br>
+<br>
     // Use the protocol definition, if there is one.<br>
     if (const ObjCProtocolDecl *Def = PD->getDefinition())<br>
       PD = Def;<br>
+    else {<br>
+      // If there is no definition, then create an external linkage symbol and<br>
+      // hope that someone else fills it in for us (and fail to link if they<br>
+      // don't).<br>
+      assert(!OldGV);<br>
+      Protocol = new llvm::GlobalVariable(TheModule, ProtocolTy,<br>
+        /*isConstant*/false,<br>
+        llvm::GlobalValue::ExternalLinkage, nullptr, SymName);<br>
+      return Protocol;<br>
+    }<br>
<br>
     SmallVector<llvm::Constant*, 16> Protocols;<br>
     for (const auto *PI : PD->protocols())<br>
@@ -1301,8 +1327,6 @@ class CGObjCGNUstep2 : public CGObjCGNUs<br>
     EmitProtocolMethodList(PD->class_methods(), ClassMethodList,<br>
         OptionalClassMethodList);<br>
<br>
-    auto SymName = SymbolForProtocol(ProtocolName);<br>
-    auto *OldGV = TheModule.getGlobalVariable(SymName);<br>
     // The isa pointer must be set to a magic number so the runtime knows it's<br>
     // the correct layout.<br>
     ConstantInitBuilder builder(CGM);<br>
@@ -1326,7 +1350,7 @@ class CGObjCGNUstep2 : public CGObjCGNUs<br>
<br>
     auto *GV = ProtocolBuilder.finishAndCreateGlobal(SymName,<br>
         CGM.getPointerAlign(), false, llvm::GlobalValue::ExternalLinkage);<br>
-    GV->setSection(ProtocolSection);<br>
+    GV->setSection(sectionName<ProtocolSection>());<br>
     GV->setComdat(TheModule.getOrInsertComdat(SymName));<br>
     if (OldGV) {<br>
       OldGV->replaceAllUsesWith(llvm::ConstantExpr::getBitCast(GV,<br>
@@ -1359,6 +1383,7 @@ class CGObjCGNUstep2 : public CGObjCGNUs<br>
           TypeEncoding);<br>
       auto *GV = new llvm::GlobalVariable(TheModule, Init->getType(),<br>
           true, llvm::GlobalValue::LinkOnceODRLinkage, Init, TypesVarName);<br>
+      GV->setComdat(TheModule.getOrInsertComdat(TypesVarName));<br>
       GV->setVisibility(llvm::GlobalValue::HiddenVisibility);<br>
       TypesGlobal = GV;<br>
     }<br>
@@ -1387,12 +1412,41 @@ class CGObjCGNUstep2 : public CGObjCGNUs<br>
         CGM.getPointerAlign(), false, llvm::GlobalValue::LinkOnceODRLinkage);<br>
     GV->setComdat(TheModule.getOrInsertComdat(SelVarName));<br>
     GV->setVisibility(llvm::GlobalValue::HiddenVisibility);<br>
-    GV->setSection(SelSection);<br>
+    GV->setSection(sectionName<SelectorSection>());<br>
     auto *SelVal = EnforceType(GV, SelectorTy);<br>
     return SelVal;<br>
   }<br>
+  llvm::StructType *emptyStruct = nullptr;<br>
+<br>
+  /// Return pointers to the start and end of a section.  On ELF platforms, we<br>
+  /// use the __start_ and __stop_ symbols that GNU-compatible linkers will set<br>
+  /// to the start and end of section names, as long as those section names are<br>
+  /// valid identifiers and the symbols are referenced but not defined.  On<br>
+  /// Windows, we use the fact that MSVC-compatible linkers will lexically sort<br>
+  /// by subsections and place everything that we want to reference in a middle<br>
+  /// subsection and then insert zero-sized symbols in subsections a and z.<br>
   std::pair<llvm::Constant*,llvm::Constant*><br>
   GetSectionBounds(StringRef Section) {<br>
+    if (CGM.getTriple().isOSBinFormatCOFF()) {<br>
+      if (emptyStruct == nullptr) {<br>
+        emptyStruct = llvm::StructType::create(VMContext, ".objc_section_sentinel");<br>
+        emptyStruct->setBody({}, /*isPacked*/true);<br>
+      }<br>
+      auto ZeroInit = llvm::Constant::getNullValue(emptyStruct);<br>
+      auto Sym = [&](StringRef Prefix, StringRef SecSuffix) {<br>
+        auto *Sym = new llvm::GlobalVariable(TheModule, emptyStruct,<br>
+            /*isConstant*/false,<br>
+            llvm::GlobalValue::LinkOnceODRLinkage, ZeroInit, Prefix +<br>
+            Section);<br>
+        Sym->setVisibility(llvm::GlobalValue::HiddenVisibility);<br>
+        Sym->setSection((Section + SecSuffix).str());<br>
+        Sym->setComdat(TheModule.getOrInsertComdat((Prefix +<br>
+            Section).str()));<br>
+        Sym->setAlignment(1);<br>
+        return Sym;<br>
+      };<br>
+      return { Sym("__start_", "$a"), Sym("__stop", "$z") };<br>
+    }<br>
     auto *Start = new llvm::GlobalVariable(TheModule, PtrTy,<br>
         /*isConstant*/false,<br>
         llvm::GlobalValue::ExternalLinkage, nullptr, StringRef("__start_") +<br>
@@ -1405,6 +1459,9 @@ class CGObjCGNUstep2 : public CGObjCGNUs<br>
     Stop->setVisibility(llvm::GlobalValue::HiddenVisibility);<br>
     return { Start, Stop };<br>
   }<br>
+  CatchTypeInfo getCatchAllTypeInfo() override {<br>
+    return CGM.getCXXABI().getCatchAllTypeInfo();<br>
+  }<br>
   llvm::Function *ModuleInitFunction() override {<br>
     llvm::Function *LoadFunction = llvm::Function::Create(<br>
       llvm::FunctionType::get(llvm::Type::getVoidTy(VMContext), false),<br>
@@ -1420,19 +1477,11 @@ class CGObjCGNUstep2 : public CGObjCGNUs<br>
     ConstantInitBuilder builder(CGM);<br>
     auto InitStructBuilder = builder.beginStruct();<br>
     InitStructBuilder.addInt(Int64Ty, 0);<br>
-    auto addSection = [&](const char *section) {<br>
-      auto bounds = GetSectionBounds(section);<br>
+    for (auto *s : SectionsBaseNames) {<br>
+      auto bounds = GetSectionBounds(s);<br>
       InitStructBuilder.add(bounds.first);<br>
       InitStructBuilder.add(bounds.second);<br>
     };<br>
-    addSection(SelSection);<br>
-    addSection(ClsSection);<br>
-    addSection(ClsRefSection);<br>
-    addSection(CatSection);<br>
-    addSection(ProtocolSection);<br>
-    addSection(ProtocolRefSection);<br>
-    addSection(ClassAliasSection);<br>
-    addSection(ConstantStringSection);<br>
     auto *InitStruct = InitStructBuilder.finishAndCreateGlobal(".objc_init",<br>
         CGM.getPointerAlign(), false, llvm::GlobalValue::LinkOnceODRLinkage);<br>
     InitStruct->setVisibility(llvm::GlobalValue::HiddenVisibility);<br>
@@ -1451,18 +1500,23 @@ class CGObjCGNUstep2 : public CGObjCGNUs<br>
     // Check that this hasn't been renamed.  This shouldn't happen, because<br>
     // this function should be called precisely once.<br>
     assert(InitVar->getName() == ".objc_ctor");<br>
-    InitVar->setSection(".ctors");<br>
+    // In Windows, initialisers are sorted by the suffix.  XCL is for library<br>
+    // initialisers, which run before user initialisers.  We are running<br>
+    // Objective-C loads at the end of library load.  This means +load methods<br>
+    // will run before any other static constructors, but that static<br>
+    // constructors can see a fully initialised Objective-C state.<br>
+    if (CGM.getTriple().isOSBinFormatCOFF())<br>
+        InitVar->setSection(".CRT$XCLz");<br>
+    else<br>
+      InitVar->setSection(".ctors");<br>
     InitVar->setVisibility(llvm::GlobalValue::HiddenVisibility);<br>
     InitVar->setComdat(TheModule.getOrInsertComdat(".objc_ctor"));<br>
-    CGM.addCompilerUsedGlobal(InitVar);<br>
+    CGM.addUsedGlobal(InitVar);<br>
     for (auto *C : Categories) {<br>
       auto *Cat = cast<llvm::GlobalVariable>(C->stripPointerCasts());<br>
-      Cat->setSection(CatSection);<br>
+      Cat->setSection(sectionName<CategorySection>());<br>
       CGM.addUsedGlobal(Cat);<br>
     }<br>
-    // Add a null value fore each special section so that we can always<br>
-    // guarantee that the _start and _stop symbols will exist and be<br>
-    // meaningful.<br>
     auto createNullGlobal = [&](StringRef Name, ArrayRef<llvm::Constant*> Init,<br>
         StringRef Section) {<br>
       auto nullBuilder = builder.beginStruct();<br>
@@ -1476,38 +1530,48 @@ class CGObjCGNUstep2 : public CGObjCGNUs<br>
       CGM.addUsedGlobal(GV);<br>
       return GV;<br>
     };<br>
-    createNullGlobal(".objc_null_selector", {NULLPtr, NULLPtr}, SelSection);<br>
-    if (Categories.empty())<br>
-      createNullGlobal(".objc_null_category", {NULLPtr, NULLPtr,<br>
-                    NULLPtr, NULLPtr, NULLPtr, NULLPtr, NULLPtr}, CatSection);<br>
-    if (!EmittedClass) {<br>
-      createNullGlobal(".objc_null_cls_init_ref", NULLPtr, ClsSection);<br>
-      createNullGlobal(".objc_null_class_ref", { NULLPtr, NULLPtr },<br>
-          ClsRefSection);<br>
-    }<br>
-    if (!EmittedProtocol)<br>
-      createNullGlobal(".objc_null_protocol", {NULLPtr, NULLPtr, NULLPtr,<br>
-          NULLPtr, NULLPtr, NULLPtr, NULLPtr, NULLPtr, NULLPtr, NULLPtr,<br>
-          NULLPtr}, ProtocolSection);<br>
-    if (!EmittedProtocolRef)<br>
-      createNullGlobal(".objc_null_protocol_ref", {NULLPtr}, ProtocolRefSection);<br>
-    if (!ClassAliases.empty())<br>
-      for (auto clsAlias : ClassAliases)<br>
-        createNullGlobal(std::string(".objc_class_alias") +<br>
-            clsAlias.second, { MakeConstantString(clsAlias.second),<br>
-            GetClassVar(clsAlias.first) }, ClassAliasSection);<br>
-    else<br>
-      createNullGlobal(".objc_null_class_alias", { NULLPtr, NULLPtr },<br>
-          ClassAliasSection);<br>
-    if (ConstantStrings.empty()) {<br>
-      auto i32Zero = llvm::ConstantInt::get(Int32Ty, 0);<br>
-      createNullGlobal(".objc_null_constant_string", { NULLPtr, i32Zero,<br>
-          i32Zero, i32Zero, i32Zero, NULLPtr }, ConstantStringSection);<br>
+    for (auto clsAlias : ClassAliases)<br>
+      createNullGlobal(std::string(".objc_class_alias") +<br>
+          clsAlias.second, { MakeConstantString(clsAlias.second),<br>
+          GetClassVar(clsAlias.first) }, sectionName<ClassAliasSection>());<br>
+    // On ELF platforms, add a null value for each special section so that we<br>
+    // can always guarantee that the _start and _stop symbols will exist and be<br>
+    // meaningful.  This is not required on COFF platforms, where our start and<br>
+    // stop symbols will create the section.<br>
+    if (!CGM.getTriple().isOSBinFormatCOFF()) {<br>
+      createNullGlobal(".objc_null_selector", {NULLPtr, NULLPtr},<br>
+          sectionName<SelectorSection>());<br>
+      if (Categories.empty())<br>
+        createNullGlobal(".objc_null_category", {NULLPtr, NULLPtr,<br>
+                      NULLPtr, NULLPtr, NULLPtr, NULLPtr, NULLPtr},<br>
+            sectionName<CategorySection>());<br>
+      if (!EmittedClass) {<br>
+        createNullGlobal(".objc_null_cls_init_ref", NULLPtr,<br>
+            sectionName<ClassReferenceSection>());<br>
+        createNullGlobal(".objc_null_class_ref", { NULLPtr, NULLPtr },<br>
+            sectionName<ClassReferenceSection>());<br>
+      }<br>
+      if (!EmittedProtocol)<br>
+        createNullGlobal(".objc_null_protocol", {NULLPtr, NULLPtr, NULLPtr,<br>
+            NULLPtr, NULLPtr, NULLPtr, NULLPtr, NULLPtr, NULLPtr, NULLPtr,<br>
+            NULLPtr}, sectionName<ProtocolSection>());<br>
+      if (!EmittedProtocolRef)<br>
+        createNullGlobal(".objc_null_protocol_ref", {NULLPtr},<br>
+            sectionName<ProtocolReferenceSection>());<br>
+      if (ClassAliases.empty())<br>
+        createNullGlobal(".objc_null_class_alias", { NULLPtr, NULLPtr },<br>
+            sectionName<ClassAliasSection>());<br>
+      if (ConstantStrings.empty()) {<br>
+        auto i32Zero = llvm::ConstantInt::get(Int32Ty, 0);<br>
+        createNullGlobal(".objc_null_constant_string", { NULLPtr, i32Zero,<br>
+            i32Zero, i32Zero, i32Zero, NULLPtr },<br>
+            sectionName<ConstantStringSection>());<br>
+      }<br>
     }<br>
     ConstantStrings.clear();<br>
     Categories.clear();<br>
     Classes.clear();<br>
-    return nullptr;//CGObjCGNU::ModuleInitFunction();<br>
+    return nullptr;<br>
   }<br>
   /// In the v2 ABI, ivar offset variables use the type encoding in their name<br>
   /// to trigger linker failures if the types don't match.<br>
@@ -1774,7 +1838,7 @@ class CGObjCGNUstep2 : public CGObjCGNUs<br>
     }<br>
<br>
     auto *classRefSymbol = GetClassVar(className);<br>
-    classRefSymbol->setSection(ClsRefSection);<br>
+    classRefSymbol->setSection(sectionName<ClassReferenceSection>());<br>
     classRefSymbol->setInitializer(llvm::ConstantExpr::getBitCast(classStruct, IdTy));<br>
<br>
<br>
@@ -1805,7 +1869,7 @@ class CGObjCGNUstep2 : public CGObjCGNUs<br>
     auto classInitRef = new llvm::GlobalVariable(TheModule,<br>
         classStruct->getType(), false, llvm::GlobalValue::ExternalLinkage,<br>
         classStruct, "._OBJC_INIT_CLASS_" + className);<br>
-    classInitRef->setSection(ClsSection);<br>
+    classInitRef->setSection(sectionName<ClassSection>());<br>
     CGM.addUsedGlobal(classInitRef);<br>
<br>
     EmittedClass = true;<br>
@@ -1829,6 +1893,18 @@ class CGObjCGNUstep2 : public CGObjCGNUs<br>
<br>
 };<br>
<br>
+const char *const CGObjCGNUstep2::SectionsBaseNames[8] =<br>
+{<br>
+"__objc_selectors",<br>
+"__objc_classes",<br>
+"__objc_class_refs",<br>
+"__objc_cats",<br>
+"__objc_protocols",<br>
+"__objc_protocol_refs",<br>
+"__objc_class_aliases",<br>
+"__objc_constant_string"<br>
+};<br>
+<br>
 /// Support for the ObjFW runtime.<br>
 class CGObjCObjFW: public CGObjCGNU {<br>
 protected:<br>
@@ -1931,6 +2007,8 @@ CGObjCGNU::CGObjCGNU(CodeGenModule &cgm,<br>
     ProtocolVersion(protocolClassVersion), ClassABIVersion(classABI) {<br>
<br>
   msgSendMDKind = VMContext.getMDKindID("GNUObjCMessageSend");<br>
+  usesSEHExceptions =<br>
+      cgm.getContext().getTargetInfo().getTriple().isWindowsMSVCEnvironment();<br>
<br>
   CodeGenTypes &Types = CGM.getTypes();<br>
   IntTy = cast<llvm::IntegerType>(<br>
@@ -2186,6 +2264,9 @@ llvm::Constant *CGObjCGNU::GetEHType(Qua<br>
 }<br>
<br>
 llvm::Constant *CGObjCGNUstep::GetEHType(QualType T) {<br>
+  if (usesSEHExceptions)<br>
+    return CGM.getCXXABI().getAddrOfRTTIDescriptor(T);<br>
+<br>
   if (!CGM.getLangOpts().CPlusPlus)<br>
     return CGObjCGNU::GetEHType(T);<br>
<br>
@@ -3726,6 +3807,7 @@ void CGObjCGNU::EmitThrowStmt(CodeGenFun<br>
                               const ObjCAtThrowStmt &S,<br>
                               bool ClearInsertionPoint) {<br>
   llvm::Value *ExceptionAsObject;<br>
+  bool isRethrow = false;<br>
<br>
   if (const Expr *ThrowExpr = S.getThrowExpr()) {<br>
     llvm::Value *Exception = CGF.EmitObjCThrowOperand(ThrowExpr);<br>
@@ -3734,11 +3816,24 @@ void CGObjCGNU::EmitThrowStmt(CodeGenFun<br>
     assert((!CGF.ObjCEHValueStack.empty() && CGF.ObjCEHValueStack.back()) &&<br>
            "Unexpected rethrow outside @catch block.");<br>
     ExceptionAsObject = CGF.ObjCEHValueStack.back();<br>
+    isRethrow = true;<br>
+  }<br>
+  if (isRethrow && usesSEHExceptions) {<br>
+    // For SEH, ExceptionAsObject may be undef, because the catch handler is<br>
+    // not passed it for catchalls and so it is not visible to the catch<br>
+    // funclet.  The real thrown object will still be live on the stack at this<br>
+    // point and will be rethrown.  If we are explicitly rethrowing the object<br>
+    // that was passed into the `@catch` block, then this code path is not<br>
+    // reached and we will instead call `objc_exception_throw` with an explicit<br>
+    // argument.<br>
+    CGF.EmitRuntimeCallOrInvoke(ExceptionReThrowFn).setDoesNotReturn();<br>
+  }<br>
+  else {<br>
+    ExceptionAsObject = CGF.Builder.CreateBitCast(ExceptionAsObject, IdTy);<br>
+    llvm::CallSite Throw =<br>
+        CGF.EmitRuntimeCallOrInvoke(ExceptionThrowFn, ExceptionAsObject);<br>
+    Throw.setDoesNotReturn();<br>
   }<br>
-  ExceptionAsObject = CGF.Builder.CreateBitCast(ExceptionAsObject, IdTy);<br>
-  llvm::CallSite Throw =<br>
-      CGF.EmitRuntimeCallOrInvoke(ExceptionThrowFn, ExceptionAsObject);<br>
-  Throw.setDoesNotReturn();<br>
   CGF.Builder.CreateUnreachable();<br>
   if (ClearInsertionPoint)<br>
     CGF.Builder.ClearInsertionPoint();<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CGObjCRuntime.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCRuntime.cpp?rev=339428&r1=339427&r2=339428&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCRuntime.cpp?rev=339428&r1=339427&r2=339428&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CGObjCRuntime.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CGObjCRuntime.cpp Fri Aug 10 05:53:13 2018<br>
@@ -15,6 +15,7 @@<br>
<br>
 #include "CGObjCRuntime.h"<br>
 #include "CGCleanup.h"<br>
+#include "CGCXXABI.h"<br>
 #include "CGRecordLayout.h"<br>
 #include "CodeGenFunction.h"<br>
 #include "CodeGenModule.h"<br>
@@ -22,6 +23,7 @@<br>
 #include "clang/AST/StmtObjC.h"<br>
 #include "clang/CodeGen/CGFunctionInfo.h"<br>
 #include "llvm/IR/CallSite.h"<br>
+#include "llvm/Support/SaveAndRestore.h"<br>
<br>
 using namespace clang;<br>
 using namespace CodeGen;<br>
@@ -120,6 +122,8 @@ namespace {<br>
     const Stmt *Body;<br>
     llvm::BasicBlock *Block;<br>
     llvm::Constant *TypeInfo;<br>
+    /// Flags used to differentiate cleanups and catchalls in Windows SEH<br>
+    unsigned Flags;<br>
   };<br>
<br>
   struct CallObjCEndCatch final : EHScopeStack::Cleanup {<br>
@@ -148,13 +152,17 @@ void CGObjCRuntime::EmitTryCatchStmt(Cod<br>
   if (S.getNumCatchStmts())<br>
     Cont = CGF.getJumpDestInCurrentScope("eh.cont");<br>
<br>
+  bool useFunclets = EHPersonality::get(CGF).usesFuncletPads();<br>
+<br>
   CodeGenFunction::FinallyInfo FinallyInfo;<br>
-  if (const ObjCAtFinallyStmt *Finally = S.getFinallyStmt())<br>
-    FinallyInfo.enter(CGF, Finally->getFinallyBody(),<br>
-                      beginCatchFn, endCatchFn, exceptionRethrowFn);<br>
+  if (!useFunclets)<br>
+    if (const ObjCAtFinallyStmt *Finally = S.getFinallyStmt())<br>
+      FinallyInfo.enter(CGF, Finally->getFinallyBody(),<br>
+                        beginCatchFn, endCatchFn, exceptionRethrowFn);<br>
<br>
   SmallVector<CatchHandler, 8> Handlers;<br>
<br>
+<br>
   // Enter the catch, if there is one.<br>
   if (S.getNumCatchStmts()) {<br>
     for (unsigned I = 0, N = S.getNumCatchStmts(); I != N; ++I) {<br>
@@ -166,10 +174,13 @@ void CGObjCRuntime::EmitTryCatchStmt(Cod<br>
       Handler.Variable = CatchDecl;<br>
       Handler.Body = CatchStmt->getCatchBody();<br>
       Handler.Block = CGF.createBasicBlock("catch");<br>
+      Handler.Flags = 0;<br>
<br>
       // @catch(...) always matches.<br>
       if (!CatchDecl) {<br>
-        Handler.TypeInfo = nullptr; // catch-all<br>
+        auto catchAll = getCatchAllTypeInfo();<br>
+        Handler.TypeInfo = catchAll.RTTI;<br>
+        Handler.Flags = catchAll.Flags;<br>
         // Don't consider any other catches.<br>
         break;<br>
       }<br>
@@ -179,9 +190,31 @@ void CGObjCRuntime::EmitTryCatchStmt(Cod<br>
<br>
     EHCatchScope *Catch = CGF.EHStack.pushCatch(Handlers.size());<br>
     for (unsigned I = 0, E = Handlers.size(); I != E; ++I)<br>
-      Catch->setHandler(I, Handlers[I].TypeInfo, Handlers[I].Block);<br>
+      Catch->setHandler(I, { Handlers[I].TypeInfo, Handlers[I].Flags }, Handlers[I].Block);<br>
   }<br>
<br>
+  if (useFunclets)<br>
+    if (const ObjCAtFinallyStmt *Finally = S.getFinallyStmt()) {<br>
+        CodeGenFunction HelperCGF(CGM, /*suppressNewContext=*/true);<br>
+        if (!CGF.CurSEHParent)<br>
+            CGF.CurSEHParent = cast<NamedDecl>(CGF.CurFuncDecl);<br>
+        // Outline the finally block.<br>
+        const Stmt *FinallyBlock = Finally->getFinallyBody();<br>
+        HelperCGF.startOutlinedSEHHelper(CGF, /*isFilter*/false, FinallyBlock);<br>
+<br>
+        // Emit the original filter expression, convert to i32, and return.<br>
+        HelperCGF.EmitStmt(FinallyBlock);<br>
+<br>
+        HelperCGF.FinishFunction(FinallyBlock->getLocEnd());<br>
+<br>
+        llvm::Function *FinallyFunc = HelperCGF.CurFn;<br>
+<br>
+<br>
+        // Push a cleanup for __finally blocks.<br>
+        CGF.pushSEHCleanup(NormalAndEHCleanup, FinallyFunc);<br>
+    }<br>
+<br>
+  <br>
   // Emit the try body.<br>
   CGF.EmitStmt(S.getTryBody());<br>
<br>
@@ -197,6 +230,13 @@ void CGObjCRuntime::EmitTryCatchStmt(Cod<br>
     CatchHandler &Handler = Handlers[I];<br>
<br>
     CGF.EmitBlock(Handler.Block);<br>
+    llvm::CatchPadInst *CPI = nullptr;<br>
+    SaveAndRestore<llvm::Instruction *> RestoreCurrentFuncletPad(CGF.CurrentFuncletPad);<br>
+    if (useFunclets)<br>
+      if ((CPI = dyn_cast_or_null<llvm::CatchPadInst>(Handler.Block->getFirstNonPHI()))) {<br>
+        CGF.CurrentFuncletPad = CPI;<br>
+        CPI->setOperand(2, CGF.getExceptionSlot().getPointer());<br>
+      }<br>
     llvm::Value *RawExn = CGF.getExceptionFromSlot();<br>
<br>
     // Enter the catch.<br>
@@ -223,6 +263,8 @@ void CGObjCRuntime::EmitTryCatchStmt(Cod<br>
       CGF.EmitAutoVarDecl(*CatchParam);<br>
       EmitInitOfCatchParam(CGF, CastExn, CatchParam);<br>
     }<br>
+    if (CPI)<br>
+        CGF.EHStack.pushCleanup<CatchRetScope>(NormalCleanup, CPI);<br>
<br>
     CGF.ObjCEHValueStack.push_back(Exn);<br>
     CGF.EmitStmt(Handler.Body);<br>
@@ -232,13 +274,13 @@ void CGObjCRuntime::EmitTryCatchStmt(Cod<br>
     cleanups.ForceCleanup();<br>
<br>
     CGF.EmitBranchThroughCleanup(Cont);<br>
-  }<br>
+  }  <br>
<br>
   // Go back to the try-statement fallthrough.<br>
   CGF.Builder.restoreIP(SavedIP);<br>
<br>
   // Pop out of the finally.<br>
-  if (S.getFinallyStmt())<br>
+  if (!useFunclets && S.getFinallyStmt())<br>
     FinallyInfo.exit(CGF);<br>
<br>
   if (Cont.isValid())<br>
@@ -277,7 +319,7 @@ namespace {<br>
       : SyncExitFn(SyncExitFn), SyncArg(SyncArg) {}<br>
<br>
     void Emit(CodeGenFunction &CGF, Flags flags) override {<br>
-      CGF.Builder.CreateCall(SyncExitFn, SyncArg)->setDoesNotThrow();<br>
+      CGF.EmitNounwindRuntimeCall(SyncExitFn, SyncArg);<br>
     }<br>
   };<br>
 }<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CGObjCRuntime.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCRuntime.h?rev=339428&r1=339427&r2=339428&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCRuntime.h?rev=339428&r1=339427&r2=339428&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CGObjCRuntime.h (original)<br>
+++ cfe/trunk/lib/CodeGen/CGObjCRuntime.h Fri Aug 10 05:53:13 2018<br>
@@ -17,6 +17,7 @@<br>
 #define LLVM_CLANG_LIB_CODEGEN_CGOBJCRUNTIME_H<br>
 #include "CGBuilder.h"<br>
 #include "CGCall.h"<br>
+#include "CGCleanup.h"<br>
 #include "CGValue.h"<br>
 #include "clang/AST/DeclObjC.h"<br>
 #include "clang/Basic/IdentifierTable.h" // Selector<br>
@@ -141,6 +142,8 @@ public:<br>
   /// error to Sema.<br>
   virtual llvm::Constant *GetEHType(QualType T) = 0;<br>
<br>
+  virtual CatchTypeInfo getCatchAllTypeInfo() { return { nullptr, 0 }; }<br>
+<br>
   /// Generate a constant string object.<br>
   virtual ConstantAddress GenerateConstantString(const StringLiteral *) = 0;<br>
<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=339428&r1=339427&r2=339428&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=339428&r1=339427&r2=339428&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)<br>
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Fri Aug 10 05:53:13 2018<br>
@@ -470,7 +470,7 @@ public:<br>
   /// potentially set the return value.<br>
   bool SawAsmBlock = false;<br>
<br>
-  const FunctionDecl *CurSEHParent = nullptr;<br>
+  const NamedDecl *CurSEHParent = nullptr;<br>
<br>
   /// True if the current function is an outlined SEH helper. This can be a<br>
   /// finally block or filter expression.<br>
@@ -2878,6 +2878,8 @@ public:<br>
   void EnterSEHTryStmt(const SEHTryStmt &S);<br>
   void ExitSEHTryStmt(const SEHTryStmt &S);<br>
<br>
+  void pushSEHCleanup(CleanupKind kind,<br>
+                      llvm::Function *FinallyFunc);<br>
   void startOutlinedSEHHelper(CodeGenFunction &ParentCGF, bool IsFilter,<br>
                               const Stmt *OutlinedStmt);<br>
<br>
<br>
Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=339428&r1=339427&r2=339428&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=339428&r1=339427&r2=339428&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)<br>
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Fri Aug 10 05:53:13 2018<br>
@@ -4915,7 +4915,8 @@ ObjCRuntime Clang::AddObjCRuntimeArgs(co<br>
     }<br>
     if ((runtime.getKind() == ObjCRuntime::GNUstep) &&<br>
         (runtime.getVersion() >= VersionTuple(2, 0)))<br>
-      if (!getToolChain().getTriple().isOSBinFormatELF()) {<br>
+      if (!getToolChain().getTriple().isOSBinFormatELF() &&<br>
+          !getToolChain().getTriple().isOSBinFormatCOFF()) {<br>
         getToolChain().getDriver().Diag(<br>
             diag::err_drv_gnustep_objc_runtime_incompatible_binary)<br>
           << runtime.getVersion().getMajor();<br>
<br>
Modified: cfe/trunk/test/CodeGenObjC/gnu-init.m<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/gnu-init.m?rev=339428&r1=339427&r2=339428&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/gnu-init.m?rev=339428&r1=339427&r2=339428&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGenObjC/gnu-init.m (original)<br>
+++ cfe/trunk/test/CodeGenObjC/gnu-init.m Fri Aug 10 05:53:13 2018<br>
@@ -1,4 +1,5 @@<br>
 // RUN: %clang_cc1 -triple x86_64-unknown-freebsd -S -emit-llvm -fobjc-runtime=gnustep-2.0 -o - %s | FileCheck %s -check-prefix=CHECK-NEW<br>
+// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -S -emit-llvm -fobjc-runtime=gnustep-2.0 -o - %s | FileCheck %s -check-prefix=CHECK-WIN<br>
 // RUN: %clang_cc1 -triple x86_64-unknown-freebsd -S -emit-llvm -fobjc-runtime=gnustep-1.8 -o - %s | FileCheck %s -check-prefix=CHECK-OLD<br>
<br>
 // Almost minimal Objective-C file, check that it emits calls to the correct<br>
@@ -49,9 +50,9 @@<br>
 // CHECK-NEW: @.objc_null_class_alias = linkonce_odr hidden global { i8*, i8* } zeroinitializer, section "__objc_class_aliases", comdat, align 8<br>
 // CHECK-NEW: @.objc_null_constant_string = linkonce_odr hidden global { i8*, i32, i32, i32, i32, i8* } zeroinitializer, section "__objc_constant_string", comdat, align 8<br>
 // Make sure that the null symbols are not going to be removed, even by linking.<br>
-// CHECK-NEW: @llvm.used = appending global [7 x i8*] [i8* bitcast ({ { i8*, i8*, i8*, i64, i64, i64, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i64, i8* }*, i8*, i8*, i64, i64, i64, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i64, i8* }** @._OBJC_INIT_CLASS_X
 to i8*), i8* bitcast ({ i8*, i8* }* @.objc_null_selector to i8*), i8* bitcast ({ i8*, i8*, i8*, i8*, i8*, i8*, i8* }* @.objc_null_category to i8*), i8* bitcast ({ i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }* @.objc_null_protocol to i8*), i8* bitcast
 ({ i8* }* @.objc_null_protocol_ref to i8*), i8* bitcast ({ i8*, i8* }* @.objc_null_class_alias to i8*), i8* bitcast ({ i8*, i32, i32, i32, i32, i8* }* @.objc_null_constant_string to i8*)], section "llvm.metadata"<br>
+// CHECK-NEW: @llvm.used = appending global [8 x i8*] [i8* bitcast ({ { i8*, i8*, i8*, i64, i64, i64, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i64, i8* }*, i8*, i8*, i64, i64, i64, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i64, i8* }** @._OBJC_INIT_CLASS_X
 to i8*), i8* bitcast (void ()** @.objc_ctor to i8*), i8* bitcast ({ i8*, i8* }* @.objc_null_selector to i8*), i8* bitcast ({ i8*, i8*, i8*, i8*, i8*, i8*, i8* }* @.objc_null_category to i8*), i8* bitcast ({ i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*,
 i8* }* @.objc_null_protocol to i8*), i8* bitcast ({ i8* }* @.objc_null_protocol_ref to i8*), i8* bitcast ({ i8*, i8* }* @.objc_null_class_alias to i8*), i8* bitcast ({ i8*, i32, i32, i32, i32, i8* }* @.objc_null_constant_string to i8*)], section "llvm.metadata"<br>
 // Make sure that the load function and the reference to it are marked as used.<br>
-// CHECK-NEW: @llvm.compiler.used = appending global [2 x i8*] [i8* bitcast (void ()* @.objcv2_load_function to i8*), i8* bitcast (void ()** @.objc_ctor to i8*)], section "llvm.metadata"<br>
+// CHECK-NEW: @llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @.objcv2_load_function to i8*)], section "llvm.metadata"<br>
<br>
 // Check that we emit the load function in a comdat and that it does the right thing.<br>
 // CHECK-NEW: define linkonce_odr hidden void @.objcv2_load_function() comdat {<br>
@@ -67,3 +68,37 @@<br>
 // CHECK-OLD-NEXT: entry:<br>
 // CHECK-OLD-NEXT: call void ({ i64, i64, i8*, { i64, { i8*, i8* }*, i16, i16, [4 x i8*] }* }*, ...) @__objc_exec_class({ i64, i64, i8*, { i64, { i8*, i8* }*, i16, i16, [4 x i8*] }* }* @4)<br>
<br>
+<br>
+<br>
+// Make sure all of our section boundary variables are emitted correctly.<br>
+// CHECK-WIN: @__start___objc_selectors = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_selectors$a", comdat, align 1<br>
+// CHECK-WIN: @__stop__objc_selectors = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_selectors$z", comdat, align 1<br>
+// CHECK-WIN: @__start___objc_classes = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_classes$a", comdat, align 1<br>
+// CHECK-WIN: @__stop__objc_classes = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_classes$z", comdat, align 1<br>
+// CHECK-WIN: @__start___objc_class_refs = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_class_refs$a", comdat, align 1<br>
+// CHECK-WIN: @__stop__objc_class_refs = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_class_refs$z", comdat, align 1<br>
+// CHECK-WIN: @__start___objc_cats = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_cats$a", comdat, align 1<br>
+// CHECK-WIN: @__stop__objc_cats = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_cats$z", comdat, align 1<br>
+// CHECK-WIN: @__start___objc_protocols = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_protocols$a", comdat, align 1<br>
+// CHECK-WIN: @__stop__objc_protocols = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_protocols$z", comdat, align 1<br>
+// CHECK-WIN: @__start___objc_protocol_refs = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_protocol_refs$a", comdat, align 1<br>
+// CHECK-WIN: @__stop__objc_protocol_refs = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_protocol_refs$z", comdat, align 1<br>
+// CHECK-WIN: @__start___objc_class_aliases = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_class_aliases$a", comdat, align 1<br>
+// CHECK-WIN: @__stop__objc_class_aliases = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_class_aliases$z", comdat, align 1<br>
+// CHECK-WIN: @__start___objc_constant_string = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_constant_string$a", comdat, align 1<br>
+// CHECK-WIN: @__stop__objc_constant_string = linkonce_odr hidden global %.objc_section_sentinel zeroinitializer, section "__objc_constant_string$z", comdat, align 1<br>
+// CHECK-WIN: @.objc_init = linkonce_odr hidden global { i64, %.objc_section_sentinel*, %.objc_section_sentinel*, %.objc_section_sentinel*, %.objc_section_sentinel*, %.objc_section_sentinel*, %.objc_section_sentinel*, %.objc_section_sentinel*, %.objc_section_sentinel*,
 %.objc_section_sentinel*, %.objc_section_sentinel*, %.objc_section_sentinel*, %.objc_section_sentinel*, %.objc_section_sentinel*, %.objc_section_sentinel*, %.objc_section_sentinel*, %.objc_section_sentinel* } { i64 0, %.objc_section_sentinel* @__start___objc_selectors,
 %.objc_section_sentinel* @__stop__objc_selectors, %.objc_section_sentinel* @__start___objc_classes, %.objc_section_sentinel* @__stop__objc_classes, %.objc_section_sentinel* @__start___objc_class_refs, %.objc_section_sentinel* @__stop__objc_class_refs, %.objc_section_sentinel*
 @__start___objc_cats, %.objc_section_sentinel* @__stop__objc_cats, %.objc_section_sentinel* @__start___objc_protocols, %.objc_section_sentinel* @__stop__objc_protocols, %.objc_section_sentinel* @__start___objc_protocol_refs, %.objc_section_sentinel* @__stop__objc_protocol_refs,
 %.objc_section_sentinel* @__start___objc_class_aliases, %.objc_section_sentinel* @__stop__objc_class_aliases, %.objc_section_sentinel* @__start___objc_constant_string, %.objc_section_sentinel* @__stop__objc_constant_string }, comdat, align 8<br>
+<br>
+// Make sure our init variable is in the correct section for late library init.<br>
+// CHECK-WIN: @.objc_ctor = linkonce hidden constant void ()* @.objcv2_load_function, section ".CRT$XCLz", comdat<br>
+<br>
+// We shouldn't have emitted any null placeholders on Windows.<br>
+// CHECK-WIN: @llvm.used = appending global [2 x i8*] [i8* bitcast ({ { i8*, i8*, i8*, i32, i32, i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i32, i8* }*, i8*, i8*, i32, i32, i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i32, i8* }** @._OBJC_INIT_CLASS_X
 to i8*), i8* bitcast (void ()** @.objc_ctor to i8*)], section "llvm.metadata"<br>
+// CHECK-WIN: @llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @.objcv2_load_function to i8*)], section "llvm.metadata"<br>
+<br>
+// Check our load function is in a comdat.<br>
+// CHECK-WIN: define linkonce_odr hidden void @.objcv2_load_function() comdat {<br>
+<br>
+// Make sure we have dllimport on the load function<br>
+// CHECK-WIN: declare dllimport void @__objc_load<br>
+<br>
<br>
Modified: cfe/trunk/test/CodeGenObjC/gnustep2-proto.m<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/gnustep2-proto.m?rev=339428&r1=339427&r2=339428&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/gnustep2-proto.m?rev=339428&r1=339427&r2=339428&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGenObjC/gnustep2-proto.m (original)<br>
+++ cfe/trunk/test/CodeGenObjC/gnustep2-proto.m Fri Aug 10 05:53:13 2018<br>
@@ -22,11 +22,11 @@<br>
<br>
 // Check that we're emitting the protocol and a correctly initialised<br>
 // indirection variable.<br>
-// CHECK: @._OBJC_PROTOCOL_X = global <br>
+// CHECK: @._OBJC_PROTOCOL_X = global<br>
 // CHECK-SAME: , section "__objc_protocols", comdat, align 8<br>
-// CHECK: @._OBJC_REF_PROTOCOL_X = global <br>
+// CHECK: @._OBJC_REF_PROTOCOL_X = linkonce_odr global<br>
 // CHECK-SAME: @._OBJC_PROTOCOL_X<br>
-// CHECK-SAME: , section "__objc_protocol_refs", align 8<br>
+// CHECK-SAME: , section "__objc_protocol_refs", comdat, align 8<br>
<br>
<br>
 // Check that we load from the indirection variable on protocol references.<br>
<br>
Modified: cfe/trunk/test/CodeGenObjCXX/<a href="http://arc-marker-funclet.mm" target="_blank">arc-marker-funclet.mm</a><br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/arc-marker-funclet.mm?rev=339428&r1=339427&r2=339428&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/arc-marker-funclet.mm?rev=339428&r1=339427&r2=339428&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGenObjCXX/<a href="http://arc-marker-funclet.mm" target="_blank">arc-marker-funclet.mm</a> (original)<br>
+++ cfe/trunk/test/CodeGenObjCXX/<a href="http://arc-marker-funclet.mm" target="_blank">arc-marker-funclet.mm</a> Fri Aug 10 05:53:13 2018<br>
@@ -10,7 +10,7 @@ void g() {<br>
   }<br>
 }<br>
<br>
-// CHECK: call i8* @"?f@@YAPAUobjc_object@@XZ"() [ "funclet"(token %1) ]<br>
+// CHECK: call i8* @"?f@@YAPAU.objc_object@@XZ"() [ "funclet"(token %1) ]<br>
 // CHECK-NEXT: call void asm sideeffect "movl{{.*}}%ebp, %ebp{{.*}}", ""() [ "funclet"(token %1) ]<br>
<br>
 // The corresponding f() call was invoked from the entry basic block.<br>
<br>
Modified: cfe/trunk/test/CodeGenObjCXX/<a href="http://microsoft-abi-arc-param-order.mm" target="_blank">microsoft-abi-arc-param-order.mm</a><br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm?rev=339428&r1=339427&r2=339428&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm?rev=339428&r1=339427&r2=339428&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGenObjCXX/<a href="http://microsoft-abi-arc-param-order.mm" target="_blank">microsoft-abi-arc-param-order.mm</a> (original)<br>
+++ cfe/trunk/test/CodeGenObjCXX/<a href="http://microsoft-abi-arc-param-order.mm" target="_blank">microsoft-abi-arc-param-order.mm</a> Fri Aug 10 05:53:13 2018<br>
@@ -9,7 +9,7 @@ struct A {<br>
<br>
 // Verify that we destruct things from left to right in the MS C++ ABI: a, b, c, d.<br>
 //<br>
-// CHECK-LABEL: define dso_local void @"?test_arc_order@@YAXUA@@PAUobjc_object@@01@Z"<br>
+// CHECK-LABEL: define dso_local void @"?test_arc_order@@YAXUA@@PAU.objc_object@@01@Z"<br>
 // CHECK:                       (<{ %struct.A, i8*, %struct.A, i8* }>* inalloca)<br>
 void test_arc_order(A a, id __attribute__((ns_consumed)) b , A c, id __attribute__((ns_consumed)) d) {<br>
   // CHECK: call x86_thiscallcc void @"??1A@@QAE@XZ"(%struct.A* %{{.*}})<br>
<br>
Modified: cfe/trunk/test/CodeGenObjCXX/<a href="http://msabi-objc-extensions.mm" target="_blank">msabi-objc-extensions.mm</a><br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/msabi-objc-extensions.mm?rev=339428&r1=339427&r2=339428&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/msabi-objc-extensions.mm?rev=339428&r1=339427&r2=339428&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGenObjCXX/<a href="http://msabi-objc-extensions.mm" target="_blank">msabi-objc-extensions.mm</a> (original)<br>
+++ cfe/trunk/test/CodeGenObjCXX/<a href="http://msabi-objc-extensions.mm" target="_blank">msabi-objc-extensions.mm</a> Fri Aug 10 05:53:13 2018<br>
@@ -6,61 +6,61 @@<br>
 @class I;<br>
<br>
 void f(id<P>, id, id<P>, id) {}<br>
-// CHECK-LABEL: "?f@@YAXPAU?$objc_object@U?$Protocol@UP@@@__ObjC@@@@PAUobjc_object@@01@Z"<br>
+// CHECK-LABEL: "?f@@YAXPAU?$.objc_object@U?$Protocol@UP@@@__ObjC@@@@PAU.objc_object@@01@Z"<br>
<br>
 void f(id, id<P>, id<P>, id) {}<br>
-// CHECK-LABEL: "?f@@YAXPAUobjc_object@@PAU?$objc_object@U?$Protocol@UP@@@__ObjC@@@@10@Z"<br>
+// CHECK-LABEL: "?f@@YAXPAU.objc_object@@PAU?$.objc_object@U?$Protocol@UP@@@__ObjC@@@@10@Z"<br>
<br>
 void f(id<P>, id<P>) {}<br>
-// CHECK-LABEL: "?f@@YAXPAU?$objc_object@U?$Protocol@UP@@@__ObjC@@@@0@Z"<br>
+// CHECK-LABEL: "?f@@YAXPAU?$.objc_object@U?$Protocol@UP@@@__ObjC@@@@0@Z"<br>
<br>
 void f(id<P>) {}<br>
-// CHECK-LABEL: "?f@@YAXPAU?$objc_object@U?$Protocol@UP@@@__ObjC@@@@@Z"<br>
+// CHECK-LABEL: "?f@@YAXPAU?$.objc_object@U?$Protocol@UP@@@__ObjC@@@@@Z"<br>
<br>
 void f(id<P, Q>) {}<br>
-// CHECK-LABEL: "?f@@YAXPAU?$objc_object@U?$Protocol@UP@@@__ObjC@@U?$Protocol@UQ@@@2@@@@Z"<br>
+// CHECK-LABEL: "?f@@YAXPAU?$.objc_object@U?$Protocol@UP@@@__ObjC@@U?$Protocol@UQ@@@2@@@@Z"<br>
<br>
 void f(Class<P>) {}<br>
-// CHECK-LABEL: "?f@@YAXPAU?$objc_class@U?$Protocol@UP@@@__ObjC@@@@@Z"<br>
+// CHECK-LABEL: "?f@@YAXPAU?$.objc_class@U?$Protocol@UP@@@__ObjC@@@@@Z"<br>
<br>
 void f(Class<P, Q>) {}<br>
-// CHECK-LABEL: "?f@@YAXPAU?$objc_class@U?$Protocol@UP@@@__ObjC@@U?$Protocol@UQ@@@2@@@@Z"<br>
+// CHECK-LABEL: "?f@@YAXPAU?$.objc_class@U?$Protocol@UP@@@__ObjC@@U?$Protocol@UQ@@@2@@@@Z"<br>
<br>
 void f(I<P> *) {}<br>
-// CHECK-LABEL: "?f@@YAXPAU?$I@U?$Protocol@UP@@@__ObjC@@@@@Z"<br>
+// CHECK-LABEL: "?f@@YAXPAU?$.objc_cls_I@U?$Protocol@UP@@@__ObjC@@@@@Z"<br>
<br>
 void f(I<P, Q> *) {}<br>
-// CHECK-LABEL: "?f@@YAXPAU?$I@U?$Protocol@UP@@@__ObjC@@U?$Protocol@UQ@@@2@@@@Z"<br>
+// CHECK-LABEL: "?f@@YAXPAU?$.objc_cls_I@U?$Protocol@UP@@@__ObjC@@U?$Protocol@UQ@@@2@@@@Z"<br>
<br>
 template <typename><br>
 struct S {};<br>
<br>
 void f(S<__unsafe_unretained id>) {}<br>
-// CHECK-LABEL: "?f@@YAXU?$S@PAUobjc_object@@@@@Z"<br>
+// CHECK-LABEL: "?f@@YAXU?$S@PAU.objc_object@@@@@Z"<br>
<br>
 void f(S<__autoreleasing id>) {}<br>
-// CHECK-LABEL: "?f@@YAXU?$S@U?$Autoreleasing@PAUobjc_object@@@__ObjC@@@@@Z"<br>
+// CHECK-LABEL: "?f@@YAXU?$S@U?$Autoreleasing@PAU.objc_object@@@__ObjC@@@@@Z"<br>
<br>
 void f(S<__strong id>) {}<br>
-// CHECK-LABEL: "?f@@YAXU?$S@U?$Strong@PAUobjc_object@@@__ObjC@@@@@Z"<br>
+// CHECK-LABEL: "?f@@YAXU?$S@U?$Strong@PAU.objc_object@@@__ObjC@@@@@Z"<br>
<br>
 void f(S<__weak id>) {}<br>
-// CHECK-LABEL: "?f@@YAXU?$S@U?$Weak@PAUobjc_object@@@__ObjC@@@@@Z"<br>
+// CHECK-LABEL: "?f@@YAXU?$S@U?$Weak@PAU.objc_object@@@__ObjC@@@@@Z"<br>
<br>
 void w(__weak id) {}<br>
-// CHECK-LABEL: "?w@@YAXPAUobjc_object@@@Z"<br>
+// CHECK-LABEL: "?w@@YAXPAU.objc_object@@@Z"<br>
<br>
 void s(__strong id) {}<br>
-// CHECK-LABEL: "?s@@YAXPAUobjc_object@@@Z"<br>
+// CHECK-LABEL: "?s@@YAXPAU.objc_object@@@Z"<br>
<br>
 void a(__autoreleasing id) {}<br>
-// CHECK-LABEL: "?a@@YAXPAUobjc_object@@@Z"<br>
+// CHECK-LABEL: "?a@@YAXPAU.objc_object@@@Z"<br>
<br>
 void u(__unsafe_unretained id) {}<br>
-// CHECK-LABEL: "?u@@YAXPAUobjc_object@@@Z"<br>
+// CHECK-LABEL: "?u@@YAXPAU.objc_object@@@Z"<br>
<br>
 S<__autoreleasing id> g() { return S<__autoreleasing id>(); }<br>
-// CHECK-LABEL: "?g@@YA?AU?$S@U?$Autoreleasing@PAUobjc_object@@@__ObjC@@@@XZ"<br>
+// CHECK-LABEL: "?g@@YA?AU?$S@U?$Autoreleasing@PAU.objc_object@@@__ObjC@@@@XZ"<br>
<br>
 __autoreleasing id h() { return nullptr; }<br>
-// CHECK-LABEL: "?h@@YAPAUobjc_object@@XZ"<br>
+// CHECK-LABEL: "?h@@YAPAU.objc_object@@XZ"<br>
<br>
Modified: cfe/trunk/test/CodeGenObjCXX/<a href="http://msabi-objc-types.mm" target="_blank">msabi-objc-types.mm</a><br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/msabi-objc-types.mm?rev=339428&r1=339427&r2=339428&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/msabi-objc-types.mm?rev=339428&r1=339427&r2=339428&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGenObjCXX/<a href="http://msabi-objc-types.mm" target="_blank">msabi-objc-types.mm</a> (original)<br>
+++ cfe/trunk/test/CodeGenObjCXX/<a href="http://msabi-objc-types.mm" target="_blank">msabi-objc-types.mm</a> Fri Aug 10 05:53:13 2018<br>
@@ -3,166 +3,166 @@<br>
 @class I;<br>
<br>
 id kid;<br>
-// CHECK: @"?kid@@3PAUobjc_object@@A" =  dso_local global<br>
+// CHECK: @"?kid@@3PAU.objc_object@@A" =  dso_local global<br>
<br>
 Class klass;<br>
-// CHECK: @"?klass@@3PAUobjc_class@@A" = dso_local global<br>
+// CHECK: @"?klass@@3PAU.objc_class@@A" = dso_local global<br>
<br>
 I *kI;<br>
-// CHECK: @"?kI@@3PAUI@@A" = dso_local global<br>
+// CHECK: @"?kI@@3PAU.objc_cls_I@@A" = dso_local global<br>
<br>
 void f(I *) {}<br>
-// CHECK-LABEL: "?f@@YAXPAUI@@@Z"<br>
+// CHECK-LABEL: "?f@@YAXPAU.objc_cls_I@@@Z"<br>
<br>
 void f(const I *) {}<br>
-// CHECK-LABEL: "?f@@YAXPBUI@@@Z"<br>
+// CHECK-LABEL: "?f@@YAXPBU.objc_cls_I@@@Z"<br>
<br>
 void f(I &) {}<br>
-// CHECK-LABEL: "?f@@YAXAAUI@@@Z"<br>
+// CHECK-LABEL: "?f@@YAXAAU.objc_cls_I@@@Z"<br>
<br>
 void f(const I &) {}<br>
-// CHECK-LABEL: "?f@@YAXABUI@@@Z"<br>
+// CHECK-LABEL: "?f@@YAXABU.objc_cls_I@@@Z"<br>
<br>
 void f(const I &&) {}<br>
-// CHECK-LABEL: "?f@@YAX$$QBUI@@@Z"<br>
+// CHECK-LABEL: "?f@@YAX$$QBU.objc_cls_I@@@Z"<br>
<br>
 void g(id) {}<br>
-// CHECK-LABEL: "?g@@YAXPAUobjc_object@@@Z"<br>
+// CHECK-LABEL: "?g@@YAXPAU.objc_object@@@Z"<br>
<br>
 void g(id &) {}<br>
-// CHECK-LABEL: "?g@@YAXAAPAUobjc_object@@@Z"<br>
+// CHECK-LABEL: "?g@@YAXAAPAU.objc_object@@@Z"<br>
<br>
 void g(const id &) {}<br>
-// CHECK-LABEL: "?g@@YAXABQAUobjc_object@@@Z"<br>
+// CHECK-LABEL: "?g@@YAXABQAU.objc_object@@@Z"<br>
<br>
 void g(id &&) {}<br>
-// CHECK-LABEL: "?g@@YAX$$QAPAUobjc_object@@@Z"<br>
+// CHECK-LABEL: "?g@@YAX$$QAPAU.objc_object@@@Z"<br>
<br>
 void h(Class) {}<br>
-// CHECK-LABEL: "?h@@YAXPAUobjc_class@@@Z"<br>
+// CHECK-LABEL: "?h@@YAXPAU.objc_class@@@Z"<br>
<br>
 void h(Class &) {}<br>
-// CHECK-LABEL: "?h@@YAXAAPAUobjc_class@@@Z"<br>
+// CHECK-LABEL: "?h@@YAXAAPAU.objc_class@@@Z"<br>
<br>
 void h(const Class &) {}<br>
-// CHECK-LABEL: "?h@@YAXABQAUobjc_class@@@Z"<br>
+// CHECK-LABEL: "?h@@YAXABQAU.objc_class@@@Z"<br>
<br>
 void h(Class &&) {}<br>
-// CHECK-LABEL: "?h@@YAX$$QAPAUobjc_class@@@Z"<br>
+// CHECK-LABEL: "?h@@YAX$$QAPAU.objc_class@@@Z"<br>
<br>
 I *i() { return nullptr; }<br>
-// CHECK-LABEL: "?i@@YAPAUI@@XZ"<br>
+// CHECK-LABEL: "?i@@YAPAU.objc_cls_I@@XZ"<br>
<br>
 const I *j() { return nullptr; }<br>
-// CHECK-LABEL: "?j@@YAPBUI@@XZ"<br>
+// CHECK-LABEL: "?j@@YAPBU.objc_cls_I@@XZ"<br>
<br>
 I &k() { return *kI; }<br>
-// CHECK-LABEL: "?k@@YAAAUI@@XZ"<br>
+// CHECK-LABEL: "?k@@YAAAU.objc_cls_I@@XZ"<br>
<br>
 const I &l() { return *kI; }<br>
-// CHECK-LABEL: "?l@@YAABUI@@XZ"<br>
+// CHECK-LABEL: "?l@@YAABU.objc_cls_I@@XZ"<br>
<br>
 void m(const id) {}<br>
-// CHECK-LABEL: "?m@@YAXQAUobjc_object@@@Z"<br>
+// CHECK-LABEL: "?m@@YAXQAU.objc_object@@@Z"<br>
<br>
 void m(const I *) {}<br>
-// CHECK-LABEL: "?m@@YAXPBUI@@@Z"<br>
+// CHECK-LABEL: "?m@@YAXPBU.objc_cls_I@@@Z"<br>
<br>
 void n(SEL) {}<br>
-// CHECK-LABEL: "?n@@YAXPAUobjc_selector@@@Z"<br>
+// CHECK-LABEL: "?n@@YAXPAU.objc_selector@@@Z"<br>
<br>
 void n(SEL *) {}<br>
-// CHECK-LABEL: "?n@@YAXPAPAUobjc_selector@@@Z"<br>
+// CHECK-LABEL: "?n@@YAXPAPAU.objc_selector@@@Z"<br>
<br>
 void n(const SEL *) {}<br>
-// CHECK-LABEL: "?n@@YAXPBQAUobjc_selector@@@Z"<br>
+// CHECK-LABEL: "?n@@YAXPBQAU.objc_selector@@@Z"<br>
<br>
 void n(SEL &) {}<br>
-// CHECK-LABEL: "?n@@YAXAAPAUobjc_selector@@@Z"<br>
+// CHECK-LABEL: "?n@@YAXAAPAU.objc_selector@@@Z"<br>
<br>
 void n(const SEL &) {}<br>
-// CHECK-LABEL: "?n@@YAXABQAUobjc_selector@@@Z"<br>
+// CHECK-LABEL: "?n@@YAXABQAU.objc_selector@@@Z"<br>
<br>
 void n(SEL &&) {}<br>
-// CHECK-LABEL: "?n@@YAX$$QAPAUobjc_selector@@@Z"<br>
+// CHECK-LABEL: "?n@@YAX$$QAPAU.objc_selector@@@Z"<br>
<br>
 struct __declspec(dllexport) s {<br>
   struct s &operator=(const struct s &) = delete;<br>
<br>
   void m(I *) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXPAUI@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXPAU.objc_cls_I@@@Z"<br>
<br>
   void m(const I *) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXPBUI@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXPBU.objc_cls_I@@@Z"<br>
<br>
   void m(I &) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXAAUI@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXAAU.objc_cls_I@@@Z"<br>
<br>
   void m(const I &) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXABUI@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXABU.objc_cls_I@@@Z"<br>
<br>
   void m(I &&) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAX$$QAUI@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAX$$QAU.objc_cls_I@@@Z"<br>
<br>
   void m(const I &&) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAX$$QBUI@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAX$$QBU.objc_cls_I@@@Z"<br>
<br>
   void m(id) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXPAUobjc_object@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXPAU.objc_object@@@Z"<br>
<br>
   void m(id &) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXAAPAUobjc_object@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXAAPAU.objc_object@@@Z"<br>
<br>
   void m(id &&) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAX$$QAPAUobjc_object@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAX$$QAPAU.objc_object@@@Z"<br>
<br>
   void m(const id &) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXABQAUobjc_object@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXABQAU.objc_object@@@Z"<br>
<br>
   void m(const id &&) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAX$$QBQAUobjc_object@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAX$$QBQAU.objc_object@@@Z"<br>
<br>
   void m(Class *) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXPAPAUobjc_class@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXPAPAU.objc_class@@@Z"<br>
<br>
   void m(const Class *) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXPBQAUobjc_class@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXPBQAU.objc_class@@@Z"<br>
<br>
   void m(Class) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXPAUobjc_class@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXPAU.objc_class@@@Z"<br>
<br>
   void m(Class &) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXAAPAUobjc_class@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXAAPAU.objc_class@@@Z"<br>
<br>
   void m(const Class &) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXABQAUobjc_class@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXABQAU.objc_class@@@Z"<br>
<br>
   void m(Class &&) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAX$$QAPAUobjc_class@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAX$$QAPAU.objc_class@@@Z"<br>
<br>
   void m(const Class &&) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAX$$QBQAUobjc_class@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAX$$QBQAU.objc_class@@@Z"<br>
<br>
   void m(SEL) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXPAUobjc_selector@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXPAU.objc_selector@@@Z"<br>
<br>
   void m(SEL *) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXPAPAUobjc_selector@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXPAPAU.objc_selector@@@Z"<br>
<br>
   void m(const SEL *) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXPBQAUobjc_selector@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXPBQAU.objc_selector@@@Z"<br>
<br>
   void m(SEL &) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXAAPAUobjc_selector@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXAAPAU.objc_selector@@@Z"<br>
<br>
   void m(const SEL &) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAXABQAUobjc_selector@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAXABQAU.objc_selector@@@Z"<br>
<br>
   void m(SEL &&) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAX$$QAPAUobjc_selector@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAX$$QAPAU.objc_selector@@@Z"<br>
<br>
   void m(const SEL &&) {}<br>
-  // CHECK-LABEL: "?m@s@@QAAX$$QBQAUobjc_selector@@@Z"<br>
+  // CHECK-LABEL: "?m@s@@QAAX$$QBQAU.objc_selector@@@Z"<br>
 };<br>
<br>
 template <typename T><br>
@@ -179,14 +179,14 @@ struct t {<br>
 };<br>
<br>
 template struct t<id>;<br>
-// CHECK-LABEL: "??0?$t@PAUobjc_object@@@@QAA@XZ"<br>
+// CHECK-LABEL: "??0?$t@PAU.objc_object@@@@QAA@XZ"<br>
<br>
 template struct t<remove_pointer<id>::type>;<br>
-// CHECK-LABEL: "??0?$t@Uobjc_object@@@@QAA@XZ"<br>
+// CHECK-LABEL: "??0?$t@U.objc_object@@@@QAA@XZ"<br>
<br>
 template struct t<SEL>;<br>
-// CHECK-LABEL: "??0?$t@PAUobjc_selector@@@@QAA@XZ"<br>
+// CHECK-LABEL: "??0?$t@PAU.objc_selector@@@@QAA@XZ"<br>
<br>
 template struct t<remove_pointer<SEL>::type>;<br>
-// CHECK-LABEL: "??0?$t@Uobjc_selector@@@@QAA@XZ"<br>
+// CHECK-LABEL: "??0?$t@U.objc_selector@@@@QAA@XZ"<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>