d: Build internal TypeInfo types when module name is "object"
commit250b1fa19d76b3e2f7a175b6b9ee6086fb548bfe
authorIain Buclaw <ibuclaw@gdcproject.org>
Mon, 15 Aug 2022 11:43:29 +0000 (15 13:43 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Mon, 15 Aug 2022 19:35:09 +0000 (15 21:35 +0200)
tree23957e10c00ddc20bfd237aab21b051fb9f157d9
parent9fb12ee6fb75be4f980a235dc3f28a29ecc80de0
d: Build internal TypeInfo types when module name is "object"

If for whatever reason the module declaration doesn't exist in the
object file, ensure that the internal definitions for TypeInfo and
TypeInfo_Class are still created, otherwise an ICE could occur later if
they are required for a run-time helper call.

gcc/d/ChangeLog:

* d-compiler.cc (Compiler::onParseModule): Call create_tinfo_types
when module name is object.
* typeinfo.cc (create_tinfo_types): Add guard for multiple
invocations.
gcc/d/d-compiler.cc
gcc/d/typeinfo.cc