[compiler-rt] [llvm] Add explicit symbol visibility macros to InstrProfData.inc (PR #110732)
Thomas Fransham via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 22:11:49 PDT 2024
================
@@ -62,6 +62,15 @@
#define INSTR_PROF_VISIBILITY
#endif
+/* This is include is needed for symbol visibility macros used on
----------------
fsfod wrote:
This is the linker error:
```
llvm\lld-link : error : undefined symbol: public: static class std::unique_ptr<struct llvm::ValueProfData, struct std::default_delete<struct llvm::ValueProfData>> __cdecl llvm::ValueProfData::serializeFrom(struct llvm::InstrProfRecord const &)
>>> referenced by llvm\unittests\ProfileData\InstrProfTest.cpp:1368
>>> unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/InstrProfTest.cpp.obj:(private: virtual void __cdecl `anonymous namespace'::ValueProfileReadWriteTest_value_prof_data_read_write_Test::TestBody(void))
>>> referenced by llvm\unittests\ProfileData\InstrProfTest.cpp:1488
>>> unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/InstrProfTest.cpp.obj:(private: virtual void __cdecl `anonymous namespace'::ValueProfileReadWriteTest_symtab_mapping_Test::TestBody(void))
llvm\lld-link : error : undefined symbol: public: void __cdecl llvm::ValueProfData::deserializeTo(struct llvm::InstrProfRecord &, class llvm::InstrProfSymtab *)
>>> referenced by llvm\unittests\ProfileData\InstrProfTest.cpp:1372
>>> unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/InstrProfTest.cpp.obj:(private: virtual void __cdecl `anonymous namespace'::ValueProfileReadWriteTest_value_prof_data_read_write_Test::TestBody(void))
>>> referenced by llvm\unittests\ProfileData\InstrProfTest.cpp:1519
>>> unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/InstrProfTest.cpp.obj:(private: virtual void __cdecl `anonymous namespace'::ValueProfileReadWriteTest_symtab_mapping_Test::TestBody(void))
```
https://github.com/llvm/llvm-project/pull/110732
More information about the llvm-commits
mailing list