private List<ParameterDefinitionImpl> convertMangledToParamDef(Program program) {

		List<ParameterDefinitionImpl> args = new ArrayList<>();
		for (DemangledParameter param : parameters) {
			// stop when a void parameter is hit.  This probably the only defined parameter.
			DemangledDataType type = param.getType();
			if (type.isVoid() && !type.isPointer()) {
				break;
			}
			if (type.isVarArgs()) {
				break;
			}

			DataType dt = type.getDataType(program.getDataTypeManager());
			args.add(new ParameterDefinitionImpl(param.getLabel(), dt, null));
		}
		return args;
	}
Determine if existing thunk relationship should be preserved and mangled symbol
discarded.  This is the case when the thunk function mangled name matches
the thunked function since we want to avoid duplicate symbol names.
@param thunkFunction thunk function with a mangled symbol which is currently
being demangled.
@return true if thunk should be preserved and mangled symbol discarded, otherwise
false if thunk relationship should be eliminated and demangled function information
should be applied as normal.
Ghidra/Features/Base/src/main/java/ghidra/app/util/demangler/DemangledFunction.java