From c089e406b9d7e654fda5e27f34b5747553d75d15 Mon Sep 17 00:00:00 2001 From: Eugene Leviant Date: Tue, 27 Dec 2016 09:31:20 +0000 Subject: Allow setting multiple debug types Differential revision: https://reviews.llvm.org/D28109 llvm-svn: 290597 --- llvm/lib/Support/Debug.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Support/Debug.cpp') diff --git a/llvm/lib/Support/Debug.cpp b/llvm/lib/Support/Debug.cpp index 323d532..a78acf0 100644 --- a/llvm/lib/Support/Debug.cpp +++ b/llvm/lib/Support/Debug.cpp @@ -63,10 +63,14 @@ bool isCurrentDebugType(const char *DebugType) { /// debug output to be produced. /// void setCurrentDebugType(const char *Type) { - CurrentDebugType->clear(); - CurrentDebugType->push_back(Type); + setCurrentDebugTypes(&Type, 1); } +void setCurrentDebugTypes(const char **Types, unsigned Count) { + CurrentDebugType->clear(); + for (size_t T = 0; T < Count; ++T) + CurrentDebugType->push_back(Types[T]); +} } // namespace llvm // All Debug.h functionality is a no-op in NDEBUG mode. -- cgit v1.1