private void removePrototype(String modelName, TaskMonitor monitor) throws CancelledException {
		FunctionManager manager = program.getFunctionManager();
		monitor.setMessage("Searching for references to " + modelName);
		monitor.setMaximum(manager.getFunctionCount());
		FunctionIterator iter = manager.getFunctions(true);
		for (int i = 0; i < 2; i += 1) {
			while (iter.hasNext()) {
				monitor.checkCancelled();
				monitor.incrementProgress(1);
				Function function = iter.next();
				PrototypeModel currentModel = function.getCallingConvention();
				if (currentModel != null && currentModel.getName().equals(modelName)) {
					try {
						function.setCallingConvention(Function.UNKNOWN_CALLING_CONVENTION_STRING);
					}
					catch (InvalidInputException e) {
						// shouldn't reach here
					}
				}
			}
			if (i == 1) {
				break;
			}
			iter = manager.getExternalFunctions();
		}
		// Clear any evaluation model that matches the prototype being removed
		clearPrototypeEvaluationModel(EvaluationModelType.EVAL_CURRENT, modelName);
	}
Clean up references to a prototype extension that is about to be removed.
Functions that use this prototype are changed to have an "unknown" prototype.
@param modelName is the name of the prototype being removed
@param monitor is a task monitor
@throws CancelledException if the task is cancelled
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/SpecExtension.java