[PATCH] D136400: [llvm-ocaml] Migrate from naked pointers to prepare for OCaml 5
Alan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 14 12:45:16 PST 2023
alan added inline comments.
================
Comment at: llvm/test/Bindings/OCaml/debuginfo.ml:293
let arg_var = Llvm_debuginfo.dibuild_create_parameter_variable dibuilder ~scope:fun_di
- ~name:"my_arg" ~argno:0 ~file:file_di ~line:10 ~ty
+ ~name:"my_arg" ~argno:1 ~file:file_di ~line:10 ~ty
~always_preserve:false flags_zero
----------------
When I ran the tests with assertions enabled, the OCaml debuginfo test at `llvm/test/Bindings/OCaml/debuginfo.ml` failed with the message:
```
File "/home/alan/llvm-project/debug/test/Bindings/OCaml/Output/debuginfo.ml.tmp/Testsuite.ml", line 1:
Warning 70 [missing-mli]: Cannot find interface file.
File "/home/alan/llvm-project/debug/test/Bindings/OCaml/Output/debuginfo.ml.tmp/debuginfo.ml", line 1:
Warning 70 [missing-mli]: Cannot find interface file.
executable: /home/alan/llvm-project/llvm/lib/IR/DIBuilder.cpp:809: llvm::DILocalVariable* llvm::DIBuilder::createParameterVariable(llvm::DIScope*, llvm::StringRef, unsigned int, llvm::DIFile*, unsigned int, llvm::DIType*, bool, llvm::DINode::DIFlags, llvm::DINodeArray): Assertion `ArgNo && "Expected non-zero argument number for parameter"' failed.
FileCheck error: '<stdin>' is empty.
FileCheck command line: /home/alan/llvm-project/debug/bin/FileCheck /home/alan/llvm-project/llvm/test/Bindings/OCaml/debuginfo.ml
```
The docs for createParameterVariable (https://llvm.org/doxygen/classllvm_1_1DIBuilder.html#afa7c4efcb5c40c8527c13759f10ef5ed) state that the index is 1-based, so the test code with `argno:0` seems to be wrong?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136400/new/
https://reviews.llvm.org/D136400
More information about the llvm-commits
mailing list