diff options
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r-- | llvm/lib/MC/ELFObjectWriter.cpp | 8 | ||||
-rw-r--r-- | llvm/lib/MC/StringTableBuilder.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/MC/WinCOFFObjectWriter.cpp | 15 |
3 files changed, 13 insertions, 12 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp index ee9c25cda94..e86db933af3 100644 --- a/llvm/lib/MC/ELFObjectWriter.cpp +++ b/llvm/lib/MC/ELFObjectWriter.cpp @@ -63,7 +63,7 @@ using namespace llvm; namespace { -typedef DenseMap<const MCSectionELF *, uint32_t> SectionIndexMapTy; +using SectionIndexMapTy = DenseMap<const MCSectionELF *, uint32_t>; class ELFObjectWriter; @@ -194,8 +194,8 @@ public: ELFSymbolData &MSD, const MCAsmLayout &Layout); // Start and end offset of each section - typedef std::map<const MCSectionELF *, std::pair<uint64_t, uint64_t>> - SectionOffsetsTy; + using SectionOffsetsTy = + std::map<const MCSectionELF *, std::pair<uint64_t, uint64_t>>; bool shouldRelocateWithSymbol(const MCAssembler &Asm, const MCSymbolRefExpr *RefA, @@ -208,7 +208,7 @@ public: uint64_t &FixedValue) override; // Map from a signature symbol to the group section index - typedef DenseMap<const MCSymbol *, unsigned> RevGroupMapTy; + using RevGroupMapTy = DenseMap<const MCSymbol *, unsigned>; /// Compute the symbol table data /// diff --git a/llvm/lib/MC/StringTableBuilder.cpp b/llvm/lib/MC/StringTableBuilder.cpp index fbd7ba60bc9..a0fb33846fc 100644 --- a/llvm/lib/MC/StringTableBuilder.cpp +++ b/llvm/lib/MC/StringTableBuilder.cpp @@ -58,7 +58,7 @@ void StringTableBuilder::write(raw_ostream &OS) const { OS << Data; } -typedef std::pair<CachedHashStringRef, size_t> StringPair; +using StringPair = std::pair<CachedHashStringRef, size_t>; void StringTableBuilder::write(uint8_t *Buf) const { assert(isFinalized()); diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp index da8fe73f823..e99a548ac00 100644 --- a/llvm/lib/MC/WinCOFFObjectWriter.cpp +++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp @@ -38,6 +38,7 @@ #include "llvm/Support/JamCRC.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/raw_ostream.h" +#include <algorithm> #include <cassert> #include <cstddef> #include <cstdint> @@ -54,7 +55,7 @@ using llvm::support::endian::write32le; namespace { -typedef SmallString<COFF::NameSize> name; +using name = SmallString<COFF::NameSize>; enum AuxiliaryType { ATFunctionDefinition, @@ -75,7 +76,7 @@ class COFFSymbol { public: COFF::symbol Data = {}; - typedef SmallVector<AuxSymbol, 1> AuxiliarySymbols; + using AuxiliarySymbols = SmallVector<AuxSymbol, 1>; name Name; int Index; @@ -107,7 +108,7 @@ struct COFFRelocation { static size_t size() { return COFF::RelocationSize; } }; -typedef std::vector<COFFRelocation> relocations; +using relocations = std::vector<COFFRelocation>; class COFFSection { public: @@ -124,11 +125,11 @@ public: class WinCOFFObjectWriter : public MCObjectWriter { public: - typedef std::vector<std::unique_ptr<COFFSymbol>> symbols; - typedef std::vector<std::unique_ptr<COFFSection>> sections; + using symbols = std::vector<std::unique_ptr<COFFSymbol>>; + using sections = std::vector<std::unique_ptr<COFFSection>>; - typedef DenseMap<MCSymbol const *, COFFSymbol *> symbol_map; - typedef DenseMap<MCSection const *, COFFSection *> section_map; + using symbol_map = DenseMap<MCSymbol const *, COFFSymbol *>; + using section_map = DenseMap<MCSection const *, COFFSection *>; std::unique_ptr<MCWinCOFFObjectTargetWriter> TargetObjectWriter; |