[PATCH] D42520: Implement __attribute__((import_module("foo")))

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 08:34:45 PST 2018


ncw added a comment.

In https://reviews.llvm.org/D42520#988026, @sunfish wrote:

> Linking with ES modules. A tool could generate a C/C++ header file which declares functions provided by the ES module, which could use this attribute to set up the module name.
>
> And actually, thinking about both of these together, I think we should take this attribute a step further and include the fieldname, as in: `__attribute__((import("modulename", "fieldname")))` or so, because you may want to use a different fieldname than the C++ declaration name. I'll rework the patch along these lines.


That would make sense then. I don't suppose that there's any crossover with C++ modules is there?


Repository:
  rL LLVM

https://reviews.llvm.org/D42520





More information about the llvm-commits mailing list