From ee66b5b0da7e54124b87268d33d9fad7a4a93b87 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 16 Apr 2020 12:08:10 +0100 Subject: [PATCH] Pass.h/cpp - cleanup includes and forward declaration. NFC. Remove unused BasicBlock forward declaration from Pass.h and Attributes/BasicBlock includes from Pass.cpp Add BasicBlock forward declaration to UnifyFunctionExitNodes.h which was relying on Pass.h --- llvm/include/llvm/Pass.h | 1 - llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h | 2 ++ llvm/lib/IR/Pass.cpp | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/llvm/include/llvm/Pass.h b/llvm/include/llvm/Pass.h index 5ed4ca4..b0af15a 100644 --- a/llvm/include/llvm/Pass.h +++ b/llvm/include/llvm/Pass.h @@ -34,7 +34,6 @@ namespace llvm { class AnalysisResolver; class AnalysisUsage; -class BasicBlock; class Function; class ImmutablePass; class Module; diff --git a/llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h b/llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h index b8a4fe7..f1789ed 100644 --- a/llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h +++ b/llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h @@ -22,6 +22,8 @@ namespace llvm { +class BasicBlock; + struct UnifyFunctionExitNodes : public FunctionPass { BasicBlock *ReturnBlock = nullptr; BasicBlock *UnwindBlock = nullptr; diff --git a/llvm/lib/IR/Pass.cpp b/llvm/lib/IR/Pass.cpp index dbdbbf4..893cf2f 100644 --- a/llvm/lib/IR/Pass.cpp +++ b/llvm/lib/IR/Pass.cpp @@ -14,8 +14,6 @@ #include "llvm/Pass.h" #include "llvm/Config/llvm-config.h" -#include "llvm/IR/Attributes.h" -#include "llvm/IR/BasicBlock.h" #include "llvm/IR/Function.h" #include "llvm/IR/IRPrintingPasses.h" #include "llvm/IR/LLVMContext.h" -- 2.7.4