Skip to content

Commit

Permalink
[clang-interp] Use -fno-sized-deallocation in two tests (#95546)
Browse files Browse the repository at this point in the history
At least on my Windows machine, these two tests fail due to not being
able to look up `??3@YAXPEAX_K@Z` (which is
`void __cdecl operator delete(void *, unsigned __int64)` in demangled)
after 130e93c. Since they don't test anything related to sized
deallocation, just disable sized allocation for them.

Possibly fixes #95451.
  • Loading branch information
nico authored Jun 14, 2024
1 parent cc7a18c commit c63b9a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions clang/test/Interpreter/inline-virtual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
//
// We disable RTTI to avoid problems on Windows for non-RTTI builds of LLVM
// where the JIT cannot find ??_7type_info@@6B@.
// RUN: cat %s | clang-repl -Xcc -fno-rtti | FileCheck %s
// RUN: cat %s | clang-repl -Xcc -fno-rtti -Xcc -O2 | FileCheck %s
// RUN: cat %s | clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation \
// RUN: | FileCheck %s
// RUN: cat %s | clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation \
// RUN: -Xcc -O2 | FileCheck %s

extern "C" int printf(const char *, ...);

Expand Down
3 changes: 2 additions & 1 deletion clang/unittests/Interpreter/InterpreterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ TEST_F(InterpreterTest, InstantiateTemplate) {
// https://github.com/llvm/llvm-project/issues/94994.
#ifndef __arm__
TEST_F(InterpreterTest, Value) {
std::unique_ptr<Interpreter> Interp = createInterpreter();
std::vector<const char *> Args = {"-fno-sized-deallocation"};
std::unique_ptr<Interpreter> Interp = createInterpreter(Args);

Value V1;
llvm::cantFail(Interp->ParseAndExecute("int x = 42;"));
Expand Down

0 comments on commit c63b9a5

Please sign in to comment.