diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-07-26 00:50:43 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-07-26 00:50:43 +0000 |
| commit | 26ce308bbf6697a7ca748456a75ee653ef0aa44d (patch) | |
| tree | fa3ffa7395577dbbb709c9b6558f20b024d65ed8 | |
| parent | a32c999ca27b987932043ef86644102099b2e1cb (diff) | |
| download | bcm5719-llvm-26ce308bbf6697a7ca748456a75ee653ef0aa44d.tar.gz bcm5719-llvm-26ce308bbf6697a7ca748456a75ee653ef0aa44d.zip | |
simplify some predicates, add isMergableString()
llvm-svn: 77103
| -rw-r--r-- | llvm/include/llvm/Target/TargetAsmInfo.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/llvm/include/llvm/Target/TargetAsmInfo.h b/llvm/include/llvm/Target/TargetAsmInfo.h index 15f17ba0598..b9a877e920a 100644 --- a/llvm/include/llvm/Target/TargetAsmInfo.h +++ b/llvm/include/llvm/Target/TargetAsmInfo.h @@ -61,11 +61,9 @@ namespace llvm { 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 @@ namespace llvm { 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 @@ namespace llvm { static SectionKind getRODataMergeConst() { return get(RODataMergeConst); } static SectionKind getThreadData() { return get(ThreadData); } static SectionKind getThreadBSS() { return get(ThreadBSS); } -}; + }; namespace SectionFlags { const unsigned Invalid = -1U; |

