mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 09:00:33 +03:00
Skip ModuleInfo generation for C files (incl. *.i)
Fixes dmd-testsuite's compilable/testcomplex.i.
This commit is contained in:
parent
30bc9c65c8
commit
49bb2ac590
3 changed files with 8 additions and 3 deletions
|
@ -433,9 +433,11 @@ void codegenModule(IRState *irs, Module *m) {
|
|||
|
||||
// Skip emission of all the additional module metadata if:
|
||||
// a) the -betterC switch is on,
|
||||
// b) requested explicitly by the user via pragma(LDC_no_moduleinfo), or if
|
||||
// c) there's no ModuleInfo declaration.
|
||||
if (global.params.useModuleInfo && !m->noModuleInfo && Module::moduleinfo) {
|
||||
// b) requested explicitly by the user via pragma(LDC_no_moduleinfo),
|
||||
// c) there's no ModuleInfo declaration, or if
|
||||
// d) the module is a C file.
|
||||
if (global.params.useModuleInfo && !m->noModuleInfo && Module::moduleinfo &&
|
||||
m->filetype != FileType::c) {
|
||||
// generate ModuleInfo
|
||||
registerModuleInfo(m);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue