aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCSectionELF.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-04-04 18:02:01 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-04-04 18:02:01 +0000
commit8ca44f0b5ca7dbba81e1da5186ed30f4dc44152d (patch)
tree7327f2fc55e2e63800b1d5070ad1fc05516ac171 /llvm/lib/MC/MCSectionELF.cpp
parentecc59396d1344f642a2ae5f6fc9e7cb3fb2fab9b (diff)
downloadllvm-8ca44f0b5ca7dbba81e1da5186ed30f4dc44152d.zip
llvm-8ca44f0b5ca7dbba81e1da5186ed30f4dc44152d.tar.gz
llvm-8ca44f0b5ca7dbba81e1da5186ed30f4dc44152d.tar.bz2
Implement unique sections with an unique ID.
This allows the compiler/assembly programmer to switch back to a section. This in turn fixes the bootstrap failure on powerpc (tested on gcc110) without changing the ppc codegen at all. I will try to cleanup the various getELFSection overloads in a followup patch. Just using a default argument now would lead to ambiguities. llvm-svn: 234099
Diffstat (limited to 'llvm/lib/MC/MCSectionELF.cpp')
-rw-r--r--llvm/lib/MC/MCSectionELF.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCSectionELF.cpp b/llvm/lib/MC/MCSectionELF.cpp
index da38682..2b9b8c6 100644
--- a/llvm/lib/MC/MCSectionELF.cpp
+++ b/llvm/lib/MC/MCSectionELF.cpp
@@ -24,7 +24,7 @@ MCSectionELF::~MCSectionELF() {} // anchor.
bool MCSectionELF::ShouldOmitSectionDirective(StringRef Name,
const MCAsmInfo &MAI) const {
- if (Unique)
+ if (isUnique())
return false;
// FIXME: Does .section .bss/.data/.text work everywhere??
@@ -148,8 +148,8 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI,
OS << ",comdat";
}
- if (Unique)
- OS << ",unique";
+ if (isUnique())
+ OS << ",unique " << UniqueID;
OS << '\n';