From d87e3922ec55f2c6f1faec957021be7afcbecdd8 Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Tue, 13 Sep 2022 19:30:13 +0100 Subject: [PATCH] Move to the llvm 7240436c94bd02762a723a2e3551528d16c8efdb commit --- README.org | 4 ++-- libserene/lib/jit/halley.cpp | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/README.org b/README.org index a540ddf..f8b6620 100644 --- a/README.org +++ b/README.org @@ -17,13 +17,13 @@ Setup the githook and install dependencies using the following commands: - doxygen (If you want to build the docs as well) - Valgrind - CCache (If you want faster builds specially with the LLVM) - - Boehm GC v8.2.0 + - Boehm GC v8.2.0 (has to be built statically and with ~-fPIC~) ** LLVM Installation *Important Note*: We're trying to keep Serene up to date with the LLVM release cycle till we get to our first release. So we use the development version of the LLVM. Currently we are using - =14.0.6= branch as our reference. + =7240436c94bd02762a723a2e3551528d16c8efdb= commit as our reference. MLIR is a part of the [[https://llvm.org][LLVM]] project and in order to build it we need to build the LLVM itself as well. Here is a quick guide to build the latest version of the LLVM and MLIR. diff --git a/libserene/lib/jit/halley.cpp b/libserene/lib/jit/halley.cpp index 09de573..d99e9c5 100644 --- a/libserene/lib/jit/halley.cpp +++ b/libserene/lib/jit/halley.cpp @@ -439,10 +439,7 @@ MaybeJitAddress Halley::lookup(const char *nsName, const char *sym) const { return expectedSymbol.takeError(); } - auto rawFPtr = expectedSymbol->getAddress(); - - // NOLINTNEXTLINE(performance-no-int-to-ptr) - auto fptr = reinterpret_cast(rawFPtr); + auto fptr = expectedSymbol->toPtr(); if (fptr == nullptr) { return tempError(*ctx, "Lookup function is null!");