[llvm-commits] [llvm] r77103 - /llvm/trunk/include/llvm/Target/TargetAsmInfo.h
Chris Lattner
sabre at nondot.org
Sat Jul 25 17:50:43 PDT 2009
Author: lattner
Date: Sat Jul 25 19:50:43 2009
New Revision: 77103
URL: http://llvm.org/viewvc/llvm-project?rev=77103&view=rev
Log:
simplify some predicates, add isMergableString()
Modified:
llvm/trunk/include/llvm/Target/TargetAsmInfo.h
Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=77103&r1=77102&r2=77103&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Sat Jul 25 19:50:43 2009
@@ -61,11 +61,9 @@
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 {
@@ -82,14 +80,14 @@
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;
@@ -106,7 +104,7 @@
static SectionKind getRODataMergeConst() { return get(RODataMergeConst); }
static SectionKind getThreadData() { return get(ThreadData); }
static SectionKind getThreadBSS() { return get(ThreadBSS); }
-};
+ };
namespace SectionFlags {
const unsigned Invalid = -1U;
More information about the llvm-commits
mailing list