This is an archive of the discontinued LLVM Phabricator instance.

Support `#pragma clang section` directives on MachO targets
ClosedPublic

Authored by jroelofs on Feb 22 2021, 3:16 PM.

Diff Detail

Event Timeline

jroelofs created this revision.Feb 22 2021, 3:16 PM
jroelofs requested review of this revision.Feb 22 2021, 3:16 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 22 2021, 3:16 PM
jroelofs added inline comments.Feb 22 2021, 3:21 PM
llvm/test/CodeGen/AArch64/clang-section-macho.ll
9

"__TEXT,__mytext"

jroelofs updated this revision to Diff 325599.Feb 22 2021, 3:32 PM

FWIW, the attribute bits look reasonable to me.

clang/lib/Sema/SemaDeclAttr.cpp
3056

Might as well fix the formatting issues.

jroelofs updated this revision to Diff 325798.Feb 23 2021, 8:02 AM

git clang-format

t.p.northover added inline comments.Feb 24 2021, 6:53 AM
clang/lib/Sema/SemaAttr.cpp
304

Shouldn't this block return so the section doesn't get marked as valid later?

jroelofs added inline comments.Feb 24 2021, 8:34 AM
clang/lib/Sema/SemaAttr.cpp
304

yes!

jroelofs updated this revision to Diff 326126.Feb 24 2021, 9:55 AM

Mark section invalid if the target doesn't like how it's spelled.

jroelofs marked 2 inline comments as done.Feb 24 2021, 10:10 AM
t.p.northover accepted this revision.Feb 25 2021, 3:04 AM

Thanks. I think it looks good too now.

This revision is now accepted and ready to land.Feb 25 2021, 3:04 AM
This revision was landed with ongoing or failed builds.Feb 25 2021, 9:31 AM
This revision was automatically updated to reflect the committed changes.