ASTMangler: Verify that debug manglings round-trip

Add an IRGen flag to disable this verification, since it doesn't work from within
lldb itself for some reason, and I don't want to investigate it right now.
This commit is contained in:
Slava Pestov
2019-01-29 18:06:29 -05:00
parent c7aede6ffe
commit c2029db223
4 changed files with 63 additions and 4 deletions

View File

@@ -158,7 +158,8 @@ public:
GenericSignature *signature,
ResilienceExpansion expansion);
std::string mangleTypeForDebugger(Type decl, const DeclContext *DC);
std::string mangleTypeForDebugger(Type decl, const DeclContext *DC,
bool verify=false);
std::string mangleDeclType(const ValueDecl *decl);

View File

@@ -197,6 +197,9 @@ public:
/// Enable chaining of dynamic replacements.
unsigned EnableDynamicReplacementChaining : 1;
/// Disable round-trip verification of mangled debug types.
unsigned DisableRoundTripDebugTypes : 1;
/// Path to the profdata file to be used for PGO, or the empty string.
std::string UseProfile = "";
@@ -232,6 +235,7 @@ public:
EnableResilienceBypass(false), LazyInitializeClassMetadata(false),
UseIncrementalLLVMCodeGen(true), UseSwiftCall(false),
GenerateProfile(false), EnableDynamicReplacementChaining(false),
DisableRoundTripDebugTypes(false),
CmdArgs(), SanitizeCoverage(llvm::SanitizerCoverageOptions()),
TypeInfoFilter(TypeInfoDumpFilter::All) {}