<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Clang compilation fails due to mismatch in include/clang/Parse/AttrSubMatchRulesParserStringSwitches.inc"
   href="https://bugs.llvm.org/show_bug.cgi?id=36693">36693</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang compilation fails due to mismatch in include/clang/Parse/AttrSubMatchRulesParserStringSwitches.inc
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mike@fireburn.co.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In Gentoo when building both 32bit and 64bit binaries any agnostic include
members are compared between the two, if there are differences compilation
fails and an error is produced

This is currently happening with Clang from git

 * Header files have changed between ABIs.
 * --- /var/tmp/portage/sys-devel/clang-9999/temp/.multilib_header_cksum       
2018-03-12 16:27:29.165639425 +0000
 * +++ /var/tmp/portage/sys-devel/clang-9999/temp/.multilib_header_cksum.new   
2018-03-12 16:27:29.759637837 +0000
 * @@ -445,7 +445,7 @@
 *  2530910038 4721
/var/tmp/portage/sys-devel/clang-9999/image/usr/include/clang/AST/TypeNodes.def
 *  137739593 4742
/var/tmp/portage/sys-devel/clang-9999/image/usr/include/clangrt/7.0.0/include/avx512vbmiintrin.h
 *  3209348314 4753
/var/tmp/portage/sys-devel/clang-9999/image/usr/include/clang/Basic/FileSystemStatCache.h
 * -813479829 4798
/var/tmp/portage/sys-devel/clang-9999/image/usr/include/clang/Parse/AttrSubMatchRulesParserStringSwitches.inc
 * +1849706191 4798
/var/tmp/portage/sys-devel/clang-9999/image/usr/include/clang/Parse/AttrSubMatchRulesParserStringSwitches.inc
 *  3072834936 48017
/var/tmp/portage/sys-devel/clang-9999/image/usr/include/clang/StaticAnalyzer/Checkers/Checkers.inc
 *  4260476026 4802
/var/tmp/portage/sys-devel/clang-9999/image/usr/include/clang/ARCMigrate/ARCMT.h
 *  521383886 4865
/var/tmp/portage/sys-devel/clang-9999/image/usr/include/clangrt/7.0.0/include/avx512cdintrin.h


The details of the header in question is:

diff -u
./work/x/y/clang-9999-abi_x86_64.amd64/include/clang/Parse/AttrSubMatchRulesParserStringSwitches.inc
./work/x/y/clang-9999-abi_x86_32.x86/include/clang/Parse/AttrSubMatchRulesParserStringSwitches.inc
---
./work/x/y/clang-9999-abi_x86_64.amd64/include/clang/Parse/AttrSubMatchRulesParserStringSwitches.inc
       2018-03-12 16:07:52.542773015 +0000
+++
./work/x/y/clang-9999-abi_x86_32.x86/include/clang/Parse/AttrSubMatchRulesParserStringSwitches.inc
 2018-03-12 15:55:16.649734176 +0000
@@ -32,21 +32,21 @@
   Default(None);
 }

-Optional<attr::SubjectMatchRule>
isAttributeSubjectMatchSubRuleFor_function(StringRef Name, bool IsUnless) {
+Optional<attr::SubjectMatchRule>
isAttributeSubjectMatchSubRuleFor_objc_method(StringRef Name, bool IsUnless) {
   if (IsUnless)
     return llvm::StringSwitch<Optional<attr::SubjectMatchRule>>(Name).
     Default(None);
   return llvm::StringSwitch<Optional<attr::SubjectMatchRule>>(Name).
-  Case("is_member", attr::SubjectMatchRule_function_is_member).
+  Case("is_instance", attr::SubjectMatchRule_objc_method_is_instance).
   Default(None);
 }

-Optional<attr::SubjectMatchRule>
isAttributeSubjectMatchSubRuleFor_objc_method(StringRef Name, bool IsUnless) {
+Optional<attr::SubjectMatchRule>
isAttributeSubjectMatchSubRuleFor_function(StringRef Name, bool IsUnless) {
   if (IsUnless)
     return llvm::StringSwitch<Optional<attr::SubjectMatchRule>>(Name).
     Default(None);
   return llvm::StringSwitch<Optional<attr::SubjectMatchRule>>(Name).
-  Case("is_instance", attr::SubjectMatchRule_objc_method_is_instance).
+  Case("is_member", attr::SubjectMatchRule_function_is_member).
   Default(None);
 }

@@ -78,10 +78,10 @@
   return "'unless(is_union)'";
   case attr::SubjectMatchRule_variable:
   return "'is_thread_local', 'is_global', 'is_parameter',
'unless(is_parameter)'";
-  case attr::SubjectMatchRule_function:
-  return "'is_member'";
   case attr::SubjectMatchRule_objc_method:
   return "'is_instance'";
+  case attr::SubjectMatchRule_function:
+  return "'is_member'";
   default: return nullptr;
   }
 }</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>