[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

Dustin L. Howett via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 7 23:29:41 PDT 2018


DHowett-MSFT added inline comments.


================
Comment at: lib/CodeGen/CGBlocks.cpp:1276
+    InitVar->setSection(".CRT$XCLa");
+    CGM.addUsedGlobal(InitVar);
+  }
----------------
rjmccall wrote:
> Is the priority system not good enough?
My reading of the LLVM language reference leads me to believe it’s only ordered per-module. If that’s the case, the benefit of emitting into `XC*` is that it provides guaranteed order over all linker input.

`llvm.global_ctors` excerpt:

> The functions referenced by this array will be called in ascending order of priority (i.e. lowest first) when the module is loaded.

Now if the priority system _is_ guaranteed over all linker input, will that guarantee hold for mixed Clang and CL objects?


Repository:
  rC Clang

https://reviews.llvm.org/D50144





More information about the cfe-commits mailing list