Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes the
lld: error: undefined symbol: const type_info::'vftable'
linker error that would usually appear when enabling RTTI and linking a program that instantiates a class containing virtual methods, and enables RTTI. This is enough to give it a quick test:This is achieved by the following changes:
type_info
class with-fno-rtti
to prevent it from emitting a recursive reference to its vftableRemoving
const
in__std_type_info_data
is not necessary to get this working, but is required for when we eventually implement name demangling, which will require this structure to be modifiable at runtime. Some missingnoexcept
's were also fixed.These changes are not enough to actually profit from having RTTI (such as using
typeid
anddynamic_cast
), as these require functional SEH and C++ exception support to implement.Fixes #237.