Loading src/core/helperFunctionsBuilder.cpp +14 −3 Original line number Diff line number Diff line Loading @@ -112,9 +112,20 @@ Function* HelperFunctionsBuilder::getAssumePlaceholder(Type* type) // outs() << *type << '\n'; auto typeName = getTypeNameLLVM(type); auto assumePlaceholderName = placeholderAssumeFunctionName + "_" + typeName; auto* F = module.getOrInsertFunction(assumePlaceholderName, getAssumePlaceholderType(type)) .getCallee(); return cast<Function>(F); auto* existingF = module.getFunction(assumePlaceholderName); if (existingF) { return existingF; } auto* F = cast<Function>(module.getOrInsertFunction(assumePlaceholderName, getAssumePlaceholderType(type)) .getCallee()); F->addFnAttr(Attribute::OptimizeNone); F->addFnAttr(Attribute::NoInline); F->addFnAttr(Attribute::NoUnwind); F->addFnAttr(Attribute::UWTable); return F; } LLVMContext& HelperFunctionsBuilder::getContext() { return module.getContext(); } Loading Loading
src/core/helperFunctionsBuilder.cpp +14 −3 Original line number Diff line number Diff line Loading @@ -112,9 +112,20 @@ Function* HelperFunctionsBuilder::getAssumePlaceholder(Type* type) // outs() << *type << '\n'; auto typeName = getTypeNameLLVM(type); auto assumePlaceholderName = placeholderAssumeFunctionName + "_" + typeName; auto* F = module.getOrInsertFunction(assumePlaceholderName, getAssumePlaceholderType(type)) .getCallee(); return cast<Function>(F); auto* existingF = module.getFunction(assumePlaceholderName); if (existingF) { return existingF; } auto* F = cast<Function>(module.getOrInsertFunction(assumePlaceholderName, getAssumePlaceholderType(type)) .getCallee()); F->addFnAttr(Attribute::OptimizeNone); F->addFnAttr(Attribute::NoInline); F->addFnAttr(Attribute::NoUnwind); F->addFnAttr(Attribute::UWTable); return F; } LLVMContext& HelperFunctionsBuilder::getContext() { return module.getContext(); } Loading