summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt/Debugify.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-02-15 21:14:36 +0000
committerVedant Kumar <vsk@apple.com>2018-02-15 21:14:36 +0000
commit775c7af4f9ff934a85d4b6d521fffc7f5ac26cc0 (patch)
treeabbc35a6c84eb1edd39ec3b32656a58ed27f8cea /llvm/tools/opt/Debugify.cpp
parentf884cd42cc0d7d1a4522737e4af03feff017dd3a (diff)
downloadbcm5719-llvm-775c7af4f9ff934a85d4b6d521fffc7f5ac26cc0.tar.gz
bcm5719-llvm-775c7af4f9ff934a85d4b6d521fffc7f5ac26cc0.zip
[opt] Port the debugify passes to the new pass manager
llvm-svn: 325294
Diffstat (limited to 'llvm/tools/opt/Debugify.cpp')
-rw-r--r--llvm/tools/opt/Debugify.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/tools/opt/Debugify.cpp b/llvm/tools/opt/Debugify.cpp
index 931b8009a67..50b142b3240 100644
--- a/llvm/tools/opt/Debugify.cpp
+++ b/llvm/tools/opt/Debugify.cpp
@@ -12,6 +12,7 @@
///
//===----------------------------------------------------------------------===//
+#include "PassPrinters.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/BasicBlock.h"
@@ -206,8 +207,19 @@ struct CheckDebugifyPass : public ModulePass {
ModulePass *createDebugifyPass() { return new DebugifyPass(); }
+PreservedAnalyses NewPMDebugifyPass::run(Module &M, ModuleAnalysisManager &) {
+ applyDebugifyMetadata(M);
+ return PreservedAnalyses::all();
+}
+
ModulePass *createCheckDebugifyPass() { return new CheckDebugifyPass(); }
+PreservedAnalyses NewPMCheckDebugifyPass::run(Module &M,
+ ModuleAnalysisManager &) {
+ checkDebugifyMetadata(M);
+ return PreservedAnalyses::all();
+}
+
char DebugifyPass::ID = 0;
static RegisterPass<DebugifyPass> X("debugify",
"Attach debug info to everything");
OpenPOWER on IntegriCloud