summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-19 04:15:51 +0000
committerChris Lattner <sabre@nondot.org>2010-01-19 04:15:51 +0000
commitce8749e445fdd0493758932874bad50293647df9 (patch)
treed0d640044545f6d9c22f1083dd19324110282999 /include
parent56b1319fbe18e886f7cff415b45df404fac39623 (diff)
downloadllvm-ce8749e445fdd0493758932874bad50293647df9.tar.gz
llvm-ce8749e445fdd0493758932874bad50293647df9.tar.bz2
llvm-ce8749e445fdd0493758932874bad50293647df9.tar.xz
make TLOF subclassify BSS based on linkage type into private, external
and everything else (weak). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93846 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/SectionKind.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/llvm/MC/SectionKind.h b/include/llvm/MC/SectionKind.h
index f125d1578f..c9557f29c9 100644
--- a/include/llvm/MC/SectionKind.h
+++ b/include/llvm/MC/SectionKind.h
@@ -88,6 +88,13 @@ class SectionKind {
/// BSS - Zero initialized writeable data.
BSS,
+ /// BSSLocal - This is BSS (zero initialized and writable) data
+ /// which has local linkage.
+ BSSLocal,
+
+ /// BSSExtern - This is BSS data with normal external linkage.
+ BSSExtern,
+
/// Common - Data with common linkage. These represent tentative
/// definitions, which always have a zero initializer and are never
/// marked 'constant'.
@@ -166,7 +173,10 @@ public:
return isBSS() || isCommon() || isDataRel() || isReadOnlyWithRel();
}
- bool isBSS() const { return K == BSS; }
+ bool isBSS() const { return K == BSS || K == BSSLocal || K == BSSExtern; }
+ bool isBSSLocal() const { return K == BSSLocal; }
+ bool isBSSExtern() const { return K == BSSExtern; }
+
bool isCommon() const { return K == Common; }
bool isDataRel() const {
@@ -213,6 +223,8 @@ public:
static SectionKind getThreadBSS() { return get(ThreadBSS); }
static SectionKind getThreadData() { return get(ThreadData); }
static SectionKind getBSS() { return get(BSS); }
+ static SectionKind getBSSLocal() { return get(BSSLocal); }
+ static SectionKind getBSSExtern() { return get(BSSExtern); }
static SectionKind getCommon() { return get(Common); }
static SectionKind getDataRel() { return get(DataRel); }
static SectionKind getDataRelLocal() { return get(DataRelLocal); }