Skip to content

Commit c63b9a5

Browse files
authored
[clang-interp] Use -fno-sized-deallocation in two tests (#95546)
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.
1 parent cc7a18c commit c63b9a5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

clang/test/Interpreter/inline-virtual.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
//
44
// We disable RTTI to avoid problems on Windows for non-RTTI builds of LLVM
55
// where the JIT cannot find ??_7type_info@@6B@.
6-
// RUN: cat %s | clang-repl -Xcc -fno-rtti | FileCheck %s
7-
// RUN: cat %s | clang-repl -Xcc -fno-rtti -Xcc -O2 | FileCheck %s
6+
// RUN: cat %s | clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation \
7+
// RUN: | FileCheck %s
8+
// RUN: cat %s | clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation \
9+
// RUN: -Xcc -O2 | FileCheck %s
810

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

clang/unittests/Interpreter/InterpreterTest.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ TEST_F(InterpreterTest, InstantiateTemplate) {
286286
// https://github.com/llvm/llvm-project/issues/94994.
287287
#ifndef __arm__
288288
TEST_F(InterpreterTest, Value) {
289-
std::unique_ptr<Interpreter> Interp = createInterpreter();
289+
std::vector<const char *> Args = {"-fno-sized-deallocation"};
290+
std::unique_ptr<Interpreter> Interp = createInterpreter(Args);
290291

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

0 commit comments

Comments
 (0)