This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch] Ignore warnings when there is no environment in triple
ClosedPublic

Authored by hev on Jun 12 2023, 11:21 PM.

Details

Summary

In Rust bare-metal targets, there is no environment component in triple name. This patch ignores warnings that look like:

warning: triple-implied ABI conflicts with provided target-abi ‘lp64s', using target-abi

Diff Detail

Event Timeline

hev created this revision.Jun 12 2023, 11:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 12 2023, 11:21 PM
hev requested review of this revision.Jun 12 2023, 11:21 PM
SixWeining accepted this revision.Jun 12 2023, 11:36 PM

The change makes sense to me.

This revision is now accepted and ready to land.Jun 12 2023, 11:36 PM
xen0n accepted this revision.Jun 13 2023, 12:44 AM

Thanks! A test case would be appreciated though.

hev updated this revision to Diff 530808.Jun 13 2023, 1:28 AM

Add test cases.

xen0n added inline comments.Jun 13 2023, 1:40 AM
llvm/test/CodeGen/LoongArch/target-abi-from-triple-edge-cases.ll
19 ↗(On Diff #530808)

grammatical nit: "for there are" -> "when there is"

26–27 ↗(On Diff #530808)

Since the intent here is just making sure no warning is emitted, and that the warning's exact form is already checked above, maybe we could coalesce the two into one as simple as NO-WARNING-NOT: warning?

hev updated this revision to Diff 530827.Jun 13 2023, 2:13 AM

Update test case.

hev marked 2 inline comments as done.Jun 13 2023, 2:14 AM
xen0n accepted this revision.Jun 13 2023, 2:28 AM
xen0n retitled this revision from [LoongArch] Ignore warnings when there are no environment in triple to [LoongArch] Ignore warnings when there is no environment in triple.
xen0n edited the summary of this revision. (Show Details)

Thanks!