diff options
author | Vitaly Buka <vitalybuka@google.com> | 2024-01-19 16:07:34 -0800 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2024-01-19 16:07:34 -0800 |
commit | b2c13350471c50f75d7a32d118faf7b04a5fbede (patch) | |
tree | cb6312cd563ba375363c73cbce500b291cd62f1c | |
parent | 8bef2f27a0f7df05c7879186cc50fc8ec4a81132 (diff) | |
download | llvm-users/vitalybuka/spr/try-patch-from-76218.zip llvm-users/vitalybuka/spr/try-patch-from-76218.tar.gz llvm-users/vitalybuka/spr/try-patch-from-76218.tar.bz2 |
[𝘀𝗽𝗿] initial versionusers/vitalybuka/spr/try-patch-from-76218
Created using spr 1.3.4
-rw-r--r-- | clang/unittests/Interpreter/InterpreterTest.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp index d6eb068..406a487 100644 --- a/clang/unittests/Interpreter/InterpreterTest.cpp +++ b/clang/unittests/Interpreter/InterpreterTest.cpp @@ -34,12 +34,6 @@ using namespace clang; #define CLANG_INTERPRETER_NO_SUPPORT_EXEC #endif -#if LLVM_ADDRESS_SANITIZER_BUILD || LLVM_HWADDRESS_SANITIZER_BUILD -#include <sanitizer/lsan_interface.h> -#else -extern "C" void __lsan_ignore_object(const void *p) {} -#endif - int Global = 42; // JIT reports symbol not found on Windows without the visibility attribute. REPL_EXTERNAL_VISIBILITY int getGlobal() { return Global; } @@ -317,8 +311,9 @@ TEST(IncrementalProcessing, InstantiateTemplate) { auto fn = cantFail(Interp->getSymbolAddress(MangledName)).toPtr<TemplateSpecFn>(); EXPECT_EQ(42, fn(NewA.getPtr())); - // FIXME: release the memory. - __lsan_ignore_object(NewA.getPtr()); + // FIXME: Consider providing an option in clang::Value to take ownership of + // the memory created from the interpreter. + free(NewA.getPtr()); } #ifdef CLANG_INTERPRETER_NO_SUPPORT_EXEC |