Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[M68k] Fix ODR violation in GISel code #72797

Merged
merged 1 commit into from
Dec 14, 2023
Merged

Commits on Dec 13, 2023

  1. [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).
    petrochenkov committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    1fbefe4 View commit details
    Browse the repository at this point in the history