diff options
-rw-r--r-- | src/ortho/llvm4-nodebug/ortho_code_main.adb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/ortho/llvm4-nodebug/ortho_code_main.adb b/src/ortho/llvm4-nodebug/ortho_code_main.adb index e09f38db5..4b36294d4 100644 --- a/src/ortho/llvm4-nodebug/ortho_code_main.adb +++ b/src/ortho/llvm4-nodebug/ortho_code_main.adb @@ -41,7 +41,10 @@ procedure Ortho_Code_Main is Output_Kind : Output_Kind_Type := Output_Object; -- True if the LLVM output must be displayed (set by '--dump-llvm') - Flag_Dump_Llvm : Boolean := False; + Flag_Dump_LLVM : Boolean := False; + + -- Verify generated LLVM code. + Flag_Verify_LLVM : Boolean := False; -- Index of the first file argument. First_File : Natural; @@ -92,7 +95,9 @@ begin begin if Arg (1) = '-' then if Arg = "--dump-llvm" then - Flag_Dump_Llvm := True; + Flag_Dump_LLVM := True; + elsif Arg = "--verify-llvm" then + Flag_Verify_LLVM := True; elsif Arg = "-o" then if Optind = Argc then Put_Line (Standard_Error, "error: missing filename to '-o'"); @@ -231,12 +236,12 @@ begin end loop; end if; - if Flag_Dump_Llvm then + if Flag_Dump_LLVM then DumpModule (Module); end if; -- Verify module. - if False then + if Flag_Verify_LLVM then if LLVM.Analysis.VerifyModule (Module, LLVM.Analysis.PrintMessageAction, Msg'Access) /= 0 then |