Index: include/llvm/ADT/STLExtras.h =================================================================== --- include/llvm/ADT/STLExtras.h +++ include/llvm/ADT/STLExtras.h @@ -58,8 +58,8 @@ template struct identity { - typedef Ty argument_type; - typedef Ty result_type; + using argument_type = Ty; + using result_type = Ty; Ty &operator()(Ty &self) const { return self; @@ -71,9 +71,9 @@ template struct less_ptr { - typedef Ty first_argument_type; - typedef Ty second_argument_type; - typedef bool result_Type; + using first_argument_type = Ty; + using second_argument_type = Ty; + using result_Type = bool; bool operator()(const Ty* left, const Ty* right) const { return *left < *right; @@ -82,9 +82,9 @@ template struct greater_ptr { - typedef Ty first_argument_type; - typedef Ty second_argument_type; - typedef bool result_Type; + using first_argument_type = Ty; + using second_argument_type = Ty; + using result_Type = bool; bool operator()(const Ty* left, const Ty* right) const { return *right < *left; Index: include/llvm/CodeGen/LatencyPriorityQueue.h =================================================================== --- include/llvm/CodeGen/LatencyPriorityQueue.h +++ include/llvm/CodeGen/LatencyPriorityQueue.h @@ -23,9 +23,9 @@ /// Sorting functions for the Available queue. struct latency_sort { - typedef SUnit* first_argument_type; - typedef SUnit* second_argument_type; - typedef bool result_Type; + using first_argument_type = SUnit*; + using second_argument_type = SUnit*; + using result_Type = bool; LatencyPriorityQueue *PQ; explicit latency_sort(LatencyPriorityQueue *pq) : PQ(pq) {} Index: include/llvm/CodeGen/MachineBasicBlock.h =================================================================== --- include/llvm/CodeGen/MachineBasicBlock.h +++ include/llvm/CodeGen/MachineBasicBlock.h @@ -763,8 +763,8 @@ // This is useful when building IndexedMaps keyed on basic block pointers. struct MBB2NumberFunctor { - typedef const MachineBasicBlock* argument_type; - typedef unsigned result_type; + using argument_type = const MachineBasicBlock*; + using result_type = unsigned; unsigned operator()(const MachineBasicBlock *MBB) const { return MBB->getNumber(); Index: include/llvm/CodeGen/ResourcePriorityQueue.h =================================================================== --- include/llvm/CodeGen/ResourcePriorityQueue.h +++ include/llvm/CodeGen/ResourcePriorityQueue.h @@ -29,9 +29,9 @@ /// Sorting functions for the Available queue. struct resource_sort { - typedef SUnit* first_argument_type; - typedef SUnit* second_argument_type; - typedef bool result_type; + using first_argument_type = SUnit*; + using second_argument_type = SUnit*; + using result_type = bool; ResourcePriorityQueue *PQ; explicit resource_sort(ResourcePriorityQueue *pq) : PQ(pq) {} Index: include/llvm/IR/Instructions.h =================================================================== --- include/llvm/IR/Instructions.h +++ include/llvm/IR/Instructions.h @@ -4195,10 +4195,10 @@ } public: - typedef BasicBlock* (*DerefFnTy)(Value *); + using DerefFnTy = BasicBlock* (*)(Value *); using handler_iterator = mapped_iterator; using handler_range = iterator_range; - typedef const BasicBlock* (*ConstDerefFnTy)(const Value *); + using ConstDerefFnTy = const BasicBlock* (*)(const Value *); using const_handler_iterator = mapped_iterator; using const_handler_range = iterator_range; Index: include/llvm/Target/TargetRegisterInfo.h =================================================================== --- include/llvm/Target/TargetRegisterInfo.h +++ include/llvm/Target/TargetRegisterInfo.h @@ -1115,8 +1115,8 @@ // This is useful when building IndexedMaps keyed on virtual registers struct VirtReg2IndexFunctor { - typedef unsigned argument_type; - typedef unsigned result_type; + using argument_type = unsigned; + using result_type = unsigned; unsigned operator()(unsigned Reg) const { return TargetRegisterInfo::virtReg2Index(Reg); Index: lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp =================================================================== --- lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -1564,9 +1564,9 @@ class RegReductionPQBase; struct queue_sort { - typedef SUnit* first_argument_type; - typedef SUnit* second_argument_type; - typedef bool result_type; + using first_argument_type = SUnit*; + using second_argument_type = SUnit*; + using result_type = bool; bool isReady(SUnit* SU, unsigned CurCycle) const { return true; } }; Index: utils/TableGen/SequenceToOffsetTable.h =================================================================== --- utils/TableGen/SequenceToOffsetTable.h +++ utils/TableGen/SequenceToOffsetTable.h @@ -38,9 +38,9 @@ // Define a comparator for SeqT that sorts a suffix immediately before a // sequence with that suffix. struct SeqLess { - typedef SeqT first_argument_type; - typedef SeqT second_argument_type; - typedef bool result_type; + using first_argument_type = SeqT; + using second_argument_type = SeqT; + using result_type = bool; Less L; bool operator()(const SeqT &A, const SeqT &B) const {