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

Serge Pavlov via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 22:05:08 PST 2018


Interesting. You have created a patch that spans two repositories (llvm and
clang). I wonder how you could do it.
For review process probably it is better to split patch according to
repositories or at least add cfe-commits to subscribers.

Thanks,
--Serge

2018-01-25 12:04 GMT+07:00 Dan Gohman via Phabricator via llvm-commits <
llvm-commits at lists.llvm.org>:

> sunfish created this revision.
> Herald added subscribers: llvm-commits, aheejin, jgravelle-google,
> dschuff, jfb.
>
> This creates an attribute for specifying an explicit import module name
> for a function declaration. It also renames the default module import name
> from "env" to "__linker_resolve", which should be less likely to collide
> with other things, though I'm open to other suggestions.
>
> The expectation is that it's the linker's job to resolve symbols that have
> the default module name, so that they're either linked to a definition in
> the same resulting module, or to a definition in a separate module with
> two-level namespacing. Modules with non-default names should be left alone.
>
> It only applies to functions for now; we can generalize it for global
> variables later if needed.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D42520
>
> Files:
>   include/llvm/MC/MCSymbolWasm.h
>   lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp
>   lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.h
>   lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
>   test/CodeGen/WebAssembly/import-module.ll
>   test/MC/WebAssembly/comdat.ll
>   test/MC/WebAssembly/external-func-address.ll
>   test/MC/WebAssembly/global-ctor-dtor.ll
>   test/MC/WebAssembly/stack-ptr.ll
>   test/MC/WebAssembly/weak-alias.ll
>   test/MC/WebAssembly/weak.ll
>   tools/clang/include/clang/Basic/Attr.td
>   tools/clang/lib/CodeGen/TargetInfo.cpp
>   tools/clang/lib/Sema/SemaDeclAttr.cpp
>   tools/clang/test/CodeGen/wasm-import-module.c
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180125/6aa0b011/attachment.html>


More information about the llvm-commits mailing list