[lld] r221499 - [PECOFF] Improve subsystem inference

Rui Ueyama ruiu at google.com
Thu Nov 6 16:18:47 PST 2014


On Thu, Nov 6, 2014 at 4:16 PM, Shankar Easwaran <shankare at codeaurora.org>
wrote:

> It looks like the test passes /subsystem for all RUN lines, Am I missing
> something ?
>
> +
> +// Infers subsystem from entry point function name.
> +class InferSubsystemPass : public lld::Pass {
> +public:
> +  InferSubsystemPass(PECOFFLinkingContext &ctx) : _ctx(ctx) {}
> +
> +  void perform(std::unique_ptr<MutableFile> &file) override {
> +    if (_ctx.getSubsystem() != WindowsSubsystem::IMAGE_SUBSYSTEM_UNKNOWN)
> +      return;
> +
> +    if (_ctx.isDll()) {
> +      _ctx.setSubsystem(WindowsSubsystem::IMAGE_SUBSYSTEM_WINDOWS_GUI);
> +      return;
> +    }
> +
>
> You could not run through the pass if the subsystem is already known ?


This is what the first if statement for -- if the subsystem is already
known, it returns immediately.


>
>
> Shankar Easwaran
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by the Linux Foundation
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141106/49b29d7b/attachment.html>


More information about the llvm-commits mailing list