mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-05 09:31:03 +03:00
Make sure special struct TypeInfo members are semantically analyzed before emitting the TypeInfo (#3783)
As there are apparently cases where the struct hasn't had semantic3 yet, at least with -linkonce-templates. This prevents erroneous xopCmp etc. (failing to compile) from being referenced in the TypeInfo (=> linker errors) / being analyzed for -linkonce-templates codegen. `semanticTypeInfoMembers()` replaces them by `object._xopCmp()` etc. if compilation fails.
This commit is contained in:
parent
2578795801
commit
6e15e1ab04
2 changed files with 10 additions and 4 deletions
|
@ -602,7 +602,6 @@ void DtoDeclareFunction(FuncDeclaration *fdecl, const bool willDefine) {
|
|||
Logger::println("Function is inside a linkonce_odr template, will be "
|
||||
"defined after declaration.");
|
||||
if (fdecl->semanticRun < PASSsemantic3done) {
|
||||
// this can e.g. happen for special __xtoHash member functions
|
||||
Logger::println("Function hasn't had sema3 run yet, running it now.");
|
||||
const bool semaSuccess = fdecl->functionSemantic3();
|
||||
(void)semaSuccess;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue