move TGSourceMgr class out of TableGen into libsupport.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73842 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/TGSourceMgr.h b/include/llvm/Support/SourceMgr.h
similarity index 91%
rename from utils/TableGen/TGSourceMgr.h
rename to include/llvm/Support/SourceMgr.h
index 69fb74c..60bf780 100644
--- a/utils/TableGen/TGSourceMgr.h
+++ b/include/llvm/Support/SourceMgr.h
@@ -1,4 +1,4 @@
-//===- TGSourceMgr.h - Manager for Source Buffers & Diagnostics -*- C++ -*-===//
+//===- SourceMgr.h - Manager for Source Buffers & Diagnostics ---*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,7 +7,9 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file declares the TGSourceMgr class.
+// This file declares the SourceMgr class.  This class is used as a simple
+// substrate for diagnostics, #include handling, and other low level things for
+// simple parsers.
 //
 //===----------------------------------------------------------------------===//
 
diff --git a/utils/TableGen/TGSourceMgr.cpp b/lib/Support/SourceMgr.cpp
similarity index 91%
rename from utils/TableGen/TGSourceMgr.cpp
rename to lib/Support/SourceMgr.cpp
index 42bc752..e745207 100644
--- a/utils/TableGen/TGSourceMgr.cpp
+++ b/lib/Support/SourceMgr.cpp
@@ -1,4 +1,4 @@
-//===- TGSourceMgr.cpp - Manager for Source Buffers & Diagnostics ---------===//
+//===- SourceMgr.cpp - Manager for Simple Source Buffers & Diagnostics ----===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,11 +7,13 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements the TGSourceMgr class.
+// This file implements the SourceMgr class.  This class is used as a simple
+// substrate for diagnostics, #include handling, and other low level things for
+// simple parsers.
 //
 //===----------------------------------------------------------------------===//
 
-#include "TGSourceMgr.h"
+#include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace llvm;
diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h
index ac06cae..18b10ea 100644
--- a/utils/TableGen/Record.h
+++ b/utils/TableGen/Record.h
@@ -15,7 +15,7 @@
 #ifndef RECORD_H
 #define RECORD_H
 
-#include "TGSourceMgr.h"
+#include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/DataTypes.h"
 #include <map>
 #include <ostream>
diff --git a/utils/TableGen/TGLexer.cpp b/utils/TableGen/TGLexer.cpp
index 758d499..1941a59 100644
--- a/utils/TableGen/TGLexer.cpp
+++ b/utils/TableGen/TGLexer.cpp
@@ -12,7 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "TGLexer.h"
-#include "TGSourceMgr.h"
+#include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/Streams.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include <ostream>
diff --git a/utils/TableGen/TGParser.h b/utils/TableGen/TGParser.h
index 3af467d..c618708 100644
--- a/utils/TableGen/TGParser.h
+++ b/utils/TableGen/TGParser.h
@@ -15,7 +15,7 @@
 #define TGPARSER_H
 
 #include "TGLexer.h"
-#include "TGSourceMgr.h"
+#include "llvm/Support/SourceMgr.h"
 #include <map>
 
 namespace llvm {