From 149178d92bf4d405e71fabb4d93204292f89acc2 Mon Sep 17 00:00:00 2001 From: Eugene Zelenko Date: Tue, 10 Oct 2017 22:33:29 +0000 Subject: [CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). llvm-svn: 315380 --- llvm/lib/CodeGen/MachineModuleInfoImpls.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/MachineModuleInfoImpls.cpp') diff --git a/llvm/lib/CodeGen/MachineModuleInfoImpls.cpp b/llvm/lib/CodeGen/MachineModuleInfoImpls.cpp index 22d519e5d88..a29fbc28528 100644 --- a/llvm/lib/CodeGen/MachineModuleInfoImpls.cpp +++ b/llvm/lib/CodeGen/MachineModuleInfoImpls.cpp @@ -1,4 +1,4 @@ -//===-- llvm/CodeGen/MachineModuleInfoImpls.cpp ---------------------------===// +//===- llvm/CodeGen/MachineModuleInfoImpls.cpp ----------------------------===// // // The LLVM Compiler Infrastructure // @@ -13,7 +13,11 @@ //===----------------------------------------------------------------------===// #include "llvm/CodeGen/MachineModuleInfoImpls.h" +#include "llvm/ADT/DenseMap.h" #include "llvm/MC/MCSymbol.h" +#include +#include + using namespace llvm; //===----------------------------------------------------------------------===// @@ -25,7 +29,8 @@ void MachineModuleInfoMachO::anchor() {} void MachineModuleInfoELF::anchor() {} static int SortSymbolPair(const void *LHS, const void *RHS) { - typedef std::pair PairTy; + using PairTy = std::pair; + const MCSymbol *LHSS = ((const PairTy *)LHS)->first; const MCSymbol *RHSS = ((const PairTy *)RHS)->first; return LHSS->getName().compare(RHSS->getName()); @@ -41,4 +46,3 @@ MachineModuleInfoImpl::SymbolListTy MachineModuleInfoImpl::getSortedStubs( Map.clear(); return List; } - -- cgit v1.2.3