diff options
Diffstat (limited to 'include/lldb/lldb-private-enumerations.h')
-rw-r--r-- | include/lldb/lldb-private-enumerations.h | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/include/lldb/lldb-private-enumerations.h b/include/lldb/lldb-private-enumerations.h index d6e30b33b3eb..9572bee81177 100644 --- a/include/lldb/lldb-private-enumerations.h +++ b/include/lldb/lldb-private-enumerations.h @@ -10,6 +10,10 @@ #ifndef LLDB_lldb_private_enumerations_h_ #define LLDB_lldb_private_enumerations_h_ +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/FormatProviders.h" +#include "llvm/Support/raw_ostream.h" + namespace lldb_private { //---------------------------------------------------------------------- @@ -112,19 +116,6 @@ typedef enum LazyBool { } LazyBool; //------------------------------------------------------------------ -/// Name matching -//------------------------------------------------------------------ -typedef enum NameMatchType { - eNameMatchIgnore, - eNameMatchEquals, - eNameMatchContains, - eNameMatchStartsWith, - eNameMatchEndsWith, - eNameMatchRegularExpression - -} NameMatchType; - -//------------------------------------------------------------------ /// Instruction types //------------------------------------------------------------------ typedef enum InstructionType { @@ -257,4 +248,24 @@ enum class CompilerContextKind { } // namespace lldb_private +namespace llvm { +template <> struct format_provider<lldb_private::Vote> { + static void format(const lldb_private::Vote &V, llvm::raw_ostream &Stream, + StringRef Style) { + switch (V) { + case lldb_private::eVoteNo: + Stream << "no"; + return; + case lldb_private::eVoteNoOpinion: + Stream << "no opinion"; + return; + case lldb_private::eVoteYes: + Stream << "yes"; + return; + } + Stream << "invalid"; + } +}; +} + #endif // LLDB_lldb_private_enumerations_h_ |