static void addMemTagOptimizationPasses(const PassManagerBuilder &Builder,
legacy::PassManagerBase &PM) {
- PM.add(createStackSafetyGlobalInfoWrapperPass(/*SetMetadata=*/true));
+ PM.add(createStackSafetyGlobalInfoWrapperPass());
}
static TargetLibraryInfoImpl *createTLII(llvm::Triple &TargetTriple,
/// (legacy pass manager).
class StackSafetyGlobalInfoWrapperPass : public ModulePass {
StackSafetyGlobalInfo SSGI;
- bool SetMetadata;
public:
static char ID;
- StackSafetyGlobalInfoWrapperPass(bool SetMetadata = false);
+ StackSafetyGlobalInfoWrapperPass();
const StackSafetyGlobalInfo &getResult() const { return SSGI; }
bool runOnModule(Module &M) override;
};
-ModulePass *createStackSafetyGlobalInfoWrapperPass(bool SetMetadata);
+ModulePass *createStackSafetyGlobalInfoWrapperPass();
} // end namespace llvm
char StackSafetyGlobalInfoWrapperPass::ID = 0;
-StackSafetyGlobalInfoWrapperPass::StackSafetyGlobalInfoWrapperPass(
- bool SetMetadata)
- : ModulePass(ID), SetMetadata(SetMetadata) {
+StackSafetyGlobalInfoWrapperPass::StackSafetyGlobalInfoWrapperPass()
+ : ModulePass(ID) {
initializeStackSafetyGlobalInfoWrapperPassPass(
*PassRegistry::getPassRegistry());
}
.Info;
});
SSGI = SSDFA.run();
- return SetMetadata ? SSGI.setMetadata(M) : false;
+ return SSGI.setMetadata(M);
}
-ModulePass *llvm::createStackSafetyGlobalInfoWrapperPass(bool SetMetadata) {
- return new StackSafetyGlobalInfoWrapperPass(SetMetadata);
+ModulePass *llvm::createStackSafetyGlobalInfoWrapperPass() {
+ return new StackSafetyGlobalInfoWrapperPass();
}
static const char LocalPassArg[] = "stack-safety-local";