This is an archive of the discontinued LLVM Phabricator instance.

Fix compilation errors in C API when using C compiler
ClosedPublic

Authored by benlangmuir on Aug 12 2021, 2:00 PM.

Details

Reviewers
lhames
deadalnix
Summary

Fix compilation errors when including C headers in C language mode instead of C++.

  • Cannot use sizeof() on another union member
  • nullptr vs NULL
  • () vs (void)

Incidentally, fix an incorrect comment about memory ownership on the argument to __orc_rt_CreateCWrapperFunctionResultFromOutOfBandError, which is copied, not moved.

Diff Detail

Event Timeline

benlangmuir created this revision.Aug 12 2021, 2:00 PM
benlangmuir requested review of this revision.Aug 12 2021, 2:00 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 12 2021, 2:00 PM
Herald added subscribers: llvm-commits, Restricted Project. · View Herald Transcript
lhames accepted this revision.Aug 17 2021, 3:12 PM

LGTM. Thanks Ben!

This revision is now accepted and ready to land.Aug 17 2021, 3:12 PM