comparison dmd/mars.c @ 151:d11848349f97 trunk

[svn r157] Fixed the nasty type==NULL bug :D
author lindquist
date Mon, 24 Mar 2008 20:48:40 +0100
parents ddfdae91281a
children 5acec6b2eef8
comparison
equal deleted inserted replaced
150:2c336566ffed 151:d11848349f97
988 m->semantic3(); 988 m->semantic3();
989 } 989 }
990 if (global.errors) 990 if (global.errors)
991 fatal(); 991 fatal();
992 992
993 #if !IN_LLVM
993 // Scan for functions to inline 994 // Scan for functions to inline
994 if (global.params.useInline) 995 if (global.params.useInline)
995 { 996 {
996 /* The problem with useArrayBounds and useAssert is that the 997 /* The problem with useArrayBounds and useAssert is that the
997 * module being linked to may not have generated them, so if 998 * module being linked to may not have generated them, so if
998 * we inline functions from those modules, the symbols for them will 999 * we inline functions from those modules, the symbols for them will
999 * not be found at link time. 1000 * not be found at link time.
1000 */ 1001 */
1001 if (!global.params.useArrayBounds && !global.params.useAssert) 1002 if (!global.params.useArrayBounds && !global.params.useAssert)
1002 { 1003 {
1004 #endif
1003 // Do pass 3 semantic analysis on all imported modules, 1005 // Do pass 3 semantic analysis on all imported modules,
1004 // since otherwise functions in them cannot be inlined 1006 // since otherwise functions in them cannot be inlined
1005 for (i = 0; i < Module::amodules.dim; i++) 1007 for (i = 0; i < Module::amodules.dim; i++)
1006 { 1008 {
1007 m = (Module *)Module::amodules.data[i]; 1009 m = (Module *)Module::amodules.data[i];
1009 printf("semantic3 %s\n", m->toChars()); 1011 printf("semantic3 %s\n", m->toChars());
1010 m->semantic3(); 1012 m->semantic3();
1011 } 1013 }
1012 if (global.errors) 1014 if (global.errors)
1013 fatal(); 1015 fatal();
1016 #if !IN_LLVM
1014 } 1017 }
1015 1018
1016 for (i = 0; i < modules.dim; i++) 1019 for (i = 0; i < modules.dim; i++)
1017 { 1020 {
1018 m = (Module *)modules.data[i]; 1021 m = (Module *)modules.data[i];
1021 m->inlineScan(); 1024 m->inlineScan();
1022 } 1025 }
1023 } 1026 }
1024 if (global.errors) 1027 if (global.errors)
1025 fatal(); 1028 fatal();
1029 #endif
1026 1030
1027 // Generate output files 1031 // Generate output files
1028 for (i = 0; i < modules.dim; i++) 1032 for (i = 0; i < modules.dim; i++)
1029 { 1033 {
1030 m = (Module *)modules.data[i]; 1034 m = (Module *)modules.data[i];