diff options
Diffstat (limited to 'llvm/docs/ProgrammersManual.rst')
-rw-r--r-- | llvm/docs/ProgrammersManual.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/docs/ProgrammersManual.rst b/llvm/docs/ProgrammersManual.rst index 37792255937..32145550fe2 100644 --- a/llvm/docs/ProgrammersManual.rst +++ b/llvm/docs/ProgrammersManual.rst @@ -342,10 +342,13 @@ that inherits from the ErrorInfo utility: public: MyError(std::string Msg) : Msg(Msg) {} void log(OStream &OS) const override { OS << "MyError - " << Msg; } + static char ID; private: std::string Msg; }; + char MyError::ID = 0; // In MyError.cpp + Error bar() { if (checkErrorCondition) return make_error<MyError>("Error condition detected"); |