<div dir="ltr">This was causing -Wmissing-field-initializers to fire due to Features not being assigned in BUILTIN or LIBBUILTIN macro expansions. Fixed it in r244307.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 6, 2015 at 3:11 PM, Eric Christopher via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: echristo<br>
Date: Thu Aug  6 17:11:54 2015<br>
New Revision: 244286<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=244286&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=244286&view=rev</a><br>
Log:<br>
Continue the work from r243908 by adding a Features field to Builtin::Info<br>
so that we can populate it on a per-target basis with required features.<br>
<br>
Future commits will start using this information for warnings.<br>
<br>
Modified:<br>
    cfe/trunk/include/clang/Basic/Builtins.h<br>
    cfe/trunk/lib/Basic/Targets.cpp<br>
<br>
Modified: cfe/trunk/include/clang/Basic/Builtins.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Builtins.h?rev=244286&r1=244285&r2=244286&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Builtins.h?rev=244286&r1=244285&r2=244286&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Basic/Builtins.h (original)<br>
+++ cfe/trunk/include/clang/Basic/Builtins.h Thu Aug  6 17:11:54 2015<br>
@@ -51,6 +51,7 @@ enum ID {<br>
 struct Info {<br>
   const char *Name, *Type, *Attributes, *HeaderName;<br>
   LanguageID Langs;<br>
+  const char *Features;<br>
 };<br>
<br>
 /// \brief Holds information about both target-independent and<br>
@@ -166,6 +167,10 @@ public:<br>
     return strchr(getRecord(ID).Attributes, 'e') != nullptr;<br>
   }<br>
<br>
+  const char *getRequiredFeatures(unsigned ID) const {<br>
+    return getRecord(ID).Features;<br>
+  }<br>
+<br>
 private:<br>
   const Info &getRecord(unsigned ID) const;<br>
<br>
<br>
Modified: cfe/trunk/lib/Basic/Targets.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=244286&r1=244285&r2=244286&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=244286&r1=244285&r2=244286&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Basic/Targets.cpp (original)<br>
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Aug  6 17:11:54 2015<br>
@@ -2001,8 +2001,10 @@ void AMDGPUTargetInfo::getGCCRegNames(co<br>
 // Namespace for x86 abstract base class<br>
 const Builtin::Info BuiltinInfo[] = {<br>
 #define BUILTIN(ID, TYPE, ATTRS) { #ID, TYPE, ATTRS, 0, ALL_LANGUAGES },<br>
-#define LIBBUILTIN(ID, TYPE, ATTRS, HEADER) { #ID, TYPE, ATTRS, HEADER,\<br>
-                                              ALL_LANGUAGES },<br>
+#define LIBBUILTIN(ID, TYPE, ATTRS, HEADER)                                    \<br>
+  { #ID, TYPE, ATTRS, HEADER, ALL_LANGUAGES },<br>
+#define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE)                               \<br>
+  { #ID, TYPE, ATTRS, 0, ALL_LANGUAGES, FEATURE },<br>
 #include "clang/Basic/BuiltinsX86.def"<br>
 };<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" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">~Craig</div>
</div>