This is an archive of the discontinued LLVM Phabricator instance.

XCore target: fix bug in dereferencing null pointer.
ClosedPublic

Authored by robertlytton on Apr 22 2014, 6:09 AM.

Details

Reviewers
friedgold
Summary

The code only affects XCore targets.
The 'const VarDecl *D' was not being checked for null prior to dereferencing.
This was discovered whilst compiling a empty destructor.

Also add testing of cpp ABI output where it differs from C ABI output.

Diff Detail

Event Timeline

friedgold accepted this revision.Apr 25 2014, 9:55 AM
friedgold edited edge metadata.

LGTM

test/CodeGen/xcore-abi.cpp
17

This comment could be made clearer. What was the actual bug? Did it crash when emitting the destructor or did it crash because of an implicitly generated method?

This revision is now accepted and ready to land.Apr 25 2014, 9:55 AM
robertlytton closed this revision.May 9 2014, 3:34 AM