[llvm] 5b5b3ce - IRPrintingPasses.h - simplify unnecessary header with forward declarations. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 27 06:52:17 PDT 2020


Author: Simon Pilgrim
Date: 2020-07-27T14:51:28+01:00
New Revision: 5b5b3ce0ad6d308471ed09c644eee4b5c337cd1b

URL: https://github.com/llvm/llvm-project/commit/5b5b3ce0ad6d308471ed09c644eee4b5c337cd1b
DIFF: https://github.com/llvm/llvm-project/commit/5b5b3ce0ad6d308471ed09c644eee4b5c337cd1b.diff

LOG: IRPrintingPasses.h - simplify unnecessary header with forward declarations. NFC.

Remove duplicate PassManager.h include in IRPrintingPasses.cpp

Added: 
    

Modified: 
    llvm/include/llvm/IR/IRPrintingPasses.h
    llvm/lib/IR/IRPrintingPasses.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/IR/IRPrintingPasses.h b/llvm/include/llvm/IR/IRPrintingPasses.h
index 3a1c489ee09f..ed7082a31a42 100644
--- a/llvm/include/llvm/IR/IRPrintingPasses.h
+++ b/llvm/include/llvm/IR/IRPrintingPasses.h
@@ -18,11 +18,12 @@
 #ifndef LLVM_IR_IRPRINTINGPASSES_H
 #define LLVM_IR_IRPRINTINGPASSES_H
 
-#include "llvm/ADT/StringRef.h"
 #include "llvm/IR/PassManager.h"
 #include <string>
 
 namespace llvm {
+class raw_ostream;
+class StringRef;
 
 /// Create and return a pass that writes the module to the specified
 /// \c raw_ostream.

diff  --git a/llvm/lib/IR/IRPrintingPasses.cpp b/llvm/lib/IR/IRPrintingPasses.cpp
index 03657ff8d9d4..7c73d2ab9871 100644
--- a/llvm/lib/IR/IRPrintingPasses.cpp
+++ b/llvm/lib/IR/IRPrintingPasses.cpp
@@ -11,13 +11,14 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/IR/IRPrintingPasses.h"
+#include "llvm/ADT/StringRef.h"
 #include "llvm/IR/Function.h"
 #include "llvm/IR/Module.h"
-#include "llvm/IR/PassManager.h"
 #include "llvm/InitializePasses.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
+
 using namespace llvm;
 
 PrintModulePass::PrintModulePass() : OS(dbgs()) {}


        


More information about the llvm-commits mailing list