From 97c4cb8947a8616d92622ca4046fcaec7ec17463 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 6 Apr 2010 18:06:18 +0000 Subject: enhance SMDiagnostic to also maintain a pointer to the SourceMgr. Add a simplified constructor for clients that don't have locations like "file not found" errors. llvm-svn: 100538 --- llvm/lib/Support/SourceMgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Support') diff --git a/llvm/lib/Support/SourceMgr.cpp b/llvm/lib/Support/SourceMgr.cpp index 4e7520c9d33..da5681c5bc0 100644 --- a/llvm/lib/Support/SourceMgr.cpp +++ b/llvm/lib/Support/SourceMgr.cpp @@ -168,7 +168,7 @@ SMDiagnostic SourceMgr::GetMessage(SMLoc Loc, const std::string &Msg, } PrintedMsg += Msg; - return SMDiagnostic(Loc, + return SMDiagnostic(*this, Loc, CurMB->getBufferIdentifier(), FindLineNumber(Loc, CurBuf), Loc.getPointer()-LineStart, PrintedMsg, LineStr, ShowLine); -- cgit v1.2.3