From ed0c676d4ee8f25d06297caa81502efa3f65782e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 26 Jul 2009 07:00:12 +0000 Subject: make SectionKind know whether a symbol is weak or not in addition to its classification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77140 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetAsmInfo.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index dc5d941..c3fa14e 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -125,13 +125,16 @@ namespace llvm { }; private: - Kind K : 8; + Kind K : 7; + /// 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; public: - bool isText() const { - return K == Text; - } + bool isWeak() const { return Weak; } + + bool isText() const { return K == Text; } bool isReadOnly() const { return K == ReadOnly || K == MergeableCString || isMergeableConst(); @@ -182,9 +185,10 @@ namespace llvm { return K == ReadOnlyWithRelLocal; } - static SectionKind get(Kind K) { + static SectionKind get(Kind K, bool isWeak) { SectionKind Res; Res.K = K; + Res.Weak = isWeak; return Res; } }; -- cgit v1.1