forked from OSchip/llvm-project
DebugInfo/Printing: Improve name of policy for including types for template arguments
Feedback from Richard Smith that the policy should be named closer to the context its used in.
This commit is contained in:
parent
3057e850b8
commit
6512098877
|
@ -75,7 +75,7 @@ struct PrintingPolicy {
|
|||
MSVCFormatting(false), ConstantsAsWritten(false),
|
||||
SuppressImplicitBase(false), FullyQualifiedName(false),
|
||||
PrintCanonicalTypes(false), PrintInjectedClassNameWithArguments(true),
|
||||
UsePreferredNames(true), UseIntegerTypeSuffixesAlways(false) {}
|
||||
UsePreferredNames(true), AlwaysIncludeTypeForTemplateArgument(false) {}
|
||||
|
||||
/// Adjust this printing policy for cases where it's known that we're
|
||||
/// printing C++ code (for instance, if AST dumping reaches a C++-only
|
||||
|
@ -280,7 +280,7 @@ struct PrintingPolicy {
|
|||
|
||||
/// Whether to use type suffixes (eg: 1U) on integral non-type template
|
||||
/// parameters.
|
||||
unsigned UseIntegerTypeSuffixesAlways : 1;
|
||||
unsigned AlwaysIncludeTypeForTemplateArgument : 1;
|
||||
|
||||
/// Callbacks to use to allow the behavior of printing to be customized.
|
||||
const PrintingCallbacks *Callbacks = nullptr;
|
||||
|
|
|
@ -204,7 +204,7 @@ bool TemplateParameterList::hasAssociatedConstraints() const {
|
|||
bool TemplateParameterList::shouldIncludeTypeForArgument(
|
||||
const PrintingPolicy &Policy, const TemplateParameterList *TPL,
|
||||
unsigned Idx) {
|
||||
if (!TPL || Idx >= TPL->size() || Policy.UseIntegerTypeSuffixesAlways)
|
||||
if (!TPL || Idx >= TPL->size() || Policy.AlwaysIncludeTypeForTemplateArgument)
|
||||
return true;
|
||||
const NamedDecl *TemplParam = TPL->getParam(Idx);
|
||||
if (const auto *ParamValueDecl =
|
||||
|
|
|
@ -247,7 +247,7 @@ PrintingPolicy CGDebugInfo::getPrintingPolicy() const {
|
|||
PP.SuppressInlineNamespace = false;
|
||||
PP.PrintCanonicalTypes = true;
|
||||
PP.UsePreferredNames = false;
|
||||
PP.UseIntegerTypeSuffixesAlways = true;
|
||||
PP.AlwaysIncludeTypeForTemplateArgument = true;
|
||||
|
||||
// Apply -fdebug-prefix-map.
|
||||
PP.Callbacks = &PrintCB;
|
||||
|
|
Loading…
Reference in New Issue