[DWARF] Fix debug info generation for function static variables, typedefs, and records