forked from qt-creator/qt-creator
Clang: Fix MSVC build
Link error:
clangpchmanagerbackendmain.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: __cdecl ClangBackEnd::ClangPathWatcher<class QFileSystemWatcher,class QTimer>::ClangPathWatcher<class QFileSystemWatcher,class QTimer>(
class ClangBackEnd::FilePathCachingInterface &,class ClangBackEnd::ClangPathWatcherNotifier *)"
(__imp_??0?$ClangPathWatcher@VQFileSystemWatcher@@VQTimer@@@ClangBackEnd@@QEAA@AEAVFilePathCachingInterface@1@PEAVClangPathWatcherNotifier@1@@Z) referenced in function main
Looks like MSVC looks for import even for inline template functions.
Another alternative is to revert 351f355b69
and either ignore or suppress the GCC warning.
Change-Id: I040d4e3924af7f4d1f4424276329c6095e6ff6bd
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
d3096f0f73
commit
956e6f3a97
@@ -77,7 +77,7 @@ using IdCache = StringCache<Utils::SmallString,
|
|||||||
|
|
||||||
template <typename FileSystemWatcher,
|
template <typename FileSystemWatcher,
|
||||||
typename Timer>
|
typename Timer>
|
||||||
class CLANGSUPPORT_EXPORT ClangPathWatcher : public ClangPathWatcherInterface
|
class CLANGSUPPORT_GCCEXPORT ClangPathWatcher : public ClangPathWatcherInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ClangPathWatcher(FilePathCachingInterface &pathCache,
|
ClangPathWatcher(FilePathCachingInterface &pathCache,
|
||||||
|
@@ -39,6 +39,12 @@
|
|||||||
# define CLANGSUPPORT_EXPORT Q_DECL_IMPORT
|
# define CLANGSUPPORT_EXPORT Q_DECL_IMPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef Q_CC_GNU
|
||||||
|
# define CLANGSUPPORT_GCCEXPORT __attribute__((visibility("default")))
|
||||||
|
#else
|
||||||
|
# define CLANGSUPPORT_GCCEXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef CLANGBACKENDPROCESSPATH
|
#ifndef CLANGBACKENDPROCESSPATH
|
||||||
# define CLANGBACKENDPROCESSPATH ""
|
# define CLANGBACKENDPROCESSPATH ""
|
||||||
#endif
|
#endif
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
namespace ClangBackEnd {
|
namespace ClangBackEnd {
|
||||||
|
|
||||||
template <typename FilePathStorage>
|
template <typename FilePathStorage>
|
||||||
class CLANGSUPPORT_EXPORT FilePathCache
|
class CLANGSUPPORT_GCCEXPORT FilePathCache
|
||||||
{
|
{
|
||||||
using DirectoryPathCache = StringCache<Utils::PathString,
|
using DirectoryPathCache = StringCache<Utils::PathString,
|
||||||
int,
|
int,
|
||||||
|
Reference in New Issue
Block a user