private static void setGlobalName(HighSymbol global, String name, SourceType source)
			throws DuplicateNameException, InvalidInputException {
		Program program = global.getHighFunction().getFunction().getProgram();
		VariableStorage storage = global.getStorage();
		if (!storage.isMemoryStorage()) {
			return; // unsupported global (register?)
		}
		Address addr = storage.getFirstVarnode().getAddress();
		SymbolTable symTable = program.getSymbolTable();
		Symbol sym = symTable.getPrimarySymbol(addr);
		if (sym == null) {
			symTable.createLabel(addr, name, source);
		}
		else if (!sym.getName().equals(name)) {
			sym.setName(name, source);
		}
	}
Rename and/or retype the specified variable in the database.  All parameters may be flushed
to the database if typed parameter inconsistency detected.
@param highSymbol is the symbol being updated
@param name new variable name or null to use retain current variable name
@param dataType newly assigned data type or null to retain current variable datatype.
Only a fixed-length data type may be specified.  If size varies from the current size,
an attempt will be made to grow/shrink the storage.
@param source source type
@throws InvalidInputException if suitable data type was not specified, or unable to
resize storage, or invalid name specified
@throws DuplicateNameException if name was specified and conflicts with another
variable/label within the function's namespace
@throws UnsupportedOperationException if unsupported variable type is specified
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/HighFunctionDBUtil.java