summaryrefslogtreecommitdiff
path: root/lib/Support/SourceMgr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-06 18:06:18 +0000
committerChris Lattner <sabre@nondot.org>2010-04-06 18:06:18 +0000
commitb019491b8d7b171cd0835ba34f3b28b24dfcc3e0 (patch)
treedf8105db1abf53a82e43dbe4fa4c49d12299bc4f /lib/Support/SourceMgr.cpp
parent98116f99b6bd766d98a650594d355dedc593d4d4 (diff)
downloadllvm-b019491b8d7b171cd0835ba34f3b28b24dfcc3e0.tar.gz
llvm-b019491b8d7b171cd0835ba34f3b28b24dfcc3e0.tar.bz2
llvm-b019491b8d7b171cd0835ba34f3b28b24dfcc3e0.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100538 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/SourceMgr.cpp')
-rw-r--r--lib/Support/SourceMgr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/SourceMgr.cpp b/lib/Support/SourceMgr.cpp
index 4e7520c9d3..da5681c5bc 100644
--- a/lib/Support/SourceMgr.cpp
+++ b/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);