diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-02-24 18:49:07 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-24 18:49:07 -0800 |
| commit | d7049fc8e0709619b8aa6766b37abeae946703b2 (patch) | |
| tree | fd575717d5ca9e585b7d94e2028f80614dbf6c2d /src/zig_clang.cpp | |
| parent | 8b9434871ea437840d25f073b945466359f402f9 (diff) | |
| parent | 9ada7638a5dbb535ba37223a14478691dd60cf6a (diff) | |
| download | zig-d7049fc8e0709619b8aa6766b37abeae946703b2.tar.gz zig-d7049fc8e0709619b8aa6766b37abeae946703b2.zip | |
Merge pull request #7920 from ziglang/ast-memory-layout
Rework AST memory layout for better memory usage and performance
Diffstat (limited to 'src/zig_clang.cpp')
| -rw-r--r-- | src/zig_clang.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zig_clang.cpp b/src/zig_clang.cpp index 8dc6a0823b..d9e5e527ac 100644 --- a/src/zig_clang.cpp +++ b/src/zig_clang.cpp @@ -2244,6 +2244,11 @@ unsigned ZigClangAPSInt_getNumWords(const ZigClangAPSInt *self) { return casted->getNumWords(); } +bool ZigClangAPSInt_lessThanEqual(const ZigClangAPSInt *self, uint64_t rhs) { + auto casted = reinterpret_cast<const llvm::APSInt *>(self); + return casted->ule(rhs); +} + uint64_t ZigClangAPInt_getLimitedValue(const ZigClangAPInt *self, uint64_t limit) { auto casted = reinterpret_cast<const llvm::APInt *>(self); return casted->getLimitedValue(limit); |
