[PATCH] D97233: Support `#pragma clang section` directives on MachO targets

2021-02-25 Thread Jon Roelofs via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7f6e3316456f: Support `#pragma clang section` directives on MachO targets (authored by jroelofs). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D97233: Support `#pragma clang section` directives on MachO targets

2021-02-25 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover accepted this revision. t.p.northover added a comment. This revision is now accepted and ready to land. Thanks. I think it looks good too now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97233/new/ https://reviews.llvm.org/D97233 _

[PATCH] D97233: Support `#pragma clang section` directives on MachO targets

2021-02-24 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 326126. jroelofs added a comment. Mark section invalid if the target doesn't like how it's spelled. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97233/new/ https://reviews.llvm.org/D97233 Files: clang/incl

[PATCH] D97233: Support `#pragma clang section` directives on MachO targets

2021-02-24 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: clang/lib/Sema/SemaAttr.cpp:304 + if (llvm::Error E = Context.getTargetInfo().isValidSectionSpecifier(SecName)) +Diag(PragmaLoc, diag::err_pragma_section_invalid_for_target) t.p.northover wrote: > Shouldn't this

[PATCH] D97233: Support `#pragma clang section` directives on MachO targets

2021-02-24 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover added inline comments. Comment at: clang/lib/Sema/SemaAttr.cpp:304 + if (llvm::Error E = Context.getTargetInfo().isValidSectionSpecifier(SecName)) +Diag(PragmaLoc, diag::err_pragma_section_invalid_for_target) Shouldn't this block return so th

[PATCH] D97233: Support `#pragma clang section` directives on MachO targets

2021-02-23 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 325798. jroelofs added a comment. `git clang-format` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97233/new/ https://reviews.llvm.org/D97233 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/

[PATCH] D97233: Support `#pragma clang section` directives on MachO targets

2021-02-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. FWIW, the attribute bits look reasonable to me. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:3056 bool Sema::checkSectionName(SourceLocation LiteralLoc, StringRef SecName) { - std::string Error = Context.getTargetInfo().isValidSectionSpecifier(Se

[PATCH] D97233: Support `#pragma clang section` directives on MachO targets

2021-02-22 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 325599. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97233/new/ https://reviews.llvm.org/D97233 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/clang/Basic/TargetInfo.h clang/lib/Ba

[PATCH] D97233: Support `#pragma clang section` directives on MachO targets

2021-02-22 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: llvm/test/CodeGen/AArch64/clang-section-macho.ll:8 + +attributes #0 = { "implicit-section-name"="TEXT,mytext" } + `"__TEXT,__mytext"` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D97233: Support `#pragma clang section` directives on MachO targets

2021-02-22 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs created this revision. jroelofs added reviewers: t.p.northover, javed.absar, rogfer01. Herald added a subscriber: hiraditya. Herald added a reviewer: aaron.ballman. jroelofs requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-c