|
LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
|
#include "CommonCAPIGen.h"#include "CAPIGenRegistration.h"#include <llvm/ADT/StringMap.h>#include <clang/Basic/FileManager.h>#include <clang/Basic/LangOptions.h>#include <clang/Basic/SourceManager.h>#include <clang/Lex/Lexer.h>#include <optional>Go to the source code of this file.
Classes | |
| struct | ClangLexerContext::Impl |
Enumerations | |
| enum class | AccessLevel : std::uint8_t { Public , Private , Protected } |
| Access level tracking for C++ class declarations. More... | |
Functions | |
| llvm::cl::opt< std::string > & | getDialectName () |
| Return the DialectName option, registering it on first access. | |
| llvm::cl::opt< std::string > & | getFunctionPrefix () |
| Return the FunctionPrefix option, registering it on first access. | |
| llvm::cl::opt< bool > & | getGenIsA () |
| Return the GenIsA option, registering it on first access. | |
| llvm::cl::opt< bool > & | getGenOpBuild () |
| Return the GenOpBuild option, registering it on first access. | |
| llvm::cl::opt< bool > & | getGenOpOperandGetters () |
| Return the GenOpOperandGetters option, registering it on first access. | |
| llvm::cl::opt< bool > & | getGenOpOperandSetters () |
| Return the GenOpOperandSetters option, registering it on first access. | |
| llvm::cl::opt< bool > & | getGenOpAttributeGetters () |
| Return the GenOpAttributeGetters option, registering it on first access. | |
| llvm::cl::opt< bool > & | getGenOpAttributeSetters () |
| Return the GenOpAttributeSetters option, registering it on first access. | |
| llvm::cl::opt< bool > & | getGenOpRegionGetters () |
| Return the GenOpRegionGetters option, registering it on first access. | |
| llvm::cl::opt< bool > & | getGenOpResultGetters () |
| Return the GenOpResultGetters option, registering it on first access. | |
| llvm::cl::opt< bool > & | getGenTypeOrAttrGet () |
| Return the GenTypeOrAttrGet option, registering it on first access. | |
| llvm::cl::opt< bool > & | getGenTypeOrAttrParamGetters () |
| Return the GenTypeOrAttrParamGetters option, registering it on first access. | |
| llvm::cl::opt< bool > & | getGenExtraClassMethods () |
| Return the GenExtraClassMethods option, registering it on first access. | |
| SmallVector< ExtraMethod > | parseExtraMethods (StringRef extraDecl) |
| Parse method declarations from extraClassDeclaration using Clang's Lexer. | |
| bool | matchesMLIRClass (StringRef cppType, StringRef typeName) |
| Check if a C++ type matches an MLIR type pattern. | |
| std::optional< std::string > | tryCppTypeToCapiType (StringRef cppType) |
| Convert C++ type to MLIR C API type. | |
| std::string | mapCppTypeToCapiType (StringRef cppType) |
| std::optional< std::string > | mapCapiTypeToBasicCppType (StringRef capiType) |
|
strong |
Access level tracking for C++ class declarations.
| Enumerator | |
|---|---|
| Public | |
| Private | |
| Protected | |
Definition at line 309 of file CommonCAPIGen.cpp.
| llvm::cl::opt< std::string > & getDialectName | ( | ) |
Return the DialectName option, registering it on first access.
Definition at line 37 of file CommonCAPIGen.cpp.
| llvm::cl::opt< std::string > & getFunctionPrefix | ( | ) |
Return the FunctionPrefix option, registering it on first access.
Definition at line 49 of file CommonCAPIGen.cpp.
| llvm::cl::opt< bool > & getGenExtraClassMethods | ( | ) |
Return the GenExtraClassMethods option, registering it on first access.
Definition at line 142 of file CommonCAPIGen.cpp.
| llvm::cl::opt< bool > & getGenIsA | ( | ) |
Return the GenIsA option, registering it on first access.
Definition at line 61 of file CommonCAPIGen.cpp.
| llvm::cl::opt< bool > & getGenOpAttributeGetters | ( | ) |
Return the GenOpAttributeGetters option, registering it on first access.
Definition at line 93 of file CommonCAPIGen.cpp.
| llvm::cl::opt< bool > & getGenOpAttributeSetters | ( | ) |
Return the GenOpAttributeSetters option, registering it on first access.
Definition at line 101 of file CommonCAPIGen.cpp.
| llvm::cl::opt< bool > & getGenOpBuild | ( | ) |
Return the GenOpBuild option, registering it on first access.
Definition at line 69 of file CommonCAPIGen.cpp.
| llvm::cl::opt< bool > & getGenOpOperandGetters | ( | ) |
Return the GenOpOperandGetters option, registering it on first access.
Definition at line 77 of file CommonCAPIGen.cpp.
| llvm::cl::opt< bool > & getGenOpOperandSetters | ( | ) |
Return the GenOpOperandSetters option, registering it on first access.
Definition at line 85 of file CommonCAPIGen.cpp.
| llvm::cl::opt< bool > & getGenOpRegionGetters | ( | ) |
Return the GenOpRegionGetters option, registering it on first access.
Definition at line 109 of file CommonCAPIGen.cpp.
| llvm::cl::opt< bool > & getGenOpResultGetters | ( | ) |
Return the GenOpResultGetters option, registering it on first access.
Definition at line 117 of file CommonCAPIGen.cpp.
| llvm::cl::opt< bool > & getGenTypeOrAttrGet | ( | ) |
Return the GenTypeOrAttrGet option, registering it on first access.
Definition at line 125 of file CommonCAPIGen.cpp.
| llvm::cl::opt< bool > & getGenTypeOrAttrParamGetters | ( | ) |
Return the GenTypeOrAttrParamGetters option, registering it on first access.
Definition at line 133 of file CommonCAPIGen.cpp.
| std::optional< std::string > mapCapiTypeToBasicCppType | ( | StringRef | capiType | ) |
Definition at line 866 of file CommonCAPIGen.cpp.
| std::string mapCppTypeToCapiType | ( | StringRef | cppType | ) |
Definition at line 853 of file CommonCAPIGen.cpp.
| bool matchesMLIRClass | ( | StringRef | cppType, |
| StringRef | typeName ) |
Check if a C++ type matches an MLIR type pattern.
Definition at line 720 of file CommonCAPIGen.cpp.
| SmallVector< ExtraMethod > parseExtraMethods | ( | StringRef | extraDecl | ) |
Parse method declarations from extraClassDeclaration using Clang's Lexer.
This function parses C++ method declarations to extract method signatures. It identifies methods by looking for the pattern: <return_type> <identifier> '(' [params] ')' [const] ';'
The parsing process:
Definition at line 616 of file CommonCAPIGen.cpp.
| std::optional< std::string > tryCppTypeToCapiType | ( | StringRef | cppType | ) |
Convert C++ type to MLIR C API type.
Definition at line 736 of file CommonCAPIGen.cpp.