[llvm] r362990 - CMake: Make most target symbols hidden by default
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 10 16:47:15 PDT 2019
On 06/10/2019 04:37 PM, Eric Christopher wrote:
> This seems like it's causing some additional issues. I did a fresh
> cmake+rebuild and:
>
> ld: warning: direct access in function
> 'llvm::createX86SpeculativeLoadHardeningPass()' from file
> 'lib/libLLVMX86CodeGen.a(X86SpeculativeLoadHardening.cpp.o)' to global
> weak symbol 'void std::__1::__call_once_proxy<std::__1::tuple<void*
> (&)(llvm::PassRegistry&),
> std::__1::reference_wrapper<llvm::PassRegistry>&&> >(void*)' from file
> 'lib/libLLVMInstrumentation.a(GCOVProfiling.cpp.o)' means the weak
> symbol cannot be overridden at runtime. This was likely caused by
> different translation units being compiled with different visibility
> settings.
> ld: warning: direct access in function 'llvm::Pass*
> llvm::callDefaultCtor<(anonymous
> namespace)::X86SpeculativeLoadHardeningPass>()' from file
> 'lib/libLLVMX86CodeGen.a(X86SpeculativeLoadHardening.cpp.o)' to global
> weak symbol 'void std::__1::__call_once_proxy<std::__1::tuple<void*
> (&)(llvm::PassRegistry&),
> std::__1::reference_wrapper<llvm::PassRegistry>&&> >(void*)' from file
> 'lib/libLLVMInstrumentation.a(GCOVProfiling.cpp.o)' means the weak
> symbol cannot be overridden at runtime. This was likely caused by
> different translation units being compiled with different visibility
> settings.
>
> on osx.
>
> /Applications/CMake.app/Contents/bin/cmake
> -DCMAKE_INSTALL_PREFIX=$HOME/installs/install-latest-clang-development
> -G Ninja -DLLVM_ENABLE_WERROR:BOOL=true
> -DLLVM_BUILD_EXAMPLES:BOOL=true -DCMAKE_BUILD_TYPE=Release
> -DLLVM_OPTIMIZED_TABLEGEN=On -DLLVM_ENABLE_ASSERTIONS=True
> -DLLVM_ENABLE_PROJECTS='llvm;clang;clang-tools-extra'
> $HOME/sources/llvm-project/llvm
>
> as my cmake build.
>
> Thoughts?
>
I'm looking at this now to see if I can reproduce.
-Tom
> -eric
>
> On Mon, Jun 10, 2019 at 3:09 PM Tom Stellard via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>>
>> Author: tstellar
>> Date: Mon Jun 10 15:12:56 2019
>> New Revision: 362990
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=362990&view=rev
>> Log:
>> CMake: Make most target symbols hidden by default
>>
>> Summary:
>> For builds with LLVM_BUILD_LLVM_DYLIB=ON and BUILD_SHARED_LIBS=OFF
>> this change makes all symbols in the target specific libraries hidden
>> by default.
>>
>> A new macro called LLVM_EXTERNAL_VISIBILITY has been added to mark symbols in these
>> libraries public, which is mainly needed for the definitions of the
>> LLVMInitialize* functions.
>>
>> This patch reduces the number of public symbols in libLLVM.so by about
>> 25%. This should improve load times for the dynamic library and also
>> make abi checker tools, like abidiff require less memory when analyzing
>> libLLVM.so
>>
>> One side-effect of this change is that for builds with
>> LLVM_BUILD_LLVM_DYLIB=ON and LLVM_LINK_LLVM_DYLIB=ON some unittests that
>> access symbols that are no longer public will need to be statically linked.
>>
>> Before and after public symbol counts (using gcc 8.2.1, ld.bfd 2.31.1):
>> nm before/libLLVM-9svn.so | grep ' [A-Zuvw] ' | wc -l
>> 36221
>> nm after/libLLVM-9svn.so | grep ' [A-Zuvw] ' | wc -l
>> 26278
>>
>> Reviewers: chandlerc, beanz, mgorny, rnk, hans
>>
>> Reviewed By: rnk, hans
>>
>> Subscribers: Jim, hiraditya, michaelplatings, chapuni, jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, javed.absar, sbc100, jgravelle-google, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, mgrang, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, kristina, jsji, llvm-commits
>>
>> Tags: #llvm
>>
>> Differential Revision: https://reviews.llvm.org/D54439
>>
>> Modified:
>> llvm/trunk/include/llvm/Support/Compiler.h
>> llvm/trunk/lib/Target/AArch64/AArch64AsmPrinter.cpp
>> llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp
>> llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
>> llvm/trunk/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
>> llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
>> llvm/trunk/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp
>> llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
>> llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
>> llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
>> llvm/trunk/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
>> llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp
>> llvm/trunk/lib/Target/AMDGPU/TargetInfo/AMDGPUTargetInfo.cpp
>> llvm/trunk/lib/Target/ARC/ARCAsmPrinter.cpp
>> llvm/trunk/lib/Target/ARC/ARCTargetMachine.cpp
>> llvm/trunk/lib/Target/ARC/Disassembler/ARCDisassembler.cpp
>> llvm/trunk/lib/Target/ARC/MCTargetDesc/ARCMCTargetDesc.cpp
>> llvm/trunk/lib/Target/ARC/TargetInfo/ARCTargetInfo.cpp
>> llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
>> llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp
>> llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
>> llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
>> llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
>> llvm/trunk/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp
>> llvm/trunk/lib/Target/AVR/AVRAsmPrinter.cpp
>> llvm/trunk/lib/Target/AVR/AVRTargetMachine.cpp
>> llvm/trunk/lib/Target/AVR/AsmParser/AVRAsmParser.cpp
>> llvm/trunk/lib/Target/AVR/Disassembler/AVRDisassembler.cpp
>> llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp
>> llvm/trunk/lib/Target/AVR/TargetInfo/AVRTargetInfo.cpp
>> llvm/trunk/lib/Target/BPF/AsmParser/BPFAsmParser.cpp
>> llvm/trunk/lib/Target/BPF/BPFAsmPrinter.cpp
>> llvm/trunk/lib/Target/BPF/BPFTargetMachine.cpp
>> llvm/trunk/lib/Target/BPF/Disassembler/BPFDisassembler.cpp
>> llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp
>> llvm/trunk/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp
>> llvm/trunk/lib/Target/CMakeLists.txt
>> llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp
>> llvm/trunk/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp
>> llvm/trunk/lib/Target/Hexagon/HexagonAsmPrinter.cpp
>> llvm/trunk/lib/Target/Hexagon/HexagonTargetMachine.cpp
>> llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
>> llvm/trunk/lib/Target/Hexagon/TargetInfo/HexagonTargetInfo.cpp
>> llvm/trunk/lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp
>> llvm/trunk/lib/Target/Lanai/Disassembler/LanaiDisassembler.cpp
>> llvm/trunk/lib/Target/Lanai/LanaiAsmPrinter.cpp
>> llvm/trunk/lib/Target/Lanai/LanaiTargetMachine.cpp
>> llvm/trunk/lib/Target/Lanai/MCTargetDesc/LanaiMCTargetDesc.cpp
>> llvm/trunk/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp
>> llvm/trunk/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp
>> llvm/trunk/lib/Target/MSP430/Disassembler/MSP430Disassembler.cpp
>> llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp
>> llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp
>> llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp
>> llvm/trunk/lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp
>> llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
>> llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp
>> llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
>> llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
>> llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp
>> llvm/trunk/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp
>> llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp
>> llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
>> llvm/trunk/lib/Target/NVPTX/NVPTXTargetMachine.cpp
>> llvm/trunk/lib/Target/NVPTX/TargetInfo/NVPTXTargetInfo.cpp
>> llvm/trunk/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
>> llvm/trunk/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
>> llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
>> llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
>> llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
>> llvm/trunk/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp
>> llvm/trunk/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
>> llvm/trunk/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
>> llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp
>> llvm/trunk/lib/Target/RISCV/RISCVAsmPrinter.cpp
>> llvm/trunk/lib/Target/RISCV/RISCVTargetMachine.cpp
>> llvm/trunk/lib/Target/RISCV/TargetInfo/RISCVTargetInfo.cpp
>> llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
>> llvm/trunk/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp
>> llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp
>> llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp
>> llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp
>> llvm/trunk/lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp
>> llvm/trunk/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
>> llvm/trunk/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp
>> llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
>> llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp
>> llvm/trunk/lib/Target/SystemZ/SystemZTargetMachine.cpp
>> llvm/trunk/lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp
>> llvm/trunk/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
>> llvm/trunk/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
>> llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
>> llvm/trunk/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp
>> llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
>> llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
>> llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
>> llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp
>> llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
>> llvm/trunk/lib/Target/X86/TargetInfo/X86TargetInfo.cpp
>> llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp
>> llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
>> llvm/trunk/lib/Target/XCore/Disassembler/XCoreDisassembler.cpp
>> llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp
>> llvm/trunk/lib/Target/XCore/TargetInfo/XCoreTargetInfo.cpp
>> llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp
>> llvm/trunk/lib/Target/XCore/XCoreTargetMachine.cpp
>> llvm/trunk/unittests/CMakeLists.txt
>> llvm/trunk/unittests/Target/AArch64/CMakeLists.txt
>> llvm/trunk/unittests/Target/WebAssembly/CMakeLists.txt
>> llvm/trunk/unittests/tools/llvm-exegesis/AArch64/CMakeLists.txt
>> llvm/trunk/unittests/tools/llvm-exegesis/ARM/CMakeLists.txt
>> llvm/trunk/unittests/tools/llvm-exegesis/PowerPC/CMakeLists.txt
>> llvm/trunk/unittests/tools/llvm-exegesis/X86/CMakeLists.txt
>> llvm/trunk/utils/unittest/CMakeLists.txt
>>
>> Modified: llvm/trunk/include/llvm/Support/Compiler.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/include/llvm/Support/Compiler.h (original)
>> +++ llvm/trunk/include/llvm/Support/Compiler.h Mon Jun 10 15:12:56 2019
>> @@ -100,11 +100,17 @@
>> /// not accessible from outside it. Can also be used to mark variables and
>> /// functions, making them private to any shared library they are linked into.
>> /// On PE/COFF targets, library visibility is the default, so this isn't needed.
>> +///
>> +/// LLVM_EXTERNAL_VISIBILITY - classes, functions, and variables marked with this
>> +/// attribute will be made public and visible outside of any shared library they
>> +/// are linked in to.
>> #if (__has_attribute(visibility) || LLVM_GNUC_PREREQ(4, 0, 0)) && \
>> !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(_WIN32)
>> #define LLVM_LIBRARY_VISIBILITY __attribute__ ((visibility("hidden")))
>> +#define LLVM_EXTERNAL_VISIBILITY __attribute__ ((visibility("default")))
>> #else
>> #define LLVM_LIBRARY_VISIBILITY
>> +#define LLVM_EXTERNAL_VISIBLITY
>> #endif
>>
>> #if defined(__GNUC__)
>>
>> Modified: llvm/trunk/lib/Target/AArch64/AArch64AsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64AsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AArch64/AArch64AsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/AArch64/AArch64AsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -1129,7 +1129,7 @@ void AArch64AsmPrinter::EmitInstruction(
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeAArch64AsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAArch64AsmPrinter() {
>> RegisterAsmPrinter<AArch64AsmPrinter> X(getTheAArch64leTarget());
>> RegisterAsmPrinter<AArch64AsmPrinter> Y(getTheAArch64beTarget());
>> RegisterAsmPrinter<AArch64AsmPrinter> Z(getTheARM64Target());
>>
>> Modified: llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -152,7 +152,7 @@ static cl::opt<bool>
>> cl::desc("Enable the AAcrh64 branch target pass"),
>> cl::init(true));
>>
>> -extern "C" void LLVMInitializeAArch64Target() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAArch64Target() {
>> // Register the target.
>> RegisterTargetMachine<AArch64leTargetMachine> X(getTheAArch64leTarget());
>> RegisterTargetMachine<AArch64beTargetMachine> Y(getTheAArch64beTarget());
>>
>> Modified: llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -5514,7 +5514,7 @@ AArch64AsmParser::classifySymbolRef(cons
>> }
>>
>> /// Force static initialization.
>> -extern "C" void LLVMInitializeAArch64AsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAArch64AsmParser() {
>> RegisterMCAsmParser<AArch64AsmParser> X(getTheAArch64leTarget());
>> RegisterMCAsmParser<AArch64AsmParser> Y(getTheAArch64beTarget());
>> RegisterMCAsmParser<AArch64AsmParser> Z(getTheARM64Target());
>>
>> Modified: llvm/trunk/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -278,7 +278,7 @@ createAArch64ExternalSymbolizer(const Tr
>> SymbolLookUp, DisInfo);
>> }
>>
>> -extern "C" void LLVMInitializeAArch64Disassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAArch64Disassembler() {
>> TargetRegistry::RegisterMCDisassembler(getTheAArch64leTarget(),
>> createAArch64Disassembler);
>> TargetRegistry::RegisterMCDisassembler(getTheAArch64beTarget(),
>>
>> Modified: llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -365,7 +365,7 @@ static MCInstrAnalysis *createAArch64Ins
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeAArch64TargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAArch64TargetMC() {
>> for (Target *T : {&getTheAArch64leTarget(), &getTheAArch64beTarget(),
>> &getTheAArch64_32Target(), &getTheARM64Target(),
>> &getTheARM64_32Target()}) {
>>
>> Modified: llvm/trunk/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -31,7 +31,7 @@ Target &llvm::getTheARM64_32Target() {
>> return TheARM64_32Target;
>> }
>>
>> -extern "C" void LLVMInitializeAArch64TargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAArch64TargetInfo() {
>> // Now register the "arm64" name for use with "-march". We don't want it to
>> // take possession of the Triple::aarch64 tags though.
>> TargetRegistry::RegisterTarget(getTheARM64Target(), "arm64",
>>
>> Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -91,7 +91,7 @@ createAMDGPUAsmPrinterPass(TargetMachine
>> return new AMDGPUAsmPrinter(tm, std::move(Streamer));
>> }
>>
>> -extern "C" void LLVMInitializeAMDGPUAsmPrinter() {
>> +extern "C" void LLVM_EXTERNAL_VISIBILITY LLVMInitializeAMDGPUAsmPrinter() {
>> TargetRegistry::RegisterAsmPrinter(getTheAMDGPUTarget(),
>> llvm::createR600AsmPrinterPass);
>> TargetRegistry::RegisterAsmPrinter(getTheGCNTarget(),
>>
>> Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -182,7 +182,7 @@ static cl::opt<bool> EnableScalarIRPasse
>> cl::init(true),
>> cl::Hidden);
>>
>> -extern "C" void LLVMInitializeAMDGPUTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUTarget() {
>> // Register the target
>> RegisterTargetMachine<R600TargetMachine> X(getTheAMDGPUTarget());
>> RegisterTargetMachine<GCNTargetMachine> Y(getTheGCNTarget());
>>
>> Modified: llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -6404,7 +6404,7 @@ void AMDGPUAsmParser::cvtSDWA(MCInst &In
>> }
>>
>> /// Force static initialization.
>> -extern "C" void LLVMInitializeAMDGPUAsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUAsmParser() {
>> RegisterMCAsmParser<AMDGPUAsmParser> A(getTheAMDGPUTarget());
>> RegisterMCAsmParser<AMDGPUAsmParser> B(getTheGCNTarget());
>> }
>>
>> Modified: llvm/trunk/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -1091,7 +1091,7 @@ static MCDisassembler *createAMDGPUDisas
>> return new AMDGPUDisassembler(STI, Ctx, T.createMCInstrInfo());
>> }
>>
>> -extern "C" void LLVMInitializeAMDGPUDisassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUDisassembler() {
>> TargetRegistry::RegisterMCDisassembler(getTheGCNTarget(),
>> createAMDGPUDisassembler);
>> TargetRegistry::RegisterMCSymbolizer(getTheGCNTarget(),
>>
>> Modified: llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -134,7 +134,7 @@ static MCInstrAnalysis *createAMDGPUMCIn
>> return new AMDGPUMCInstrAnalysis(Info);
>> }
>>
>> -extern "C" void LLVMInitializeAMDGPUTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUTargetMC() {
>>
>> TargetRegistry::RegisterMCInstrInfo(getTheGCNTarget(), createAMDGPUMCInstrInfo);
>> TargetRegistry::RegisterMCInstrInfo(getTheAMDGPUTarget(), createR600MCInstrInfo);
>>
>> Modified: llvm/trunk/lib/Target/AMDGPU/TargetInfo/AMDGPUTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/TargetInfo/AMDGPUTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AMDGPU/TargetInfo/AMDGPUTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/AMDGPU/TargetInfo/AMDGPUTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -28,7 +28,7 @@ Target &llvm::getTheGCNTarget() {
>> }
>>
>> /// Extern function to initialize the targets for the AMDGPU backend
>> -extern "C" void LLVMInitializeAMDGPUTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUTargetInfo() {
>> RegisterTarget<Triple::r600, false> R600(getTheAMDGPUTarget(), "r600",
>> "AMD GPUs HD2XXX-HD6XXX", "AMDGPU");
>> RegisterTarget<Triple::amdgcn, false> GCN(getTheGCNTarget(), "amdgcn",
>>
>> Modified: llvm/trunk/lib/Target/ARC/ARCAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARC/ARCAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARC/ARCAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/ARC/ARCAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -62,6 +62,6 @@ void ARCAsmPrinter::EmitInstruction(cons
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeARCAsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARCAsmPrinter() {
>> RegisterAsmPrinter<ARCAsmPrinter> X(getTheARCTarget());
>> }
>>
>> Modified: llvm/trunk/lib/Target/ARC/ARCTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARC/ARCTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARC/ARCTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/ARC/ARCTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -81,7 +81,7 @@ void ARCPassConfig::addPreRegAlloc() {
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeARCTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARCTarget() {
>> RegisterTargetMachine<ARCTargetMachine> X(getTheARCTarget());
>> }
>>
>>
>> Modified: llvm/trunk/lib/Target/ARC/Disassembler/ARCDisassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARC/Disassembler/ARCDisassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARC/Disassembler/ARCDisassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/ARC/Disassembler/ARCDisassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -365,7 +365,7 @@ static MCDisassembler *createARCDisassem
>> return new ARCDisassembler(STI, Ctx, T.createMCInstrInfo());
>> }
>>
>> -extern "C" void LLVMInitializeARCDisassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARCDisassembler() {
>> // Register the disassembler.
>> TargetRegistry::RegisterMCDisassembler(getTheARCTarget(),
>> createARCDisassembler);
>>
>> Modified: llvm/trunk/lib/Target/ARC/MCTargetDesc/ARCMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARC/MCTargetDesc/ARCMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARC/MCTargetDesc/ARCMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/ARC/MCTargetDesc/ARCMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -81,7 +81,7 @@ static MCTargetStreamer *createTargetAsm
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeARCTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARCTargetMC() {
>> // Register the MC asm info.
>> Target &TheARCTarget = getTheARCTarget();
>> RegisterMCAsmInfoFn X(TheARCTarget, createARCMCAsmInfo);
>>
>> Modified: llvm/trunk/lib/Target/ARC/TargetInfo/ARCTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARC/TargetInfo/ARCTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARC/TargetInfo/ARCTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/ARC/TargetInfo/ARCTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -16,6 +16,6 @@ Target &llvm::getTheARCTarget() {
>> return TheARCTarget;
>> }
>>
>> -extern "C" void LLVMInitializeARCTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARCTargetInfo() {
>> RegisterTarget<Triple::arc> X(getTheARCTarget(), "arc", "ARC", "ARC");
>> }
>>
>> Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -2066,7 +2066,7 @@ void ARMAsmPrinter::EmitInstruction(cons
>> //===----------------------------------------------------------------------===//
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeARMAsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARMAsmPrinter() {
>> RegisterAsmPrinter<ARMAsmPrinter> X(getTheARMLETarget());
>> RegisterAsmPrinter<ARMAsmPrinter> Y(getTheARMBETarget());
>> RegisterAsmPrinter<ARMAsmPrinter> A(getTheThumbLETarget());
>>
>> Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -78,7 +78,7 @@ namespace llvm {
>> void initializeARMExecutionDomainFixPass(PassRegistry&);
>> }
>>
>> -extern "C" void LLVMInitializeARMTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARMTarget() {
>> // Register the target.
>> RegisterTargetMachine<ARMLETargetMachine> X(getTheARMLETarget());
>> RegisterTargetMachine<ARMLETargetMachine> A(getTheThumbLETarget());
>>
>> Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -10390,7 +10390,7 @@ bool ARMAsmParser::parseDirectiveThumbSe
>> }
>>
>> /// Force static initialization.
>> -extern "C" void LLVMInitializeARMAsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARMAsmParser() {
>> RegisterMCAsmParser<ARMAsmParser> X(getTheARMLETarget());
>> RegisterMCAsmParser<ARMAsmParser> Y(getTheARMBETarget());
>> RegisterMCAsmParser<ARMAsmParser> A(getTheThumbLETarget());
>>
>> Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -874,7 +874,7 @@ DecodeStatus ThumbDisassembler::getInstr
>> return MCDisassembler::Fail;
>> }
>>
>> -extern "C" void LLVMInitializeARMDisassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARMDisassembler() {
>> TargetRegistry::RegisterMCDisassembler(getTheARMLETarget(),
>> createARMDisassembler);
>> TargetRegistry::RegisterMCDisassembler(getTheARMBETarget(),
>>
>> Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -300,7 +300,7 @@ static MCInstrAnalysis *createThumbMCIns
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeARMTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARMTargetMC() {
>> for (Target *T : {&getTheARMLETarget(), &getTheARMBETarget(),
>> &getTheThumbLETarget(), &getTheThumbBETarget()}) {
>> // Register the MC asm info.
>>
>> Modified: llvm/trunk/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -27,7 +27,7 @@ Target &llvm::getTheThumbBETarget() {
>> return TheThumbBETarget;
>> }
>>
>> -extern "C" void LLVMInitializeARMTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARMTargetInfo() {
>> RegisterTarget<Triple::arm, /*HasJIT=*/true> X(getTheARMLETarget(), "arm",
>> "ARM", "ARM");
>> RegisterTarget<Triple::armeb, /*HasJIT=*/true> Y(getTheARMBETarget(), "armeb",
>>
>> Modified: llvm/trunk/lib/Target/AVR/AVRAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/AVRAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AVR/AVRAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/AVR/AVRAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -178,7 +178,7 @@ void AVRAsmPrinter::EmitInstruction(cons
>>
>> } // end of namespace llvm
>>
>> -extern "C" void LLVMInitializeAVRAsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAVRAsmPrinter() {
>> llvm::RegisterAsmPrinter<llvm::AVRAsmPrinter> X(llvm::getTheAVRTarget());
>> }
>>
>>
>> Modified: llvm/trunk/lib/Target/AVR/AVRTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/AVRTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AVR/AVRTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/AVR/AVRTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -76,7 +76,7 @@ TargetPassConfig *AVRTargetMachine::crea
>> return new AVRPassConfig(*this, PM);
>> }
>>
>> -extern "C" void LLVMInitializeAVRTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAVRTarget() {
>> // Register the target.
>> RegisterTargetMachine<AVRTargetMachine> X(getTheAVRTarget());
>>
>>
>> Modified: llvm/trunk/lib/Target/AVR/AsmParser/AVRAsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/AsmParser/AVRAsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AVR/AsmParser/AVRAsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/AVR/AsmParser/AVRAsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -682,7 +682,7 @@ bool AVRAsmParser::parseLiteralValues(un
>> return (parseMany(parseOne));
>> }
>>
>> -extern "C" void LLVMInitializeAVRAsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAVRAsmParser() {
>> RegisterMCAsmParser<AVRAsmParser> X(getTheAVRTarget());
>> }
>>
>>
>> Modified: llvm/trunk/lib/Target/AVR/Disassembler/AVRDisassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/Disassembler/AVRDisassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AVR/Disassembler/AVRDisassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/AVR/Disassembler/AVRDisassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -52,7 +52,7 @@ static MCDisassembler *createAVRDisassem
>> }
>>
>>
>> -extern "C" void LLVMInitializeAVRDisassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAVRDisassembler() {
>> // Register the disassembler.
>> TargetRegistry::RegisterMCDisassembler(getTheAVRTarget(),
>> createAVRDisassembler);
>>
>> Modified: llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -89,7 +89,7 @@ static MCTargetStreamer *createMCAsmTarg
>> return new AVRTargetAsmStreamer(S);
>> }
>>
>> -extern "C" void LLVMInitializeAVRTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAVRTargetMC() {
>> // Register the MC asm info.
>> RegisterMCAsmInfo<AVRMCAsmInfo> X(getTheAVRTarget());
>>
>>
>> Modified: llvm/trunk/lib/Target/AVR/TargetInfo/AVRTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/TargetInfo/AVRTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/AVR/TargetInfo/AVRTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/AVR/TargetInfo/AVRTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -15,7 +15,7 @@ Target &getTheAVRTarget() {
>> }
>> }
>>
>> -extern "C" void LLVMInitializeAVRTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAVRTargetInfo() {
>> llvm::RegisterTarget<llvm::Triple::avr> X(llvm::getTheAVRTarget(), "avr",
>> "Atmel AVR Microcontroller", "AVR");
>> }
>>
>> Modified: llvm/trunk/lib/Target/BPF/AsmParser/BPFAsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/AsmParser/BPFAsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/BPF/AsmParser/BPFAsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/BPF/AsmParser/BPFAsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -493,7 +493,7 @@ bool BPFAsmParser::ParseInstruction(Pars
>>
>> bool BPFAsmParser::ParseDirective(AsmToken DirectiveID) { return true; }
>>
>> -extern "C" void LLVMInitializeBPFAsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeBPFAsmParser() {
>> RegisterMCAsmParser<BPFAsmParser> X(getTheBPFTarget());
>> RegisterMCAsmParser<BPFAsmParser> Y(getTheBPFleTarget());
>> RegisterMCAsmParser<BPFAsmParser> Z(getTheBPFbeTarget());
>>
>> Modified: llvm/trunk/lib/Target/BPF/BPFAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/BPFAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/BPF/BPFAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/BPF/BPFAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -142,7 +142,7 @@ void BPFAsmPrinter::EmitInstruction(cons
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeBPFAsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeBPFAsmPrinter() {
>> RegisterAsmPrinter<BPFAsmPrinter> X(getTheBPFleTarget());
>> RegisterAsmPrinter<BPFAsmPrinter> Y(getTheBPFbeTarget());
>> RegisterAsmPrinter<BPFAsmPrinter> Z(getTheBPFTarget());
>>
>> Modified: llvm/trunk/lib/Target/BPF/BPFTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/BPFTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/BPF/BPFTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/BPF/BPFTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -27,7 +27,7 @@ static cl::
>> opt<bool> DisableMIPeephole("disable-bpf-peephole", cl::Hidden,
>> cl::desc("Disable machine peepholes for BPF"));
>>
>> -extern "C" void LLVMInitializeBPFTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeBPFTarget() {
>> // Register the target.
>> RegisterTargetMachine<BPFTargetMachine> X(getTheBPFleTarget());
>> RegisterTargetMachine<BPFTargetMachine> Y(getTheBPFbeTarget());
>>
>> Modified: llvm/trunk/lib/Target/BPF/Disassembler/BPFDisassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/Disassembler/BPFDisassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/BPF/Disassembler/BPFDisassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/BPF/Disassembler/BPFDisassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -84,7 +84,7 @@ static MCDisassembler *createBPFDisassem
>> }
>>
>>
>> -extern "C" void LLVMInitializeBPFDisassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeBPFDisassembler() {
>> // Register the disassembler.
>> TargetRegistry::RegisterMCDisassembler(getTheBPFTarget(),
>> createBPFDisassembler);
>>
>> Modified: llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -97,7 +97,7 @@ static MCInstrAnalysis *createBPFInstrAn
>> return new BPFMCInstrAnalysis(Info);
>> }
>>
>> -extern "C" void LLVMInitializeBPFTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeBPFTargetMC() {
>> for (Target *T :
>> {&getTheBPFleTarget(), &getTheBPFbeTarget(), &getTheBPFTarget()}) {
>> // Register the MC asm info.
>>
>> Modified: llvm/trunk/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -24,7 +24,7 @@ Target &llvm::getTheBPFTarget() {
>> return TheBPFTarget;
>> }
>>
>> -extern "C" void LLVMInitializeBPFTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeBPFTargetInfo() {
>> TargetRegistry::RegisterTarget(getTheBPFTarget(), "bpf", "BPF (host endian)",
>> "BPF", [](Triple::ArchType) { return false; },
>> true);
>>
>> Modified: llvm/trunk/lib/Target/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CMakeLists.txt?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/CMakeLists.txt (original)
>> +++ llvm/trunk/lib/Target/CMakeLists.txt Mon Jun 10 15:12:56 2019
>> @@ -13,6 +13,14 @@ add_llvm_library(LLVMTarget
>> ${LLVM_MAIN_INCLUDE_DIR}/llvm/Target
>> )
>>
>> +# When building shared objects for each target there are some internal APIs
>> +# that are used across shared objects which we can't hide.
>> +if (NOT BUILD_SHARED_LIBS)
>> + # Set default visibility to hidden, so we don't export all the Target classes
>> + # in libLLVM.so.
>> + set(CMAKE_CXX_VISIBILITY_PRESET hidden)
>> +endif()
>> +
>> foreach(t ${LLVM_TARGETS_TO_BUILD})
>> message(STATUS "Targeting ${t}")
>> add_subdirectory(${t})
>>
>> Modified: llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -813,10 +813,10 @@ bool HexagonAsmParser::RegisterMatchesAr
>> return true;
>> }
>>
>> -// extern "C" void LLVMInitializeHexagonAsmLexer();
>> +// extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeHexagonAsmLexer();
>>
>> /// Force static initialization.
>> -extern "C" void LLVMInitializeHexagonAsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeHexagonAsmParser() {
>> RegisterMCAsmParser<HexagonAsmParser> X(getTheHexagonTarget());
>> }
>>
>>
>> Modified: llvm/trunk/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -158,7 +158,7 @@ static MCDisassembler *createHexagonDisa
>> return new HexagonDisassembler(STI, Ctx, T.createMCInstrInfo());
>> }
>>
>> -extern "C" void LLVMInitializeHexagonDisassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeHexagonDisassembler() {
>> TargetRegistry::RegisterMCDisassembler(getTheHexagonTarget(),
>> createHexagonDisassembler);
>> }
>>
>> Modified: llvm/trunk/lib/Target/Hexagon/HexagonAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Hexagon/HexagonAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/Hexagon/HexagonAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -771,6 +771,6 @@ void HexagonAsmPrinter::EmitInstruction(
>> OutStreamer->EmitInstruction(MCB, getSubtargetInfo());
>> }
>>
>> -extern "C" void LLVMInitializeHexagonAsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeHexagonAsmPrinter() {
>> RegisterAsmPrinter<HexagonAsmPrinter> X(getTheHexagonTarget());
>> }
>>
>> Modified: llvm/trunk/lib/Target/Hexagon/HexagonTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Hexagon/HexagonTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/Hexagon/HexagonTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -180,7 +180,7 @@ static Reloc::Model getEffectiveRelocMod
>> return *RM;
>> }
>>
>> -extern "C" void LLVMInitializeHexagonTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeHexagonTarget() {
>> // Register the target.
>> RegisterTargetMachine<HexagonTargetMachine> X(getTheHexagonTarget());
>>
>>
>> Modified: llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -456,7 +456,7 @@ static MCInstrAnalysis *createHexagonMCI
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeHexagonTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeHexagonTargetMC() {
>> // Register the MC asm info.
>> RegisterMCAsmInfoFn X(getTheHexagonTarget(), createHexagonMCAsmInfo);
>>
>>
>> Modified: llvm/trunk/lib/Target/Hexagon/TargetInfo/HexagonTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/TargetInfo/HexagonTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Hexagon/TargetInfo/HexagonTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/Hexagon/TargetInfo/HexagonTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -15,7 +15,7 @@ Target &llvm::getTheHexagonTarget() {
>> return TheHexagonTarget;
>> }
>>
>> -extern "C" void LLVMInitializeHexagonTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeHexagonTargetInfo() {
>> RegisterTarget<Triple::hexagon, /*HasJIT=*/true> X(
>> getTheHexagonTarget(), "hexagon", "Hexagon", "Hexagon");
>> }
>>
>> Modified: llvm/trunk/lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -1223,6 +1223,6 @@ bool LanaiAsmParser::ParseInstruction(Pa
>> #define GET_MATCHER_IMPLEMENTATION
>> #include "LanaiGenAsmMatcher.inc"
>>
>> -extern "C" void LLVMInitializeLanaiAsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeLanaiAsmParser() {
>> RegisterMCAsmParser<LanaiAsmParser> x(getTheLanaiTarget());
>> }
>>
>> Modified: llvm/trunk/lib/Target/Lanai/Disassembler/LanaiDisassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/Disassembler/LanaiDisassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Lanai/Disassembler/LanaiDisassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/Lanai/Disassembler/LanaiDisassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -36,7 +36,7 @@ static MCDisassembler *createLanaiDisass
>> return new LanaiDisassembler(STI, Ctx);
>> }
>>
>> -extern "C" void LLVMInitializeLanaiDisassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeLanaiDisassembler() {
>> // Register the disassembler
>> TargetRegistry::RegisterMCDisassembler(getTheLanaiTarget(),
>> createLanaiDisassembler);
>>
>> Modified: llvm/trunk/lib/Target/Lanai/LanaiAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/LanaiAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Lanai/LanaiAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/Lanai/LanaiAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -237,6 +237,6 @@ bool LanaiAsmPrinter::isBlockOnlyReachab
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeLanaiAsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeLanaiAsmPrinter() {
>> RegisterAsmPrinter<LanaiAsmPrinter> X(getTheLanaiTarget());
>> }
>>
>> Modified: llvm/trunk/lib/Target/Lanai/LanaiTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/LanaiTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Lanai/LanaiTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/Lanai/LanaiTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -30,7 +30,7 @@ namespace llvm {
>> void initializeLanaiMemAluCombinerPass(PassRegistry &);
>> } // namespace llvm
>>
>> -extern "C" void LLVMInitializeLanaiTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeLanaiTarget() {
>> // Register the target.
>> RegisterTargetMachine<LanaiTargetMachine> registered_target(
>> getTheLanaiTarget());
>>
>> Modified: llvm/trunk/lib/Target/Lanai/MCTargetDesc/LanaiMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/MCTargetDesc/LanaiMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Lanai/MCTargetDesc/LanaiMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/Lanai/MCTargetDesc/LanaiMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -123,7 +123,7 @@ static MCInstrAnalysis *createLanaiInstr
>> return new LanaiMCInstrAnalysis(Info);
>> }
>>
>> -extern "C" void LLVMInitializeLanaiTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeLanaiTargetMC() {
>> // Register the MC asm info.
>> RegisterMCAsmInfo<LanaiMCAsmInfo> X(getTheLanaiTarget());
>>
>>
>> Modified: llvm/trunk/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -16,7 +16,7 @@ Target &llvm::getTheLanaiTarget() {
>> return TheLanaiTarget;
>> }
>>
>> -extern "C" void LLVMInitializeLanaiTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeLanaiTargetInfo() {
>> RegisterTarget<Triple::lanai> X(getTheLanaiTarget(), "lanai", "Lanai",
>> "Lanai");
>> }
>>
>> Modified: llvm/trunk/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -529,7 +529,7 @@ bool MSP430AsmParser::ParseLiteralValues
>> return (parseMany(parseOne));
>> }
>>
>> -extern "C" void LLVMInitializeMSP430AsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMSP430AsmParser() {
>> RegisterMCAsmParser<MSP430AsmParser> X(getTheMSP430Target());
>> }
>>
>>
>> Modified: llvm/trunk/lib/Target/MSP430/Disassembler/MSP430Disassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/Disassembler/MSP430Disassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/MSP430/Disassembler/MSP430Disassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/MSP430/Disassembler/MSP430Disassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -62,7 +62,7 @@ static MCDisassembler *createMSP430Disas
>> return new MSP430Disassembler(STI, Ctx);
>> }
>>
>> -extern "C" void LLVMInitializeMSP430Disassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMSP430Disassembler() {
>> TargetRegistry::RegisterMCDisassembler(getTheMSP430Target(),
>> createMSP430Disassembler);
>> }
>>
>> Modified: llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -57,7 +57,7 @@ static MCInstPrinter *createMSP430MCInst
>> return nullptr;
>> }
>>
>> -extern "C" void LLVMInitializeMSP430TargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMSP430TargetMC() {
>> Target &T = getTheMSP430Target();
>>
>> RegisterMCAsmInfo<MSP430MCAsmInfo> X(T);
>>
>> Modified: llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -183,6 +183,6 @@ bool MSP430AsmPrinter::runOnMachineFunct
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeMSP430AsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMSP430AsmPrinter() {
>> RegisterAsmPrinter<MSP430AsmPrinter> X(getTheMSP430Target());
>> }
>>
>> Modified: llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -21,7 +21,7 @@
>> #include "llvm/Support/TargetRegistry.h"
>> using namespace llvm;
>>
>> -extern "C" void LLVMInitializeMSP430Target() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMSP430Target() {
>> // Register the target.
>> RegisterTargetMachine<MSP430TargetMachine> X(getTheMSP430Target());
>> }
>>
>> Modified: llvm/trunk/lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -15,7 +15,7 @@ Target &llvm::getTheMSP430Target() {
>> return TheMSP430Target;
>> }
>>
>> -extern "C" void LLVMInitializeMSP430TargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMSP430TargetInfo() {
>> RegisterTarget<Triple::msp430> X(getTheMSP430Target(), "msp430",
>> "MSP430 [experimental]", "MSP430");
>> }
>>
>> Modified: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -8190,7 +8190,7 @@ bool MipsAsmParser::parseInternalDirecti
>> return false;
>> }
>>
>> -extern "C" void LLVMInitializeMipsAsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsAsmParser() {
>> RegisterMCAsmParser<MipsAsmParser> X(getTheMipsTarget());
>> RegisterMCAsmParser<MipsAsmParser> Y(getTheMipselTarget());
>> RegisterMCAsmParser<MipsAsmParser> A(getTheMips64Target());
>>
>> Modified: llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -555,7 +555,7 @@ static MCDisassembler *createMipselDisas
>> return new MipsDisassembler(STI, Ctx, false);
>> }
>>
>> -extern "C" void LLVMInitializeMipsDisassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsDisassembler() {
>> // Register the disassembler.
>> TargetRegistry::RegisterMCDisassembler(getTheMipsTarget(),
>> createMipsDisassembler);
>>
>> Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -162,7 +162,7 @@ static MCInstrAnalysis *createMipsMCInst
>> return new MipsMCInstrAnalysis(Info);
>> }
>>
>> -extern "C" void LLVMInitializeMipsTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsTargetMC() {
>> for (Target *T : {&getTheMipsTarget(), &getTheMipselTarget(),
>> &getTheMips64Target(), &getTheMips64elTarget()}) {
>> // Register the MC asm info.
>>
>> Modified: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -1296,7 +1296,7 @@ bool MipsAsmPrinter::isLongBranchPseudo(
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeMipsAsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsAsmPrinter() {
>> RegisterAsmPrinter<MipsAsmPrinter> X(getTheMipsTarget());
>> RegisterAsmPrinter<MipsAsmPrinter> Y(getTheMipselTarget());
>> RegisterAsmPrinter<MipsAsmPrinter> A(getTheMips64Target());
>>
>> Modified: llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -44,7 +44,7 @@ using namespace llvm;
>>
>> #define DEBUG_TYPE "mips"
>>
>> -extern "C" void LLVMInitializeMipsTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsTarget() {
>> // Register the target.
>> RegisterTargetMachine<MipsebTargetMachine> X(getTheMipsTarget());
>> RegisterTargetMachine<MipselTargetMachine> Y(getTheMipselTarget());
>>
>> Modified: llvm/trunk/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -27,7 +27,7 @@ Target &llvm::getTheMips64elTarget() {
>> return TheMips64elTarget;
>> }
>>
>> -extern "C" void LLVMInitializeMipsTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsTargetInfo() {
>> RegisterTarget<Triple::mips,
>> /*HasJIT=*/true>
>> X(getTheMipsTarget(), "mips", "MIPS (32-bit big endian)", "Mips");
>>
>> Modified: llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -66,7 +66,7 @@ static MCTargetStreamer *createTargetAsm
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeNVPTXTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeNVPTXTargetMC() {
>> for (Target *T : {&getTheNVPTXTarget32(), &getTheNVPTXTarget64()}) {
>> // Register the MC asm info.
>> RegisterMCAsmInfo<NVPTXMCAsmInfo> X(*T);
>>
>> Modified: llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -2260,7 +2260,7 @@ void NVPTXAsmPrinter::printMemOperand(co
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeNVPTXAsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeNVPTXAsmPrinter() {
>> RegisterAsmPrinter<NVPTXAsmPrinter> X(getTheNVPTXTarget32());
>> RegisterAsmPrinter<NVPTXAsmPrinter> Y(getTheNVPTXTarget64());
>> }
>>
>> Modified: llvm/trunk/lib/Target/NVPTX/NVPTXTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/NVPTX/NVPTXTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/NVPTX/NVPTXTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -72,7 +72,7 @@ void initializeNVPTXProxyRegErasurePass(
>>
>> } // end namespace llvm
>>
>> -extern "C" void LLVMInitializeNVPTXTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeNVPTXTarget() {
>> // Register the target.
>> RegisterTargetMachine<NVPTXTargetMachine32> X(getTheNVPTXTarget32());
>> RegisterTargetMachine<NVPTXTargetMachine64> Y(getTheNVPTXTarget64());
>>
>> Modified: llvm/trunk/lib/Target/NVPTX/TargetInfo/NVPTXTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/TargetInfo/NVPTXTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/NVPTX/TargetInfo/NVPTXTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/NVPTX/TargetInfo/NVPTXTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -19,7 +19,7 @@ Target &llvm::getTheNVPTXTarget64() {
>> return TheNVPTXTarget64;
>> }
>>
>> -extern "C" void LLVMInitializeNVPTXTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeNVPTXTargetInfo() {
>> RegisterTarget<Triple::nvptx> X(getTheNVPTXTarget32(), "nvptx",
>> "NVIDIA PTX 32-bit", "NVPTX");
>> RegisterTarget<Triple::nvptx64> Y(getTheNVPTXTarget64(), "nvptx64",
>>
>> Modified: llvm/trunk/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -1786,7 +1786,7 @@ bool PPCAsmParser::ParseDirectiveLocalEn
>>
>>
>> /// Force static initialization.
>> -extern "C" void LLVMInitializePowerPCAsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCAsmParser() {
>> RegisterMCAsmParser<PPCAsmParser> A(getThePPC32Target());
>> RegisterMCAsmParser<PPCAsmParser> B(getThePPC64Target());
>> RegisterMCAsmParser<PPCAsmParser> C(getThePPC64LETarget());
>>
>> Modified: llvm/trunk/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -51,7 +51,7 @@ static MCDisassembler *createPPCLEDisass
>> return new PPCDisassembler(STI, Ctx, /*IsLittleEndian=*/true);
>> }
>>
>> -extern "C" void LLVMInitializePowerPCDisassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCDisassembler() {
>> // Register the disassembler for each target.
>> TargetRegistry::RegisterMCDisassembler(getThePPC32Target(),
>> createPPCDisassembler);
>>
>> Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -260,7 +260,7 @@ static MCInstPrinter *createPPCMCInstPri
>> return new PPCInstPrinter(MAI, MII, MRI, T);
>> }
>>
>> -extern "C" void LLVMInitializePowerPCTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCTargetMC() {
>> for (Target *T :
>> {&getThePPC32Target(), &getThePPC64Target(), &getThePPC64LETarget()}) {
>> // Register the MC asm info.
>>
>> Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -1651,7 +1651,7 @@ createPPCAsmPrinterPass(TargetMachine &t
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializePowerPCAsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCAsmPrinter() {
>> TargetRegistry::RegisterAsmPrinter(getThePPC32Target(),
>> createPPCAsmPrinterPass);
>> TargetRegistry::RegisterAsmPrinter(getThePPC64Target(),
>>
>> Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -94,7 +94,7 @@ static cl::opt<bool>
>> ReduceCRLogical("ppc-reduce-cr-logicals",
>> cl::desc("Expand eligible cr-logical binary ops to branches"),
>> cl::init(false), cl::Hidden);
>> -extern "C" void LLVMInitializePowerPCTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCTarget() {
>> // Register the targets
>> RegisterTargetMachine<PPCTargetMachine> A(getThePPC32Target());
>> RegisterTargetMachine<PPCTargetMachine> B(getThePPC64Target());
>>
>> Modified: llvm/trunk/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -23,7 +23,7 @@ Target &llvm::getThePPC64LETarget() {
>> return ThePPC64LETarget;
>> }
>>
>> -extern "C" void LLVMInitializePowerPCTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCTargetInfo() {
>> RegisterTarget<Triple::ppc, /*HasJIT=*/true> X(getThePPC32Target(), "ppc32",
>> "PowerPC 32", "PPC");
>>
>>
>> Modified: llvm/trunk/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -1754,7 +1754,7 @@ bool RISCVAsmParser::processInstruction(
>> return false;
>> }
>>
>> -extern "C" void LLVMInitializeRISCVAsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVAsmParser() {
>> RegisterMCAsmParser<RISCVAsmParser> X(getTheRISCV32Target());
>> RegisterMCAsmParser<RISCVAsmParser> Y(getTheRISCV64Target());
>> }
>>
>> Modified: llvm/trunk/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -48,7 +48,7 @@ static MCDisassembler *createRISCVDisass
>> return new RISCVDisassembler(STI, Ctx);
>> }
>>
>> -extern "C" void LLVMInitializeRISCVDisassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVDisassembler() {
>> // Register the disassembler for each target.
>> TargetRegistry::RegisterMCDisassembler(getTheRISCV32Target(),
>> createRISCVDisassembler);
>>
>> Modified: llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -84,7 +84,7 @@ static MCTargetStreamer *createRISCVAsmT
>> return new RISCVTargetAsmStreamer(S, OS);
>> }
>>
>> -extern "C" void LLVMInitializeRISCVTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTargetMC() {
>> for (Target *T : {&getTheRISCV32Target(), &getTheRISCV64Target()}) {
>> TargetRegistry::RegisterMCAsmInfo(*T, createRISCVMCAsmInfo);
>> TargetRegistry::RegisterMCInstrInfo(*T, createRISCVMCInstrInfo);
>>
>> Modified: llvm/trunk/lib/Target/RISCV/RISCVAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/RISCV/RISCVAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/RISCV/RISCVAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/RISCV/RISCVAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -123,7 +123,7 @@ bool RISCVAsmPrinter::PrintAsmMemoryOper
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeRISCVAsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVAsmPrinter() {
>> RegisterAsmPrinter<RISCVAsmPrinter> X(getTheRISCV32Target());
>> RegisterAsmPrinter<RISCVAsmPrinter> Y(getTheRISCV64Target());
>> }
>>
>> Modified: llvm/trunk/lib/Target/RISCV/RISCVTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/RISCV/RISCVTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/RISCV/RISCVTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/RISCV/RISCVTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -24,7 +24,7 @@
>> #include "llvm/Target/TargetOptions.h"
>> using namespace llvm;
>>
>> -extern "C" void LLVMInitializeRISCVTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTarget() {
>> RegisterTargetMachine<RISCVTargetMachine> X(getTheRISCV32Target());
>> RegisterTargetMachine<RISCVTargetMachine> Y(getTheRISCV64Target());
>> auto PR = PassRegistry::getPassRegistry();
>>
>> Modified: llvm/trunk/lib/Target/RISCV/TargetInfo/RISCVTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/RISCV/TargetInfo/RISCVTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/RISCV/TargetInfo/RISCVTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/RISCV/TargetInfo/RISCVTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -20,7 +20,7 @@ Target &llvm::getTheRISCV64Target() {
>> return TheRISCV64Target;
>> }
>>
>> -extern "C" void LLVMInitializeRISCVTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTargetInfo() {
>> RegisterTarget<Triple::riscv32> X(getTheRISCV32Target(), "riscv32",
>> "32-bit RISC-V", "RISCV");
>> RegisterTarget<Triple::riscv64> Y(getTheRISCV64Target(), "riscv64",
>>
>> Modified: llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -1308,7 +1308,7 @@ bool SparcAsmParser::matchSparcAsmModifi
>> return true;
>> }
>>
>> -extern "C" void LLVMInitializeSparcAsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSparcAsmParser() {
>> RegisterMCAsmParser<SparcAsmParser> A(getTheSparcTarget());
>> RegisterMCAsmParser<SparcAsmParser> B(getTheSparcV9Target());
>> RegisterMCAsmParser<SparcAsmParser> C(getTheSparcelTarget());
>>
>> Modified: llvm/trunk/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -48,7 +48,7 @@ static MCDisassembler *createSparcDisass
>> }
>>
>>
>> -extern "C" void LLVMInitializeSparcDisassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSparcDisassembler() {
>> // Register the disassembler.
>> TargetRegistry::RegisterMCDisassembler(getTheSparcTarget(),
>> createSparcDisassembler);
>>
>> Modified: llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -89,7 +89,7 @@ static MCInstPrinter *createSparcMCInstP
>> return new SparcInstPrinter(MAI, MII, MRI);
>> }
>>
>> -extern "C" void LLVMInitializeSparcTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSparcTargetMC() {
>> // Register the MC asm info.
>> RegisterMCAsmInfoFn X(getTheSparcTarget(), createSparcMCAsmInfo);
>> RegisterMCAsmInfoFn Y(getTheSparcV9Target(), createSparcV9MCAsmInfo);
>>
>> Modified: llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -439,7 +439,7 @@ bool SparcAsmPrinter::PrintAsmMemoryOper
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeSparcAsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSparcAsmPrinter() {
>> RegisterAsmPrinter<SparcAsmPrinter> X(getTheSparcTarget());
>> RegisterAsmPrinter<SparcAsmPrinter> Y(getTheSparcV9Target());
>> RegisterAsmPrinter<SparcAsmPrinter> Z(getTheSparcelTarget());
>>
>> Modified: llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -20,7 +20,7 @@
>> #include "llvm/Support/TargetRegistry.h"
>> using namespace llvm;
>>
>> -extern "C" void LLVMInitializeSparcTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSparcTarget() {
>> // Register the target.
>> RegisterTargetMachine<SparcV8TargetMachine> X(getTheSparcTarget());
>> RegisterTargetMachine<SparcV9TargetMachine> Y(getTheSparcV9Target());
>>
>> Modified: llvm/trunk/lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -23,7 +23,7 @@ Target &llvm::getTheSparcelTarget() {
>> return TheSparcelTarget;
>> }
>>
>> -extern "C" void LLVMInitializeSparcTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSparcTargetInfo() {
>> RegisterTarget<Triple::sparc, /*HasJIT=*/true> X(getTheSparcTarget(), "sparc",
>> "Sparc", "Sparc");
>> RegisterTarget<Triple::sparcv9, /*HasJIT=*/true> Y(
>>
>> Modified: llvm/trunk/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -1371,6 +1371,6 @@ SystemZAsmParser::parsePCRel(OperandVect
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeSystemZAsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZAsmParser() {
>> RegisterMCAsmParser<SystemZAsmParser> X(getTheSystemZTarget());
>> }
>>
>> Modified: llvm/trunk/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -46,7 +46,7 @@ static MCDisassembler *createSystemZDisa
>> return new SystemZDisassembler(STI, Ctx);
>> }
>>
>> -extern "C" void LLVMInitializeSystemZDisassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZDisassembler() {
>> // Register the disassembler.
>> TargetRegistry::RegisterMCDisassembler(getTheSystemZTarget(),
>> createSystemZDisassembler);
>>
>> Modified: llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -182,7 +182,7 @@ static MCInstPrinter *createSystemZMCIns
>> return new SystemZInstPrinter(MAI, MII, MRI);
>> }
>>
>> -extern "C" void LLVMInitializeSystemZTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZTargetMC() {
>> // Register the MCAsmInfo.
>> TargetRegistry::RegisterMCAsmInfo(getTheSystemZTarget(),
>> createSystemZMCAsmInfo);
>>
>> Modified: llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -644,6 +644,6 @@ void SystemZAsmPrinter::EmitEndOfAsmFile
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeSystemZAsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZAsmPrinter() {
>> RegisterAsmPrinter<SystemZAsmPrinter> X(getTheSystemZTarget());
>> }
>>
>> Modified: llvm/trunk/lib/Target/SystemZ/SystemZTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/SystemZ/SystemZTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/SystemZ/SystemZTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -29,7 +29,7 @@
>>
>> using namespace llvm;
>>
>> -extern "C" void LLVMInitializeSystemZTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZTarget() {
>> // Register the target.
>> RegisterTargetMachine<SystemZTargetMachine> X(getTheSystemZTarget());
>> }
>>
>> Modified: llvm/trunk/lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -16,7 +16,7 @@ Target &llvm::getTheSystemZTarget() {
>> return TheSystemZTarget;
>> }
>>
>> -extern "C" void LLVMInitializeSystemZTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZTargetInfo() {
>> RegisterTarget<Triple::systemz, /*HasJIT=*/true> X(
>> getTheSystemZTarget(), "systemz", "SystemZ", "SystemZ");
>> }
>>
>> Modified: llvm/trunk/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -764,7 +764,7 @@ public:
>> } // end anonymous namespace
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeWebAssemblyAsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyAsmParser() {
>> RegisterMCAsmParser<WebAssemblyAsmParser> X(getTheWebAssemblyTarget32());
>> RegisterMCAsmParser<WebAssemblyAsmParser> Y(getTheWebAssemblyTarget64());
>> }
>>
>> Modified: llvm/trunk/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -65,7 +65,7 @@ static MCDisassembler *createWebAssembly
>> return new WebAssemblyDisassembler(STI, Ctx, std::move(MCII));
>> }
>>
>> -extern "C" void LLVMInitializeWebAssemblyDisassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyDisassembler() {
>> // Register the disassembler for each target.
>> TargetRegistry::RegisterMCDisassembler(getTheWebAssemblyTarget32(),
>> createWebAssemblyDisassembler);
>>
>> Modified: llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -95,7 +95,7 @@ static MCTargetStreamer *createNullTarge
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeWebAssemblyTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyTargetMC() {
>> for (Target *T :
>> {&getTheWebAssemblyTarget32(), &getTheWebAssemblyTarget64()}) {
>> // Register the MC asm info.
>>
>> Modified: llvm/trunk/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -26,7 +26,7 @@ Target &llvm::getTheWebAssemblyTarget64(
>> return TheWebAssemblyTarget64;
>> }
>>
>> -extern "C" void LLVMInitializeWebAssemblyTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyTargetInfo() {
>> RegisterTarget<Triple::wasm32> X(getTheWebAssemblyTarget32(), "wasm32",
>> "WebAssembly 32-bit", "WebAssembly");
>> RegisterTarget<Triple::wasm64> Y(getTheWebAssemblyTarget64(), "wasm64",
>>
>> Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -443,7 +443,7 @@ bool WebAssemblyAsmPrinter::PrintAsmMemo
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeWebAssemblyAsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyAsmPrinter() {
>> RegisterAsmPrinter<WebAssemblyAsmPrinter> X(getTheWebAssemblyTarget32());
>> RegisterAsmPrinter<WebAssemblyAsmPrinter> Y(getTheWebAssemblyTarget64());
>> }
>>
>> Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -45,7 +45,7 @@ static cl::opt<bool> EnableEmSjLj(
>> cl::desc("WebAssembly Emscripten-style setjmp/longjmp handling"),
>> cl::init(false));
>>
>> -extern "C" void LLVMInitializeWebAssemblyTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyTarget() {
>> // Register the target.
>> RegisterTargetMachine<WebAssemblyTargetMachine> X(
>> getTheWebAssemblyTarget32());
>>
>> Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Mon Jun 10 15:12:56 2019
>> @@ -3709,7 +3709,7 @@ bool X86AsmParser::parseDirectiveFPOEndP
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeX86AsmParser() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86AsmParser() {
>> RegisterMCAsmParser<X86AsmParser> X(getTheX86_32Target());
>> RegisterMCAsmParser<X86AsmParser> Y(getTheX86_64Target());
>> }
>>
>> Modified: llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -844,7 +844,7 @@ static MCDisassembler *createX86Disassem
>> return new X86GenericDisassembler(STI, Ctx, std::move(MII));
>> }
>>
>> -extern "C" void LLVMInitializeX86Disassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86Disassembler() {
>> // Register the disassembler.
>> TargetRegistry::RegisterMCDisassembler(getTheX86_32Target(),
>> createX86Disassembler);
>>
>> Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -523,7 +523,7 @@ static MCInstrAnalysis *createX86MCInstr
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeX86TargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86TargetMC() {
>> for (Target *T : {&getTheX86_32Target(), &getTheX86_64Target()}) {
>> // Register the MC asm info.
>> RegisterMCAsmInfoFn X(*T, createX86MCAsmInfo);
>>
>> Modified: llvm/trunk/lib/Target/X86/TargetInfo/X86TargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/TargetInfo/X86TargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/TargetInfo/X86TargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/X86/TargetInfo/X86TargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -19,7 +19,7 @@ Target &llvm::getTheX86_64Target() {
>> return TheX86_64Target;
>> }
>>
>> -extern "C" void LLVMInitializeX86TargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86TargetInfo() {
>> RegisterTarget<Triple::x86, /*HasJIT=*/true> X(
>> getTheX86_32Target(), "x86", "32-bit X86: Pentium-Pro and above", "X86");
>>
>>
>> Modified: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -727,7 +727,7 @@ void X86AsmPrinter::EmitEndOfAsmFile(Mod
>> //===----------------------------------------------------------------------===//
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeX86AsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86AsmPrinter() {
>> RegisterAsmPrinter<X86AsmPrinter> X(getTheX86_32Target());
>> RegisterAsmPrinter<X86AsmPrinter> Y(getTheX86_64Target());
>> }
>>
>> Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -60,7 +60,7 @@ static cl::opt<bool> EnableCondBrFolding
>> "folding pass"),
>> cl::init(false), cl::Hidden);
>>
>> -extern "C" void LLVMInitializeX86Target() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86Target() {
>> // Register the target.
>> RegisterTargetMachine<X86TargetMachine> X(getTheX86_32Target());
>> RegisterTargetMachine<X86TargetMachine> Y(getTheX86_64Target());
>>
>> Modified: llvm/trunk/lib/Target/XCore/Disassembler/XCoreDisassembler.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/Disassembler/XCoreDisassembler.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/XCore/Disassembler/XCoreDisassembler.cpp (original)
>> +++ llvm/trunk/lib/Target/XCore/Disassembler/XCoreDisassembler.cpp Mon Jun 10 15:12:56 2019
>> @@ -774,7 +774,7 @@ static MCDisassembler *createXCoreDisass
>> return new XCoreDisassembler(STI, Ctx);
>> }
>>
>> -extern "C" void LLVMInitializeXCoreDisassembler() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXCoreDisassembler() {
>> // Register the disassembler.
>> TargetRegistry::RegisterMCDisassembler(getTheXCoreTarget(),
>> createXCoreDisassembler);
>>
>> Modified: llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp (original)
>> +++ llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp Mon Jun 10 15:12:56 2019
>> @@ -121,7 +121,7 @@ static MCTargetStreamer *createTargetAsm
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeXCoreTargetMC() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXCoreTargetMC() {
>> // Register the MC asm info.
>> RegisterMCAsmInfoFn X(getTheXCoreTarget(), createXCoreMCAsmInfo);
>>
>>
>> Modified: llvm/trunk/lib/Target/XCore/TargetInfo/XCoreTargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/TargetInfo/XCoreTargetInfo.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/XCore/TargetInfo/XCoreTargetInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/XCore/TargetInfo/XCoreTargetInfo.cpp Mon Jun 10 15:12:56 2019
>> @@ -15,7 +15,7 @@ Target &llvm::getTheXCoreTarget() {
>> return TheXCoreTarget;
>> }
>>
>> -extern "C" void LLVMInitializeXCoreTargetInfo() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXCoreTargetInfo() {
>> RegisterTarget<Triple::xcore> X(getTheXCoreTarget(), "xcore", "XCore",
>> "XCore");
>> }
>>
>> Modified: llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp (original)
>> +++ llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp Mon Jun 10 15:12:56 2019
>> @@ -292,6 +292,6 @@ void XCoreAsmPrinter::EmitInstruction(co
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeXCoreAsmPrinter() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXCoreAsmPrinter() {
>> RegisterAsmPrinter<XCoreAsmPrinter> X(getTheXCoreTarget());
>> }
>>
>> Modified: llvm/trunk/lib/Target/XCore/XCoreTargetMachine.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetMachine.cpp?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/XCore/XCoreTargetMachine.cpp (original)
>> +++ llvm/trunk/lib/Target/XCore/XCoreTargetMachine.cpp Mon Jun 10 15:12:56 2019
>> @@ -105,7 +105,7 @@ void XCorePassConfig::addPreEmitPass() {
>> }
>>
>> // Force static initialization.
>> -extern "C" void LLVMInitializeXCoreTarget() {
>> +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXCoreTarget() {
>> RegisterTargetMachine<XCoreTargetMachine> X(getTheXCoreTarget());
>> }
>>
>>
>> Modified: llvm/trunk/unittests/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/CMakeLists.txt?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/unittests/CMakeLists.txt (original)
>> +++ llvm/trunk/unittests/CMakeLists.txt Mon Jun 10 15:12:56 2019
>> @@ -8,6 +8,12 @@ function(add_llvm_unittest_with_input_fi
>> add_unittest_with_input_files(UnitTests ${test_dirname} ${ARGN})
>> endfunction()
>>
>> +# The target unittests may test APIs that aren't exported in libLLVM.so, so
>> +# we need to always link against the static libraries.
>> +function(add_llvm_target_unittest test_dir_name)
>> + add_llvm_unittest(${test_dir_name} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN})
>> +endfunction()
>> +
>> add_subdirectory(ADT)
>> add_subdirectory(Analysis)
>> add_subdirectory(AsmParser)
>>
>> Modified: llvm/trunk/unittests/Target/AArch64/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Target/AArch64/CMakeLists.txt?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/unittests/Target/AArch64/CMakeLists.txt (original)
>> +++ llvm/trunk/unittests/Target/AArch64/CMakeLists.txt Mon Jun 10 15:12:56 2019
>> @@ -17,6 +17,6 @@ set(LLVM_LINK_COMPONENTS
>> Target
>> )
>>
>> -add_llvm_unittest(AArch64Tests
>> +add_llvm_target_unittest(AArch64Tests
>> InstSizes.cpp
>> )
>>
>> Modified: llvm/trunk/unittests/Target/WebAssembly/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Target/WebAssembly/CMakeLists.txt?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/unittests/Target/WebAssembly/CMakeLists.txt (original)
>> +++ llvm/trunk/unittests/Target/WebAssembly/CMakeLists.txt Mon Jun 10 15:12:56 2019
>> @@ -13,6 +13,6 @@ set(LLVM_LINK_COMPONENTS
>> WebAssemblyInfo
>> )
>>
>> -add_llvm_unittest(WebAssemblyTests
>> +add_llvm_target_unittest(WebAssemblyTests
>> WebAssemblyExceptionInfoTest.cpp
>> )
>>
>> Modified: llvm/trunk/unittests/tools/llvm-exegesis/AArch64/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/tools/llvm-exegesis/AArch64/CMakeLists.txt?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/unittests/tools/llvm-exegesis/AArch64/CMakeLists.txt (original)
>> +++ llvm/trunk/unittests/tools/llvm-exegesis/AArch64/CMakeLists.txt Mon Jun 10 15:12:56 2019
>> @@ -13,7 +13,7 @@ set(LLVM_LINK_COMPONENTS
>> AArch64
>> )
>>
>> -add_llvm_unittest(LLVMExegesisAArch64Tests
>> +add_llvm_target_unittest(LLVMExegesisAArch64Tests
>> TargetTest.cpp
>> )
>> target_link_libraries(LLVMExegesisAArch64Tests PRIVATE
>>
>> Modified: llvm/trunk/unittests/tools/llvm-exegesis/ARM/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/tools/llvm-exegesis/ARM/CMakeLists.txt?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/unittests/tools/llvm-exegesis/ARM/CMakeLists.txt (original)
>> +++ llvm/trunk/unittests/tools/llvm-exegesis/ARM/CMakeLists.txt Mon Jun 10 15:12:56 2019
>> @@ -13,7 +13,7 @@ set(LLVM_LINK_COMPONENTS
>> ARM
>> )
>>
>> -add_llvm_unittest(LLVMExegesisARMTests
>> +add_llvm_target_unittest(LLVMExegesisARMTests
>> AssemblerTest.cpp
>> )
>> target_link_libraries(LLVMExegesisARMTests PRIVATE LLVMExegesis)
>>
>> Modified: llvm/trunk/unittests/tools/llvm-exegesis/PowerPC/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/tools/llvm-exegesis/PowerPC/CMakeLists.txt?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/unittests/tools/llvm-exegesis/PowerPC/CMakeLists.txt (original)
>> +++ llvm/trunk/unittests/tools/llvm-exegesis/PowerPC/CMakeLists.txt Mon Jun 10 15:12:56 2019
>> @@ -13,7 +13,7 @@ set(LLVM_LINK_COMPONENTS
>> PowerPC
>> )
>>
>> -add_llvm_unittest(LLVMExegesisPowerPCTests
>> +add_llvm_target_unittest(LLVMExegesisPowerPCTests
>> AnalysisTest.cpp
>> TargetTest.cpp
>> )
>>
>> Modified: llvm/trunk/unittests/tools/llvm-exegesis/X86/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/tools/llvm-exegesis/X86/CMakeLists.txt?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/unittests/tools/llvm-exegesis/X86/CMakeLists.txt (original)
>> +++ llvm/trunk/unittests/tools/llvm-exegesis/X86/CMakeLists.txt Mon Jun 10 15:12:56 2019
>> @@ -13,7 +13,7 @@ set(LLVM_LINK_COMPONENTS
>> X86
>> )
>>
>> -add_llvm_unittest(LLVMExegesisX86Tests
>> +add_llvm_target_unittest(LLVMExegesisX86Tests
>> AssemblerTest.cpp
>> BenchmarkResultTest.cpp
>> RegisterAliasingTest.cpp
>>
>> Modified: llvm/trunk/utils/unittest/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/CMakeLists.txt?rev=362990&r1=362989&r2=362990&view=diff
>> ==============================================================================
>> --- llvm/trunk/utils/unittest/CMakeLists.txt (original)
>> +++ llvm/trunk/utils/unittest/CMakeLists.txt Mon Jun 10 15:12:56 2019
>> @@ -71,3 +71,23 @@ add_llvm_library(gtest
>> )
>>
>> add_subdirectory(UnitTestMain)
>> +
>> +# When LLVM_LINK_LLVM_DYLIB is enabled, libLLVM.so is added to the interface
>> +# link libraries for gtest and gtest_main. This means that any target, like
>> +# unittests for example, that links against gtest will be forced to link
>> +# against libLLVM.so. In some cases we may want to statically unittests if they
>> +# need access to symbols that are marked private in libLLVM.so. The only
>> +# way we can make this work is to remove libLLVM.so from the list of interface
>> +# link libraries for gtest and then make gtest users responsible for explicitly
>> +# adding libLLVM.so to their targets link libraries if they need it.
>> +
>> +function (gtest_remove_dylib_from_link_interface target)
>> + get_target_property(interface_libs ${target} INTERFACE_LINK_LIBRARIES)
>> + if (interface_libs)
>> + list(REMOVE_ITEM interface_libs LLVM)
>> + set_target_properties(${target} PROPERTIES INTERFACE_LINK_LIBRARIES "${interface_libs}")
>> + endif()
>> +endfunction()
>> +
>> +gtest_remove_dylib_from_link_interface(gtest)
>> +gtest_remove_dylib_from_link_interface(gtest_main)
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list