mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 15:10:59 +03:00
Drop support for LLVM < 3.5
This allows to clean up the code a little.
This commit is contained in:
parent
8eab25f2fa
commit
60d676e2a1
57 changed files with 35 additions and 1019 deletions
|
@ -150,14 +150,11 @@ void CodeGenerator::finishLLModule(Module *m) {
|
|||
void CodeGenerator::writeAndFreeLLModule(const char *filename) {
|
||||
ir_->DBuilder.Finalize();
|
||||
|
||||
#if LDC_LLVM_VER >= 303
|
||||
// Add the linker options metadata flag.
|
||||
ir_->module.addModuleFlag(
|
||||
llvm::Module::AppendUnique, "Linker Options",
|
||||
llvm::MDNode::get(ir_->context(), ir_->LinkerMetadataArgs));
|
||||
#endif
|
||||
|
||||
#if LDC_LLVM_VER >= 304
|
||||
// Emit ldc version as llvm.ident metadata.
|
||||
llvm::NamedMDNode *IdentMetadata =
|
||||
ir_->module.getOrInsertNamedMetadata("llvm.ident");
|
||||
|
@ -170,7 +167,6 @@ void CodeGenerator::writeAndFreeLLModule(const char *filename) {
|
|||
#endif
|
||||
{llvm::MDString::get(ir_->context(), Version)};
|
||||
IdentMetadata->addOperand(llvm::MDNode::get(ir_->context(), IdentNode));
|
||||
#endif
|
||||
|
||||
writeModule(&ir_->module, filename);
|
||||
global.params.objfiles->push(const_cast<char *>(filename));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue