Mercurial > projects > ldc
comparison dmd2/module.c @ 988:2667e3a145be
- Fixed LLVM style CL args for D2.
- Moved main() into its own file gen/main.cpp
- Fixed basic cross compilation
- removed the option for setting OS
- added support for llc's mattr, mcpu and mtriple switches
- added basic ABI abstraction for return value rewrites, it's not perfect and will probably be completely rewritten once I get to handling parameter rewrites as well.
- x86-64 extern(C) abi for cfloat returns now match (llvm-)gcc.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Thu, 26 Feb 2009 14:11:49 +0100 |
parents | 356e65836fb5 |
children | 638d16625da2 |
comparison
equal
deleted
inserted
replaced
987:73ff89728d85 | 988:2667e3a145be |
---|---|
37 #include "html.h" | 37 #include "html.h" |
38 | 38 |
39 #ifdef IN_GCC | 39 #ifdef IN_GCC |
40 #include "d-dmd-gcc.h" | 40 #include "d-dmd-gcc.h" |
41 #endif | 41 #endif |
42 | |
43 | |
44 #include "llvm/Support/CommandLine.h" | |
45 | |
46 static llvm::cl::opt<bool> preservePaths("op", | |
47 llvm::cl::desc("Do not strip paths from source file"), | |
48 llvm::cl::ZeroOrMore); | |
49 | |
50 static llvm::cl::opt<bool> fqnNames("oq", | |
51 llvm::cl::desc("Write object files with fully qualified names"), | |
52 llvm::cl::ZeroOrMore); | |
53 | |
54 | |
42 | 55 |
43 ClassDeclaration *Module::moduleinfo; | 56 ClassDeclaration *Module::moduleinfo; |
44 | 57 |
45 Module *Module::rootModule; | 58 Module *Module::rootModule; |
46 DsymbolTable *Module::modules; | 59 DsymbolTable *Module::modules; |
137 char *argobj; | 150 char *argobj; |
138 if (forcename) | 151 if (forcename) |
139 argobj = forcename; | 152 argobj = forcename; |
140 else | 153 else |
141 { | 154 { |
142 if (global.params.preservePaths) | 155 if (preservePaths) |
143 argobj = (char*)this->arg; | 156 argobj = (char*)this->arg; |
144 else | 157 else |
145 argobj = FileName::name((char*)this->arg); | 158 argobj = FileName::name((char*)this->arg); |
146 | 159 |
147 if (global.params.fqnNames) | 160 if (fqnNames) |
148 { | 161 { |
149 if(md) | 162 if(md) |
150 argobj = FileName::replaceName(argobj, md->toChars()); | 163 argobj = FileName::replaceName(argobj, md->toChars()); |
151 else | 164 else |
152 argobj = FileName::replaceName(argobj, toChars()); | 165 argobj = FileName::replaceName(argobj, toChars()); |