[PATCH] D29998: Add initial support for debug counting
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 18 20:40:44 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL295593: Add initial support for debug counting (authored by dannyb).
Changed prior to commit:
https://reviews.llvm.org/D29998?vs=89049&id=89057#toc
Repository:
rL LLVM
https://reviews.llvm.org/D29998
Files:
llvm/trunk/include/llvm/Support/CommandLine.h
llvm/trunk/lib/Support/CMakeLists.txt
llvm/trunk/lib/Support/CommandLine.cpp
Index: llvm/trunk/include/llvm/Support/CommandLine.h
===================================================================
--- llvm/trunk/include/llvm/Support/CommandLine.h
+++ llvm/trunk/include/llvm/Support/CommandLine.h
@@ -343,6 +343,9 @@
virtual void printOptionValue(size_t GlobalWidth, bool Force) const = 0;
+ static void printHelpStr(StringRef HelpStr, size_t Indent,
+ size_t FirstLineIndentedBy);
+
virtual void getExtraOptionNames(SmallVectorImpl<StringRef> &) {}
// addOccurrence - Wrapper around handleOccurrence that enforces Flags.
Index: llvm/trunk/lib/Support/CMakeLists.txt
===================================================================
--- llvm/trunk/lib/Support/CMakeLists.txt
+++ llvm/trunk/lib/Support/CMakeLists.txt
@@ -47,6 +47,7 @@
CrashRecoveryContext.cpp
DataExtractor.cpp
Debug.cpp
+ DebugCounter.cpp
DeltaAlgorithm.cpp
DAGDeltaAlgorithm.cpp
Dwarf.cpp
Index: llvm/trunk/lib/Support/CommandLine.cpp
===================================================================
--- llvm/trunk/lib/Support/CommandLine.cpp
+++ llvm/trunk/lib/Support/CommandLine.cpp
@@ -1404,8 +1404,8 @@
// Return the width of the option tag for printing...
size_t alias::getOptionWidth() const { return ArgStr.size() + 6; }
-static void printHelpStr(StringRef HelpStr, size_t Indent,
- size_t FirstLineIndentedBy) {
+void Option::printHelpStr(StringRef HelpStr, size_t Indent,
+ size_t FirstLineIndentedBy) {
std::pair<StringRef, StringRef> Split = HelpStr.split('\n');
outs().indent(Indent - FirstLineIndentedBy) << " - " << Split.first << "\n";
while (!Split.second.empty()) {
@@ -1448,7 +1448,7 @@
if (!ValName.empty())
outs() << "=<" << getValueStr(O, ValName) << '>';
- printHelpStr(O.HelpStr, GlobalWidth, getOptionWidth(O));
+ Option::printHelpStr(O.HelpStr, GlobalWidth, getOptionWidth(O));
}
void basic_parser_impl::printOptionName(const Option &O,
@@ -1587,7 +1587,7 @@
size_t GlobalWidth) const {
if (O.hasArgStr()) {
outs() << " -" << O.ArgStr;
- printHelpStr(O.HelpStr, GlobalWidth, O.ArgStr.size() + 6);
+ Option::printHelpStr(O.HelpStr, GlobalWidth, O.ArgStr.size() + 6);
for (unsigned i = 0, e = getNumOptions(); i != e; ++i) {
size_t NumSpaces = GlobalWidth - getOption(i).size() - 8;
@@ -1600,7 +1600,7 @@
for (unsigned i = 0, e = getNumOptions(); i != e; ++i) {
auto Option = getOption(i);
outs() << " -" << Option;
- printHelpStr(getDescription(i), GlobalWidth, Option.size() + 8);
+ Option::printHelpStr(getDescription(i), GlobalWidth, Option.size() + 8);
}
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29998.89057.patch
Type: text/x-patch
Size: 2745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170219/2d746a89/attachment.bin>
More information about the llvm-commits
mailing list