diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-26 07:14:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-26 07:14:28 +0000 |
commit | 37088b3f82112b1c28c713190606cf040fb056c9 (patch) | |
tree | d60e5573d2d8bff72615883595bd1ae853f2d755 /include | |
parent | 2b421dad78d169801dc907013bc0c7bd4f1b3d23 (diff) | |
download | external_llvm-37088b3f82112b1c28c713190606cf040fb056c9.zip external_llvm-37088b3f82112b1c28c713190606cf040fb056c9.tar.gz external_llvm-37088b3f82112b1c28c713190606cf040fb056c9.tar.bz2 |
make SectionKind keep track of whether a global had an explicit
section specified for it or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77142 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index c3fa14e..3a34905 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -125,14 +125,19 @@ namespace llvm { }; private: - Kind K : 7; + Kind K : 6; /// Weak - This is true if the referenced symbol is weak (i.e. linkonce, /// weak, weak_odr, etc). This is orthogonal from the categorization. bool Weak : 1; + + /// ExplicitSection - This is true if the global had a section explicitly + /// specified on it. + bool ExplicitSection : 1; public: bool isWeak() const { return Weak; } + bool hasExplicitSection() const { return ExplicitSection; } bool isText() const { return K == Text; } @@ -185,10 +190,12 @@ namespace llvm { return K == ReadOnlyWithRelLocal; } - static SectionKind get(Kind K, bool isWeak) { + static SectionKind get(Kind K, bool isWeak, + bool hasExplicitSection = false) { SectionKind Res; Res.K = K; Res.Weak = isWeak; + Res.ExplicitSection = hasExplicitSection; return Res; } }; |