[PATCH] D68049: Propeller: Clang options for basic block sections
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 1 23:23:22 PDT 2020
MaskRay added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4858
+ if (Arg *A = Args.getLastArg(options::OPT_fbasicblock_sections_EQ)) {
+ CmdArgs.push_back(
----------------
If we want to pass the option verbatim, `A->render(Args, CmdArgs);`
However, we actually want (a convention) to catch the error at the driver level. So the value checking in Frontend/CompilerInvocation.cpp should be moved here.
(Note that you used `err_drv_invalid_value` in Frontend/CompilerInvocation.cpp . drv is short for driver)
================
Comment at: clang/test/CodeGen/basicblock-sections.c:35
+//
+// BB_WORLD: .section .text.world,"ax", at progbits
+// BB_WORLD: world
----------------
I haven't read through the previous threads whether we should use a .c -> .s test here. Assume we've decided to do that, `@progbits` should be followed by `{{$}}` to ensure there is no unique assembly linkage.
================
Comment at: clang/test/CodeGen/basicblock-sections.c:38
+// BB_WORLD: .section .text.world,"ax", at progbits,unique
+// BB_WORLD: a.BB.world
+// BB_WORLD: .section .text.another,"ax", at progbits
----------------
If `world` is followed by a colon, the colon should be added. The little detail will make it clear that this is a label.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68049/new/
https://reviews.llvm.org/D68049
More information about the cfe-commits
mailing list