[PATCH] D97233: Support `#pragma clang section` directives on MachO targets
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 23 05:01:48 PST 2021
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(SecName);
- if (!Error.empty()) {
- Diag(LiteralLoc, diag::err_attribute_section_invalid_for_target) << Error
+ if (llvm::Error E = Context.getTargetInfo().isValidSectionSpecifier(SecName)) {
+ Diag(LiteralLoc, diag::err_attribute_section_invalid_for_target)
----------------
Might as well fix the formatting issues.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97233/new/
https://reviews.llvm.org/D97233
More information about the cfe-commits
mailing list