[PATCH] D61615: [COFF] Use COFF stubs for extern_weak functions
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 6 15:36:27 PDT 2019
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 mingw uses these for external global variable declarations,
but we can use them for weak function declarations as well.
Updates the dso_local classification to add a special case for
extern_weak symbols on COFF in both clang and LLVM.
Fixes PR37598
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D61615
Files:
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/CodeGen/dso-local-executable.c
llvm/lib/Target/TargetMachine.cpp
llvm/lib/Target/X86/X86FastISel.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86Subtarget.cpp
llvm/test/CodeGen/X86/extern_weak.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61615.198355.patch
Type: text/x-patch
Size: 7167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190506/41b03d54/attachment.bin>
More information about the cfe-commits
mailing list