Page MenuHomePhabricator

[AIX][TLS] Diagnose use of unimplemented TLS models
ClosedPublic

Authored by NeHuang on May 7 2021, 6:46 AM.

Details

Summary

Add front end diagnostics to report error for unimplemented TLS models set by

  • compiler option -ftls-model
  • attributes like __thread int __attribute__((tls_model("local-exec"))) var_name;

Diff Detail

Event Timeline

NeHuang created this revision.May 7 2021, 6:46 AM
NeHuang requested review of this revision.May 7 2021, 6:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 7 2021, 6:46 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
NeHuang added reviewers: lei, stefanp, nemanjai, Restricted Project.May 7 2021, 6:48 AM
NeHuang updated this revision to Diff 343683.May 7 2021, 7:59 AM

Update the test case.

aaron.ballman added inline comments.May 7 2021, 8:47 AM
clang/include/clang/Basic/DiagnosticDriverKinds.td
548

This neatly avoids the problem of diagnostics not starting with a capital letter (it looks like we have other diagnostics to update, but that's not your problem to deal with).

clang/include/clang/Basic/DiagnosticSemaKinds.td
3154
NeHuang updated this revision to Diff 343743.May 7 2021, 12:53 PM

Addressed review comment for the diagnostic message and update the test cases.

NeHuang marked 2 inline comments as done.May 7 2021, 12:53 PM
nemanjai accepted this revision.May 10 2021, 4:10 AM

LGTM. Maybe give this a couple of days to see if any other reviewers have further input.

This revision is now accepted and ready to land.May 10 2021, 4:10 AM
aaron.ballman accepted this revision.May 10 2021, 8:37 AM

LGTM aside from the single quotes in the diagnostic.

clang/include/clang/Basic/DiagnosticDriverKinds.td
548

Can you also add the single quotes around the %0 so that the diagnostic is properly quoted?

clang/include/clang/Basic/DiagnosticSemaKinds.td
3154

Same here.

NeHuang updated this revision to Diff 344258.May 10 2021, 6:18 PM

Address review comment for the diagnostic message.

This revision was landed with ongoing or failed builds.May 11 2021, 3:22 PM
This revision was automatically updated to reflect the committed changes.