IRGen: dont use autolink-extract for COFF targets

COFF supports the `.drectve` section for embedding linker directives.  LLVM has
long supported emitting this section.  With this move, ELF shall become the only
target needing the autolink-extract functionality.
This commit is contained in:
Saleem Abdulrasool
2016-06-04 15:05:00 -07:00
parent 89bebf897f
commit 7837db48d2
2 changed files with 18 additions and 1 deletions

View File

@@ -879,6 +879,7 @@ void IRGenModule::emitAutolinkInfo() {
switch (TargetInfo.OutputObjectFormat) {
case llvm::Triple::UnknownObjectFormat:
llvm_unreachable("unknown object format");
case llvm::Triple::COFF:
case llvm::Triple::MachO: {
llvm::LLVMContext &ctx = Module.getContext();
@@ -897,7 +898,6 @@ void IRGenModule::emitAutolinkInfo() {
}
break;
}
case llvm::Triple::COFF:
case llvm::Triple::ELF: {
// Merge the entries into null-separated string.
llvm::SmallString<64> EntriesString;