This is an archive of the discontinued LLVM Phabricator instance.

Fix Calling Convention through aliases
ClosedPublic

Authored by erichkeane on Oct 7 2019, 8:46 AM.

Details

Summary

r369697 changed the behavior of stripPointerCasts to no longer include
aliases. However, the code in CGDeclCXX.cpp's createAtExitStub counted
on the looking through aliases to properly set the calling convention of
a call.

The result of the change was that the calling convention mismatch of the
call would be replaced with a llvm.trap, causing a runtime crash.

Diff Detail

Repository
rL LLVM

Event Timeline

erichkeane created this revision.Oct 7 2019, 8:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2019, 8:46 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
pcc accepted this revision.Oct 7 2019, 10:18 AM

LGTM

clang/lib/CodeGen/CGDeclCXX.cpp
251 ↗(On Diff #223617)

Nit: while here you could change this to auto *.

This revision is now accepted and ready to land.Oct 7 2019, 10:18 AM
rnk accepted this revision.Oct 7 2019, 11:29 AM

lgtm

This revision was automatically updated to reflect the committed changes.