diff --git a/BitcodeEmitter.cpp b/BitcodeEmitter.cpp index cbcb672..dbd8c0a 100644 --- a/BitcodeEmitter.cpp +++ b/BitcodeEmitter.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -552,6 +553,7 @@ bool BitcodeEmitter::emit(Function const& node) { llvm::Function *func = dynamic_cast(d->retval); d->scope.enter(); + assert(func != nullptr); llvm::BasicBlock *bb = llvm::BasicBlock::Create( getGlobalContext(), "entry", func