[llvm-bugs] [Bug 36693] New: Clang compilation fails due to mismatch in include/clang/Parse/AttrSubMatchRulesParserStringSwitches.inc

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 12 09:41:40 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=36693

            Bug ID: 36693
           Summary: Clang compilation fails due to mismatch in
                    include/clang/Parse/AttrSubMatchRulesParserStringSwitc
                    hes.inc
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mike at fireburn.co.uk
                CC: llvm-bugs at lists.llvm.org

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;
   }
 }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180312/ba9fd857/attachment.html>


More information about the llvm-bugs mailing list