[Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).

llvm-svn: 308936
diff --git a/llvm/lib/Analysis/CallGraph.cpp b/llvm/lib/Analysis/CallGraph.cpp
index ff5242f..ac3ea2b 100644
--- a/llvm/lib/Analysis/CallGraph.cpp
+++ b/llvm/lib/Analysis/CallGraph.cpp
@@ -8,12 +8,20 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Analysis/CallGraph.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/SmallVector.h"
 #include "llvm/IR/CallSite.h"
-#include "llvm/IR/Instructions.h"
-#include "llvm/IR/IntrinsicInst.h"
 #include "llvm/IR/Module.h"
+#include "llvm/IR/Function.h"
+#include "llvm/IR/Intrinsics.h"
+#include "llvm/IR/PassManager.h"
+#include "llvm/Pass.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
+#include <algorithm>
+#include <cassert>
+
 using namespace llvm;
 
 //===----------------------------------------------------------------------===//
@@ -125,7 +133,6 @@
 /// This does not rescan the body of the function, so it is suitable when
 /// splicing the body of the old function to the new while also updating all
 /// callers from old to new.
-///
 void CallGraph::spliceFunction(const Function *From, const Function *To) {
   assert(FunctionMap.count(From) && "No CallGraphNode for function!");
   assert(!FunctionMap.count(To) &&
@@ -256,7 +263,7 @@
   initializeCallGraphWrapperPassPass(*PassRegistry::getPassRegistry());
 }
 
-CallGraphWrapperPass::~CallGraphWrapperPass() {}
+CallGraphWrapperPass::~CallGraphWrapperPass() = default;
 
 void CallGraphWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const {
   AU.setPreservesAll();
@@ -291,8 +298,10 @@
 #endif
 
 namespace {
+
 struct CallGraphPrinterLegacyPass : public ModulePass {
   static char ID; // Pass ID, replacement for typeid
+
   CallGraphPrinterLegacyPass() : ModulePass(ID) {
     initializeCallGraphPrinterLegacyPassPass(*PassRegistry::getPassRegistry());
   }
@@ -301,12 +310,14 @@
     AU.setPreservesAll();
     AU.addRequiredTransitive<CallGraphWrapperPass>();
   }
+
   bool runOnModule(Module &M) override {
     getAnalysis<CallGraphWrapperPass>().print(errs(), &M);
     return false;
   }
 };
-}
+
+} // end anonymous namespace
 
 char CallGraphPrinterLegacyPass::ID = 0;