diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-06-21 03:41:50 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-06-21 03:41:50 +0000 | 
| commit | fd255754afcd352c8907ae0eb778b82de063a8fd (patch) | |
| tree | 1c6bc76bf6875915599905ffba579c67d20ef833 /llvm/lib | |
| parent | 526c8cb557a1cf2850e181cd1c3ebaa282201feb (diff) | |
| download | bcm5719-llvm-fd255754afcd352c8907ae0eb778b82de063a8fd.tar.gz bcm5719-llvm-fd255754afcd352c8907ae0eb778b82de063a8fd.zip | |
Rename TGSourceMgr -> SourceMgr.
llvm-svn: 73844
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Support/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | llvm/lib/Support/SourceMgr.cpp | 10 | 
2 files changed, 6 insertions, 5 deletions
| diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt index 7c8ce706b61..e7a76cc3f23 100644 --- a/llvm/lib/Support/CMakeLists.txt +++ b/llvm/lib/Support/CMakeLists.txt @@ -19,6 +19,7 @@ add_llvm_library(LLVMSupport    PrettyStackTrace.cpp    SlowOperationInformer.cpp    SmallPtrSet.cpp +  SourceMgr.cpp    Statistic.cpp    Streams.cpp    StringExtras.cpp diff --git a/llvm/lib/Support/SourceMgr.cpp b/llvm/lib/Support/SourceMgr.cpp index 1d0bccb34b7..40a6f43f5e0 100644 --- a/llvm/lib/Support/SourceMgr.cpp +++ b/llvm/lib/Support/SourceMgr.cpp @@ -18,7 +18,7 @@  #include "llvm/Support/raw_ostream.h"  using namespace llvm; -TGSourceMgr::~TGSourceMgr() { +SourceMgr::~SourceMgr() {    while (!Buffers.empty()) {      delete Buffers.back().Buffer;      Buffers.pop_back(); @@ -27,7 +27,7 @@ TGSourceMgr::~TGSourceMgr() {  /// FindBufferContainingLoc - Return the ID of the buffer containing the  /// specified location, returning -1 if not found. -int TGSourceMgr::FindBufferContainingLoc(SMLoc Loc) const { +int SourceMgr::FindBufferContainingLoc(SMLoc Loc) const {    for (unsigned i = 0, e = Buffers.size(); i != e; ++i)      if (Loc.getPointer() >= Buffers[i].Buffer->getBufferStart() &&          // Use <= here so that a pointer to the null at the end of the buffer @@ -39,7 +39,7 @@ int TGSourceMgr::FindBufferContainingLoc(SMLoc Loc) const {  /// FindLineNumber - Find the line number for the specified location in the  /// specified file.  This is not a fast method. -unsigned TGSourceMgr::FindLineNumber(SMLoc Loc, int BufferID) const { +unsigned SourceMgr::FindLineNumber(SMLoc Loc, int BufferID) const {    if (BufferID == -1) BufferID = FindBufferContainingLoc(Loc);    assert(BufferID != -1 && "Invalid Location!"); @@ -56,7 +56,7 @@ unsigned TGSourceMgr::FindLineNumber(SMLoc Loc, int BufferID) const {    return LineNo;  } -void TGSourceMgr::PrintIncludeStack(SMLoc IncludeLoc) const { +void SourceMgr::PrintIncludeStack(SMLoc IncludeLoc) const {    if (IncludeLoc == SMLoc()) return;  // Top of stack.    int CurBuf = FindBufferContainingLoc(IncludeLoc); @@ -70,7 +70,7 @@ void TGSourceMgr::PrintIncludeStack(SMLoc IncludeLoc) const {  } -void TGSourceMgr::PrintError(SMLoc ErrorLoc, const std::string &Msg) const { +void SourceMgr::PrintError(SMLoc ErrorLoc, const std::string &Msg) const {    raw_ostream &OS = errs();    // First thing to do: find the current buffer containing the specified | 

