Remove some #include from StackProtector.h; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304748 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matthias Braun 2017-06-05 22:59:21 +00:00
parent 323e6e9ede
commit 6764d4642c
2 changed files with 8 additions and 6 deletions

View File

@ -19,18 +19,17 @@
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Triple.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/ValueMap.h"
#include "llvm/Pass.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetMachine.h"
namespace llvm {
class Function;
class Module;
class PHINode;
class TargetMachine;
class StackProtector : public FunctionPass {
public:
@ -119,10 +118,7 @@ public:
initializeStackProtectorPass(*PassRegistry::getPassRegistry());
}
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<TargetPassConfig>();
AU.addPreserved<DominatorTreeWrapperPass>();
}
void getAnalysisUsage(AnalysisUsage &AU) const override;
SSPLayoutKind getSSPLayout(const AllocaInst *AI) const;

View File

@ -21,6 +21,7 @@
#include "llvm/Analysis/OptimizationDiagnosticInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/StackProtector.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
@ -92,6 +93,11 @@ void StackProtector::adjustForColoring(const AllocaInst *From,
}
}
void StackProtector::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<TargetPassConfig>();
AU.addPreserved<DominatorTreeWrapperPass>();
}
bool StackProtector::runOnFunction(Function &Fn) {
F = &Fn;
M = F->getParent();