forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[M68k] Fix ODR violation in GISel code
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 adding virtual methods for compatibility).
- Loading branch information
1 parent
2c4de6c
commit 3cb7133
Showing
2 changed files
with
22 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters