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

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


> Do you mean if the imported function (say 'foo') references an alias ('f'),
> the aliasee 'f2' will have to be imported and converted to internal linkage?

Depends on what you want to import. My understanding is that your testcase is

@f = alias void (), void ()* @f2
define void @foo() {
  call void @f()
  ret void
}
define void @f2() {
  ret void
}

if you want foo, f, f2, the output is like the input

if you want just foo, you get

define void @foo() {
  call void @f()
  ret void
|
declare void @f()

if you want just foo and f, you get

@f = alias void(), void()* @f2
define void @foo() {
  call void @f()
  ret void
}
define internal void @f2() {
  ret void
}

take a look at pr19848 for another example.

Cheers,
Rafael


More information about the llvm-commits mailing list