Commit 10b61fe
authored
[llvm] include GenericLoopInfoImpl for full implementation (#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 5a16645 commit 10b61fe
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments