Mercurial > projects > ldc
comparison gen/arrays.cpp @ 234:9760f54af0b7 trunk
[svn r250] Fixed the warning about dropping arguments to _Dmain when optimizing.
Did a few cleanups in inline asm code.
author | lindquist |
---|---|
date | Sun, 08 Jun 2008 08:03:19 +0200 |
parents | 0806379a5eca |
children | a95056b3c996 |
comparison
equal
deleted
inserted
replaced
233:76ee1bbe487e | 234:9760f54af0b7 |
---|---|
13 #include "gen/logger.h" | 13 #include "gen/logger.h" |
14 #include "gen/dvalue.h" | 14 #include "gen/dvalue.h" |
15 | 15 |
16 ////////////////////////////////////////////////////////////////////////////////////////// | 16 ////////////////////////////////////////////////////////////////////////////////////////// |
17 | 17 |
18 const llvm::StructType* DtoArrayType(Type* t) | 18 const llvm::StructType* DtoArrayType(Type* arrayTy) |
19 { | 19 { |
20 assert(t->next); | 20 assert(arrayTy->next); |
21 const LLType* elemty = DtoType(t->next); | 21 const LLType* elemty = DtoType(arrayTy->next); |
22 if (elemty == llvm::Type::VoidTy) | 22 if (elemty == llvm::Type::VoidTy) |
23 elemty = llvm::Type::Int8Ty; | 23 elemty = llvm::Type::Int8Ty; |
24 return llvm::StructType::get(DtoSize_t(), getPtrToType(elemty), 0); | 24 return llvm::StructType::get(DtoSize_t(), getPtrToType(elemty), 0); |
25 } | |
26 | |
27 const llvm::StructType* DtoArrayType(const LLType* t) | |
28 { | |
29 return llvm::StructType::get(DtoSize_t(), getPtrToType(t), 0); | |
25 } | 30 } |
26 | 31 |
27 ////////////////////////////////////////////////////////////////////////////////////////// | 32 ////////////////////////////////////////////////////////////////////////////////////////// |
28 | 33 |
29 const llvm::ArrayType* DtoStaticArrayType(Type* t) | 34 const llvm::ArrayType* DtoStaticArrayType(Type* t) |