|
36 | 36 | #define CINDEX_VERSION_MAJOR 0
|
37 | 37 | #define CINDEX_VERSION_MINOR 64
|
38 | 38 |
|
39 |
| -#define CINDEX_VERSION_ENCODE(major, minor) (((major)*10000) + ((minor)*1)) |
| 39 | +#define CINDEX_VERSION_ENCODE(major, minor) (((major) * 10000) + ((minor) * 1)) |
40 | 40 |
|
41 | 41 | #define CINDEX_VERSION \
|
42 | 42 | CINDEX_VERSION_ENCODE(CINDEX_VERSION_MAJOR, CINDEX_VERSION_MINOR)
|
@@ -4495,6 +4495,129 @@ CINDEX_LINKAGE CXStringSet *clang_Cursor_getCXXManglings(CXCursor);
|
4495 | 4495 | */
|
4496 | 4496 | CINDEX_LINKAGE CXStringSet *clang_Cursor_getObjCManglings(CXCursor);
|
4497 | 4497 |
|
| 4498 | +/** |
| 4499 | + * @} |
| 4500 | + */ |
| 4501 | + |
| 4502 | +/** |
| 4503 | + * \defgroup CINDEX_MODULE Inline Assembly introspection |
| 4504 | + * |
| 4505 | + * The functions in this group provide access to information about GCC-style |
| 4506 | + * inline assembly statements. |
| 4507 | + * |
| 4508 | + * @{ |
| 4509 | + */ |
| 4510 | + |
| 4511 | +/** |
| 4512 | + * Given a CXCursor_GCCAsmStmt cursor, return the assembly template string. |
| 4513 | + * As per LLVM IR Assembly Template language, template placeholders for |
| 4514 | + * inputs and outputs are either of the form $N where N is a decimal number |
| 4515 | + * as an index into the input-output specification, |
| 4516 | + * or ${N:M} where N is a decimal number also as an index into the |
| 4517 | + * input-output specification and M is the template argument modifier. |
| 4518 | + * The index N in both cases points into the the total inputs and outputs, |
| 4519 | + * or more specifically, into the list of outputs followed by the inputs, |
| 4520 | + * starting from index 0 as the first available template argument. |
| 4521 | + * |
| 4522 | + * This function also returns a valid empty string if the cursor does not point |
| 4523 | + * at a GCC inline assembly block. |
| 4524 | + * |
| 4525 | + * Users are responsible for releasing the allocation of returned string via |
| 4526 | + * \c clang_disposeString. |
| 4527 | + */ |
| 4528 | + |
| 4529 | +CINDEX_LINKAGE CXString clang_Cursor_getGCCAssemblyTemplate(CXCursor); |
| 4530 | + |
| 4531 | +/** |
| 4532 | + * Given a CXCursor_GCCAsmStmt cursor, check if the assembly block has goto |
| 4533 | + * labels. |
| 4534 | + * This function also returns 0 if the cursor does not point at a GCC inline |
| 4535 | + * assembly block. |
| 4536 | + */ |
| 4537 | + |
| 4538 | +CINDEX_LINKAGE unsigned clang_Cursor_isGCCAssemblyHasGoto(CXCursor); |
| 4539 | + |
| 4540 | +/** |
| 4541 | + * Given a CXCursor_GCCAsmStmt cursor, count the number of outputs. |
| 4542 | + * This function also returns 0 if the cursor does not point at a GCC inline |
| 4543 | + * assembly block. |
| 4544 | + */ |
| 4545 | + |
| 4546 | +CINDEX_LINKAGE unsigned clang_Cursor_getGCCAssemblyNumOutputs(CXCursor); |
| 4547 | + |
| 4548 | +/** |
| 4549 | + * Given a CXCursor_GCCAsmStmt cursor, count the number of inputs. |
| 4550 | + * This function also returns 0 if the cursor does not point at a GCC inline |
| 4551 | + * assembly block. |
| 4552 | + */ |
| 4553 | + |
| 4554 | +CINDEX_LINKAGE unsigned clang_Cursor_getGCCAssemblyNumInputs(CXCursor); |
| 4555 | + |
| 4556 | +/** |
| 4557 | + * Given a CXCursor_GCCAsmStmt cursor, get the constraint and expression cursor |
| 4558 | + * to the Index-th input. |
| 4559 | + * This function returns 1 when the cursor points at a GCC inline assembly |
| 4560 | + * statement, `Index` is within bounds and both the `Constraint` and `Expr` are |
| 4561 | + * not NULL. |
| 4562 | + * Otherwise, this function returns 0 but leaves `Constraint` and `Expr` |
| 4563 | + * intact. |
| 4564 | + * |
| 4565 | + * Users are responsible for releasing the allocation of `Constraint` via |
| 4566 | + * \c clang_disposeString. |
| 4567 | + */ |
| 4568 | + |
| 4569 | +CINDEX_LINKAGE unsigned clang_Cursor_getGCCAssemblyInput(CXCursor Cursor, |
| 4570 | + unsigned Index, |
| 4571 | + CXString *Constraint, |
| 4572 | + CXCursor *Expr); |
| 4573 | + |
| 4574 | +/** |
| 4575 | + * Given a CXCursor_GCCAsmStmt cursor, get the constraint and expression cursor |
| 4576 | + * to the Index-th output. |
| 4577 | + * This function returns 1 when the cursor points at a GCC inline assembly |
| 4578 | + * statement, `Index` is within bounds and both the `Constraint` and `Expr` are |
| 4579 | + * not NULL. |
| 4580 | + * Otherwise, this function returns 0 but leaves `Constraint` and `Expr` |
| 4581 | + * intact. |
| 4582 | + * |
| 4583 | + * Users are responsible for releasing the allocation of `Constraint` via |
| 4584 | + * \c clang_disposeString. |
| 4585 | + */ |
| 4586 | + |
| 4587 | +CINDEX_LINKAGE unsigned clang_Cursor_getGCCAssemblyOutput(CXCursor Cursor, |
| 4588 | + unsigned Index, |
| 4589 | + CXString *Constraint, |
| 4590 | + CXCursor *Expr); |
| 4591 | + |
| 4592 | +/** |
| 4593 | + * Given a CXCursor_GCCAsmStmt cursor, count the clobbers in it. |
| 4594 | + * This function also returns 0 if the cursor does not point at a GCC inline |
| 4595 | + * assembly block. |
| 4596 | + */ |
| 4597 | + |
| 4598 | +CINDEX_LINKAGE unsigned clang_Cursor_getGCCAssemblyNumClobbers(CXCursor Cursor); |
| 4599 | + |
| 4600 | +/** |
| 4601 | + * Given a CXCursor_GCCAsmStmt cursor, get the Index-th clobber of it. |
| 4602 | + * This function returns a valid empty string if the cursor does not point |
| 4603 | + * at a GCC inline assembly block or `Index` is out of bounds. |
| 4604 | + * |
| 4605 | + * Users are responsible for releasing the allocation of returned string via |
| 4606 | + * \c clang_disposeString. |
| 4607 | + */ |
| 4608 | + |
| 4609 | +CINDEX_LINKAGE CXString clang_Cursor_getGCCAssemblyClobber(CXCursor Cursor, |
| 4610 | + unsigned Index); |
| 4611 | + |
| 4612 | +/** |
| 4613 | + * Given a CXCursor_GCCAsmStmt cursor, check if the inline assembly is |
| 4614 | + * `volatile`. |
| 4615 | + * This function returns 0 if the cursor does not point at a GCC inline |
| 4616 | + * assembly block. |
| 4617 | + */ |
| 4618 | + |
| 4619 | +CINDEX_LINKAGE unsigned clang_Cursor_isGCCAssemblyVolatile(CXCursor Cursor); |
| 4620 | + |
4498 | 4621 | /**
|
4499 | 4622 | * @}
|
4500 | 4623 | */
|
|
0 commit comments