Be consistent about being virtual and returning void in the cfi methods.
[oota-llvm.git] / include / llvm / MC / MCContext.h
index 60d5c0fae1f3f6f1ada707db89bd56ce7e2fcda1..f6279768ca26b63c6a25cb3e10e6cb64fd5996e1 100644 (file)
@@ -29,6 +29,7 @@ namespace llvm {
   class MCLineSection;
   class StringRef;
   class Twine;
+  class TargetAsmInfo;
   class MCSectionMachO;
   class MCSectionELF;
 
@@ -42,6 +43,8 @@ namespace llvm {
     /// The MCAsmInfo for this target.
     const MCAsmInfo &MAI;
 
+    const TargetAsmInfo *TAI;
+
     /// Symbols - Bindings of names to symbols.
     StringMap<MCSymbol*> Symbols;
 
@@ -81,6 +84,11 @@ namespace llvm {
     MCDwarfLoc CurrentDwarfLoc;
     bool DwarfLocSeen;
 
+    /// Honor temporary labels, this is useful for debugging semantic
+    /// differences between temporary and non-temporary labels (primarily on
+    /// Darwin).
+    bool AllowTemporaryLabels;
+
     /// The dwarf line information from the .loc directives for the sections
     /// with assembled machine instructions have after seeing .loc directives.
     DenseMap<const MCSection *, MCLineSection *> MCLineSections;
@@ -99,11 +107,15 @@ namespace llvm {
     MCSymbol *CreateSymbol(StringRef Name);
 
   public:
-    explicit MCContext(const MCAsmInfo &MAI);
+    explicit MCContext(const MCAsmInfo &MAI, const TargetAsmInfo *TAI);
     ~MCContext();
 
     const MCAsmInfo &getAsmInfo() const { return MAI; }
 
+    const TargetAsmInfo &getTargetAsmInfo() const { return *TAI; }
+
+    void setAllowTemporaryLabels(bool Value) { AllowTemporaryLabels = Value; }
+
     /// @name Symbol Management
     /// @{
 
@@ -177,11 +189,8 @@ namespace llvm {
 
     bool isValidDwarfFileNumber(unsigned FileNumber);
 
-    bool hasDwarfFiles(void) {
-      return MCDwarfFiles.size() != 0;
-    }
-    bool hasDwarfLines(void) {
-      return MCLineSectionOrder.size() != 0;
+    bool hasDwarfFiles() const {
+      return !MCDwarfFiles.empty();
     }
 
     const std::vector<MCDwarfFile *> &getMCDwarfFiles() {