Skip to content

Commit

Permalink
clang format fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
theo25 committed Sep 27, 2024
1 parent fdb31c8 commit e892cbe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 4 additions & 2 deletions lib/ast/definition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,10 @@ void kore_definition::preprocess() {
// Defer processing this sort until its parameter sorts have
// been processed.
worklist.push(std::make_pair(sort_to_process, true));
for (auto const &param_sort : sort_to_process->get_arguments()) {
auto *param_ctr = dynamic_cast<kore_composite_sort *>(param_sort.get());
for (auto const &param_sort :
sort_to_process->get_arguments()) {
auto *param_ctr
= dynamic_cast<kore_composite_sort *>(param_sort.get());
worklist.push(std::make_pair(param_ctr, false));
}
continue;
Expand Down
4 changes: 2 additions & 2 deletions lib/binary/serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ void emit_kore_rich_header(std::ostream &os, kore_definition *definition) {
uint8_t num_sort_params = sort->get_arguments().size();
os.write(reinterpret_cast<char const *>(&num_sort_params), 1);
for (uint8_t j = 0; j < num_sort_params; j++) {
auto *param_sort =
dynamic_cast<kore_composite_sort *>(sort->get_arguments()[j].get());
auto *param_sort
= dynamic_cast<kore_composite_sort *>(sort->get_arguments()[j].get());
uint32_t param_ordinal = param_sort->get_ordinal();
if (param_ordinal >= i) {
throw std::runtime_error("found sort ordinal not in topological order");
Expand Down
12 changes: 5 additions & 7 deletions lib/codegen/ProofEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ llvm::Constant *create_global_sort_string_ptr(
}

template <typename IRBuilder>
llvm::Value *get_llvm_value_for_kore_term(llvm::Value *val, uint64_t bits, IRBuilder &b, llvm::Module *mod) {
llvm::Value *get_llvm_value_for_kore_term(
llvm::Value *val, uint64_t bits, IRBuilder &b, llvm::Module *mod) {
if (bits <= 64) {
return val;
}
Expand All @@ -43,12 +44,9 @@ llvm::Value *get_llvm_value_for_kore_term(llvm::Value *val, uint64_t bits, IRBu
uint64_t proof_event::get_llvm_scalar_bits(kore_composite_sort &sort) {
value_type sort_category = sort.get_category(definition_);
switch (sort_category.cat) {
case sort_category::Bool:
return 1;
case sort_category::MInt:
return sort_category.bits;
default:
return 0;
case sort_category::Bool: return 1;
case sort_category::MInt: return sort_category.bits;
default: return 0;
}
}

Expand Down

0 comments on commit e892cbe

Please sign in to comment.