@Override
	public void setCallingConvention(String conventionName) throws InvalidInputException {

		if (CompilerSpec.isUnknownCallingConvention(conventionName)) {
			this.callingConventionName = CompilerSpec.CALLING_CONVENTION_unknown;
			return;
		}
		if (CompilerSpec.CALLING_CONVENTION_default.equals(conventionName)) {
			this.callingConventionName = CompilerSpec.CALLING_CONVENTION_default;
			return;
		}

		if (GenericCallingConvention
				.getGenericCallingConvention(conventionName) == GenericCallingConvention.unknown &&
			(dataMgr == null ||
				!dataMgr.getKnownCallingConventionNames().contains(conventionName))) {
			throw new InvalidInputException("Unknown calling convention name: " + conventionName);
		}

		this.callingConventionName = conventionName;
	}
Create a Function Definition based on a Function
@param function the function to use to create a Function Signature.
@param formalSignature if true only original formal types will be retained and 
auto-params discarded (e.g., this, __return_storage_ptr__, etc.).  If false,
the effective signature will be used where forced indirect and auto-params
are reflected in the signature.  This option has no affect if the specified 
function has custom storage enabled.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/FunctionDefinitionDataType.java