[llvm] ad57286 - CodeMetrics.h - include and forward declaration cleanup. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 13 05:10:47 PDT 2020
Author: Simon Pilgrim
Date: 2020-04-13T13:09:39+01:00
New Revision: ad57286232e4a750e53106080e6216e9460aeb0d
URL: https://github.com/llvm/llvm-project/commit/ad57286232e4a750e53106080e6216e9460aeb0d
DIFF: https://github.com/llvm/llvm-project/commit/ad57286232e4a750e53106080e6216e9460aeb0d.diff
LOG: CodeMetrics.h - include and forward declaration cleanup. NFC.
Remove SmallPtrSet include, replace with forward declaration and include SmallPtrSet.h in CodeMetrics.cpp directly.
Remove unused llvm::DataLayout/Instruction forward declarations.
Added:
Modified:
llvm/include/llvm/Analysis/CodeMetrics.h
llvm/lib/Analysis/CodeMetrics.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/CodeMetrics.h b/llvm/include/llvm/Analysis/CodeMetrics.h
index 1482b66a3080..eab24c8ab179 100644
--- a/llvm/include/llvm/Analysis/CodeMetrics.h
+++ b/llvm/include/llvm/Analysis/CodeMetrics.h
@@ -15,15 +15,13 @@
#define LLVM_ANALYSIS_CODEMETRICS_H
#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/SmallPtrSet.h"
namespace llvm {
class AssumptionCache;
class BasicBlock;
class Loop;
class Function;
-class Instruction;
-class DataLayout;
+template <class T> class SmallPtrSetImpl;
class TargetTransformInfo;
class Value;
diff --git a/llvm/lib/Analysis/CodeMetrics.cpp b/llvm/lib/Analysis/CodeMetrics.cpp
index 627d955c865f..0e571cad5460 100644
--- a/llvm/lib/Analysis/CodeMetrics.cpp
+++ b/llvm/lib/Analysis/CodeMetrics.cpp
@@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Analysis/CodeMetrics.h"
+#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
More information about the llvm-commits
mailing list