diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp index 9f18a11c236c0..63c9c3bfff169 100644 --- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp +++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp @@ -141,7 +141,7 @@ class AsmMatcherInfo; // RegisterSets can be seen in the outputted AsmMatcher tables occasionally, and // can even affect compiler output (at least seen in diagnostics produced when // all matches fail). So we use a type that sorts them consistently. -typedef std::set RegisterSet; +using RegisterSet = std::set; class AsmMatcherEmitter { const RecordKeeper &Records; @@ -779,8 +779,8 @@ class AsmMatcherInfo { std::vector OperandMatchInfo; /// Map of Register records to their class information. - typedef std::map - RegisterClassesTy; + using RegisterClassesTy = + std::map; RegisterClassesTy RegisterClasses; /// Map of Predicate records to their subtarget information. @@ -1275,7 +1275,7 @@ void AsmMatcherInfo::buildRegisterClasses( const auto &Registers = Target.getRegBank().getRegisters(); auto &RegClassList = Target.getRegBank().getRegClasses(); - typedef std::set RegisterSetSet; + using RegisterSetSet = std::set; // The register sets used for matching. RegisterSetSet RegisterSets; @@ -1515,7 +1515,7 @@ AsmMatcherInfo::AsmMatcherInfo(const Record *asmParser, void AsmMatcherInfo::buildOperandMatchInfo() { /// Map containing a mask with all operands indices that can be found for /// that class inside a instruction. - typedef std::map>> OpClassMaskTy; + using OpClassMaskTy = std::map>>; OpClassMaskTy OpClassMask; bool CallCustomParserForAllOperands = diff --git a/llvm/utils/TableGen/AsmWriterEmitter.cpp b/llvm/utils/TableGen/AsmWriterEmitter.cpp index c8c6c23bea014..8901ecb7210a7 100644 --- a/llvm/utils/TableGen/AsmWriterEmitter.cpp +++ b/llvm/utils/TableGen/AsmWriterEmitter.cpp @@ -814,7 +814,7 @@ static unsigned CountNumOperands(StringRef AsmString, unsigned Variant) { namespace { struct AliasPriorityComparator { - typedef std::pair ValueType; + using ValueType = std::pair; bool operator()(const ValueType &LHS, const ValueType &RHS) const { if (LHS.second == RHS.second) { // We don't actually care about the order, but for consistency it @@ -845,8 +845,8 @@ void AsmWriterEmitter::EmitPrintAliasInstruction(raw_ostream &O) { bool PassSubtarget = AsmWriter->getValueAsInt("PassSubtarget"); // Create a map from the qualified name to a list of potential matches. - typedef std::set, AliasPriorityComparator> - AliasWithPriority; + using AliasWithPriority = + std::set, AliasPriorityComparator>; std::map AliasMap; for (const Record *R : Records.getAllDerivedDefinitions("InstAlias")) { int Priority = R->getValueAsInt("EmitPriority"); diff --git a/llvm/utils/TableGen/Basic/SequenceToOffsetTable.h b/llvm/utils/TableGen/Basic/SequenceToOffsetTable.h index 8da6fbef0672e..761ef1fcf12fe 100644 --- a/llvm/utils/TableGen/Basic/SequenceToOffsetTable.h +++ b/llvm/utils/TableGen/Basic/SequenceToOffsetTable.h @@ -44,7 +44,7 @@ inline void printChar(raw_ostream &OS, char C) { /// @tparam Less A stable comparator for SeqT elements. template > class SequenceToOffsetTable { - typedef typename SeqT::value_type ElemT; + using ElemT = typename SeqT::value_type; // Define a comparator for SeqT that sorts a suffix immediately before a // sequence with that suffix. @@ -58,7 +58,7 @@ class SequenceToOffsetTable { // Keep sequences ordered according to SeqLess so suffixes are easy to find. // Map each sequence to its offset in the table. - typedef std::map SeqMap; + using SeqMap = std::map; // Sequences added so far, with suffixes removed. SeqMap Seqs; diff --git a/llvm/utils/TableGen/CodeGenMapTable.cpp b/llvm/utils/TableGen/CodeGenMapTable.cpp index 90f0a2ac8c268..e5025784d304d 100644 --- a/llvm/utils/TableGen/CodeGenMapTable.cpp +++ b/llvm/utils/TableGen/CodeGenMapTable.cpp @@ -84,9 +84,9 @@ #include "llvm/TableGen/Record.h" using namespace llvm; -typedef std::map> InstrRelMapTy; -typedef std::map, std::vector> - RowInstrMapTy; +using InstrRelMapTy = std::map>; +using RowInstrMapTy = + std::map, std::vector>; namespace { diff --git a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp index 8076ce2486f56..34355d5d6b743 100644 --- a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp @@ -776,7 +776,7 @@ bool TypeInfer::EnforceSameSize(TypeSetByHwMode &A, TypeSetByHwMode &B) { if (B.empty()) Changed |= EnforceAny(B); - typedef SmallSet TypeSizeSet; + using TypeSizeSet = SmallSet; auto NoSize = [](const TypeSizeSet &Sizes, MVT T) -> bool { return !Sizes.contains(T.getSizeInBits()); @@ -4129,7 +4129,7 @@ void CodeGenDAGPatterns::ParseInstructions() { } } -typedef std::pair NameRecord; +using NameRecord = std::pair; static void FindNames(TreePatternNode &P, std::map &Names, @@ -4590,7 +4590,7 @@ void CodeGenDAGPatterns::ExpandHwModeBasedTypes() { } /// Dependent variable map for CodeGenDAGPattern variant generation -typedef StringMap DepVarMap; +using DepVarMap = StringMap; static void FindDepVarsOf(TreePatternNode &N, DepVarMap &DepMap) { if (N.isLeaf()) { diff --git a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h index 2ed8d1376b045..aa9a0a442424d 100644 --- a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h +++ b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h @@ -349,7 +349,7 @@ struct TypeInfer { }; /// Set type used to track multiply used variables in patterns -typedef StringSet<> MultipleUseVarSet; +using MultipleUseVarSet = StringSet<>; /// SDTypeConstraint - This is a discriminated union of constraints, /// corresponding to the SDTypeConstraint tablegen class in Target.td. @@ -1217,13 +1217,13 @@ class CodeGenDAGPatterns { iterator_range ptfs() const { return PatternFragments; } // Patterns to match information. - typedef std::vector::const_iterator ptm_iterator; + using ptm_iterator = std::vector::const_iterator; ptm_iterator ptm_begin() const { return PatternsToMatch.begin(); } ptm_iterator ptm_end() const { return PatternsToMatch.end(); } iterator_range ptms() const { return PatternsToMatch; } /// Parse the Pattern for an instruction, and insert the result in DAGInsts. - typedef std::map DAGInstMap; + using DAGInstMap = std::map; void parseInstructionPattern(CodeGenInstruction &CGI, const ListInit *Pattern, DAGInstMap &DAGInsts); diff --git a/llvm/utils/TableGen/Common/CodeGenHwModes.h b/llvm/utils/TableGen/Common/CodeGenHwModes.h index 5e1b31ae39e43..55062b6ebeb35 100644 --- a/llvm/utils/TableGen/Common/CodeGenHwModes.h +++ b/llvm/utils/TableGen/Common/CodeGenHwModes.h @@ -36,7 +36,7 @@ struct HwMode { struct HwModeSelect { HwModeSelect(const Record *R, CodeGenHwModes &CGH); - typedef std::pair PairType; + using PairType = std::pair; std::vector Items; void dump() const; }; diff --git a/llvm/utils/TableGen/Common/CodeGenInstruction.h b/llvm/utils/TableGen/Common/CodeGenInstruction.h index ed0bfa7098eb7..72958375ab298 100644 --- a/llvm/utils/TableGen/Common/CodeGenInstruction.h +++ b/llvm/utils/TableGen/Common/CodeGenInstruction.h @@ -158,8 +158,8 @@ class CGIOperandList { OperandInfo &back() { return OperandList.back(); } const OperandInfo &back() const { return OperandList.back(); } - typedef std::vector::iterator iterator; - typedef std::vector::const_iterator const_iterator; + using iterator = std::vector::iterator; + using const_iterator = std::vector::const_iterator; iterator begin() { return OperandList.begin(); } const_iterator begin() const { return OperandList.begin(); } iterator end() { return OperandList.end(); } diff --git a/llvm/utils/TableGen/Common/CodeGenRegisters.cpp b/llvm/utils/TableGen/Common/CodeGenRegisters.cpp index 2eb94b7e92674..2f0ff3f59c47c 100644 --- a/llvm/utils/TableGen/Common/CodeGenRegisters.cpp +++ b/llvm/utils/TableGen/Common/CodeGenRegisters.cpp @@ -2163,7 +2163,7 @@ void CodeGenRegBank::computeRegUnitLaneMasks() { CodeGenRegister::RegUnitLaneMaskList RegUnitLaneMasks( RegUnits.count(), LaneBitmask::getAll()); // Iterate through SubRegisters. - typedef CodeGenRegister::SubRegMap SubRegMap; + using SubRegMap = CodeGenRegister::SubRegMap; const SubRegMap &SubRegs = Register.getSubRegs(); for (auto [SubRegIndex, SubReg] : SubRegs) { // Ignore non-leaf subregisters, their lane masks are fully covered by @@ -2282,9 +2282,8 @@ void CodeGenRegBank::inferCommonSubClass(CodeGenRegisterClass *RC) { // void CodeGenRegBank::inferSubClassWithSubReg(CodeGenRegisterClass *RC) { // Map SubRegIndex to set of registers in RC supporting that SubRegIndex. - typedef std::map>> - SubReg2SetMap; + using SubReg2SetMap = std::map>>; // Compute the set of registers supporting each SubRegIndex. SubReg2SetMap SRSets; diff --git a/llvm/utils/TableGen/Common/CodeGenRegisters.h b/llvm/utils/TableGen/Common/CodeGenRegisters.h index 89dac125e3d15..c02d04b648534 100644 --- a/llvm/utils/TableGen/Common/CodeGenRegisters.h +++ b/llvm/utils/TableGen/Common/CodeGenRegisters.h @@ -93,9 +93,8 @@ class CodeGenSubRegIndex { std::string getQualifiedName() const; // Map of composite subreg indices. - typedef std::map>> - CompMap; + using CompMap = + std::map>>; // Returns the subreg index that results from composing this with Idx. // Returns NULL if this and Idx don't compose. @@ -180,8 +179,8 @@ class CodeGenRegister { bool Constant = false; // Map SubRegIndex -> Register. - typedef std::map>> - SubRegMap; + using SubRegMap = + std::map>>; CodeGenRegister(const Record *R, unsigned Enum); @@ -220,7 +219,7 @@ class CodeGenRegister { return SubReg2Idx.lookup(Reg); } - typedef std::vector SuperRegList; + using SuperRegList = std::vector; // Get the list of super-registers in topological order, small to large. // This is valid after computeSubRegs visits all registers during RegBank @@ -248,8 +247,8 @@ class CodeGenRegister { } // List of register units in ascending order. - typedef SparseBitVector<> RegUnitList; - typedef SmallVector RegUnitLaneMaskList; + using RegUnitList = SparseBitVector<>; + using RegUnitLaneMaskList = SmallVector; // How many entries in RegUnitList are native? RegUnitList NativeRegUnits; @@ -281,7 +280,7 @@ class CodeGenRegister { unsigned getWeight(const CodeGenRegBank &RegBank) const; // Canonically ordered set. - typedef std::vector Vec; + using Vec = std::vector; private: bool SubRegsComplete; @@ -590,7 +589,7 @@ struct RegUnit { // Each RegUnitSet is a sorted vector with a name. struct RegUnitSet { - typedef std::vector::const_iterator iterator; + using iterator = std::vector::const_iterator; std::string Name; std::vector Units; @@ -602,7 +601,7 @@ struct RegUnitSet { // Base vector for identifying TopoSigs. The contents uniquely identify a // TopoSig, only computeSuperRegs needs to know how. -typedef SmallVector TopoSigId; +using TopoSigId = SmallVector; // CodeGenRegBank - Represent a target's registers and the relations between // them. @@ -621,8 +620,8 @@ class CodeGenRegBank { CodeGenSubRegIndex *createSubRegIndex(StringRef Name, StringRef NameSpace); - typedef std::map, CodeGenSubRegIndex *> - ConcatIdxMap; + using ConcatIdxMap = + std::map, CodeGenSubRegIndex *>; ConcatIdxMap ConcatIdx; // Registers. @@ -639,7 +638,7 @@ class CodeGenRegBank { // Register classes. std::list RegClasses; DenseMap Def2RC; - typedef std::map RCKeyMap; + using RCKeyMap = std::map; RCKeyMap Key2RC; // Register categories. diff --git a/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.h b/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.h index 84dfca46dfbfa..d71fdb450e1a9 100644 --- a/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.h +++ b/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.h @@ -528,10 +528,10 @@ class RuleMatcher : public Matcher { ArrayRef SrcLoc; - typedef std::tuple - DefinedComplexPatternSubOperand; - typedef StringMap - DefinedComplexPatternSubOperandMap; + using DefinedComplexPatternSubOperand = + std::tuple; + using DefinedComplexPatternSubOperandMap = + StringMap; /// A map of Symbolic Names to ComplexPattern sub-operands. DefinedComplexPatternSubOperandMap ComplexSubOperands; /// A map used to for multiple referenced error check of ComplexSubOperand. @@ -1775,7 +1775,7 @@ class OneUsePredicateMatcher : public InstructionPredicateMatcher { /// * Has an nsw/nuw flag or doesn't. class InstructionMatcher final : public PredicateListMatcher { protected: - typedef std::vector> OperandVec; + using OperandVec = std::vector>; RuleMatcher &Rule; diff --git a/llvm/utils/TableGen/Common/InfoByHwMode.cpp b/llvm/utils/TableGen/Common/InfoByHwMode.cpp index 2b3155cace9f3..a16fdbb58e788 100644 --- a/llvm/utils/TableGen/Common/InfoByHwMode.cpp +++ b/llvm/utils/TableGen/Common/InfoByHwMode.cpp @@ -174,7 +174,7 @@ bool RegSizeInfoByHwMode::hasStricterSpillThan( } void RegSizeInfoByHwMode::writeToStream(raw_ostream &OS) const { - typedef decltype(Map)::value_type PairType; + using PairType = decltype(Map)::value_type; std::vector Pairs; for (const auto &P : Map) Pairs.push_back(&P); diff --git a/llvm/utils/TableGen/Common/InfoByHwMode.h b/llvm/utils/TableGen/Common/InfoByHwMode.h index c730b7397c173..ef688a6f6b3d1 100644 --- a/llvm/utils/TableGen/Common/InfoByHwMode.h +++ b/llvm/utils/TableGen/Common/InfoByHwMode.h @@ -87,10 +87,10 @@ void union_modes(const InfoByHwMode &A, const InfoByHwMode &B, } template struct InfoByHwMode { - typedef std::map MapType; - typedef typename MapType::value_type PairType; - typedef typename MapType::iterator iterator; - typedef typename MapType::const_iterator const_iterator; + using MapType = std::map; + using PairType = typename MapType::value_type; + using iterator = typename MapType::iterator; + using const_iterator = typename MapType::const_iterator; InfoByHwMode() = default; InfoByHwMode(const MapType &M) : Map(M) {} diff --git a/llvm/utils/TableGen/FastISelEmitter.cpp b/llvm/utils/TableGen/FastISelEmitter.cpp index c4dbb148c72c1..ed05af05572c2 100644 --- a/llvm/utils/TableGen/FastISelEmitter.cpp +++ b/llvm/utils/TableGen/FastISelEmitter.cpp @@ -71,7 +71,7 @@ class ImmPredicateSet { const TreePredicateFn &getPredicate(unsigned Idx) { return PredsByName[Idx]; } - typedef std::vector::const_iterator iterator; + using iterator = std::vector::const_iterator; iterator begin() const { return PredsByName.begin(); } iterator end() const { return PredsByName.end(); } }; @@ -366,12 +366,12 @@ struct OperandsSignature { class FastISelMap { // A multimap is needed instead of a "plain" map because the key is // the instruction's complexity (an int) and they are not unique. - typedef std::multimap PredMap; - typedef std::map RetPredMap; - typedef std::map TypeRetPredMap; - typedef std::map OpcodeTypeRetPredMap; - typedef std::map - OperandsOpcodeTypeRetPredMap; + using PredMap = std::multimap; + using RetPredMap = std::map; + using TypeRetPredMap = std::map; + using OpcodeTypeRetPredMap = std::map; + using OperandsOpcodeTypeRetPredMap = + std::map; OperandsOpcodeTypeRetPredMap SimplePatterns; diff --git a/llvm/utils/TableGen/InstrInfoEmitter.cpp b/llvm/utils/TableGen/InstrInfoEmitter.cpp index e725de1d9f15f..ee3cd8c20f8e7 100644 --- a/llvm/utils/TableGen/InstrInfoEmitter.cpp +++ b/llvm/utils/TableGen/InstrInfoEmitter.cpp @@ -68,9 +68,9 @@ class InstrInfoEmitter { void emitEnums(raw_ostream &OS, ArrayRef NumberedInstructions); - typedef std::vector OperandInfoTy; - typedef std::vector OperandInfoListTy; - typedef std::map OperandInfoMapTy; + using OperandInfoTy = std::vector; + using OperandInfoListTy = std::vector; + using OperandInfoMapTy = std::map; /// Generate member functions in the target-specific GenInstrInfo class. /// diff --git a/llvm/utils/TableGen/OptionParserEmitter.cpp b/llvm/utils/TableGen/OptionParserEmitter.cpp index 48ae1a0a92b1c..e2440c110f9f4 100644 --- a/llvm/utils/TableGen/OptionParserEmitter.cpp +++ b/llvm/utils/TableGen/OptionParserEmitter.cpp @@ -266,8 +266,8 @@ static void emitOptionParser(const RecordKeeper &Records, raw_ostream &OS) { emitSourceFileHeader("Option Parsing Definitions", OS); // Generate prefix groups. - typedef SmallVector, 2> PrefixKeyT; - typedef std::map PrefixesT; + using PrefixKeyT = SmallVector, 2>; + using PrefixesT = std::map; PrefixesT Prefixes; Prefixes.try_emplace(PrefixKeyT(), 0); for (const Record &R : llvm::make_pointee_range(Opts)) { @@ -277,8 +277,8 @@ static void emitOptionParser(const RecordKeeper &Records, raw_ostream &OS) { } // Generate sub command groups. - typedef SmallVector SubCommandKeyT; - typedef std::map SubCommandIDsT; + using SubCommandKeyT = SmallVector; + using SubCommandIDsT = std::map; SubCommandIDsT SubCommandIDs; auto PrintSubCommandIdsOffset = [&SubCommandIDs, &OS](const Record &R) { diff --git a/llvm/utils/TableGen/RegisterBankEmitter.cpp b/llvm/utils/TableGen/RegisterBankEmitter.cpp index 60aa2d80aee3e..271888ba26820 100644 --- a/llvm/utils/TableGen/RegisterBankEmitter.cpp +++ b/llvm/utils/TableGen/RegisterBankEmitter.cpp @@ -30,7 +30,7 @@ namespace { class RegisterBank { /// A vector of register classes that are included in the register bank. - typedef std::vector RegisterClassesTy; + using RegisterClassesTy = std::vector; private: const Record &TheDef; diff --git a/llvm/utils/TableGen/RegisterInfoEmitter.cpp b/llvm/utils/TableGen/RegisterInfoEmitter.cpp index a67a5a944b1e1..3e6e23ffec115 100644 --- a/llvm/utils/TableGen/RegisterInfoEmitter.cpp +++ b/llvm/utils/TableGen/RegisterInfoEmitter.cpp @@ -623,8 +623,8 @@ static void printSubRegIndex(raw_ostream &OS, const CodeGenSubRegIndex *Idx) { // The initial value depends on the specific list. The list is terminated by a // 0 differential which means we can't encode repeated elements. -typedef SmallVector DiffVec; -typedef SmallVector MaskVec; +using DiffVec = SmallVector; +using MaskVec = SmallVector; // Fills V with differentials between every two consecutive elements of List. static DiffVec &diffEncode(DiffVec &V, SparseBitVector<> List) { @@ -912,7 +912,7 @@ void RegisterInfoEmitter::runMCDesc(raw_ostream &OS) { auto &SubRegIndices = RegBank.getSubRegIndices(); // The lists of sub-registers and super-registers go in the same array. That // allows us to share suffixes. - typedef std::vector RegVec; + using RegVec = std::vector; // Differentially encoded lists. SequenceToOffsetTable DiffSeqs; @@ -926,7 +926,7 @@ void RegisterInfoEmitter::runMCDesc(raw_ostream &OS) { // Keep track of sub-register names as well. These are not differentially // encoded. - typedef SmallVector SubRegIdxVec; + using SubRegIdxVec = SmallVector; SequenceToOffsetTable>> SubRegIdxSeqs( /*Terminator=*/std::nullopt); SmallVector SubRegIdxLists(Regs.size()); @@ -1348,7 +1348,7 @@ void RegisterInfoEmitter::runTargetDesc(raw_ostream &OS) { // Every bit mask present in the list has at least one bit set. // Compress the sub-reg index lists. - typedef std::vector IdxList; + using IdxList = std::vector; SmallVector SuperRegIdxLists(RegisterClasses.size()); SequenceToOffsetTable>> SuperRegIdxSeqs; BitVector MaskBV(RegisterClasses.size()); diff --git a/llvm/utils/TableGen/SearchableTableEmitter.cpp b/llvm/utils/TableGen/SearchableTableEmitter.cpp index d17d90b452bd7..0dc8c92a5a37a 100644 --- a/llvm/utils/TableGen/SearchableTableEmitter.cpp +++ b/llvm/utils/TableGen/SearchableTableEmitter.cpp @@ -116,7 +116,7 @@ class SearchableTableEmitter { void run(raw_ostream &OS); private: - typedef std::pair SearchTableEntry; + using SearchTableEntry = std::pair; enum TypeContext { TypeInStaticStruct, diff --git a/llvm/utils/TableGen/X86DisassemblerTables.cpp b/llvm/utils/TableGen/X86DisassemblerTables.cpp index b8c3c02a9eb3f..483fc58fcfba4 100644 --- a/llvm/utils/TableGen/X86DisassemblerTables.cpp +++ b/llvm/utils/TableGen/X86DisassemblerTables.cpp @@ -864,8 +864,8 @@ void DisassemblerTables::emitInstructionInfo(raw_ostream &o, o << "static const struct OperandSpecifier x86OperandSets[][" << X86_MAX_OPERANDS << "] = {\n"; - typedef SmallVector, X86_MAX_OPERANDS> - OperandListTy; + using OperandListTy = + SmallVector, X86_MAX_OPERANDS>; std::map OperandSets; unsigned OperandSetNum = 0; diff --git a/llvm/utils/TableGen/X86DisassemblerTables.h b/llvm/utils/TableGen/X86DisassemblerTables.h index 0f382741530ce..325bb572b0587 100644 --- a/llvm/utils/TableGen/X86DisassemblerTables.h +++ b/llvm/utils/TableGen/X86DisassemblerTables.h @@ -51,7 +51,7 @@ class DisassemblerTables { std::unique_ptr Tables[12]; // Table of ModRM encodings. - typedef std::map, unsigned> ModRMMapTy; + using ModRMMapTy = std::map, unsigned>; mutable ModRMMapTy ModRMTable; /// The instruction information table diff --git a/llvm/utils/TableGen/X86FoldTablesEmitter.cpp b/llvm/utils/TableGen/X86FoldTablesEmitter.cpp index 6f523b5a197d3..cbb7f89bee679 100644 --- a/llvm/utils/TableGen/X86FoldTablesEmitter.cpp +++ b/llvm/utils/TableGen/X86FoldTablesEmitter.cpp @@ -175,9 +175,8 @@ class X86FoldTablesEmitter { } }; - typedef std::map - FoldTable; + using FoldTable = std::map; // Table2Addr - Holds instructions which their memory form performs // load+store. // diff --git a/llvm/utils/TableGen/X86InstrMappingEmitter.cpp b/llvm/utils/TableGen/X86InstrMappingEmitter.cpp index 2745ba72ba624..9abb1943380f2 100644 --- a/llvm/utils/TableGen/X86InstrMappingEmitter.cpp +++ b/llvm/utils/TableGen/X86InstrMappingEmitter.cpp @@ -35,10 +35,10 @@ class X86InstrMappingEmitter { // to make the search more efficient std::map> CompressedInsts; - typedef std::pair - Entry; - typedef std::map> - PredicateInstMap; + using Entry = + std::pair; + using PredicateInstMap = + std::map>; // Hold all compressed instructions that need to check predicate PredicateInstMap PredicateInsts;