aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-07-09 13:41:07 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-07-09 13:41:07 +0000
commit4b4d100ad0a12e6787930dc499ece1b3063c7e88 (patch)
tree7d9e02ce72572e878a7a5717a54098297a473eb3
parentc5a7e40c74f9e0e3e0e19b9d5c0b9295841e8db4 (diff)
Drop enum and use constants for SectionFlags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53325 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Target/TargetAsmInfo.h30
1 files changed, 14 insertions, 16 deletions
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h
index 1baae518c5..eb90d94da3 100644
--- a/include/llvm/Target/TargetAsmInfo.h
+++ b/include/llvm/Target/TargetAsmInfo.h
@@ -45,22 +45,20 @@ namespace llvm {
}
namespace SectionFlags {
- enum Flags {
- Invalid = -1UL,
- None = 0,
- Code = 1 << 0, ///< Section contains code
- Writeable = 1 << 1, ///< Section is writeable
- BSS = 1 << 2, ///< Section contains only zeroes
- Mergeable = 1 << 3, ///< Section contains mergeable data
- Strings = 1 << 4, ///< Section contains null-terminated strings
- TLS = 1 << 5, ///< Section contains thread-local data
- Debug = 1 << 6, ///< Section contains debug data
- Linkonce = 1 << 7, ///< Section is linkonce
- TypeFlags = 0xFF,
- // Some gap for future flags
- Named = 1 << 23, ///< Section is named
- EntitySize = 0xFF << 24 ///< Entity size for mergeable sections
- };
+ const unsigned Invalid = -1UL;
+ const unsigned None = 0;
+ const unsigned Code = 1 << 0; ///< Section contains code
+ const unsigned Writeable = 1 << 1; ///< Section is writeable
+ const unsigned BSS = 1 << 2; ///< Section contains only zeroes
+ const unsigned Mergeable = 1 << 3; ///< Section contains mergeable data
+ const unsigned Strings = 1 << 4; ///< Section contains C-type strings
+ const unsigned TLS = 1 << 5; ///< Section contains thread-local data
+ const unsigned Debug = 1 << 6; ///< Section contains debug data
+ const unsigned Linkonce = 1 << 7; ///< Section is linkonce
+ const unsigned TypeFlags = 0xFF;
+ // Some gap for future flags
+ const unsigned Named = 1 << 23; ///< Section is named
+ const unsigned EntitySize = 0xFF << 24; ///< Entity size for mergeable stuff
static inline unsigned getEntitySize(unsigned Flags) {
return (Flags >> 24) & 0xFF;