Kind getKind() const { return K; }
bool isReadOnly() const {
- return (K == SectionKind::ROData ||
- K == SectionKind::DataRelRO ||
- K == SectionKind::DataRelROLocal ||
- K == SectionKind::RODataMergeConst ||
- K == SectionKind::RODataMergeStr);
+ return K == ROData ||
+ K == DataRelRO || K == DataRelROLocal ||
+ K == RODataMergeConst || K == RODataMergeStr;
}
bool isBSS() const {
bool isWritable() const {
return isTLS() ||
- K == SectionKind::Data ||
- K == SectionKind::DataRel ||
- K == SectionKind::DataRelLocal ||
- K == SectionKind::DataRelRO ||
- K == SectionKind::DataRelROLocal ||
- K == SectionKind::BSS;
+ K == Data ||
+ K == DataRel || K == DataRelLocal ||
+ K == DataRelRO || K == DataRelROLocal ||
+ K == BSS;
}
+ bool isMergableString() const { return K == RODataMergeStr; }
+
static SectionKind get(Kind K) {
SectionKind Res = { K };
return Res;
static SectionKind getRODataMergeConst() { return get(RODataMergeConst); }
static SectionKind getThreadData() { return get(ThreadData); }
static SectionKind getThreadBSS() { return get(ThreadBSS); }
-};
+ };
namespace SectionFlags {
const unsigned Invalid = -1U;