Skip to content

Commit

Permalink
Run clang with original optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
master-q committed Jul 16, 2023
1 parent fe61e41 commit c997407
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions infer/src/clang/Capture.ml
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,12 @@ let cc1_capture clang_cmd =


let capture clang_cmd =
if ClangCommand.can_attach_ast_exporter clang_cmd then
if ClangCommand.can_attach_ast_exporter clang_cmd then (
(* this command compiles some code; replace the invocation of clang with our own clang and
plugin *)
cc1_capture clang_cmd
cc1_capture clang_cmd ; (* to create AST *)
run_clang clang_cmd Utils.echo_in ; (* to run clang with original optimizer *)
() )
else if Option.exists Config.buck_mode ~f:BuckMode.is_clang_compilation_db then
(* when running with buck's compilation-database, skip commands where frontend cannot be
attached, as they may cause unnecessary compilation errors *)
Expand Down

0 comments on commit c997407

Please sign in to comment.