<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/89056>89056</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
An error caused by the upcoming By-Design of MSVC
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
MonicaLiu0311
</td>
</tr>
</table>
<pre>
An error caused by the [upcoming By-Design of MSVC](https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/2034133#3966150):
```
[4444/5079] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\cl.exe /TP -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -ID:\b\llvm\x64-windows-dbg\tools\dsymutil -ID:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil -ID:\b\llvm\x64-windows-dbg\include -ID:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\include -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 -std:c++17 -MDd /EHsc /GR /showIncludes /Fotools\dsymutil\CMakeFiles\dsymutil.dir\DwarfLinkerForBinary.cpp.obj /Fdtools\dsymutil\CMakeFiles\dsymutil.dir\ /FS -c D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp
FAILED: tools/dsymutil/CMakeFiles/dsymutil.dir/DwarfLinkerForBinary.cpp.obj
C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\cl.exe /TP -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -ID:\b\llvm\x64-windows-dbg\tools\dsymutil -ID:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil -ID:\b\llvm\x64-windows-dbg\include -ID:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\include -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 -std:c++17 -MDd /EHsc /GR /showIncludes /Fotools\dsymutil\CMakeFiles\dsymutil.dir\DwarfLinkerForBinary.cpp.obj /Fdtools\dsymutil\CMakeFiles\dsymutil.dir\ /FS -c D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp
D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp(954): error C2275: 'llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>::ValidReloc': expected an expression instead of a type
D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp(954): note: the template instantiation context (the oldest one first) is
D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp(557): note: see reference to function template instantiation 'bool llvm::dsymutil::DwarfLinkerForBinary::linkImpl<llvm::dwarflinker_parallel::DWARFLinker,llvm::dwarflinker_parallel::DWARFFile,llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>>(const llvm::dsymutil::DebugMap &,llvm::dwarflinker_parallel::DWARFLinker::OutputFileType)' being compiled
D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp(651): note: see reference to function template instantiation 'llvm::ErrorOr<std::unique_ptr<llvm::dwarflinker_parallel::DWARFFile,std::default_delete<llvm::dwarflinker_parallel::DWARFFile>>> llvm::dsymutil::DwarfLinkerForBinary::loadObject<llvm::dwarflinker_parallel::DWARFFile,llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>>(const llvm::dsymutil::DebugMapObject &,const llvm::dsymutil::DebugMap &,llvm::remarks::RemarkLinker &)' being compiled
D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp(237): note: see reference to class template instantiation 'std::unique_ptr<llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>,std::default_delete<llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>>>' being compiled
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\include\memory(3335): note: see reference to class template instantiation 'std::default_delete<llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>>' being compiled
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\include\memory(3298): note: while compiling class template member function 'void std::default_delete<llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>>::operator ()(_Ty *) noexcept const'
with
[
_Ty=llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>
]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\include\memory(3410): note: see the first reference to 'std::default_delete<llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>>::operator ()' in 'std::unique_ptr<llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>,std::default_delete<llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>>>::~unique_ptr'
D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp(235): note: see the first reference to 'std::unique_ptr<llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>,std::default_delete<llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>>>::~unique_ptr' in 'llvm::dsymutil::DwarfLinkerForBinary::loadObject'
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\include\memory(3299): note: see reference to class template instantiation 'llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>' being compiled
D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp(1034): note: while compiling class template member function 'std::optional<int64_t> llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>::getExprOpAddressRelocAdjustment(llvm::DWARFUnit &,const llvm::DWARFExpression::Operation &,uint64_t,uint64_t)'
D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp(952): note: while compiling class template member function 'std::vector<llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>::ValidReloc,std::allocator<llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>::ValidReloc>> llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>::getRelocations(const std::vector<llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>::ValidReloc,std::allocator<llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>::ValidReloc>> &,uint64_t,uint64_t)'
D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp(1114): note: see the first reference to 'llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>::getRelocations' in 'llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>::applyValidRelocs'
D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp(953): error C2923: 'std::vector': 'llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>::ValidReloc' is not a valid template type argument for parameter '_Ty'
D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp(954): note: see declaration of 'llvm::dsymutil::DwarfLinkerForBinary::AddressManager<llvm::dwarflinker_parallel::AddressesMap>::ValidReloc'
D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp(953): error C2976: 'std::vector': too few template arguments
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\include\vector(429): note: see declaration of 'std::vector'
D:\b\llvm\src\org-17.0.2-5fdca9a361.clean\llvm\tools\dsymutil\DwarfLinkerForBinary.cpp(955): error C2641: cannot deduce template arguments for 'std::vector'
```
![image](https://github.com/microsoft/vcpkg/assets/110024546/c4a72138-ca59-4832-83fa-cce3f71a82c9)
Fix in vcpkg: https://github.com/microsoft/vcpkg/pull/38235.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsGk9P477y05iL1Sqx4yY5cChJsz-kLV2V7iK9S-Uk0-LdNM6LnUIv-9mf7ARa2MIPWESrJ1ZLJx57xuP54_E44UqJZQlwitgZYvEJb_S1rE_HshQZ_yoah7ruSSrzzemwxFDXssYZbxTkON1gfQ0YsbOmyuRKlEt8tunFYPhhucDjyx8RYjEiwbXWlUJ0iEiCSJLDOhfr_lqohhdKN7mQ_UyuEEliWPCm0JEsCsi0kKXFrWOxRiSZ38j6l9CwUogkkAuNSEIc6rmUIkJpOBi4zEEkNPM4MXKGaOB0_9smO_M8z0MkYY4fIhbjyAxl0bfp5Mt0-NtFLBqfR9PJpX0kDiGIRaOL2Wj6zWLMaqKZlIUyI-3iItejwW-3T6kZkIoSsegfqfTtwEMsan-zog-3gBFJZt9wL_5-cR5N4hHuxfNoOptfTC4uZ3E0v5jM49G36Sgazvb1XQ2nF-cXXy7vui5H0ffpaC_VtmuX6DL6-hTRw65doh1Z51aSyEg0vJjNx0OjqG1HM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