Issue 86986
Summary ODR warning in Arch64GenAsmMatcher.in (SubtargetFeatureBits)
Labels tablegen
Assignees
Reporter efriedma-quic
    When building with -flto -Werror=odr to find possible runtime issues w/ LTO:

```
/var/tmp/portage/sys-devel/llvm-18.1.0/work/llvm_build-abi_x86_32.x86/lib/Target/AArch64/AArch64GenAsmMatcher.inc:272: error: type ‘SubtargetFeatureBits’ violates the C++ One Definition Rule [-Werror=odr]
  272 | enum SubtargetFeatureBits : uint8_t {
      | 
/var/tmp/portage/sys-devel/llvm-18.1.0/work/llvm_build-abi_x86_32.x86/lib/Target/Hexagon/HexagonGenAsmMatcher.inc:49: note: an enum with different value name is defined in another translation unit
   49 | enum SubtargetFeatureBits : uint8_t {
      | 
/var/tmp/portage/sys-devel/llvm-18.1.0/work/llvm_build-abi_x86_32.x86/lib/Target/AArch64/AArch64GenAsmMatcher.inc:273: note: name ‘Feature_HasV8_0aBit’ differs from name ‘Feature_HasV5Bit’ defined in another translation unit
  273 |   Feature_HasV8_0aBit = 103,
      | 
/var/tmp/portage/sys-devel/llvm-18.1.0/work/llvm_build-abi_x86_32.x86/lib/Target/Hexagon/HexagonGenAsmMatcher.inc:50: note: mismatching definition
   50 |   Feature_HasV5Bit = 2,
      | 
```

Split from #84577 .  Originally reported downstream in Gentoo at https://bugs.gentoo.org/926529.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to