diff options
Diffstat (limited to 'include/llvm/Support/SourceMgr.h')
-rw-r--r-- | include/llvm/Support/SourceMgr.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/llvm/Support/SourceMgr.h b/include/llvm/Support/SourceMgr.h index 030db8f..deb8caf 100644 --- a/include/llvm/Support/SourceMgr.h +++ b/include/llvm/Support/SourceMgr.h @@ -78,6 +78,9 @@ public: DiagContext = Ctx; } + DiagHandlerTy getDiagHandler() const { return DiagHandler; } + void *getDiagContext() const { return DiagContext; } + const SrcBuffer &getBufferInfo(unsigned i) const { assert(i < Buffers.size() && "Invalid Buffer ID!"); return Buffers[i]; @@ -138,8 +141,12 @@ public: const Twine &Msg, const char *Type, bool ShowLine = true) const; - -private: + /// PrintIncludeStack - Prints the names of included files and the line of the + /// file they were included from. A diagnostic handler can use this before + /// printing its custom formatted message. + /// + /// @param IncludeLoc - The line of the include. + /// @param OS the raw_ostream to print on. void PrintIncludeStack(SMLoc IncludeLoc, raw_ostream &OS) const; }; |