MC: Allow modifiers in MCSymbolRefExpr, and eliminate X86MCTargetExpr.
[oota-llvm.git] / include / llvm / MC / SectionKind.h
index 945cff790a4876875c4f0cb01c1f0deebaef1c50..c9557f29c9a5c79254c4607c4178eac7982f3deb 100644 (file)
@@ -87,6 +87,18 @@ class SectionKind {
     
            /// BSS - Zero initialized writeable data.
            BSS,
+    
+               /// BSSLocal - This is BSS (zero initialized and writable) data
+               /// which has local linkage.
+               BSSLocal,
+    
+               /// BSSExtern - This is BSS data with normal external linkage.
+               BSSExtern,
+    
+           /// Common - Data with common linkage.  These represent tentative
+           /// definitions, which always have a zero initializer and are never
+           /// marked 'constant'.
+           Common,
 
            /// DataRel - This is the most general form of data that is written
            /// to by the program, it can have random relocations to arbitrary
@@ -158,10 +170,14 @@ public:
   bool isThreadData() const { return K == ThreadData; } 
 
   bool isGlobalWriteableData() const {
-    return isBSS() || isDataRel() || isReadOnlyWithRel();
+    return isBSS() || isCommon() || isDataRel() || isReadOnlyWithRel();
   }
   
-  bool isBSS() const { return K == BSS; }
+  bool isBSS() const { return K == BSS || K == BSSLocal || K == BSSExtern; }
+  bool isBSSLocal() const { return K == BSSLocal; }
+  bool isBSSExtern() const { return K == BSSExtern; }
+  
+  bool isCommon() const { return K == Common; }
   
   bool isDataRel() const {
     return K == DataRel || K == DataRelLocal || K == DataNoRel;
@@ -207,6 +223,9 @@ public:
   static SectionKind getThreadBSS() { return get(ThreadBSS); }
   static SectionKind getThreadData() { return get(ThreadData); }
   static SectionKind getBSS() { return get(BSS); }
+  static SectionKind getBSSLocal() { return get(BSSLocal); }
+  static SectionKind getBSSExtern() { return get(BSSExtern); }
+  static SectionKind getCommon() { return get(Common); }
   static SectionKind getDataRel() { return get(DataRel); }
   static SectionKind getDataRelLocal() { return get(DataRelLocal); }
   static SectionKind getDataNoRel() { return get(DataNoRel); }