[clang] Kill CFrontend_config.json field

Summary: It was hardly used.

Reviewed By: jvillard

Differential Revision: D4112229

fbshipit-source-id: 1eb5ee5
master
Andrzej Kotulski 8 years ago committed by Facebook Github Bot
parent 2d424b7779
commit aa3ebf117c

@ -76,17 +76,15 @@ let run_clang_frontend trans_unit_ctx ast_source => {
CFrontend_config.pointer_stmt_index := stmt_index; CFrontend_config.pointer_stmt_index := stmt_index;
CFrontend_config.pointer_type_index := type_index; CFrontend_config.pointer_type_index := type_index;
CFrontend_config.ivar_to_property_index := ivar_to_property_index; CFrontend_config.ivar_to_property_index := ivar_to_property_index;
CFrontend_config.json := ast_filename;
Logging.out "Clang frontend action is %s@\n" Config.clang_frontend_action_string; Logging.out "Clang frontend action is %s@\n" Config.clang_frontend_action_string;
Logging.out Logging.out "Start %s of AST from %s@\n" Config.clang_frontend_action_string ast_filename;
"Start %s of AST from %s@\n" Config.clang_frontend_action_string !CFrontend_config.json;
if Config.clang_frontend_do_lint { if Config.clang_frontend_do_lint {
CFrontend_checkers_main.do_frontend_checks trans_unit_ctx ast_decl CFrontend_checkers_main.do_frontend_checks trans_unit_ctx ast_decl
}; };
if Config.clang_frontend_do_capture { if Config.clang_frontend_do_capture {
CFrontend.do_source_file trans_unit_ctx ast_decl CFrontend.do_source_file trans_unit_ctx ast_decl
}; };
Logging.out "End translation AST file %s... OK!@\n" !CFrontend_config.json; Logging.out "End translation AST file %s... OK!@\n" ast_filename;
print_elapsed () print_elapsed ()
}; };

@ -94,7 +94,6 @@ let modeled_function_attributes = [replace_with_deref_first_arg_attr]
let enum_map = ref Clang_ast_main.PointerMap.empty let enum_map = ref Clang_ast_main.PointerMap.empty
let global_translation_unit_decls : Clang_ast_t.decl list ref = ref [] let global_translation_unit_decls : Clang_ast_t.decl list ref = ref []
let ivar_to_property_index = ref Clang_ast_main.PointerMap.empty let ivar_to_property_index = ref Clang_ast_main.PointerMap.empty
let json = ref ""
let log_out = ref Format.std_formatter let log_out = ref Format.std_formatter
let pointer_decl_index = ref Clang_ast_main.PointerMap.empty let pointer_decl_index = ref Clang_ast_main.PointerMap.empty
let pointer_stmt_index = ref Clang_ast_main.PointerMap.empty let pointer_stmt_index = ref Clang_ast_main.PointerMap.empty
@ -105,7 +104,6 @@ let reset_global_state () =
enum_map := Clang_ast_main.PointerMap.empty; enum_map := Clang_ast_main.PointerMap.empty;
global_translation_unit_decls := []; global_translation_unit_decls := [];
ivar_to_property_index := Clang_ast_main.PointerMap.empty; ivar_to_property_index := Clang_ast_main.PointerMap.empty;
json := "";
log_out := Format.std_formatter; log_out := Format.std_formatter;
pointer_decl_index := Clang_ast_main.PointerMap.empty; pointer_decl_index := Clang_ast_main.PointerMap.empty;
pointer_stmt_index := Clang_ast_main.PointerMap.empty; pointer_stmt_index := Clang_ast_main.PointerMap.empty;

@ -94,7 +94,6 @@ val modeled_function_attributes : string list
val enum_map : (Clang_ast_t.pointer option * Exp.t option) Clang_ast_main.PointerMap.t ref val enum_map : (Clang_ast_t.pointer option * Exp.t option) Clang_ast_main.PointerMap.t ref
val global_translation_unit_decls : Clang_ast_t.decl list ref val global_translation_unit_decls : Clang_ast_t.decl list ref
val ivar_to_property_index : Clang_ast_t.decl Clang_ast_main.PointerMap.t ref val ivar_to_property_index : Clang_ast_t.decl Clang_ast_main.PointerMap.t ref
val json : string ref
val log_out : Format.formatter ref val log_out : Format.formatter ref
val pointer_decl_index : Clang_ast_t.decl Clang_ast_main.PointerMap.t ref val pointer_decl_index : Clang_ast_t.decl Clang_ast_main.PointerMap.t ref
val pointer_stmt_index : Clang_ast_t.stmt Clang_ast_main.PointerMap.t ref val pointer_stmt_index : Clang_ast_t.stmt Clang_ast_main.PointerMap.t ref

@ -573,7 +573,6 @@ let rec get_type_from_exp_stmt stmt =
| DeclRefExpr(_, _, _, info) -> do_decl_ref_exp info | DeclRefExpr(_, _, _, info) -> do_decl_ref_exp info
| _ -> | _ ->
Logging.err_debug "Failing with: %s@\n%!" (Clang_ast_j.string_of_stmt stmt); Logging.err_debug "Failing with: %s@\n%!" (Clang_ast_j.string_of_stmt stmt);
Printing.print_failure_info "";
assert false assert false
module Self = module Self =

@ -63,9 +63,6 @@ let print_procedures cfg =
" defined? " ^ (string_of_bool (Cfg.Procdesc.is_defined pdesc)) ^ "\n") " defined? " ^ (string_of_bool (Cfg.Procdesc.is_defined pdesc)) ^ "\n")
procs) procs)
let print_failure_info pointer =
L.err "AST Element> %s IN FILE> %s @.@." pointer !CFrontend_config.json
let print_nodes nodes = let print_nodes nodes =
IList.iter (fun node -> Logging.do_out "%s" (Cfg.Node.get_description pe_text node)) nodes IList.iter (fun node -> Logging.do_out "%s" (Cfg.Node.get_description pe_text node)) nodes

@ -9,8 +9,6 @@
open! Utils open! Utils
val print_failure_info : string -> unit
val print_tenv : Tenv.t -> unit val print_tenv : Tenv.t -> unit
val print_tenv_struct_unions : Tenv.t -> unit val print_tenv_struct_unions : Tenv.t -> unit

Loading…
Cancel
Save