Skip to content

Commit 65ebf8d

Browse files
fix failing WASM test
1 parent e351551 commit 65ebf8d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/lpython/python_evaluator.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ std::string PythonCompiler::aggregate_type_to_string(const struct EvalResult &r)
507507
}
508508

509509
void PythonCompiler::compute_offsets(llvm::Type *type, ASR::symbol_t *asr_type, EvalResult &result) {
510+
#ifdef HAVE_LFORTRAN_LLVM
510511
LCOMPILERS_ASSERT(type->isStructTy())
511512

512513
const llvm::DataLayout &dl = e->get_jit_data_layout();
@@ -531,6 +532,9 @@ void PythonCompiler::compute_offsets(llvm::Type *type, ASR::symbol_t *asr_type,
531532
#endif
532533
);
533534
}
535+
#else
536+
throw LCompilersException("LLVM is not enabled");
537+
#endif
534538
}
535539

536540
void print_type(ASR::ttype_t *t, void *data, std::string &result) {

0 commit comments

Comments
 (0)