Mercurial > projects > ldc
comparison gen/runtime.cpp @ 794:661384d6a936
Fix warnings on x86-64. By fvbommel.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Fri, 28 Nov 2008 21:24:08 +0100 |
parents | 4ac97ec7c18e |
children | 340acf1535d0 |
comparison
equal
deleted
inserted
replaced
793:f6dd817060fc | 794:661384d6a936 |
---|---|
108 return getPtrToType(t); | 108 return getPtrToType(t); |
109 } | 109 } |
110 | 110 |
111 static const LLType* rt_array(const LLType* elemty) | 111 static const LLType* rt_array(const LLType* elemty) |
112 { | 112 { |
113 return llvm::StructType::get(DtoSize_t(), rt_ptr(elemty), 0); | 113 return llvm::StructType::get(DtoSize_t(), rt_ptr(elemty), NULL); |
114 } | 114 } |
115 | 115 |
116 static const LLType* rt_dg1() | 116 static const LLType* rt_dg1() |
117 { | 117 { |
118 std::vector<const LLType*> types; | 118 std::vector<const LLType*> types; |
119 types.push_back(rt_ptr(LLType::Int8Ty)); | 119 types.push_back(rt_ptr(LLType::Int8Ty)); |
120 types.push_back(rt_ptr(LLType::Int8Ty)); | 120 types.push_back(rt_ptr(LLType::Int8Ty)); |
121 const llvm::FunctionType* fty = llvm::FunctionType::get(LLType::Int32Ty, types, false); | 121 const llvm::FunctionType* fty = llvm::FunctionType::get(LLType::Int32Ty, types, false); |
122 return llvm::StructType::get(rt_ptr(LLType::Int8Ty), rt_ptr(fty), 0); | 122 return llvm::StructType::get(rt_ptr(LLType::Int8Ty), rt_ptr(fty), NULL); |
123 } | 123 } |
124 | 124 |
125 static const LLType* rt_dg2() | 125 static const LLType* rt_dg2() |
126 { | 126 { |
127 std::vector<const LLType*> types; | 127 std::vector<const LLType*> types; |
128 types.push_back(rt_ptr(LLType::Int8Ty)); | 128 types.push_back(rt_ptr(LLType::Int8Ty)); |
129 types.push_back(rt_ptr(LLType::Int8Ty)); | 129 types.push_back(rt_ptr(LLType::Int8Ty)); |
130 types.push_back(rt_ptr(LLType::Int8Ty)); | 130 types.push_back(rt_ptr(LLType::Int8Ty)); |
131 const llvm::FunctionType* fty = llvm::FunctionType::get(LLType::Int32Ty, types, false); | 131 const llvm::FunctionType* fty = llvm::FunctionType::get(LLType::Int32Ty, types, false); |
132 return llvm::StructType::get(rt_ptr(LLType::Int8Ty), rt_ptr(fty), 0); | 132 return llvm::StructType::get(rt_ptr(LLType::Int8Ty), rt_ptr(fty), NULL); |
133 } | 133 } |
134 | 134 |
135 static void LLVM_D_BuildRuntimeModule() | 135 static void LLVM_D_BuildRuntimeModule() |
136 { | 136 { |
137 M = new llvm::Module("ldc internal runtime"); | 137 M = new llvm::Module("ldc internal runtime"); |
150 if ((global.params.cpu == ARCHx86) || (global.params.cpu == ARCHx86_64)) | 150 if ((global.params.cpu == ARCHx86) || (global.params.cpu == ARCHx86_64)) |
151 realTy = LLType::X86_FP80Ty; | 151 realTy = LLType::X86_FP80Ty; |
152 else | 152 else |
153 realTy = LLType::DoubleTy; | 153 realTy = LLType::DoubleTy; |
154 | 154 |
155 const LLType* cfloatTy = llvm::StructType::get(floatTy, floatTy, 0); | 155 const LLType* cfloatTy = llvm::StructType::get(floatTy, floatTy, NULL); |
156 const LLType* cdoubleTy = llvm::StructType::get(doubleTy, doubleTy, 0); | 156 const LLType* cdoubleTy = llvm::StructType::get(doubleTy, doubleTy, NULL); |
157 const LLType* crealTy = llvm::StructType::get(realTy, realTy, 0); | 157 const LLType* crealTy = llvm::StructType::get(realTy, realTy, NULL); |
158 | 158 |
159 const LLType* voidPtrTy = rt_ptr(byteTy); | 159 const LLType* voidPtrTy = rt_ptr(byteTy); |
160 const LLType* stringTy = rt_array(byteTy); | 160 const LLType* stringTy = rt_array(byteTy); |
161 const LLType* wstringTy = rt_array(shortTy); | 161 const LLType* wstringTy = rt_array(shortTy); |
162 const LLType* dstringTy = rt_array(intTy); | 162 const LLType* dstringTy = rt_array(intTy); |