[llvm] 0caaf40 - TGLexer.h - cleanup includes and forward declarations. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 03:41:54 PDT 2020


Author: Simon Pilgrim
Date: 2020-04-21T11:32:58+01:00
New Revision: 0caaf4025857144ad67ed8313fb71a7225394888

URL: https://github.com/llvm/llvm-project/commit/0caaf4025857144ad67ed8313fb71a7225394888
DIFF: https://github.com/llvm/llvm-project/commit/0caaf4025857144ad67ed8313fb71a7225394888.diff

LOG: TGLexer.h - cleanup includes and forward declarations. NFC.
Replace ArrayRef.h with a forward declaration and include in ArrayRef.cpp
Remove SMLoc forward declaration as we already have to include SMLoc.h

Added: 
    

Modified: 
    llvm/lib/TableGen/TGLexer.cpp
    llvm/lib/TableGen/TGLexer.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/TableGen/TGLexer.cpp b/llvm/lib/TableGen/TGLexer.cpp
index 1a3f5a7392d5..9e6cc947925d 100644
--- a/llvm/lib/TableGen/TGLexer.cpp
+++ b/llvm/lib/TableGen/TGLexer.cpp
@@ -11,6 +11,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "TGLexer.h"
+#include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/ADT/Twine.h"
 #include "llvm/Config/config.h" // for strtoull()/strtoll() define

diff  --git a/llvm/lib/TableGen/TGLexer.h b/llvm/lib/TableGen/TGLexer.h
index 6d10af348674..fe6792611119 100644
--- a/llvm/lib/TableGen/TGLexer.h
+++ b/llvm/lib/TableGen/TGLexer.h
@@ -13,7 +13,6 @@
 #ifndef LLVM_LIB_TABLEGEN_TGLEXER_H
 #define LLVM_LIB_TABLEGEN_TGLEXER_H
 
-#include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringSet.h"
 #include "llvm/Support/DataTypes.h"
@@ -24,8 +23,8 @@
 #include <string>
 
 namespace llvm {
+template <typename T> class ArrayRef;
 class SourceMgr;
-class SMLoc;
 class Twine;
 
 namespace tgtok {


        


More information about the llvm-commits mailing list