This is an archive of the discontinued LLVM Phabricator instance.

DebugInfo: support for DW_TAG_atomic_type
ClosedPublic

Authored by vleschuk on Oct 31 2016, 5:37 AM.

Details

Summary

Mark C11 _Atomic variables with DW_TAG_atomic_type tag.

This is the simplest way to achieve the goal: modifying Qualifiers results in much more changes and putting emission of tag into CreateQualifiedType() along with DW_TAG_const_type and friends seems more logic but requires way more changes and could break something else (my first attempt to add atomic to qualifiers resulted in lots of failures in OpenCL tests for some reason).

Diff Detail

Event Timeline

vleschuk updated this revision to Diff 76389.Oct 31 2016, 5:37 AM
vleschuk retitled this revision from to DebugInfo: support for DW_TAG_atomic_type.
vleschuk updated this object.
vleschuk added a subscriber: cfe-commits.
aprantl accepted this revision.Oct 31 2016, 8:58 AM
aprantl edited edge metadata.

LGTM with inline comments addressed.

test/CodeGen/debug-info-atomic.c
4

Why do we need the const here?

5

Can you check that it is actually the DIVariable "i" that has the atomic type?

This revision is now accepted and ready to land.Oct 31 2016, 8:58 AM
vleschuk added inline comments.Oct 31 2016, 10:11 AM
test/CodeGen/debug-info-atomic.c
4

I thought it would be better to make sure that "enabling" atomic doesn't affect other qualifiers.

vleschuk marked 2 inline comments as done.Oct 31 2016, 10:11 AM
vleschuk updated this revision to Diff 76441.Oct 31 2016, 10:24 AM
vleschuk edited edge metadata.

Made test more strict: it now checks that variable i is atomic.

vleschuk marked an inline comment as done.Oct 31 2016, 10:24 AM

One more inline comment.

test/CodeGen/debug-info-atomic.c
4

Please use FileCheck variables ![[TYPE:[0-9]+]] instead of hardcoding the numbers. This is bound to break soon otherwise.

This revision was automatically updated to reflect the committed changes.