I need the comdat selection for PR40094. To keep the patch for that smaller, I'm adding it here, and as a first application I'm using it to reject associative comdats referring to earlier associative comdats. Depends on D56929; together with that all associative comdats referring to other associative comdats are now rejected.
Details
Diff Detail
Event Timeline
lld/COFF/InputFiles.cpp | ||
---|---|---|
229 | For lambdas only used locally within a function we normally use an implicit capture with [&]. | |
258 | Maybe move this inside readSection and do C->Selection = Def->Selection;? | |
lld/test/COFF/associative-comdat-order.s | ||
1 | (Sorry didn't notice this on your other patch) This isn't an assembly file, so the extension should be .test. |
lld/COFF/InputFiles.cpp | ||
---|---|---|
258 | That's a good suggestion, but Def->Selection is an uint8_t while C->Selection is a COMDATType. I could make readSection() do validation and error out if Def->Selection is something unknown, but in the upcoming patch for better Selection handling I need to do this validation long before I call readSection(), so I'd have to do it in two places then. So I figured setting it here is maybe easier? | |
lld/test/COFF/associative-comdat-order.s | ||
1 | Renamed in 352074. |
LGTM
lld/COFF/InputFiles.cpp | ||
---|---|---|
229 | nit: since this function reads associative comdat sections, Assoc in a variable name seems redundant. |
It looks like this change broke the windows bot:
http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/1030
For some reason the change isn't logged as one of the ones included in the build, but it was fetched (http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/1030/steps/svn-lld/logs/stdio) and built.
For lambdas only used locally within a function we normally use an implicit capture with [&].