[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.

llvm-svn: 337786
This commit is contained in:
Vedant Kumar 2018-07-24 00:41:28 +00:00
parent 2b5dd39386
commit 069adf4d6b
5 changed files with 42 additions and 21 deletions

View File

@ -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"

39
tools/opt/Debugify.h Normal file
View File

@ -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

View File

@ -13,6 +13,7 @@
///
//===----------------------------------------------------------------------===//
#include "Debugify.h"
#include "NewPMDriver.h"
#include "PassPrinters.h"
#include "llvm/ADT/StringRef.h"

View File

@ -49,24 +49,4 @@ BasicBlockPass *createBasicBlockPassPrinter(const PassInfo *PI,
} // 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

View File

@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//
#include "BreakpointPrinter.h"
#include "Debugify.h"
#include "NewPMDriver.h"
#include "PassPrinters.h"
#include "llvm/ADT/Triple.h"