aboutsummaryrefslogtreecommitdiff
path: root/src/zig_clang.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-02-24 18:49:07 -0800
committerGitHub <noreply@github.com>2021-02-24 18:49:07 -0800
commitd7049fc8e0709619b8aa6766b37abeae946703b2 (patch)
treefd575717d5ca9e585b7d94e2028f80614dbf6c2d /src/zig_clang.cpp
parent8b9434871ea437840d25f073b945466359f402f9 (diff)
parent9ada7638a5dbb535ba37223a14478691dd60cf6a (diff)
downloadzig-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.cpp5
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);