public Integer index(Location loc) {
		if (loc == null) {
			Msg.info(this, "null Location");
			return null;
		}
		String filename = loc.filename;
		if (filename == null) {
			Msg.info(this, "null filename");
			return null;
		}
		Integer res = filenameToIndex.putIfAbsent(filename, leastUnusedIndex);
		if (res == null) {
			return leastUnusedIndex++;
		}
		return res;
	}
Adds the filename of a location to the index if it is not already present.
@param loc location containing filename to add
@return index associated with filename, or {@code null} if a {@code null} {@link Location}
or a {@link Location} with a {@code null} filename was provided as input.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/sleigh/grammar/SourceFileIndexer.java