aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-26 07:00:12 +0000
committerChris Lattner <sabre@nondot.org>2009-07-26 07:00:12 +0000
commit4c50922f6be96fdb1e9a924aeeecf91638e2c52b (patch)
tree6178770be2c961efdb66096dca312636def13129 /include
parent37939c910fe17eef328736b3c09b6cd262095a87 (diff)
downloadexternal_llvm-4c50922f6be96fdb1e9a924aeeecf91638e2c52b.zip
external_llvm-4c50922f6be96fdb1e9a924aeeecf91638e2c52b.tar.gz
external_llvm-4c50922f6be96fdb1e9a924aeeecf91638e2c52b.tar.bz2
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
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/TargetAsmInfo.h14
1 files changed, 9 insertions, 5 deletions
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;
}
};