Skip to content

Commit

Permalink
Apply clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
raviqqe committed Jan 8, 2025
1 parent f02edc4 commit 9b20d84
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cc/include/TableGen.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void tableGenFree(TableGenParserRef tg_ref);
TableGenBool tableGenAddSource(TableGenParserRef tg_ref, const char *source);
void tableGenAddSourceFile(TableGenParserRef tg_ref, TableGenStringRef source);
void tableGenAddIncludeDirectory(TableGenParserRef tg_ref,
TableGenStringRef include);
TableGenStringRef include);

/// NOTE: TableGen currently relies on global state within a given parser
/// invocation, so this function is not thread-safe.
Expand Down
6 changes: 3 additions & 3 deletions cc/lib/RecordVal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

TableGenStringRef tableGenRecordValGetName(TableGenRecordValRef rv_ref) {
auto s = unwrap(rv_ref)->getName();
return TableGenStringRef { .data = s.data(), .len = s.size() };
return TableGenStringRef{.data = s.data(), .len = s.size()};
}

TableGenTypedInitRef tableGenRecordValGetNameInit(TableGenRecordValRef rv_ref) {
Expand Down Expand Up @@ -58,8 +58,8 @@ tableGenRecordValGetValAsDefRecord(TableGenRecordValRef rv_ref) {
wrap(dyn_cast<TypedInit>(unwrap(rv_ref)->getValue())));
}

void tableGenRecordValPrint(TableGenRecordValRef rv_ref, TableGenStringCallback callback,
void *userData) {
void tableGenRecordValPrint(TableGenRecordValRef rv_ref,
TableGenStringCallback callback, void *userData) {
ctablegen::CallbackOstream stream(callback, userData);
stream << *unwrap(rv_ref);
}
Expand Down
2 changes: 1 addition & 1 deletion cc/lib/TableGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ TableGenBool tableGenAddSource(TableGenParserRef tg_ref, const char *source) {
}

void tableGenAddIncludeDirectory(TableGenParserRef tg_ref,
TableGenStringRef include) {
TableGenStringRef include) {
return unwrap(tg_ref)->addIncludeDirectory(
StringRef(include.data, include.len));
}
Expand Down
11 changes: 7 additions & 4 deletions cc/lib/Utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ void tableGenInitPrint(TableGenTypedInitRef ti, TableGenStringCallback callback,

void tableGenInitDump(TableGenTypedInitRef ti) { unwrap(ti)->dump(); }

TableGenBool tableGenPrintError(TableGenParserRef ref, TableGenSourceLocationRef loc_ref, TableGenDiagKind dk,
TableGenStringRef message,
TableGenStringCallback callback, void *userData) {
TableGenBool tableGenPrintError(TableGenParserRef ref,
TableGenSourceLocationRef loc_ref,
TableGenDiagKind dk, TableGenStringRef message,
TableGenStringCallback callback,
void *userData) {
ctablegen::CallbackOstream stream(callback, userData);
ArrayRef<SMLoc> Loc = *unwrap(loc_ref);

Expand Down Expand Up @@ -182,7 +184,8 @@ TableGenSourceLocationRef tableGenSourceLocationNull() {
return wrap(new ArrayRef(SMLoc()));
}

TableGenSourceLocationRef tableGenSourceLocationClone(TableGenSourceLocationRef loc_ref) {
TableGenSourceLocationRef
tableGenSourceLocationClone(TableGenSourceLocationRef loc_ref) {
return wrap(new ArrayRef(*unwrap(loc_ref)));
}

Expand Down

0 comments on commit 9b20d84

Please sign in to comment.