Mercurial > projects > ldc
comparison gen/tollvm.cpp @ 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 | 03d7c4aac654 |
children | 18ad5601dff7 |
comparison
equal
deleted
inserted
replaced
987:73ff89728d85 | 988:2667e3a145be |
---|---|
20 #include "gen/typeinf.h" | 20 #include "gen/typeinf.h" |
21 #include "gen/complex.h" | 21 #include "gen/complex.h" |
22 #include "gen/llvmhelpers.h" | 22 #include "gen/llvmhelpers.h" |
23 | 23 |
24 bool DtoIsPassedByRef(Type* type) | 24 bool DtoIsPassedByRef(Type* type) |
25 { | |
26 Type* typ = type->toBasetype(); | |
27 TY t = typ->ty; | |
28 return (t == Tstruct || t == Tsarray); | |
29 } | |
30 | |
31 bool DtoIsReturnedInArg(Type* type) | |
32 { | 25 { |
33 Type* typ = type->toBasetype(); | 26 Type* typ = type->toBasetype(); |
34 TY t = typ->ty; | 27 TY t = typ->ty; |
35 return (t == Tstruct || t == Tsarray); | 28 return (t == Tstruct || t == Tsarray); |
36 } | 29 } |