[db][procname] kill dead optional argument

Summary: No callers use optional argument.

Reviewed By: ezgicicek

Differential Revision: D20002257

fbshipit-source-id: e377db4fd
master
Nikos Gorogiannis 5 years ago committed by Facebook Github Bot
parent ec950666a0
commit 43b3ef60f8

@ -767,7 +767,7 @@ let get_qualifiers pname =
(** Convert a proc name to a filename *) (** Convert a proc name to a filename *)
let to_filename ?crc_only pname = let to_filename pname =
(* filenames for clang procs are REVERSED qualifiers with '#' as separator *) (* filenames for clang procs are REVERSED qualifiers with '#' as separator *)
let pp_rev_qualified fmt pname = let pp_rev_qualified fmt pname =
let rev_qualifiers = get_qualifiers pname |> QualifiedCppName.to_rev_list in let rev_qualifiers = get_qualifiers pname |> QualifiedCppName.to_rev_list in
@ -785,7 +785,7 @@ let to_filename ?crc_only pname =
| _ -> | _ ->
F.asprintf "%a" pp_unique_id pname F.asprintf "%a" pp_unique_id pname
in in
Escape.escape_filename @@ DB.append_crc_cutoff ?crc_only proc_id Escape.escape_filename @@ DB.append_crc_cutoff proc_id
module SQLite = struct module SQLite = struct

@ -309,8 +309,8 @@ val pp_unique_id : F.formatter -> t -> unit
val to_unique_id : t -> string val to_unique_id : t -> string
(** Convert a proc name into a unique identifier. *) (** Convert a proc name into a unique identifier. *)
val to_filename : ?crc_only:bool -> t -> string val to_filename : t -> string
(** Convert a proc name to a filename or only to its crc. *) (** Convert a proc name to a filename. *)
val get_qualifiers : t -> QualifiedCppName.t val get_qualifiers : t -> QualifiedCppName.t
(** get qualifiers of C/objc/C++ method/function *) (** get qualifiers of C/objc/C++ method/function *)

@ -17,7 +17,7 @@ let cutoff_length = 100
let crc_token = '.' let crc_token = '.'
let append_crc_cutoff ?(key = "") ?(crc_only = false) name = let append_crc_cutoff ?(key = "") name =
let name_up_to_cutoff = let name_up_to_cutoff =
if String.length name <= cutoff_length then name else String.sub name ~pos:0 ~len:cutoff_length if String.length name <= cutoff_length then name else String.sub name ~pos:0 ~len:cutoff_length
in in
@ -25,7 +25,7 @@ let append_crc_cutoff ?(key = "") ?(crc_only = false) name =
let name_for_crc = name ^ key in let name_for_crc = name ^ key in
Utils.string_crc_hex32 name_for_crc Utils.string_crc_hex32 name_for_crc
in in
if crc_only then crc_str else Printf.sprintf "%s%c%s" name_up_to_cutoff crc_token crc_str Printf.sprintf "%s%c%s" name_up_to_cutoff crc_token crc_str
let curr_source_file_encoding = `Enc_crc let curr_source_file_encoding = `Enc_crc

@ -55,9 +55,9 @@ module Results_dir : sig
(** create a file at the given path, creating any missing directories *) (** create a file at the given path, creating any missing directories *)
end end
val append_crc_cutoff : ?key:string -> ?crc_only:bool -> string -> string val append_crc_cutoff : ?key:string -> string -> string
(** Append a crc to the string, using string_crc_hex32. Cut the string if it exceeds the cutoff (** Append a crc to the string, using string_crc_hex32. Cut the string if it exceeds the cutoff
limit. Use an optional key to compute the crc. Return only the crc if [crc_only] is true. *) limit. Use an optional key to compute the crc. *)
val source_file_encoding : SourceFile.t -> string val source_file_encoding : SourceFile.t -> string
(** string encoding of a source file (including path) as a single filename *) (** string encoding of a source file (including path) as a single filename *)

Loading…
Cancel
Save