diff options
author | dim <dim@FreeBSD.org> | 2016-01-13 19:58:01 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-01-13 19:58:01 +0000 |
commit | e39b9e36e5f2d2dd312004cf5f84bb382be47dcd (patch) | |
tree | 7376a0c71aad05d327e5b1dcbceb3311a10f9f29 /lib/Support/Debug.cpp | |
parent | ff2ba393a56d9d99dcb76ceada542233db28af9a (diff) | |
download | FreeBSD-src-e39b9e36e5f2d2dd312004cf5f84bb382be47dcd.zip FreeBSD-src-e39b9e36e5f2d2dd312004cf5f84bb382be47dcd.tar.gz |
Vendor import of llvm trunk r257626:
https://llvm.org/svn/llvm-project/llvm/trunk@257626
Diffstat (limited to 'lib/Support/Debug.cpp')
-rw-r--r-- | lib/Support/Debug.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Support/Debug.cpp b/lib/Support/Debug.cpp index 47751fc..323d532 100644 --- a/lib/Support/Debug.cpp +++ b/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 |