[lld] r221499 - [PECOFF] Improve subsystem inference
Shankar Easwaran
shankare at codeaurora.org
Thu Nov 6 16:16:50 PST 2014
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 ?
Shankar Easwaran
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
More information about the llvm-commits
mailing list