diff options
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/runtime/GCCLibraries/crtend/crtend.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/runtime/GCCLibraries/crtend/crtend.c b/llvm/runtime/GCCLibraries/crtend/crtend.c index 58f1bf5f9ab..baac8a1b95a 100644 --- a/llvm/runtime/GCCLibraries/crtend/crtend.c +++ b/llvm/runtime/GCCLibraries/crtend/crtend.c @@ -49,8 +49,9 @@ void __main(void) { abort(); /* Should be able to install ONE atexit handler! */ /* FIXME: This should sort the list by priority! */ - for (; R->FP; ++R) - R->FP(); + if (R->FP) + for (; R->FP; ++R) + R->FP(); } static void run_destructors(void) { |