This is an archive of the discontinued LLVM Phabricator instance.

[MC] Do not consider .ifdef/.ifndef as a use
ClosedPublic

Authored by scott.linder on Dec 7 2018, 9:04 AM.

Details

Summary

GAS seems to allow this, and I can't think of a reason why these directives should be considered uses.

Diff Detail

Event Timeline

scott.linder created this revision.Dec 7 2018, 9:04 AM

Rebase and ping

kristina added a reviewer: kristina.EditedJan 17 2019, 8:09 AM
kristina added a subscriber: kristina.

LGTM if GAS does allow multiple uses of .set to change the value. One nit on the test, can you add a case where you don't have an .if directive like:

.set foo, 5
# CHECK: .byte 5
.byte foo

I think it would make sense to have that at the bottom even if there is already a test for it, just to verify that plain .set semantics are still correct when preceded by several .if/.else directives.

Rebase and extend tests

kristina accepted this revision.Jan 28 2019, 8:38 AM

LGTM.

This revision is now accepted and ready to land.Jan 28 2019, 8:38 AM
This revision was automatically updated to reflect the committed changes.