// RUN: %clang_cc1 -no-opaque-pointers %s -triple=armv7-apple-darwin10 -emit-llvm -o - -fexceptions -fcxx-exceptions | FileCheck %s
// Check that we annotate all compiler-synthesized runtime calls and
// functions with the actual ABI-determined CC. This usually doesn't
// matter as long as we're internally consistent (and the LLVM-default
// CC is consistent with the real one), but it's possible for user
// translation units to define these runtime functions (or, equivalently,
// for us to get LTO'ed with such a translation unit), and then the
// mismatch will kill us.
//
// rdar://12818655
// CHECK: [[A:%.*]] = type { double }
// CHECK: declare i32 @__cxa_atexit(void (i8*)*, i8*, i8*) [[NOUNWIND]]
// CHECK: declare i8* @__cxa_allocate_exception(i32)
// CHECK: declare void @__cxa_throw(i8*, i8*, i8*)
// CHECK-LABEL: define internal void @_GLOBAL__sub_I_runtimecc.cpp()
// CHECK: call void @__cxx_global_var_init()
// CHECK: attributes [[NOUNWIND]] = { nounwind }
// CHECK: attributes [[NORETURN]] = { noreturn }