Mercurial > projects > ldc
comparison dmd/module.c @ 1630:44b145be2ef5
Merge dmd 1.056.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Sat, 06 Feb 2010 15:53:52 +0000 |
parents | def7a1d494fd |
children | 9bf06e02070b |
comparison
equal
deleted
inserted
replaced
1629:b07d683ba4d0 | 1630:44b145be2ef5 |
---|---|
1 | 1 |
2 // Compiler implementation of the D programming language | 2 // Compiler implementation of the D programming language |
3 // Copyright (c) 1999-2009 by Digital Mars | 3 // Copyright (c) 1999-2010 by Digital Mars |
4 // All Rights Reserved | 4 // All Rights Reserved |
5 // written by Walter Bright | 5 // written by Walter Bright |
6 // http://www.digitalmars.com | 6 // http://www.digitalmars.com |
7 // License for redistribution is by either the Artistic License | 7 // License for redistribution is by either the Artistic License |
8 // in artistic.txt, or the GNU General Public License in gnu.txt. | 8 // in artistic.txt, or the GNU General Public License in gnu.txt. |
42 | 42 |
43 #ifdef IN_GCC | 43 #ifdef IN_GCC |
44 #include "d-dmd-gcc.h" | 44 #include "d-dmd-gcc.h" |
45 #endif | 45 #endif |
46 | 46 |
47 | 47 #if IN_LLVM |
48 #include "llvm/Support/CommandLine.h" | 48 #include "llvm/Support/CommandLine.h" |
49 #include <map> | 49 #include <map> |
50 | 50 |
51 static llvm::cl::opt<bool> preservePaths("op", | 51 static llvm::cl::opt<bool> preservePaths("op", |
52 llvm::cl::desc("Do not strip paths from source file"), | 52 llvm::cl::desc("Do not strip paths from source file"), |
53 llvm::cl::ZeroOrMore); | 53 llvm::cl::ZeroOrMore); |
54 | 54 |
55 static llvm::cl::opt<bool> fqnNames("oq", | 55 static llvm::cl::opt<bool> fqnNames("oq", |
56 llvm::cl::desc("Write object files with fully qualified names"), | 56 llvm::cl::desc("Write object files with fully qualified names"), |
57 llvm::cl::ZeroOrMore); | 57 llvm::cl::ZeroOrMore); |
58 | 58 #endif |
59 | |
60 | 59 |
61 ClassDeclaration *Module::moduleinfo; | 60 ClassDeclaration *Module::moduleinfo; |
62 | 61 |
63 Module *Module::rootModule; | 62 Module *Module::rootModule; |
64 DsymbolTable *Module::modules; | 63 DsymbolTable *Module::modules; |
969 * Run semantic() on deferred symbols. | 968 * Run semantic() on deferred symbols. |
970 */ | 969 */ |
971 | 970 |
972 void Module::runDeferredSemantic() | 971 void Module::runDeferredSemantic() |
973 { | 972 { |
974 size_t len; | 973 if (dprogress == 0) |
974 return; | |
975 | 975 |
976 static int nested; | 976 static int nested; |
977 if (nested) | 977 if (nested) |
978 return; | 978 return; |
979 //if (deferred.dim) printf("+Module::runDeferredSemantic('%s'), len = %d\n", toChars(), deferred.dim); | 979 //if (deferred.dim) printf("+Module::runDeferredSemantic('%s'), len = %d\n", toChars(), deferred.dim); |
980 nested++; | 980 nested++; |
981 | 981 |
982 size_t len; | |
982 do | 983 do |
983 { | 984 { |
984 dprogress = 0; | 985 dprogress = 0; |
985 len = deferred.dim; | 986 len = deferred.dim; |
986 if (!len) | 987 if (!len) |