================
@@ -105,6 +105,11 @@ def should_keep_microsoft_symbol(symbol,
calling_convention_decoration):
# Skip X86GenMnemonicTables functions, they are not exposed from
llvm/include/.
elif re.match(r"\?is[A-Z0-9]*@X86@llvm", symbol):
return None
+ # Keep Registry<T>::Head and Registry<T>::Tail static members for plugin
support.
+ # Pattern matches: ?Head@?$Registry@<template_args>@llvm@@ or
?Tail@?$Registry@...
+ elif ("?$Registry@" in symbol and "@llvm@@" in symbol and
+ (symbol.startswith("?Head@") or symbol.startswith("?Tail@"))):
+ return symbol
----------------
zmodem wrote:
Just targeting these two feels a bit hacky, but I suppose the alternative of
exporting all global variables might be too much.
Ideally we'd rely on the dllimport/export annotations (the plugin registry is
marked imported/exported here:)
https://github.com/llvm/llvm-project/blob/7bbb4a51035aa491313b1242a779d52fd12904c6/clang/include/clang/Frontend/FrontendPluginRegistry.h#L28
Can you check if your build might work without
`-DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON`?
https://github.com/llvm/llvm-project/pull/163391
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits