[llvm-bugs] [Bug 42692] New: "Getter" functionality (or just docs?) missing from include/llvm-c/Core.h

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 19 12:21:34 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=42692

            Bug ID: 42692
           Summary: "Getter" functionality (or just docs?) missing from
                    include/llvm-c/Core.h
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Core LLVM classes
          Assignee: unassignedbugs at nondot.org
          Reporter: cdisselk at cs.ucsd.edu
                CC: llvm-bugs at lists.llvm.org

LLVM's C API appears to me to be missing getters for certain features.  It's
also very possible that the functionality is there but I can't find it, in
which case I would suggest this could also be considered a documentation bug. 
Specifically, getters seem to be missing for the following:

- the 'nsw' and 'nuw' flags on the 'add', 'sub', 'mul', and 'shl' instructions.
 The C API has functionality to set these flags and/or create new instructions
with specific values of those flags (e.g., `LLVMBuildNSWAdd()`), but appears to
have no way to query those flags on an existing instruction.
- Likewise, the 'exact' flag on the 'udiv', 'sdiv', 'lshr', and 'ashr'
instructions.
- The various fast-math flags on floating-point operations. I don't even see
how setters are exposed for these (let alone getters), but this bug is about
getters.
- The `LLVMAtomicRMWBinOp` associated with a particular 'atomicrmw'
instruction.  The BinOp can be specified when creating an 'atomicrmw'
instruction with `LLVMBuildAtomicRMW()`, but I don't see a way to determine the
BinOp of an existing 'atomicrmw' instruction.
- The contents of an inline asm string.  Despite its name, `LLVMGetInlineAsm()`
appears to create inline asm values, not get information about them.
- The contents of clauses of the 'landingpad' instruction. `LLVMGetClause()`
exists, but it's unclear what functions can be called on the resulting
`LLVMValueRef`, or how to tell the `LLVMLandingPadClauseTy` of the clause.
- The operands of a 'blockaddress' constant expression. If you have a value
with `LLVMBlockAddressValueKind`, how can you determine which basic block it is
taking the address of?
- The "prefix data" associated with a function.

Again, it's very possible that getters do exist for any or all of the above,
but I would suggest that in that case, this could be considered a documentation
bug.

I can also file separate bugs for each of these issues if desired.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190719/d94e8a7f/attachment.html>


More information about the llvm-bugs mailing list