public FunctionDefinition asFunctionDefinition(boolean includeCC) {
		ProgramBasedDataTypeManager dtm = getProgram().getGhidraProgram().getDataTypeManager();

		FunctionDefinitionDataType funcDef =
			new FunctionDefinitionDataType(name.getParentCP(), name.getName(), dtm);
		funcDef.setReturnType(retval.type);
		funcDef.setNoReturn(noReturn);
		funcDef.setArguments(getParameterDefinitions());
		if (varArg) {
			funcDef.setVarArgs(true);
		}
		if (getProgram().getImportOptions().isOutputSourceLocationInfo() && sourceInfo != null) {
			funcDef.setComment(sourceInfo.getDescriptionStr());
		}
		if (includeCC && callingConventionName != null) {
			try {
				funcDef.setCallingConvention(callingConventionName);
			}
			catch (InvalidInputException e) {
				Msg.warn(this, "Unable to set calling convention name to %s for function def: %s"
						.formatted(callingConventionName, funcDef));
			}
		}

		return funcDef;
	}
Returns a {@link FunctionDefinition} that reflects this function's information.
 
@param includeCC boolean flag, if true the returned funcdef will include calling convention 
@return {@link FunctionDefinition} that reflects this function's information
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFFunction.java