MC: clang-format MCContext. NFC.
[oota-llvm.git] / include / llvm / MC / MCContext.h
index e2c115b5d19eacc8f21182e45d77947e3471a43d..b62b84a34ce0c7264afab35b363d50ab2d7fe7cb 100644 (file)
@@ -45,10 +45,12 @@ namespace llvm {
   /// sections that it creates.
   ///
   class MCContext {
-    MCContext(const MCContext&) = delete;
-    MCContext &operator=(const MCContext&) = delete;
+    MCContext(const MCContext &) = delete;
+    MCContext &operator=(const MCContext &) = delete;
+
   public:
-    typedef StringMap<MCSymbol*, BumpPtrAllocator&> SymbolTable;
+    typedef StringMap<MCSymbol *, BumpPtrAllocator &> SymbolTable;
+
   private:
     /// The SourceMgr for this object, if any.
     const SourceMgr *SrcMgr;
@@ -73,7 +75,7 @@ namespace llvm {
 
     /// ELF sections can have a corresponding symbol. This maps one to the
     /// other.
-    DenseMap<const MCSectionELF*, MCSymbol*> SectionSymbols;
+    DenseMap<const MCSectionELF *, MCSymbol *> SectionSymbols;
 
     /// A mapping from a local label number and an instance count to a symbol.
     /// For example, in the assembly
@@ -81,11 +83,11 @@ namespace llvm {
     ///     2:
     ///     1:
     /// We have three labels represented by the pairs (1, 0), (2, 0) and (1, 1)
-    DenseMap<std::pair<unsigned, unsigned>, MCSymbol*> LocalSymbols;
+    DenseMap<std::pair<unsigned, unsigned>, MCSymbol *> LocalSymbols;
 
     /// Keeps tracks of names that were used both for used declared and
     /// artificial symbols.
-    StringMap<bool, BumpPtrAllocator&> UsedNames;
+    StringMap<bool, BumpPtrAllocator &> UsedNames;
 
     /// The next ID to dole out to an unnamed assembler temporary symbol with
     /// a given prefix.
@@ -136,8 +138,8 @@ namespace llvm {
 
     /// Symbols created for the start and end of each section, used for
     /// generating the .debug_ranges and .debug_aranges sections.
-    MapVector<const MCSection *, std::pair<MCSymbol *, MCSymbol *> >
-    SectionStartEndSyms;
+    MapVector<const MCSection *, std::pair<MCSymbol *, MCSymbol *>>
+        SectionStartEndSyms;
 
     /// The information gathered from labels that will have dwarf label
     /// entries when generating dwarf assembly source files.
@@ -197,7 +199,7 @@ namespace llvm {
       }
     };
 
-    StringMap<const MCSectionMachO*> MachOUniquingMap;
+    StringMap<const MCSectionMachO *> MachOUniquingMap;
     std::map<ELFSectionKey, const MCSectionELF *> ELFUniquingMap;
     std::map<COFFSectionKey, const MCSectionCOFF *> COFFUniquingMap;
     StringMap<bool> ELFRelSecNames;
@@ -280,9 +282,7 @@ namespace llvm {
     /// want to, for example, iterate over all symbols. 'const' because we
     /// still want any modifications to the table itself to use the MCContext
     /// APIs.
-    const SymbolTable &getSymbols() const {
-      return Symbols;
-    }
+    const SymbolTable &getSymbols() const { return Symbols; }
 
     /// @}
 
@@ -433,9 +433,7 @@ namespace llvm {
           return true;
       return false;
     }
-    unsigned getDwarfCompileUnitID() {
-      return DwarfCompileUnitID;
-    }
+    unsigned getDwarfCompileUnitID() { return DwarfCompileUnitID; }
     void setDwarfCompileUnitID(unsigned CUIndex) {
       DwarfCompileUnitID = CUIndex;
     }
@@ -469,12 +467,12 @@ namespace llvm {
     void setGenDwarfFileNumber(unsigned FileNumber) {
       GenDwarfFileNumber = FileNumber;
     }
-    MapVector<const MCSection *, std::pair<MCSymbol *, MCSymbol *> > &
+    MapVector<const MCSection *, std::pair<MCSymbol *, MCSymbol *>> &
     getGenDwarfSectionSyms() {
       return SectionStartEndSyms;
     }
     std::pair<MapVector<const MCSection *,
-                        std::pair<MCSymbol *, MCSymbol *> >::iterator,
+                        std::pair<MCSymbol *, MCSymbol *>>::iterator,
               bool>
     addGenDwarfSection(const MCSection *Sec) {
       return SectionStartEndSyms.insert(
@@ -502,18 +500,13 @@ namespace llvm {
     char *getSecureLogFile() { return SecureLogFile; }
     raw_ostream *getSecureLog() { return SecureLog; }
     bool getSecureLogUsed() { return SecureLogUsed; }
-    void setSecureLog(raw_ostream *Value) {
-      SecureLog = Value;
-    }
-    void setSecureLogUsed(bool Value) {
-      SecureLogUsed = Value;
-    }
+    void setSecureLog(raw_ostream *Value) { SecureLog = Value; }
+    void setSecureLogUsed(bool Value) { SecureLogUsed = Value; }
 
     void *allocate(unsigned Size, unsigned Align = 8) {
       return Allocator.Allocate(Size, Align);
     }
-    void deallocate(void *Ptr) {
-    }
+    void deallocate(void *Ptr) {}
 
     // Unrecoverable error has occurred. Display the best diagnostic we can
     // and bail via exit(1). For now, most MC backend errors are unrecoverable.