From 4d5970f6939b8aa3b7840c124bf63396143d2a61 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Wed, 29 May 2019 09:06:06 -0700 Subject: [PATCH] [sledge] Only call Llvm_analysis.verify_module in debug mode Summary: This isn't free and is expected to hold of bitcode produced by clang/llvm. There are tests that fail verification, so keep it in debug mode. Reviewed By: kren1 Differential Revision: D15535438 fbshipit-source-id: 9390a8363 --- sledge/src/llair/frontend.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sledge/src/llair/frontend.ml b/sledge/src/llair/frontend.ml index d94de37ce..63bd6e55b 100644 --- a/sledge/src/llair/frontend.ml +++ b/sledge/src/llair/frontend.ml @@ -1383,7 +1383,9 @@ let translate : string -> Llair.t = Llvm_linker.linker_dispose link_ctx ; llmodule in - Llvm_analysis.verify_module llmodule |> Option.iter ~f:invalid_llvm ; + assert ( + Llvm_analysis.verify_module llmodule |> Option.for_all ~f:invalid_llvm + ) ; transform ~gdce:(not single_bc_input) llmodule ; scan_locs llmodule ; scan_names llmodule ;