Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LLVM][TableGen] Change all Init pointers to const #112705

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clang/utils/TableGen/ClangOptionDocEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,13 +367,13 @@ void emitOption(const DocumentedOption &Option, const Record *DocInfo,
for (const Record *VisibilityHelp :
R->getValueAsListOfDefs("HelpTextsForVariants")) {
// This is a list of visibilities.
ArrayRef<Init *> Visibilities =
ArrayRef<const Init *> Visibilities =
VisibilityHelp->getValueAsListInit("Visibilities")->getValues();

// See if any of the program's visibilities are in the list.
for (StringRef DocInfoMask :
DocInfo->getValueAsListOfStrings("VisibilityMask")) {
for (Init *Visibility : Visibilities) {
for (const Init *Visibility : Visibilities) {
if (Visibility->getAsUnquotedString() == DocInfoMask) {
// Use the first one we find.
Description = escapeRST(VisibilityHelp->getValueAsString("Text"));
Expand Down
4 changes: 2 additions & 2 deletions llvm/include/llvm/TableGen/Error.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ void PrintError(const RecordVal *RecVal, const Twine &Msg);
[[noreturn]] void PrintFatalError(function_ref<void(raw_ostream &OS)> PrintMsg);

// Returns true if the assert failed.
bool CheckAssert(SMLoc Loc, Init *Condition, Init *Message);
void dumpMessage(SMLoc Loc, Init *Message);
bool CheckAssert(SMLoc Loc, const Init *Condition, const Init *Message);
void dumpMessage(SMLoc Loc, const Init *Message);

extern SourceMgr SrcMgr;
extern unsigned ErrorsPrinted;
Expand Down
Loading
Loading