From 462b43cbf61fd38db5f2467175c4a51ac1aba154 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 16 Oct 2011 05:47:55 +0000 Subject: remove the dead 'ShowLine' argument from SMDiagnostic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142108 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/SourceMgr.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'lib/Support/SourceMgr.cpp') diff --git a/lib/Support/SourceMgr.cpp b/lib/Support/SourceMgr.cpp index 91cb25a60a..5a6090d05e 100644 --- a/lib/Support/SourceMgr.cpp +++ b/lib/Support/SourceMgr.cpp @@ -141,8 +141,8 @@ void SourceMgr::PrintIncludeStack(SMLoc IncludeLoc, raw_ostream &OS) const { /// @param Type - If non-null, the kind of message (e.g., "error") which is /// prefixed to the message. SMDiagnostic SourceMgr::GetMessage(SMLoc Loc, SourceMgr::DiagKind Kind, - const Twine &Msg, ArrayRef Ranges, - bool ShowLine) const { + const Twine &Msg, + ArrayRef Ranges) const { // First thing to do: find the current buffer containing the specified // location. @@ -189,13 +189,12 @@ SMDiagnostic SourceMgr::GetMessage(SMLoc Loc, SourceMgr::DiagKind Kind, return SMDiagnostic(*this, Loc, CurMB->getBufferIdentifier(), FindLineNumber(Loc, CurBuf), Loc.getPointer()-LineStart, Kind, Msg.str(), - LineStr, ColRanges, ShowLine); + LineStr, ColRanges); } void SourceMgr::PrintMessage(SMLoc Loc, SourceMgr::DiagKind Kind, - const Twine &Msg, ArrayRef Ranges, - bool ShowLine) const { - SMDiagnostic Diagnostic = GetMessage(Loc, Kind, Msg, Ranges, ShowLine); + const Twine &Msg, ArrayRef Ranges) const { + SMDiagnostic Diagnostic = GetMessage(Loc, Kind, Msg, Ranges); // Report the message with the diagnostic handler if present. if (DiagHandler) { @@ -220,11 +219,9 @@ SMDiagnostic::SMDiagnostic(const SourceMgr &sm, SMLoc L, const std::string &FN, int Line, int Col, SourceMgr::DiagKind Kind, const std::string &Msg, const std::string &LineStr, - ArrayRef > Ranges, - bool showline) + ArrayRef > Ranges) : SM(&sm), Loc(L), Filename(FN), LineNo(Line), ColumnNo(Col), Kind(Kind), - Message(Msg), LineContents(LineStr), ShowLine(showline), - Ranges(Ranges.vec()) { + Message(Msg), LineContents(LineStr), Ranges(Ranges.vec()) { } @@ -255,7 +252,7 @@ void SMDiagnostic::print(const char *ProgName, raw_ostream &S) const { S << Message << '\n'; - if (LineNo == -1 || ColumnNo == -1 || !ShowLine) + if (LineNo == -1 || ColumnNo == -1) return; // Build the line with the caret and ranges. -- cgit v1.2.3