From 5d618ef7f1ad005fc6912f3e9a08c044b082e47f Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 14 Feb 2011 22:23:49 +0000 Subject: Switch llvm to using comdats. For now always use groups with a single section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125526 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCSectionELF.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/MC/MCSectionELF.cpp') diff --git a/lib/MC/MCSectionELF.cpp b/lib/MC/MCSectionELF.cpp index 56138cbc30..d32aea144e 100644 --- a/lib/MC/MCSectionELF.cpp +++ b/lib/MC/MCSectionELF.cpp @@ -61,6 +61,8 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI, OS << 'a'; if (Flags & ELF::SHF_EXECINSTR) OS << 'x'; + if (Flags & ELF::SHF_GROUP) + OS << 'G'; if (Flags & ELF::SHF_WRITE) OS << 'w'; if (Flags & ELF::SHF_MERGE) @@ -104,6 +106,8 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI, OS << "," << EntrySize; } + if (Flags & ELF::SHF_GROUP) + OS << "," << Group->getName() << ",comdat"; OS << '\n'; } -- cgit v1.2.3-18-g5258