Mercurial > hg > CbC > CbC_llvm
comparison include/llvm/Support/PrettyStackTrace.h @ 121:803732b1fca8
LLVM 5.0
author | kono |
---|---|
date | Fri, 27 Oct 2017 17:07:41 +0900 |
parents | 1172e4bd9c6f |
children | c2174574ed3a |
comparison
equal
deleted
inserted
replaced
120:1172e4bd9c6f | 121:803732b1fca8 |
---|---|
14 //===----------------------------------------------------------------------===// | 14 //===----------------------------------------------------------------------===// |
15 | 15 |
16 #ifndef LLVM_SUPPORT_PRETTYSTACKTRACE_H | 16 #ifndef LLVM_SUPPORT_PRETTYSTACKTRACE_H |
17 #define LLVM_SUPPORT_PRETTYSTACKTRACE_H | 17 #define LLVM_SUPPORT_PRETTYSTACKTRACE_H |
18 | 18 |
19 #include "llvm/ADT/SmallVector.h" | |
19 #include "llvm/Support/Compiler.h" | 20 #include "llvm/Support/Compiler.h" |
20 | 21 |
21 namespace llvm { | 22 namespace llvm { |
22 class raw_ostream; | 23 class raw_ostream; |
23 | 24 |
53 public: | 54 public: |
54 PrettyStackTraceString(const char *str) : Str(str) {} | 55 PrettyStackTraceString(const char *str) : Str(str) {} |
55 void print(raw_ostream &OS) const override; | 56 void print(raw_ostream &OS) const override; |
56 }; | 57 }; |
57 | 58 |
59 /// PrettyStackTraceFormat - This object prints a string (which may use | |
60 /// printf-style formatting but should not contain newlines) to the stream | |
61 /// as the stack trace when a crash occurs. | |
62 class PrettyStackTraceFormat : public PrettyStackTraceEntry { | |
63 llvm::SmallVector<char, 32> Str; | |
64 public: | |
65 PrettyStackTraceFormat(const char *Format, ...); | |
66 void print(raw_ostream &OS) const override; | |
67 }; | |
68 | |
58 /// PrettyStackTraceProgram - This object prints a specified program arguments | 69 /// PrettyStackTraceProgram - This object prints a specified program arguments |
59 /// to the stream as the stack trace when a crash occurs. | 70 /// to the stream as the stack trace when a crash occurs. |
60 class PrettyStackTraceProgram : public PrettyStackTraceEntry { | 71 class PrettyStackTraceProgram : public PrettyStackTraceEntry { |
61 int ArgC; | 72 int ArgC; |
62 const char *const *ArgV; | 73 const char *const *ArgV; |