Previously, when clang was compiled with -DLLVM_ENABLE_ASSERTIONS=ON, the attached test was yielding:
inlinable function call in a function with debug info must have a !dbg location call void @"??1?$c@UB@@@@QEAA@XZ"(%struct.c* @"?f@?1??d@@YAPEAU?$c@UB@@@@XZ@4U2@A") fatal error: error in backend: Broken module found, compilation aborted! Stack dump: 0. Program arguments: <f:\svn\buildninja\bin\clang -cc1 -emit-llvm debug-info-no-location.cpp> -gcodeview -debug-info-kind=limited 1. <eof> parser at end of file 2. Per-function optimization
Fixes PR43012
Maybe we should rename this GlobalArrayDestructor, since it's only used for arrays. Later, we can come back and avoid emitting these when using the MS ABI, since we already have the ?__F finalizer.