<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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
/* 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;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@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">Yes, I had just noticed I had done that.  I'll revert and redo it.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">--paulr<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></a></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""> David Majnemer [mailto:david.majnemer@gmail.com]
<br>
<b>Sent:</b> Wednesday, December 10, 2014 3:23 PM<br>
<b>To:</b> Robinson, Paul<br>
<b>Cc:</b> cfe-commits@cs.uiuc.edu<br>
<b>Subject:</b> Re: r223980 - Rename a couple of preprocessor symbols to be more descriptive. NFC.<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Dec 10, 2014 at 3:12 PM, Paul Robinson <<a href="mailto:paul_robinson@playstation.sony.com" target="_blank">paul_robinson@playstation.sony.com</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">Author: probinson<br>
Date: Wed Dec 10 17:12:37 2014<br>
New Revision: 223980<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=223980&view=rev" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=223980&view=rev</a><br>
Log:<br>
Rename a couple of preprocessor symbols to be more descriptive. NFC.<br>
Review feedback from recent changes to GetSVN.cmake.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">This commit message doesn't seem to match the commit contents.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
Modified:<br>
    cfe/trunk/lib/Sema/SemaDeclAttr.cpp<br>
    cfe/trunk/test/CodeGen/attr-optnone.c<br>
    cfe/trunk/test/SemaCXX/attr-optnone.cpp<br>
    cfe/trunk/test/SemaCXX/pragma-optimize.cpp<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=223980&r1=223979&r2=223980&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=223980&r1=223979&r2=223980&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Wed Dec 10 17:12:37 2014<br>
@@ -3146,10 +3146,22 @@ static void handleAlwaysInlineAttr(Sema<br>
                               Attr.getAttributeSpellingListIndex()));<br>
 }<br>
<br>
+static void handleMinSizeAttr(Sema &S, Decl *D,<br>
+                              const AttributeList &Attr) {<br>
+  if (checkAttrMutualExclusion<OptimizeNoneAttr>(S, D, Attr))<br>
+    return;<br>
+<br>
+  D->addAttr(::new (S.Context)<br>
+             MinSizeAttr(Attr.getRange(), S.Context,<br>
+                         Attr.getAttributeSpellingListIndex()));<br>
+}<br>
+<br>
 static void handleOptimizeNoneAttr(Sema &S, Decl *D,<br>
                                    const AttributeList &Attr) {<br>
   if (checkAttrMutualExclusion<AlwaysInlineAttr>(S, D, Attr))<br>
     return;<br>
+  if (checkAttrMutualExclusion<MinSizeAttr>(S, D, Attr))<br>
+    return;<br>
<br>
   D->addAttr(::new (S.Context)<br>
              OptimizeNoneAttr(Attr.getRange(), S.Context,<br>
@@ -4340,7 +4352,7 @@ static void ProcessDeclAttribute(Sema &S<br>
     handleExtVectorTypeAttr(S, scope, D, Attr);<br>
     break;<br>
   case AttributeList::AT_MinSize:<br>
-    handleSimpleAttribute<MinSizeAttr>(S, D, Attr);<br>
+    handleMinSizeAttr(S, D, Attr);<br>
     break;<br>
   case AttributeList::AT_OptimizeNone:<br>
     handleOptimizeNoneAttr(S, D, Attr);<br>
<br>
Modified: cfe/trunk/test/CodeGen/attr-optnone.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/attr-optnone.c?rev=223980&r1=223979&r2=223980&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/attr-optnone.c?rev=223980&r1=223979&r2=223980&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGen/attr-optnone.c (original)<br>
+++ cfe/trunk/test/CodeGen/attr-optnone.c Wed Dec 10 17:12:37 2014<br>
@@ -9,7 +9,7 @@ __attribute__((always_inline))<br>
 int test2() { return 0; }<br>
 // OPTSIZE: @test2{{.*}}[[ATTR2:#[0-9]+]]<br>
<br>
-__attribute__((optnone)) __attribute__((minsize))<br>
+__attribute__((optnone))<br>
 int test3() { return 0; }<br>
 // PRESENT-DAG: @test3{{.*}}[[ATTR3:#[0-9]+]]<br>
<br>
<br>
Modified: cfe/trunk/test/SemaCXX/attr-optnone.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/attr-optnone.cpp?rev=223980&r1=223979&r2=223980&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/attr-optnone.cpp?rev=223980&r1=223979&r2=223980&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/SemaCXX/attr-optnone.cpp (original)<br>
+++ cfe/trunk/test/SemaCXX/attr-optnone.cpp Wed Dec 10 17:12:37 2014<br>
@@ -6,6 +6,9 @@ int bar() __attribute__((optnone)) __att<br>
 int baz() __attribute__((always_inline)) __attribute__((optnone)); // expected-error{{'always_inline' and 'optnone' attributes are not compatible}}<br>
 int quz() __attribute__((optnone)) __attribute__((always_inline)); // expected-error{{'optnone' and 'always_inline' attributes are not compatible}}<br>
<br>
+int bay() __attribute__((minsize)) __attribute__((optnone)); // expected-error{{'minsize' and 'optnone' attributes are not compatible}}<br>
+int quy() __attribute__((optnone)) __attribute__((minsize)); // expected-error{{'optnone' and 'minsize' attributes are not compatible}}<br>
+<br>
 __forceinline __attribute__((optnone)) int bax(); // expected-error{{'__forceinline' and 'optnone' attributes are not compatible}}<br>
 __attribute__((optnone)) __forceinline int qux(); // expected-error{{'optnone' and '__forceinline' attributes are not compatible}}<br>
<br>
<br>
Modified: cfe/trunk/test/SemaCXX/pragma-optimize.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/pragma-optimize.cpp?rev=223980&r1=223979&r2=223980&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/pragma-optimize.cpp?rev=223980&r1=223979&r2=223980&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/SemaCXX/pragma-optimize.cpp (original)<br>
+++ cfe/trunk/test/SemaCXX/pragma-optimize.cpp Wed Dec 10 17:12:37 2014<br>
@@ -55,6 +55,13 @@ int __attribute__((always_inline)) baz(i<br>
 }<br>
 // CHECK-DAG: @_Z3bazi{{.*}} [[ATTRBAZ:#[0-9]+]]<br>
<br>
+// This function definition will not be decorated with `optnone` because the<br>
+// attribute would conflict with `minsize`.<br>
+int __attribute__((minsize)) bax(int z) {<br>
+    return foo(z, 2);<br>
+}<br>
+// CHECK-DAG: @_Z3baxi{{.*}} [[ATTRBAX:#[0-9]+]]<br>
+<br>
 #pragma clang optimize on<br>
<br>
 // The function "int wombat(int param)" created by the macro is not<br>
@@ -144,6 +151,7 @@ int yet_another_normal(int x) {<br>
 // Check that the other functions do NOT have optnone.<br>
 // CHECK-DAG-NOT: attributes [[ATTRFOO]] = { {{.*}}optnone{{.*}} }<br>
 // CHECK-DAG-NOT: attributes [[ATTRBAZ]] = { {{.*}}optnone{{.*}} }<br>
+// CHECK-DAG-NOT: attributes [[ATTRBAX]] = { {{.*}}optnone{{.*}} }<br>
 // CHECK-DAG-NOT: attributes [[ATTRWOMBAT]] = { {{.*}}optnone{{.*}} }<br>
 // CHECK-DAG-NOT: attributes [[ATTRCONTAINER]] = { {{.*}}optnone{{.*}} }<br>
 // CHECK-DAG-NOT: attributes [[ATTRTWICE]] = { {{.*}}optnone{{.*}} }<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>