Skip to content

Commit e1465a9

Browse files
andrurogerzJaddyen
authored andcommitted
[llvm] include GenericLoopInfoImpl for full implementation (llvm#144621)
MSVC issues a warning when a an `extern` template instantiation is annotated for DLL export but it does not have the complete template definition. Because the full implementation of `LoopBase` is in `GenericLoopInfoImpl.h` rather than `GenericLoopInfo.h`, MSVC complains whenever `LoopInfo.h` is included. ``` S:\llvm\llvm-project\llvm\include\llvm/Support/GenericLoopInfo.h(342): warning C4661: 'BlockT *llvm::LoopBase<BlockT,llvm::Loop>::getLoopLatch(void) const': no suitable definition provided for explicit template instantiation request with [ BlockT=llvm::BasicBlock ] S:\llvm\llvm-project\llvm\include\llvm/Support/GenericLoopInfo.h(326): note: see declaration of 'llvm::LoopBase<llvm::BasicBlock,llvm::Loop>::getLoopLatch' ``` Everything links fine but the warning is very noisy when building LLVM as a Windows DLL. Interestingly, `clang-cl` does not warn here and is fine with the code as-is.
1 parent dd9b4ca commit e1465a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/Analysis/LoopInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "llvm/IR/PassManager.h"
1919
#include "llvm/Pass.h"
2020
#include "llvm/Support/Compiler.h"
21-
#include "llvm/Support/GenericLoopInfo.h"
21+
#include "llvm/Support/GenericLoopInfoImpl.h"
2222
#include <optional>
2323
#include <utility>
2424

0 commit comments

Comments
 (0)