1 // REQUIRES: host-supports-jit
2 // UNSUPPORTED: system-aix
4 // We disable RTTI to avoid problems on Windows for non-RTTI builds of LLVM
5 // where the JIT cannot find ??_7type_info@@6B@.
6 // RUN: cat %s | clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation \
8 // RUN: cat %s | clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation \
9 // RUN: -Xcc -O2 | FileCheck %s
11 extern "C" int printf(const char *, ...);
13 struct A
{ int a
; A(int a
) : a(a
) {} virtual ~A(); };
15 // Then define the virtual destructor as inline out-of-line, in a separate
16 // PartialTranslationUnit.
17 inline A::~A() { printf("~A(%d)\n", a
); }
19 // Create one instance with new and delete it. We crash here now:
24 // Also create one global that will be auto-destructed.