diff --git a/codegenerator.cpp b/codegenerator.cpp index 277f3b6cc..f05961a17 100644 --- a/codegenerator.cpp +++ b/codegenerator.cpp @@ -592,8 +592,6 @@ void CodeGenerator::translate(uint64_t VirtualAddress, VirtualAddress = Binary.entryPoint(); } - dbg << "Entry address: 0x" << std::hex << VirtualAddress << std::endl; - BasicBlock *Head = JumpTargets.getBlockAt(VirtualAddress); // Fake jumps to the dispatcher-related basic blocks. This way all the blocks diff --git a/ir-helpers.h b/ir-helpers.h index b3ba6599c..2d553a38d 100644 --- a/ir-helpers.h +++ b/ir-helpers.h @@ -311,6 +311,9 @@ static inline void visitPredecessors(llvm::Instruction *I, /// \return the name of the basic block, if available, its pointer value /// otherwise. static inline std::string getName(const llvm::BasicBlock *BB) { + if (BB == nullptr) + return "(nullptr)"; + llvm::StringRef Result = BB->getName(); if (!Result.empty()) { return Result.str();