Combining LinkOnce and External

Before I go writing a bug report, I want to know if the behavior I am seeing is intended.

Before 1.3, I was able to generate a linkonce definition in one module, and an external declaration in another module and link them together, with the result being a defined symbol with external linkage. However, with the latest head, it apparently discards the linkonce version, and my output contains the declaration only, which fails when I try to generate code.

Is it legal to combine linkonce and external in this way?

-- Talin

Sounds like a regression to me.

sounds like a serious bug. Please file a bug report, I may have recently broken this with a fix for another bug :frowning:

-Chris

Chris Lattner wrote:

  

Before I go writing a bug report, I want to know if the behavior I am
seeing is intended.

Before 1.3, I was able to generate a linkonce definition in one module,
and an external declaration in another module and link them together,
with the result being a defined symbol with external linkage. However,
with the latest head, it apparently discards the linkonce version, and
my output contains the declaration only, which fails when I try to
generate code.

Is it legal to combine linkonce and external in this way?
    
sounds like a serious bug. Please file a bug report, I may have recently broken this with a fix for another bug :frowning:
  

Actually, it turns out it was a mistake on my part - at least, when I tried to narrow it down to the smallest possible test case, I could no longer reproduce it. So, no bug...I think.