Make SMDiagnostic::Print a const method.
authorMikhail Glushenkov <foldr@codedgers.com>
Wed, 27 Jan 2010 10:13:28 +0000 (10:13 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Wed, 27 Jan 2010 10:13:28 +0000 (10:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94672 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/SourceMgr.h
lib/Support/SourceMgr.cpp

index 176e852fc14318b8b9c26b663e0f189ac07952ef..bed2f138ddb605908315984e4074b53dcb38e179 100644 (file)
@@ -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
index 7652e186cad891eb056c8ba9483dec9c964925a6..83c7964ca00c1b066e9697146ad2ece2a618dd5c 100644 (file)
@@ -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 << ": ";