This revision was automatically updated to reflect the committed changes.
Closed by commit rC360207: [COFF] Use COFF stubs for extern_weak functions
(authored by rnk, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D61615?vs=198359=198558#toc
Repository:
rC Clang
CHANGES
rnk marked an inline comment as done.
rnk added a comment.
Thanks! I'll see about AArch64. It would be nice for this use of
`__attribute__((weak))` declarations to work there as well.
Comment at: llvm/test/CodeGen/X86/extern_weak.ll:20-21
+; DARWIN-LABEL: _bar:
+; DARWIN:
mstorsjo added a comment.
Ideally it'd be nice to have this consistent on arm and aarch64 as well, but
it's not a blocker (it's not something I'm running into so far).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61615/new/
smeenai accepted this revision.
smeenai added a comment.
LGTM, neat!
Comment at: llvm/test/CodeGen/X86/extern_weak.ll:20-21
+; DARWIN-LABEL: _bar:
+; DARWIN: cmpl $0, L_foo$non_lazy_ptr
+; DARWIN: jmp _foo ## TAILCALL
+
I'm not parsing this too well (it's not
mstorsjo accepted this revision.
mstorsjo added a comment.
This revision is now accepted and ready to land.
LGTM, it's nice if this mechanism comes in handy in other cases than the one it
was originally made for.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
rnk updated this revision to Diff 198359.
rnk added a comment.
- fix some tests
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61615/new/
https://reviews.llvm.org/D61615
Files:
clang/lib/CodeGen/CodeGenModule.cpp
rnk created this revision.
rnk added reviewers: smeenai, mstorsjo.
Herald added subscribers: cfe-commits, hiraditya.
Herald added projects: clang, LLVM.
A COFF stub indirects the reference to a symbol through memory. A
.refptr.$sym global variable pointer is created to refer to $sym.
Typically