LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 16735 - [-cxx-abi] Out-of-line constructor not emitted if pure virtual functions are present?
Summary: [-cxx-abi] Out-of-line constructor not emitted if pure virtual functions are ...
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: C++ (show other bugs)
Version: trunk
Hardware: PC Windows NT
: P normal
Assignee: Timur Iskhodzhanov
URL:
Keywords:
Depends on:
Blocks: 12477
  Show dependency tree
 
Reported: 2013-07-29 11:59 PDT by Timur Iskhodzhanov
Modified: 2013-08-04 12:32 PDT (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timur Iskhodzhanov 2013-07-29 11:59:52 PDT
As of r187356,

$ clang++ -Xclang -cxx-abi -Xclang microsoft -w -S -o - source.cpp
----------
gives an empty output on this file:
----------
struct X {
  X();
  virtual void f() = 0;
};

X::X() { }
----------

If another class in a different TU inherits X and overrides f(), we get a link-time unresolved symbol error for the X constructor.
Comment 1 Timur Iskhodzhanov 2013-07-29 12:00:18 PDT
FTR, this builds fine if I remove "= 0;"
Comment 2 Timur Iskhodzhanov 2013-07-30 10:07:50 PDT
This looks to be trivial enough, I'll take it.
Comment 3 Timur Iskhodzhanov 2013-07-31 09:41:09 PDT
http://llvm-reviews.chandlerc.com/D1248 out for review
Comment 4 Timur Iskhodzhanov 2013-08-04 12:32:11 PDT
Should be fine after r187709.