[PATCH] D14623: [ThinLTO] Comdat importing fixes and related cleanup

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 13:11:54 PST 2015


> Not exactly, f2 can't be imported as-is since that would result in
> multiply-defined f2. To avoid that, f2() is imported as
> available_externally. Unfortunately, with the change you made in
> r254170 we cannot import f() as an alias of the imported f2. It needs
> to be a declaration. That may be an issue if f and f2 are part of a
> comdat, where we decided to select and therefore import the source
> comdat group - it will be incomplete.

You can't have f2 be available_externally and part of comdat:

$f2 = comdat any
define available_externally void @f2() comdat {
  ret void
}

will fail the verifier:

Declaration may not be in a Comdat!
void ()* @f2


Cheers,
Rafael


More information about the llvm-commits mailing list