[ms-inline asm] Remove the MatchInstruction() function. Previously, this was
[oota-llvm.git] / include / llvm / MC / MCSectionELF.h
index 26951725e497912ed173fbd4bd52cc0e7d32ba2b..4d54465760d4ead69b84fec13e35a18540fbde23 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "llvm/MC/MCSection.h"
 #include "llvm/Support/ELF.h"
+#include "llvm/ADT/StringRef.h"
 
 namespace llvm {
 
@@ -66,10 +67,15 @@ public:
   virtual bool UseCodeAlign() const;
   virtual bool isVirtualSection() const;
 
+  /// isBaseAddressKnownZero - We know that non-allocatable sections (like
+  /// debug info) have a base of zero.
+  virtual bool isBaseAddressKnownZero() const {
+    return (getFlags() & ELF::SHF_ALLOC) == 0;
+  }
+
   static bool classof(const MCSection *S) {
     return S->getVariant() == SV_ELF;
   }
-  static bool classof(const MCSectionELF *) { return true; }
 
   // Return the entry size for sections with fixed-width data.
   static unsigned DetermineEntrySize(SectionKind Kind);