teak-llvm/clang/test/CodeGenCXX/windows-on-arm-stack-probe-size.cpp
Saleem Abdulrasool d0807aee51 CodeGen: correct Windows ARM C++ assertion
Because the Decl is explicitly passed as nullptr further up the call chain, it
is possible to invoke isa on a nullptr, which will assert.  Guard against the
nullptr.

Take the opportunity to reuse the helper method rather than re-implementing this
logic.

llvm-svn: 259874
2016-02-05 04:12:40 +00:00

14 lines
305 B
C++

// RUN: %clang_cc1 -triple thumbv7--windows-msvc -S -emit-llvm -o - -x c++ %s | FileCheck %s
// RUN: %clang_cc1 -triple thumbv7--windows-itanium -fno-use-cxa-atexit -S -emit-llvm -o - -x c++ %s | FileCheck %s
class C {
public:
~C();
};
static C sc;
void f(const C &ci) { sc = ci; }
// CHECK: atexit