method vglob_aux g =
    match g with
      | GFun (_f, _loc) (* function definition *)
        -> Cil.DoChildren (* keep everything *)
      | GVar (v, _, _loc) (* variable definition *)
      | GVarDecl (_, v, _loc) -> (* variable/function declaration *)
          if Hashtbl.mem used_variables v then DoChildren
          else begin
            debug "remove var %s@." v.vname;
            ChangeTo []
          end
      | GType (ti, _loc) (* typedef *) ->
          if Hashtbl.mem used_typeinfo ti.tname then DoChildren
          else begin
            debug "remove typedef %s@." ti.tname;
            ChangeTo []
          end
      | GCompTag (ci, _loc) (* struct/union definition *)
      | GCompTagDecl (ci, _loc) (* struct/union declaration *) ->
          if Hashtbl.mem used_compinfo ci.cname then DoChildren
          else begin
            debug "remove comp %s@." ci.cname;
            ChangeTo []
          end
      | GEnumTag (ei, _loc) (* enum definition *)
      | GEnumTagDecl (ei, _loc) (* enum declaration *) ->
          if Hashtbl.mem used_enuminfo ei.ename then DoChildren
          else begin
            debug "remove enum %s@." ei.ename;
            DoChildren (* ChangeTo [] *)
          end
      | _ -> Cil.DoChildren