summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorJosh Berdine <josh@berdine.net>2021-03-25 23:24:16 +0000
committerJosh Berdine <josh@berdine.net>2021-03-26 11:49:13 +0000
commit0b1dc49ca38a8569b0aee40ea8d3054bc960e2ed (patch)
tree2b0414f84a11d0243841176a6df8fd26d7513763 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentb06c669114e2e903ca3941e3ec738f868c863eee (diff)
[NFC][OCaml] Resolve const and unsigned compilation warnings
There are a number of compilation warnings regarding disregarding const qualifiers, and casting between pointers to integer types with different sign. The incompatible sign warnings are due to treating the result of `LLVMGetModuleIdentifier` as `const unsigned char *`, but it is declared as `const char *`. The dropped const qualifiers are due to the code pattern `memcpy(String_val(_),_,_)` which ought to be (following the implementation of the OCaml runtime) `memcpy((char *)String_val(_),_,_)`. The issue is that `String_val` is usually used to get the value of an immutable string. But in the context of the `memcpy` calls, the string is in the process of being initialized, so is not yet constant. Differential Revision: https://reviews.llvm.org/D99392
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions