mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Revert "Introduce a string_ostream string builder facilty"
Temporarily back out commits r211749, r211752 and r211754. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211814 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1342,21 +1342,25 @@ printGenericOptionDiff(const Option &O, const GenericOptionValue &Value,
|
||||
|
||||
// printOptionDiff - Specializations for printing basic value types.
|
||||
//
|
||||
#define PRINT_OPT_DIFF(T) \
|
||||
void parser<T>::printOptionDiff(const Option &O, T V, OptionValue<T> D, \
|
||||
size_t GlobalWidth) const { \
|
||||
printOptionName(O, GlobalWidth); \
|
||||
string_ostream SS; \
|
||||
SS << V; \
|
||||
outs() << "= " << SS.str(); \
|
||||
size_t NumSpaces = MaxOptWidth > SS.tell() ? MaxOptWidth - SS.tell() : 0; \
|
||||
outs().indent(NumSpaces) << " (default: "; \
|
||||
if (D.hasValue()) \
|
||||
outs() << D.getValue(); \
|
||||
else \
|
||||
outs() << "*no default*"; \
|
||||
outs() << ")\n"; \
|
||||
}
|
||||
#define PRINT_OPT_DIFF(T) \
|
||||
void parser<T>:: \
|
||||
printOptionDiff(const Option &O, T V, OptionValue<T> D, \
|
||||
size_t GlobalWidth) const { \
|
||||
printOptionName(O, GlobalWidth); \
|
||||
std::string Str; \
|
||||
{ \
|
||||
raw_string_ostream SS(Str); \
|
||||
SS << V; \
|
||||
} \
|
||||
outs() << "= " << Str; \
|
||||
size_t NumSpaces = MaxOptWidth > Str.size() ? MaxOptWidth - Str.size() : 0;\
|
||||
outs().indent(NumSpaces) << " (default: "; \
|
||||
if (D.hasValue()) \
|
||||
outs() << D.getValue(); \
|
||||
else \
|
||||
outs() << "*no default*"; \
|
||||
outs() << ")\n"; \
|
||||
} \
|
||||
|
||||
PRINT_OPT_DIFF(bool)
|
||||
PRINT_OPT_DIFF(boolOrDefault)
|
||||
|
Reference in New Issue
Block a user