summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/SourceMgr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-06-21 21:22:11 +0000
committerChris Lattner <sabre@nondot.org>2009-06-21 21:22:11 +0000
commit2adc9e739c95db68ef625daa6fe7a4ce90d00106 (patch)
treecbb545c0eb8b838d6e10aa68172eeda08bdaf461 /llvm/lib/Support/SourceMgr.cpp
parent36e0212c163c931f11970192788f8b24d2489daa (diff)
downloadbcm5719-llvm-2adc9e739c95db68ef625daa6fe7a4ce90d00106.tar.gz
bcm5719-llvm-2adc9e739c95db68ef625daa6fe7a4ce90d00106.zip
rename SourceMgr::PrintError to PrintMessage.
llvm-svn: 73861
Diffstat (limited to 'llvm/lib/Support/SourceMgr.cpp')
-rw-r--r--llvm/lib/Support/SourceMgr.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Support/SourceMgr.cpp b/llvm/lib/Support/SourceMgr.cpp
index 5460cb3824d..d789f1010be 100644
--- a/llvm/lib/Support/SourceMgr.cpp
+++ b/llvm/lib/Support/SourceMgr.cpp
@@ -90,12 +90,12 @@ void SourceMgr::PrintIncludeStack(SMLoc IncludeLoc) const {
}
-void SourceMgr::PrintError(SMLoc ErrorLoc, const std::string &Msg) const {
+void SourceMgr::PrintMessage(SMLoc Loc, const std::string &Msg) const {
raw_ostream &OS = errs();
// First thing to do: find the current buffer containing the specified
// location.
- int CurBuf = FindBufferContainingLoc(ErrorLoc);
+ int CurBuf = FindBufferContainingLoc(Loc);
assert(CurBuf != -1 && "Invalid or unspecified location!");
PrintIncludeStack(getBufferInfo(CurBuf).IncludeLoc);
@@ -104,24 +104,24 @@ void SourceMgr::PrintError(SMLoc ErrorLoc, const std::string &Msg) const {
OS << "Parsing " << CurMB->getBufferIdentifier() << ":"
- << FindLineNumber(ErrorLoc, CurBuf) << ": ";
+ << FindLineNumber(Loc, CurBuf) << ": ";
OS << Msg << "\n";
// Scan backward to find the start of the line.
- const char *LineStart = ErrorLoc.getPointer();
+ const char *LineStart = Loc.getPointer();
while (LineStart != CurMB->getBufferStart() &&
LineStart[-1] != '\n' && LineStart[-1] != '\r')
--LineStart;
// Get the end of the line.
- const char *LineEnd = ErrorLoc.getPointer();
+ const char *LineEnd = Loc.getPointer();
while (LineEnd != CurMB->getBufferEnd() &&
LineEnd[0] != '\n' && LineEnd[0] != '\r')
++LineEnd;
// Print out the line.
OS << std::string(LineStart, LineEnd) << "\n";
// Print out spaces before the caret.
- for (const char *Pos = LineStart; Pos != ErrorLoc.getPointer(); ++Pos)
+ for (const char *Pos = LineStart; Pos != Loc.getPointer(); ++Pos)
OS << (*Pos == '\t' ? '\t' : ' ');
OS << "^\n";
}
OpenPOWER on IntegriCloud