summaryrefslogtreecommitdiff
path: root/lib/Target/AArch64/AArch64AsmPrinter.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2018-01-17 23:55:23 +0000
committerReid Kleckner <rnk@google.com>2018-01-17 23:55:23 +0000
commitdaef2dedfff4cc0af3a4c5bc7d9355f9a978407e (patch)
treea2b629f5e936fb1265e8d515612fd030c4f9e623 /lib/Target/AArch64/AArch64AsmPrinter.cpp
parentd3309408027216ced608ed884defd4542f4582ef (diff)
[CodeGen] Hoist common AsmPrinter code out of X86, ARM, and AArch64
Every known PE COFF target emits /EXPORT: linker flags into a .drective section. The AsmPrinter should handle this. While we're at it, use global_values() and emit each export flag with its own .ascii directive. This should make the .s file output more readable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322788 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/AArch64AsmPrinter.cpp')
-rw-r--r--lib/Target/AArch64/AArch64AsmPrinter.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/Target/AArch64/AArch64AsmPrinter.cpp b/lib/Target/AArch64/AArch64AsmPrinter.cpp
index 2ff2ee347f5..994b8436f94 100644
--- a/lib/Target/AArch64/AArch64AsmPrinter.cpp
+++ b/lib/Target/AArch64/AArch64AsmPrinter.cpp
@@ -210,29 +210,6 @@ void AArch64AsmPrinter::EmitEndOfAsmFile(Module &M) {
OutStreamer->EmitAssemblerFlag(MCAF_SubsectionsViaSymbols);
SM.serializeToStackMapSection();
}
-
- if (TT.isOSBinFormatCOFF()) {
- const auto &TLOF =
- static_cast<const TargetLoweringObjectFileCOFF &>(getObjFileLowering());
-
- std::string Flags;
- raw_string_ostream OS(Flags);
-
- for (const auto &Function : M)
- TLOF.emitLinkerFlagsForGlobal(OS, &Function);
- for (const auto &Global : M.globals())
- TLOF.emitLinkerFlagsForGlobal(OS, &Global);
- for (const auto &Alias : M.aliases())
- TLOF.emitLinkerFlagsForGlobal(OS, &Alias);
-
- OS.flush();
-
- // Output collected flags
- if (!Flags.empty()) {
- OutStreamer->SwitchSection(TLOF.getDrectveSection());
- OutStreamer->EmitBytes(Flags);
- }
- }
}
void AArch64AsmPrinter::EmitLOHs() {