forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "rustllvm.h" | ||
|
||
using namespace llvm; | ||
|
||
void RustSafeStack::getAnalysisUsage(AnalysisUsage &AU) const { | ||
AU.setPreservesCFG(); | ||
AU.addPreserved<MachineLoopInfo>(); | ||
AU.addPreserved<MachineDominatorTree>(); | ||
|
||
// Get pass ID for PEI | ||
StringRef SR("prologepilog"); | ||
const void *pei_id = PassRegistry::getPassRegistry()->getPassInfo(SR)->getTypeInfo(); | ||
AU.addRequiredID(pei_id); | ||
|
||
MachineFunctionPass::getAnalysisUsage(AU); | ||
} | ||
|
||
bool RustSafeStack::runOnMachineFunction(MachineFunction &Fn) { | ||
errs() << "Rust stack safety running\n"; | ||
return false; | ||
} | ||
|
||
char RustSafeStack::ID = 0; | ||
//static RegisterPass<RustSafeStack> X("rustsafestack", "Rust Stack Safety Pass", false, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters