private TreeSet<String> buildDefinedCallingConventionSet() {

		// Include all calling conventions defined by associated architecture compiler spec
		TreeSet<String> nameSet = new TreeSet<>();
		ProgramArchitecture arch = getProgramArchitecture();
		if (arch != null) {
			CompilerSpec compilerSpec = arch.getCompilerSpec();
			PrototypeModel[] namedCallingConventions = compilerSpec.getCallingConventions();
			for (PrototypeModel model : namedCallingConventions) {
				nameSet.add(model.getName());
			}
		}

		// Include all generic calling convention names without cspec
		else {
			for (GenericCallingConvention conv : GenericCallingConvention.values()) {
				if (conv == GenericCallingConvention.unknown) {
					continue; // added below
				}
				nameSet.add(conv.getDeclarationName());
			}
		}

		return nameSet;
	}
Get (and assign if needed thus requiring open transaction) the ID associated with the 
specified calling convention name.  If name is a new convention and the number of stored
convention names exceeds 127 the returned ID will correspond to the unknown calling 
convention.
@param name calling convention name
@param restrictive if true an error will be thrown if name is not defined by 
{@link GenericCallingConvention} or the associated compiler specification if 
datatype manager has an associated program architecture.
@return calling convention ID
@throws IOException if database IO error occurs
@throws InvalidInputException if restrictive is true and name is not defined by 
{@link GenericCallingConvention} or the associated compiler specification if 
datatype manager has an associated program architecture.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/DataTypeManagerDB.java