GlobPattern.h - remove unnecessary BitVector.h/StringRef.h includes. NFC
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 17 May 2020 17:29:27 +0000 (18:29 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 17 May 2020 17:29:41 +0000 (18:29 +0100)
Use forward declarations (BitVector already had one) and an headers to source file that were implicitly using them.

llvm/include/llvm/Support/GlobPattern.h
llvm/lib/Support/GlobPattern.cpp
llvm/tools/llvm-objcopy/CopyConfig.cpp
llvm/unittests/Support/GlobPatternTest.cpp

index 0098ac6..b08b41d 100644 (file)
 #ifndef LLVM_SUPPORT_GLOB_PATTERN_H
 #define LLVM_SUPPORT_GLOB_PATTERN_H
 
-#include "llvm/ADT/BitVector.h"
 #include "llvm/ADT/Optional.h"
-#include "llvm/ADT/StringRef.h"
 #include "llvm/Support/Error.h"
 #include <vector>
 
 // This class represents a glob pattern. Supported metacharacters
 // are "*", "?", "\", "[<chars>]", "[^<chars>]", and "[!<chars>]".
 namespace llvm {
+
 class BitVector;
+class StringRef;
 template <typename T> class ArrayRef;
 
 class GlobPattern {
index 8dae694..f7c9907 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "llvm/Support/GlobPattern.h"
 #include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/BitVector.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/Errc.h"
index ff12e4b..c143ac4 100644 (file)
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "CopyConfig.h"
-
+#include "llvm/ADT/BitVector.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
index 17d60b2..95b6708 100644 (file)
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Support/GlobPattern.h"
+#include "llvm/ADT/BitVector.h"
 #include "gtest/gtest.h"
 
 using namespace llvm;