Lines Matching refs:Arg
114 static SanitizerMask parseArgValues(const Driver &D, const llvm::opt::Arg *A,
119 static int parseCoverageFeatures(const Driver &D, const llvm::opt::Arg *A,
124 static int parseBinaryMetadataFeatures(const Driver &D, const llvm::opt::Arg *A,
139 static std::string describeSanitizeArg(const llvm::opt::Arg *A,
216 for (const auto *Arg : Args) { in parseSpecialCaseListArg() local
218 if (Arg->getOption().matches(SCLOptionID)) { in parseSpecialCaseListArg()
219 Arg->claim(); in parseSpecialCaseListArg()
220 std::string SCLPath = Arg->getValue(); in parseSpecialCaseListArg()
227 } else if (Arg->getOption().matches(NoSCLOptionID)) { in parseSpecialCaseListArg()
228 Arg->claim(); in parseSpecialCaseListArg()
256 for (const llvm::opt::Arg *Arg : llvm::reverse(Args)) { in parseSanitizeTrapArgs() local
257 if (Arg->getOption().matches(options::OPT_fsanitize_trap_EQ)) { in parseSanitizeTrapArgs()
258 Arg->claim(); in parseSanitizeTrapArgs()
259 SanitizerMask Add = parseArgValues(D, Arg, true); in parseSanitizeTrapArgs()
266 << Arg->getSpelling() << toString(S); in parseSanitizeTrapArgs()
269 } else if (Arg->getOption().matches(options::OPT_fno_sanitize_trap_EQ)) { in parseSanitizeTrapArgs()
270 Arg->claim(); in parseSanitizeTrapArgs()
272 expandSanitizerGroups(parseArgValues(D, Arg, DiagnoseErrors)); in parseSanitizeTrapArgs()
347 Arg *OptLevel = Args.getLastArg(options::OPT_O_Group); in SanitizerArgs()
351 for (const llvm::opt::Arg *Arg : llvm::reverse(Args)) { in SanitizerArgs() local
352 if (Arg->getOption().matches(options::OPT_fsanitize_EQ)) { in SanitizerArgs()
353 Arg->claim(); in SanitizerArgs()
354 SanitizerMask Add = parseArgValues(D, Arg, DiagnoseErrors); in SanitizerArgs()
363 << Arg->getAsString(Args); in SanitizerArgs()
376 std::string Desc = describeSanitizeArg(Arg, KindsToDiagnose); in SanitizerArgs()
388 std::string Desc = describeSanitizeArg(Arg, KindsToDiagnose); in SanitizerArgs()
397 if (llvm::opt::Arg *A = Args.getLastArg(options::OPT_mcmodel_EQ)) { in SanitizerArgs()
417 std::string Desc = describeSanitizeArg(Arg, KindsToDiagnose); in SanitizerArgs()
447 std::string Desc = describeSanitizeArg(Arg, KindsToDiagnose); in SanitizerArgs()
459 if (const llvm::opt::Arg *NoRTTIArg = TC.getRTTIArg()) { in SanitizerArgs()
516 } else if (Arg->getOption().matches(options::OPT_fno_sanitize_EQ)) { in SanitizerArgs()
517 Arg->claim(); in SanitizerArgs()
518 SanitizerMask Remove = parseArgValues(D, Arg, DiagnoseErrors); in SanitizerArgs()
635 for (const auto *Arg : Args) { in SanitizerArgs() local
636 if (Arg->getOption().matches(options::OPT_fsanitize_recover_EQ)) { in SanitizerArgs()
637 SanitizerMask Add = parseArgValues(D, Arg, DiagnoseErrors); in SanitizerArgs()
646 << Arg->getSpelling() << toString(SetToDiagnose); in SanitizerArgs()
650 Arg->claim(); in SanitizerArgs()
651 } else if (Arg->getOption().matches(options::OPT_fno_sanitize_recover_EQ)) { in SanitizerArgs()
652 SanitizerMask Remove = parseArgValues(D, Arg, DiagnoseErrors); in SanitizerArgs()
661 << Arg->getSpelling() << toString(SetToDiagnose); in SanitizerArgs()
665 Arg->claim(); in SanitizerArgs()
689 if (Arg *A = in SanitizerArgs()
793 for (const auto *Arg : Args) { in SanitizerArgs() local
794 if (Arg->getOption().matches(options::OPT_fsanitize_coverage)) { in SanitizerArgs()
796 if (Arg->getNumValues() == 1 && in SanitizerArgs()
797 !StringRef(Arg->getValue(0)) in SanitizerArgs()
800 Arg->claim(); in SanitizerArgs()
803 << Arg->getAsString(Args) << /*hasReplacement=*/true in SanitizerArgs()
808 CoverageFeatures |= parseCoverageFeatures(D, Arg, DiagnoseErrors); in SanitizerArgs()
813 Arg->claim(); in SanitizerArgs()
817 } else if (Arg->getOption().matches(options::OPT_fno_sanitize_coverage)) { in SanitizerArgs()
818 Arg->claim(); in SanitizerArgs()
819 CoverageFeatures &= ~parseCoverageFeatures(D, Arg, DiagnoseErrors); in SanitizerArgs()
890 for (const auto *Arg : in SanitizerArgs() local
893 if (Arg->getOption().matches( in SanitizerArgs()
895 Arg->claim(); in SanitizerArgs()
897 parseBinaryMetadataFeatures(D, Arg, DiagnoseErrors); in SanitizerArgs()
899 Arg->claim(); in SanitizerArgs()
901 ~parseBinaryMetadataFeatures(D, Arg, DiagnoseErrors); in SanitizerArgs()
924 if (Arg *A = in SanitizerArgs()
935 if (Arg *WindowsDebugRTArg = in SanitizerArgs()
996 if (const auto *Arg = in SanitizerArgs() local
998 auto parsedAsanDtorKind = AsanDtorKindFromString(Arg->getValue()); in SanitizerArgs()
1001 << Arg->getSpelling() << Arg->getValue(); in SanitizerArgs()
1006 if (const auto *Arg = Args.getLastArg( in SanitizerArgs() local
1009 AsanDetectStackUseAfterReturnModeFromString(Arg->getValue()); in SanitizerArgs()
1014 << Arg->getSpelling() << Arg->getValue(); in SanitizerArgs()
1035 if (Arg *HwasanAbiArg = in SanitizerArgs()
1400 SanitizerMask parseArgValues(const Driver &D, const llvm::opt::Arg *A, in parseArgValues()
1429 int parseCoverageFeatures(const Driver &D, const llvm::opt::Arg *A, in parseCoverageFeatures()
1465 int parseBinaryMetadataFeatures(const Driver &D, const llvm::opt::Arg *A, in parseBinaryMetadataFeatures()
1493 const auto *Arg = *I; in lastArgumentForMask() local
1494 if (Arg->getOption().matches(options::OPT_fsanitize_EQ)) { in lastArgumentForMask()
1496 expandSanitizerGroups(parseArgValues(D, Arg, false)); in lastArgumentForMask()
1498 return describeSanitizeArg(Arg, Mask); in lastArgumentForMask()
1499 } else if (Arg->getOption().matches(options::OPT_fno_sanitize_EQ)) { in lastArgumentForMask()
1501 expandSanitizerGroups(parseArgValues(D, Arg, false)); in lastArgumentForMask()
1508 std::string describeSanitizeArg(const llvm::opt::Arg *A, SanitizerMask Mask) { in describeSanitizeArg()