comparison gen/main.cpp @ 1403:e5c5d354c649

Tentative fix for semantic3 on imported modules and unnecessary template function definition issue. Please test! Also change linkage of __interfaceInfos to external (same as __Class, __vtbl, __init). The other change might make this superfluous.
author Christian Kamm <kamm incasoftware de>
date Thu, 21 May 2009 10:56:04 +0200
parents 1311dabc6a1f
children bac3931b3de3
comparison
equal deleted inserted replaced
1402:1311dabc6a1f 1403:e5c5d354c649
809 * we inline functions from those modules, the symbols for them will 809 * we inline functions from those modules, the symbols for them will
810 * not be found at link time. 810 * not be found at link time.
811 */ 811 */
812 if (!global.params.useArrayBounds && !global.params.useAssert) 812 if (!global.params.useArrayBounds && !global.params.useAssert)
813 { 813 {
814 #endif
815 // Do pass 3 semantic analysis on all imported modules, 814 // Do pass 3 semantic analysis on all imported modules,
816 // since otherwise functions in them cannot be inlined 815 // since otherwise functions in them cannot be inlined
817 for (int i = 0; i < Module::amodules.dim; i++) 816 for (int i = 0; i < Module::amodules.dim; i++)
818 { 817 {
819 m = (Module *)Module::amodules.data[i]; 818 m = (Module *)Module::amodules.data[i];
821 printf("semantic3 %s\n", m->toChars()); 820 printf("semantic3 %s\n", m->toChars());
822 m->semantic3(); 821 m->semantic3();
823 } 822 }
824 if (global.errors) 823 if (global.errors)
825 fatal(); 824 fatal();
826 #if !IN_LLVM
827 } 825 }
828 826
829 for (int i = 0; i < modules.dim; i++) 827 for (int i = 0; i < modules.dim; i++)
830 { 828 {
831 m = (Module *)modules.data[i]; 829 m = (Module *)modules.data[i];
832 if (global.params.verbose) 830 if (global.params.verbose)
833 printf("inline scan %s\n", m->toChars()); 831 printf("inline scan %s\n", m->toChars());
834 m->inlineScan(); 832 m->inlineScan();
835 } 833 }
836 } 834 }
837 #endif
838 if (global.errors) 835 if (global.errors)
839 fatal(); 836 fatal();
837 #endif
840 838
841 // write module dependencies to file if requested 839 // write module dependencies to file if requested
842 if (global.params.moduleDepsFile != NULL) 840 if (global.params.moduleDepsFile != NULL)
843 { 841 {
844 assert (global.params.moduleDepsFile != NULL); 842 assert (global.params.moduleDepsFile != NULL);