This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Check for associated statements with hasAssociatedStmt() when scanning for device code.
ClosedPublic

Authored by sfantao on May 2 2016, 9:57 AM.

Details

Summary

getAssociatedStmt() contains an assertion that assumes the statement always exists. In device code scanning, we need to look into the associated statement therefore we check its existence. This patch replaces getAssociatedStmt by hasAssociatedStmt so that we do not trigger the assertion for directives that happen not to have an associated statement (e.g target enter/exit data).

Diff Detail

Event Timeline

sfantao updated this revision to Diff 55836.May 2 2016, 9:57 AM
sfantao retitled this revision from to [OpenMP] Check for associated statements with hasAssociatedStmt() when scanning for device code..
sfantao updated this object.
sfantao added subscribers: caomhin, cfe-commits.
ABataev accepted this revision.May 4 2016, 6:32 AM
ABataev edited edge metadata.

LG

This revision is now accepted and ready to land.May 4 2016, 6:32 AM
sfantao closed this revision.May 7 2016, 11:49 PM