Mercurial > projects > ldc
comparison gen/runtime.cpp @ 1524:b265fb6ce15b
Merge.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Mon, 06 Jul 2009 23:56:11 +0100 |
parents | 833337c65fd3 982eb70e83b2 |
children | f19adff18813 |
comparison
equal
deleted
inserted
replaced
1523:833337c65fd3 | 1524:b265fb6ce15b |
---|---|
1 #include "gen/llvm.h" | 1 #include "gen/llvm.h" |
2 #include "gen/llvm-version.h" | |
3 #if LLVM_REV >= 74640 | |
4 #include "llvm/LLVMContext.h" | |
5 #endif | |
2 #include "llvm/Module.h" | 6 #include "llvm/Module.h" |
3 #include "llvm/Attributes.h" | 7 #include "llvm/Attributes.h" |
4 #include "llvm/Bitcode/ReaderWriter.h" | 8 #include "llvm/Bitcode/ReaderWriter.h" |
5 #include "llvm/Support/MemoryBuffer.h" | 9 #include "llvm/Support/MemoryBuffer.h" |
6 #include "llvm/Support/CommandLine.h" | 10 #include "llvm/Support/CommandLine.h" |
147 } | 151 } |
148 | 152 |
149 static void LLVM_D_BuildRuntimeModule() | 153 static void LLVM_D_BuildRuntimeModule() |
150 { | 154 { |
151 Logger::println("building module"); | 155 Logger::println("building module"); |
156 #if LLVM_REV >= 74640 | |
157 M = new llvm::Module("ldc internal runtime", llvm::getGlobalContext()); | |
158 #else | |
152 M = new llvm::Module("ldc internal runtime"); | 159 M = new llvm::Module("ldc internal runtime"); |
160 #endif | |
153 | 161 |
154 Logger::println("building basic types"); | 162 Logger::println("building basic types"); |
155 const LLType* voidTy = LLType::VoidTy; | 163 const LLType* voidTy = LLType::VoidTy; |
156 const LLType* boolTy = LLType::Int1Ty; | 164 const LLType* boolTy = LLType::Int1Ty; |
157 const LLType* byteTy = LLType::Int8Ty; | 165 const LLType* byteTy = LLType::Int8Ty; |