Skip to content

Commit

Permalink
[Clang][TableGen] Change SACheckersEmitter to use const Record *
Browse files Browse the repository at this point in the history
  • Loading branch information
jurahul committed Sep 30, 2024
1 parent 8b47711 commit 7b0d431
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions clang/utils/TableGen/ClangSACheckersEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,8 @@ void clang::EmitClangSACheckers(const RecordKeeper &Records, raw_ostream &OS) {
if (Package->isValueUnset("PackageOptions"))
continue;

std::vector<Record *> PackageOptions = Package
->getValueAsListOfDefs("PackageOptions");
for (Record *PackageOpt : PackageOptions) {
for (const Record *PackageOpt :
Package->getValueAsListOfDefs("PackageOptions")) {
OS << "PACKAGE_OPTION(";
printOption(OS, getPackageFullName(Package), *PackageOpt);
OS << ")\n";
Expand Down Expand Up @@ -325,13 +324,11 @@ void clang::EmitClangSACheckers(const RecordKeeper &Records, raw_ostream &OS) {
OS << "\n"
"#ifdef GET_CHECKER_OPTIONS\n";
for (const Record *Checker : checkers) {

if (Checker->isValueUnset("CheckerOptions"))
continue;

std::vector<Record *> CheckerOptions = Checker
->getValueAsListOfDefs("CheckerOptions");
for (Record *CheckerOpt : CheckerOptions) {
for (const Record *CheckerOpt :
Checker->getValueAsListOfDefs("CheckerOptions")) {
OS << "CHECKER_OPTION(";
printOption(OS, getCheckerFullName(Checker), *CheckerOpt);
OS << ")\n";
Expand Down

0 comments on commit 7b0d431

Please sign in to comment.