[llvm] cca3167 - [NFC][OCaml] Fix documentation for verify_function and const_of_int64
Josh Berdine via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 17 05:10:16 PDT 2021
Author: Jason Hu
Date: 2021-03-17T12:09:28Z
New Revision: cca3167de0b6f95916fa9d2338beccb74132e526
URL: https://github.com/llvm/llvm-project/commit/cca3167de0b6f95916fa9d2338beccb74132e526
DIFF: https://github.com/llvm/llvm-project/commit/cca3167de0b6f95916fa9d2338beccb74132e526.diff
LOG: [NFC][OCaml] Fix documentation for verify_function and const_of_int64
Documentation of verify_function is incorrect and that of
const_of_int64 is incomplete.
Reviewed By: whitequark
Differential Revision: https://reviews.llvm.org/D77884
Added:
Modified:
llvm/bindings/ocaml/analysis/llvm_analysis.mli
llvm/bindings/ocaml/llvm/llvm.mli
Removed:
################################################################################
diff --git a/llvm/bindings/ocaml/analysis/llvm_analysis.mli b/llvm/bindings/ocaml/analysis/llvm_analysis.mli
index cf323b547d9a..3dd397425a78 100644
--- a/llvm/bindings/ocaml/analysis/llvm_analysis.mli
+++ b/llvm/bindings/ocaml/analysis/llvm_analysis.mli
@@ -16,9 +16,8 @@
human-readable validation report. See [llvm::verifyModule]. *)
external verify_module : Llvm.llmodule -> string option = "llvm_verify_module"
-(** [verify_function f] returns [None] if the function [f] is valid, and
- [Some reason] if it is invalid. [reason] is a string containing a
- human-readable validation report. See [llvm::verifyFunction]. *)
+(** [verify_function f] returns [true] if the function [f] is valid, and
+ [false] if it is invalid. See [llvm::verifyFunction]. *)
external verify_function : Llvm.llvalue -> bool = "llvm_verify_function"
(** [verify_module m] returns if the module [m] is valid, but prints a
diff --git a/llvm/bindings/ocaml/llvm/llvm.mli b/llvm/bindings/ocaml/llvm/llvm.mli
index 0a900f86f47e..8892b12d1566 100644
--- a/llvm/bindings/ocaml/llvm/llvm.mli
+++ b/llvm/bindings/ocaml/llvm/llvm.mli
@@ -960,8 +960,9 @@ val metadata_as_value : llcontext -> llmetadata -> llvalue
See the method [llvm::ConstantInt::get]. *)
val const_int : lltype -> int -> llvalue
-(** [const_of_int64 ty i] returns the integer constant of type [ty] and value
- [i]. See the method [llvm::ConstantInt::get]. *)
+(** [const_of_int64 ty i s] returns the integer constant of type [ty] and value
+ [i]. [s] indicates whether the integer is signed or not.
+ See the method [llvm::ConstantInt::get]. *)
val const_of_int64 : lltype -> Int64.t -> bool -> llvalue
(** [int64_of_const c] returns the int64 value of the [c] constant integer.
More information about the llvm-commits
mailing list