The other sanitizers don't have backend passes that rely on value names.
Avoid paying the compile time cost of names there.
llvm-svn: 263541
Res.getLangOpts()->ObjCExceptions = 1;
}
- // FIXME: Override value name discarding when sanitizers are used because the
+ // FIXME: Override value name discarding when asan or msan is used because the
// backend passes depend on the name of the alloca in order to print out
// names.
- Res.getCodeGenOpts().DiscardValueNames &= Res.getLangOpts()->Sanitize.empty();
+ Res.getCodeGenOpts().DiscardValueNames &=
+ !Res.getLangOpts()->Sanitize.has(SanitizerKind::Address) &&
+ !Res.getLangOpts()->Sanitize.has(SanitizerKind::Memory);
// FIXME: ParsePreprocessorArgs uses the FileManager to read the contents of
// PCH file and find the original header name. Remove the need to do that in