This is an archive of the discontinued LLVM Phabricator instance.

Add more initializers to quiet a clang warning
ClosedPublic

Authored by rtereshin on Jan 18 2018, 3:54 PM.

Details

Summary

struct crashreporter_annotations_t gained one more uint64_t field in
CRASHREPORTER_ANNOTATIONS_VERSION 5

causing an annoying clang warning:

llvm/lib/Support/PrettyStackTrace.cpp:92:65: warning: missing field 'abort_cause' initializer [-Wmissing-field-initializers]
        = { CRASHREPORTER_ANNOTATIONS_VERSION, 0, 0, 0, 0, 0, 0 };
                                                                ^
1 warning generated

Let's fix it.

Patch by Roman Tereshin

Diff Detail

Repository
rL LLVM

Event Timeline

rtereshin created this revision.Jan 18 2018, 3:54 PM
rtereshin set the repository for this revision to rL LLVM.Jan 18 2018, 5:01 PM
rtereshin added subscribers: qcolombet, echristo, beanz.
rtereshin added a subscriber: dexonsmith.
echristo accepted this revision.Jan 26 2018, 2:39 PM

Seems reasonable? Not a fan of the ifdef, but I also don't know what changed in 10.11 here. If it's wrong we can work around it later.

This revision is now accepted and ready to land.Jan 26 2018, 2:39 PM

(Also sorry, I thought I'd hit submit on my comments a few days ago, but apparently hit close tab before I'd gotten that far)

(Also sorry, I thought I'd hit submit on my comments a few days ago, but apparently hit close tab before I'd gotten that far)

@echristo No problem, thank you for looking into this!

@dsanders Could you please commit this for me?

Thanks!

dsanders edited the summary of this revision. (Show Details)Jan 30 2018, 8:03 AM
This revision was automatically updated to reflect the committed changes.