[llvm] r337786 - [Debugify] Move interface definitions to a header, NFC

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 23 17:41:28 PDT 2018


Author: vedantk
Date: Mon Jul 23 17:41:28 2018
New Revision: 337786

URL: http://llvm.org/viewvc/llvm-project?rev=337786&view=rev
Log:
[Debugify] Move interface definitions to a header, NFC

This is a minor cleanup in preparation for a change to export DI
statistics from -check-debugify. To do that, it would be cleaner to have
a dedicated header for the debugify interface.

Added:
    llvm/trunk/tools/opt/Debugify.h
Modified:
    llvm/trunk/tools/opt/Debugify.cpp
    llvm/trunk/tools/opt/NewPMDriver.cpp
    llvm/trunk/tools/opt/PassPrinters.h
    llvm/trunk/tools/opt/opt.cpp

Modified: llvm/trunk/tools/opt/Debugify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/Debugify.cpp?rev=337786&r1=337785&r2=337786&view=diff
==============================================================================
--- llvm/trunk/tools/opt/Debugify.cpp (original)
+++ llvm/trunk/tools/opt/Debugify.cpp Mon Jul 23 17:41:28 2018
@@ -12,7 +12,7 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "PassPrinters.h"
+#include "Debugify.h"
 #include "llvm/ADT/BitVector.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/IR/BasicBlock.h"

Added: llvm/trunk/tools/opt/Debugify.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/Debugify.h?rev=337786&view=auto
==============================================================================
--- llvm/trunk/tools/opt/Debugify.h (added)
+++ llvm/trunk/tools/opt/Debugify.h Mon Jul 23 17:41:28 2018
@@ -0,0 +1,39 @@
+//===- Debugify.h - Attach synthetic debug info to everything -------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file Interface to the `debugify` synthetic debug info testing utility.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TOOLS_OPT_DEBUGIFY_H
+#define LLVM_TOOLS_OPT_DEBUGIFY_H
+
+#include "llvm/IR/PassManager.h"
+
+llvm::ModulePass *createDebugifyModulePass();
+llvm::FunctionPass *createDebugifyFunctionPass();
+
+struct NewPMDebugifyPass : public llvm::PassInfoMixin<NewPMDebugifyPass> {
+  llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM);
+};
+
+llvm::ModulePass *
+createCheckDebugifyModulePass(bool Strip = false,
+                              llvm::StringRef NameOfWrappedPass = "");
+
+llvm::FunctionPass *
+createCheckDebugifyFunctionPass(bool Strip = false,
+                                llvm::StringRef NameOfWrappedPass = "");
+
+struct NewPMCheckDebugifyPass
+    : public llvm::PassInfoMixin<NewPMCheckDebugifyPass> {
+  llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM);
+};
+
+#endif // LLVM_TOOLS_OPT_DEBUGIFY_H

Modified: llvm/trunk/tools/opt/NewPMDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/NewPMDriver.cpp?rev=337786&r1=337785&r2=337786&view=diff
==============================================================================
--- llvm/trunk/tools/opt/NewPMDriver.cpp (original)
+++ llvm/trunk/tools/opt/NewPMDriver.cpp Mon Jul 23 17:41:28 2018
@@ -13,6 +13,7 @@
 ///
 //===----------------------------------------------------------------------===//
 
+#include "Debugify.h"
 #include "NewPMDriver.h"
 #include "PassPrinters.h"
 #include "llvm/ADT/StringRef.h"

Modified: llvm/trunk/tools/opt/PassPrinters.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/PassPrinters.h?rev=337786&r1=337785&r2=337786&view=diff
==============================================================================
--- llvm/trunk/tools/opt/PassPrinters.h (original)
+++ llvm/trunk/tools/opt/PassPrinters.h Mon Jul 23 17:41:28 2018
@@ -49,24 +49,4 @@ BasicBlockPass *createBasicBlockPassPrin
 
 } // end namespace llvm
 
-llvm::ModulePass *createDebugifyModulePass();
-llvm::FunctionPass *createDebugifyFunctionPass();
-
-struct NewPMDebugifyPass : public llvm::PassInfoMixin<NewPMDebugifyPass> {
-  llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM);
-};
-
-llvm::ModulePass *
-createCheckDebugifyModulePass(bool Strip = false,
-                              llvm::StringRef NameOfWrappedPass = "");
-
-llvm::FunctionPass *
-createCheckDebugifyFunctionPass(bool Strip = false,
-                                llvm::StringRef NameOfWrappedPass = "");
-
-struct NewPMCheckDebugifyPass
-    : public llvm::PassInfoMixin<NewPMCheckDebugifyPass> {
-  llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM);
-};
-
 #endif // LLVM_TOOLS_OPT_PASSPRINTERS_H

Modified: llvm/trunk/tools/opt/opt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/opt.cpp?rev=337786&r1=337785&r2=337786&view=diff
==============================================================================
--- llvm/trunk/tools/opt/opt.cpp (original)
+++ llvm/trunk/tools/opt/opt.cpp Mon Jul 23 17:41:28 2018
@@ -13,6 +13,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "BreakpointPrinter.h"
+#include "Debugify.h"
 #include "NewPMDriver.h"
 #include "PassPrinters.h"
 #include "llvm/ADT/Triple.h"




More information about the llvm-commits mailing list