Skip to content

Commit

Permalink
Run clang-format on modified code
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Kulla <[email protected]>
  • Loading branch information
fpsunflower committed Oct 27, 2024
1 parent 8616458 commit 48c79d8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
12 changes: 6 additions & 6 deletions src/include/osl_pvt.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ class TypeSpec {
/// Take a type code string (possibly containing many types) and
/// turn it into a TypeSpec vector.
static void typespecs_from_codes(const char* code,
std::vector<TypeSpec>& types);
std::vector<TypeSpec>& types);


private:
Expand Down Expand Up @@ -1155,11 +1155,11 @@ typedef std::vector<Opcode> OpcodeVec;
/// and figures out the lifetimes of all variables, based on whether the
/// args in each op are read or written. This function is used both in
/// the compiler and the runtime optimizer.
void track_variable_lifetimes_main(
const OpcodeVec& ircode,
const SymbolPtrVec& opargs,
const SymbolPtrVec& allsyms,
std::vector<int>* bblock_ids = nullptr);
void
track_variable_lifetimes_main(const OpcodeVec& ircode,
const SymbolPtrVec& opargs,
const SymbolPtrVec& allsyms,
std::vector<int>* bblock_ids = nullptr);



Expand Down
3 changes: 1 addition & 2 deletions src/liboslcomp/symtab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,7 @@ static ustring op_while("while");
static ustring op_dowhile("dowhile");

void
track_variable_lifetimes_main(const OpcodeVec& code,
const SymbolPtrVec& opargs,
track_variable_lifetimes_main(const OpcodeVec& code, const SymbolPtrVec& opargs,
const SymbolPtrVec& allsyms,
std::vector<int>* bblockids)
{
Expand Down
8 changes: 4 additions & 4 deletions src/liboslexec/runtimeoptimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,8 @@ RuntimeOptimizer::insert_code(int opnum, ustring opname,
{
OpcodeVec& code(inst()->ops());
std::vector<int>& opargs(inst()->args());
ustring method = (opnum < (int)code.size())
? code[opnum].method()
: main_method_name;
ustring method = (opnum < (int)code.size()) ? code[opnum].method()
: main_method_name;
int nargs = args_to_add.size();
Opcode op(opname, method, opargs.size(), nargs);
code.insert(code.begin() + opnum, op);
Expand Down Expand Up @@ -2518,7 +2517,8 @@ RuntimeOptimizer::track_variable_lifetimes(const SymbolPtrVec& allsymptrs)
if (m_bblockids.size() != inst()->ops().size())
find_basic_blocks();

track_variable_lifetimes_main(inst()->ops(), oparg_ptrs, allsymptrs, &m_bblockids);
track_variable_lifetimes_main(inst()->ops(), oparg_ptrs, allsymptrs,
&m_bblockids);
}


Expand Down
6 changes: 3 additions & 3 deletions src/liboslexec/typespec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ TypeSpec::new_struct(StructSpec* n)
return (int)m_structs.size() - 1;
}

TypeSpec TypeSpec::type_from_code(const char* code, int* advance)
TypeSpec
TypeSpec::type_from_code(const char* code, int* advance)
{
TypeSpec t;
int i = 0;
Expand Down Expand Up @@ -259,8 +260,7 @@ TypeSpec::code_from_type() const


void
TypeSpec::typespecs_from_codes(const char* code,
std::vector<TypeSpec>& types)
TypeSpec::typespecs_from_codes(const char* code, std::vector<TypeSpec>& types)
{
types.clear();
while (code && *code) {
Expand Down

0 comments on commit 48c79d8

Please sign in to comment.