summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Debug.cpp
diff options
context:
space:
mode:
authorChristof Douma <Christof.Douma@arm.com>2016-01-12 10:23:13 +0000
committerChristof Douma <Christof.Douma@arm.com>2016-01-12 10:23:13 +0000
commitf617e678e90c85a1fc733ad8ce93ffc51cfd4f72 (patch)
tree173f83a8607d10758f511836715680f0f24f0983 /llvm/lib/Support/Debug.cpp
parent49982f577322ca1613d4c3f379d30514cbae009d (diff)
downloadbcm5719-llvm-f617e678e90c85a1fc733ad8ce93ffc51cfd4f72.tar.gz
bcm5719-llvm-f617e678e90c85a1fc733ad8ce93ffc51cfd4f72.zip
The --debug-only option now takes a comma separated list of debug types.
This means that the DEBUG_TYPE cannot take a comma anymore. All existing passes conform to this rule. Differential Revision: http://reviews.llvm.org/D15645 llvm-svn: 257466
Diffstat (limited to 'llvm/lib/Support/Debug.cpp')
-rw-r--r--llvm/lib/Support/Debug.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Support/Debug.cpp b/llvm/lib/Support/Debug.cpp
index 47751fce3fc..323d53279b4 100644
--- a/llvm/lib/Support/Debug.cpp
+++ b/llvm/lib/Support/Debug.cpp
@@ -95,7 +95,10 @@ struct DebugOnlyOpt {
if (Val.empty())
return;
DebugFlag = true;
- CurrentDebugType->push_back(Val);
+ SmallVector<StringRef,8> dbgTypes;
+ StringRef(Val).split(dbgTypes, ',', -1, false);
+ for (auto dbgType : dbgTypes)
+ CurrentDebugType->push_back(dbgType);
}
};
@@ -104,10 +107,9 @@ struct DebugOnlyOpt {
static DebugOnlyOpt DebugOnlyOptLoc;
static cl::opt<DebugOnlyOpt, true, cl::parser<std::string> >
-DebugOnly("debug-only", cl::desc("Enable a specific type of debug output"),
+DebugOnly("debug-only", cl::desc("Enable a specific type of debug output (comma separated list of types)"),
cl::Hidden, cl::ZeroOrMore, cl::value_desc("debug string"),
cl::location(DebugOnlyOptLoc), cl::ValueRequired);
-
// Signal handlers - dump debug output on termination.
static void debug_user_sig_handler(void *Cookie) {
// This is a bit sneaky. Since this is under #ifndef NDEBUG, we
OpenPOWER on IntegriCloud