enhance SMDiagnostic to also maintain a pointer to the SourceMgr.
[oota-llvm.git] / lib / Support / SourceMgr.cpp
index 4e7520c9d3397ccf128114ee112e465e0164984b..da5681c5bc09a4385fb942449193bbe957387adf 100644 (file)
@@ -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);