mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-13 22:48:43 +03:00
Drop support for LLVM < 3.7
This commit is contained in:
parent
4e174ff19c
commit
1fb269f940
72 changed files with 98 additions and 3862 deletions
|
@ -91,7 +91,6 @@ static std::string getOutputName() {
|
|||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if LDC_LLVM_VER >= 306
|
||||
/// Insert an LLVM bitcode file into the module
|
||||
static void insertBitcodeIntoModule(const char *bcFile, llvm::Module &M,
|
||||
llvm::LLVMContext &Context) {
|
||||
|
@ -110,22 +109,13 @@ static void insertBitcodeIntoModule(const char *bcFile, llvm::Module &M,
|
|||
llvm::Linker(&M).linkInModule(loadedModule.release());
|
||||
#endif
|
||||
}
|
||||
#endif // LDC_LLVM_VER >= 306
|
||||
|
||||
/// Insert LLVM bitcode files into the module
|
||||
void insertBitcodeFiles(llvm::Module &M, llvm::LLVMContext &Ctx,
|
||||
Array<const char *> &bitcodeFiles) {
|
||||
#if LDC_LLVM_VER >= 306
|
||||
for (const char *fname : bitcodeFiles) {
|
||||
insertBitcodeIntoModule(fname, M, Ctx);
|
||||
}
|
||||
#else
|
||||
if (!bitcodeFiles.empty()) {
|
||||
error(Loc(),
|
||||
"Passing LLVM bitcode files to LDC is not supported for LLVM < 3.6");
|
||||
fatal();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue