diff options
author | Chris Lattner <sabre@nondot.org> | 2009-06-21 03:39:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-06-21 03:39:35 +0000 |
commit | 526c8cb557a1cf2850e181cd1c3ebaa282201feb (patch) | |
tree | 1dfc11d7f9c43b678de9638fdc7d13c10f61472d /llvm/lib/Support/SourceMgr.cpp | |
parent | 1b30e1ac453f9b7c650811020020030b204784fb (diff) | |
download | llvm-526c8cb557a1cf2850e181cd1c3ebaa282201feb.zip llvm-526c8cb557a1cf2850e181cd1c3ebaa282201feb.tar.gz llvm-526c8cb557a1cf2850e181cd1c3ebaa282201feb.tar.bz2 |
rename TGLoc -> SMLoc.
llvm-svn: 73843
Diffstat (limited to 'llvm/lib/Support/SourceMgr.cpp')
-rw-r--r-- | llvm/lib/Support/SourceMgr.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Support/SourceMgr.cpp b/llvm/lib/Support/SourceMgr.cpp index e745207..1d0bccb 100644 --- a/llvm/lib/Support/SourceMgr.cpp +++ b/llvm/lib/Support/SourceMgr.cpp @@ -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(TGLoc Loc) const { +int TGSourceMgr::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(TGLoc Loc) const { /// FindLineNumber - Find the line number for the specified location in the /// specified file. This is not a fast method. -unsigned TGSourceMgr::FindLineNumber(TGLoc Loc, int BufferID) const { +unsigned TGSourceMgr::FindLineNumber(SMLoc Loc, int BufferID) const { if (BufferID == -1) BufferID = FindBufferContainingLoc(Loc); assert(BufferID != -1 && "Invalid Location!"); @@ -51,13 +51,13 @@ unsigned TGSourceMgr::FindLineNumber(TGLoc Loc, int BufferID) const { const char *Ptr = Buff->getBufferStart(); - for (; TGLoc::getFromPointer(Ptr) != Loc; ++Ptr) + for (; SMLoc::getFromPointer(Ptr) != Loc; ++Ptr) if (*Ptr == '\n') ++LineNo; return LineNo; } -void TGSourceMgr::PrintIncludeStack(TGLoc IncludeLoc) const { - if (IncludeLoc == TGLoc()) return; // Top of stack. +void TGSourceMgr::PrintIncludeStack(SMLoc IncludeLoc) const { + if (IncludeLoc == SMLoc()) return; // Top of stack. int CurBuf = FindBufferContainingLoc(IncludeLoc); assert(CurBuf != -1 && "Invalid or unspecified location!"); @@ -70,7 +70,7 @@ void TGSourceMgr::PrintIncludeStack(TGLoc IncludeLoc) const { } -void TGSourceMgr::PrintError(TGLoc ErrorLoc, const std::string &Msg) const { +void TGSourceMgr::PrintError(SMLoc ErrorLoc, const std::string &Msg) const { raw_ostream &OS = errs(); // First thing to do: find the current buffer containing the specified |