From: Mikhail Glushenkov Date: Wed, 27 Jan 2010 10:13:28 +0000 (+0000) Subject: Make SMDiagnostic::Print a const method. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=42210668da1b304488320ff01eea74733d9a1829;p=oota-llvm.git Make SMDiagnostic::Print a const method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94672 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/SourceMgr.h b/include/llvm/Support/SourceMgr.h index 176e852fc14..bed2f138ddb 100644 --- a/include/llvm/Support/SourceMgr.h +++ b/include/llvm/Support/SourceMgr.h @@ -139,7 +139,7 @@ public: : Filename(FN), LineNo(Line), ColumnNo(Col), Message(Msg), LineContents(LineStr), ShowLine(showline) {} - void Print(const char *ProgName, raw_ostream &S); + void Print(const char *ProgName, raw_ostream &S) const; }; } // end llvm namespace diff --git a/lib/Support/SourceMgr.cpp b/lib/Support/SourceMgr.cpp index 7652e186cad..83c7964ca00 100644 --- a/lib/Support/SourceMgr.cpp +++ b/lib/Support/SourceMgr.cpp @@ -188,7 +188,7 @@ void SourceMgr::PrintMessage(SMLoc Loc, const std::string &Msg, // SMDiagnostic Implementation //===----------------------------------------------------------------------===// -void SMDiagnostic::Print(const char *ProgName, raw_ostream &S) { +void SMDiagnostic::Print(const char *ProgName, raw_ostream &S) const { if (ProgName && ProgName[0]) S << ProgName << ": ";