[llvm-dev] Counterintuitive use of LLVMBool in C-API?

Alexander Benikowski via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 12 01:59:28 PDT 2016

I stumbled across the following:

> /* Builds a module from the bitcode in the specified memory buffer,
> returning a
> reference to the module via the OutModule parameter. Returns 0 on success.
> */
> LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf,
> LLVMModuleRef *OutModule);

However in most scenarios i know, a Bool is something like
0 = False
!0 = True

In short: is it just me or is this really counterintuitive?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160912/f8b1e4c2/attachment.html>

More information about the llvm-dev mailing list