void buildTypeDefs(TaskMonitor monitor) throws CancelledException {
		monitor.setMessage("Applying typedefs...");
		// NOTE: PDB does not appear to contain typedefs of typedefs.  Such definitions do not convey
		// so we are saved from having dependency ordering issues for typedef elements.
		for (XmlElement elem : todo) {
			monitor.checkCancelled();

			String datatypeName =
				SymbolUtilities.replaceInvalidChars(elem.getAttribute("name"), false);
			String baseDatatypeName =
				SymbolUtilities.replaceInvalidChars(elem.getAttribute("basetype"), false);

			if (datatypeName.equals(baseDatatypeName)) {
				continue;
			}
			if ("Function".equals(baseDatatypeName)) {
				continue;//TODO is this actually a global function
			}

			WrappedDataType baseDataType = pdbParser.findDataType(baseDatatypeName);
			if (baseDataType == null) {
				log.appendMsg("PDB",
					"Failed to resolve typedef: " + datatypeName + " -> " + baseDatatypeName);
				continue;
			}
			if (baseDataType.isZeroLengthArray()) {
				log.appendMsg("PDB",
					"Zero length array not supported for typedef: " + datatypeName);
				continue;
			}

			TypedefDataType typedef =
				pdbParser.createTypeDef(datatypeName, baseDataType.getDataType());
			pdbParser.cacheDataType(datatypeName, typedef); // cache with namespace-based name
		}
	}
Perform parsing and caching of typedefs 
@param monitor task monitor
@throws CancelledException if task cancelled
Ghidra/Features/PDB/src/main/java/ghidra/app/util/bin/format/pdb/ApplyTypeDefs.java