[all-commits] [llvm/llvm-project] 8cb842: [M68k] Fix ODR violation in GISel code (#72797)
Vadim Petrochenkov via All-commits
all-commits at lists.llvm.org
Thu Dec 14 01:41:35 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8cb842879d44ba7b5c1d3e158b8824cae1db6092
https://github.com/llvm/llvm-project/commit/8cb842879d44ba7b5c1d3e158b8824cae1db6092
Author: Vadim Petrochenkov <vadim.petrochenkov at gmail.com>
Date: 2023-12-14 (Thu, 14 Dec 2023)
Changed paths:
M llvm/lib/Target/M68k/GISel/M68kCallLowering.cpp
M llvm/lib/Target/M68k/GISel/M68kCallLowering.h
Log Message:
-----------
[M68k] Fix ODR violation in GISel code (#72797)
It prevents LLVM from being linked with LLD at least on Windows, with
errors like this:
```
= note: ld.lld: error: duplicate symbol: vtable for llvm::FormalArgHandler
>>> defined at librustc_llvm-a81737dd65a7c126.rlib(M68kCallLowering.cpp.obj)
>>> defined at librustc_llvm-a81737dd65a7c126.rlib(PPCCallLowering.cpp.obj)
```
Binutils linker also complains about this, but only with warnings.
`FormalArgHandler` has a base class `M68kIncomingValueHandler` which
doesn't have a virtual method `markPhysRegUsed` like
`IncomingValueHandler`s for all other targets including PPC, so it
results in a conflict.
The simplest fix is to rename the `FormalArgHandler` structure (rather
than to add virtual methods for compatibility).
cc https://github.com/rust-lang/rust/issues/107668
More information about the All-commits
mailing list