Ensure existence of abort since the beginning

This commit is contained in:
Alessandro Di Federico
2016-01-12 18:06:40 +01:00
parent 0cffa717ed
commit df0997ab04
+5
View File
@@ -73,6 +73,11 @@ CodeGenerator::CodeGenerator(std::string Input,
BinaryHandle = std::move(BinaryOrErr.get());
// Provide an abort declaration
TheModule->getOrInsertFunction("abort",
FunctionType::get(Type::getVoidTy(Context),
false));
// We only support ELF for now
auto *TheBinary = cast<object::ObjectFile>(BinaryHandle.getBinary());