<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Embedding failure with type_traits"
href="https://bugs.llvm.org/show_bug.cgi?id=49378">49378</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Embedding failure with type_traits
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Core LLVM classes
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>scott.waye@hubse.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>I'm not a c++ expert, so firstly apologies if this is in my project and not a
defect in LLVM. I'm embedding LLVM (core) in
<a href="https://github.com/dotnet/runtimelab/tree/feature/NativeAOT-LLVM">https://github.com/dotnet/runtimelab/tree/feature/NativeAOT-LLVM</a> for
<a href="https://github.com/dotnet/runtimelab/pull/647">https://github.com/dotnet/runtimelab/pull/647</a>. I've started by downloading and
building the LLVM 11.0.0 src (On Windows with VS 2019 - (Microsoft (R) C/C++
Optimizing Compiler Version 19.28.29337 for x64)) and updating my
CMakeLists.txt with
```
find_package(LLVM REQUIRED CONFIG PATHS
E:/llvm11/llvm-11.0.0.src/build/lib/cmake/llvm)
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
llvm_map_components_to_libnames(llvm_libs core)
target_link_libraries(${TARGETDETAILS_TARGET} ${llvm_libs})
```
And when I include #include "llvm/IR/IRBuilder.h":
```
#include "compiler.h"
#include "llvm.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
```
I start to get the error from VS2019 MSVC
```
1>llvm.cpp
1>E:\llvm11\llvm-11.0.0.src\include\llvm\Support\type_traits.h(91,1): error
C2220: the following warning is treated as an error
1>C:\Program Files (x86)\Microsoft Visual
Studio\2019\Professional\VC\Tools\MSVC\14.28.29333\include\type_traits(630):
message : see reference to class template instantiation
'llvm::detail::trivial_helper<T>' being compiled
1> with
1> [
1> T=llvm::SmallVector<unsigned int,8>
1> ]
1>E:\llvm11\llvm-11.0.0.src\include\llvm\Support\type_traits.h(144): message :
see reference to class template instantiation
'std::is_copy_constructible<llvm::detail::trivial_helper<T>>' being compiled
1> with
1> [
1> T=llvm::SmallVector<unsigned int,8>
1> ]
1>E:\llvm11\llvm-11.0.0.src\include\llvm\ADT\Optional.h(216): message : see
reference to class template instantiation 'llvm::is_trivially_copyable<T>'
being compiled
1> with
1> [
1> T=llvm::SmallVector<unsigned int,8>
1> ]
1>E:\llvm11\llvm-11.0.0.src\include\llvm\IR\Instructions.h(3451): message : see
reference to class template instantiation
'llvm::Optional<llvm::SmallVector<unsigned int,8>>' being compiled
1>E:\llvm11\llvm-11.0.0.src\include\llvm\Support\type_traits.h(91,1): warning
C4624: 'llvm::detail::trivial_helper<T>': destructor was implicitly defined as
deleted
1> with
1> [
1> T=llvm::SmallVector<unsigned int,8>
1> ]
1>E:\llvm11\llvm-11.0.0.src\include\llvm\IR\Operator.h(116,1): warning C4624:
'llvm::OverflowingBinaryOperator': destructor was implicitly defined as deleted
1>E:\llvm11\llvm-11.0.0.src\include\llvm\IR\Operator.h(157,1): warning C4624:
'llvm::PossiblyExactOperator': destructor was implicitly defined as deleted
1>E:\llvm11\llvm-11.0.0.src\include\llvm\IR\Operator.h(408,1): warning C4624:
'llvm::FPMathOperator': destructor was implicitly defined as deleted
1>E:\llvm11\llvm-11.0.0.src\include\llvm\IR\Operator.h(424,1): warning C4624:
'llvm::ConcreteOperator<llvm::OverflowingBinaryOperator,13>': destructor was
implicitly defined as deleted
1>E:\llvm11\llvm-11.0.0.src\include\llvm\IR\Operator.h(427): message : see
reference to class template instantiation
'llvm::ConcreteOperator<llvm::OverflowingBinaryOperator,13>' being compiled
1>E:\llvm11\llvm-11.0.0.src\include\llvm\IR\Operator.h(428,1): warning C4624:
'llvm::AddOperator': destructor was implicitly defined as deleted
1>E:\llvm11\llvm-11.0.0.src\include\llvm\IR\Operator.h(424,1): warning C4624:
'llvm::ConcreteOperator<llvm::OverflowingBinaryOperator,15>': destructor was
implicitly defined as deleted
1>E:\llvm11\llvm-11.0.0.src\include\llvm\IR\Operator.h(430): message : see
reference to class template instantiation
'llvm::ConcreteOperator<llvm::OverflowingBinaryOperator,15>' being compiled
1>E:\llvm11\llvm-11.0.0.src\include\llvm\IR\Operator.h(431,1): warning C4624:
'llvm::SubOperator': destructor was implicitly defined as deleted
1>E:\llvm11\llvm-11.0.0.src\include\llvm\IR\Operator.h(424,1): warning C4624:
'llvm::ConcreteOperator<llvm::OverflowingBinaryOperator,17>': destructor was
implicitly defined as deleted
1>E:\llvm11\llvm-11.0.0.src\include\llvm\IR\Operator.h(433): message : see
reference to class template instantiation
'llvm::ConcreteOperator<llvm::OverflowingBinaryOperator,17>' being compiled
1>E:\llvm11\llvm-11.0.0.src\include\llvm\IR\Operator.h(434,1): warning C4624:
'llvm::MulOperator': destructor was implicitly defined as deleted
1>E:\llvm11\llvm-11.0.0.src\include\llvm\IR\Operator.h(424,1): warning C4624:
'llvm::ConcreteOperator<llvm::OverflowingBinaryOperator,25>': destructor was
implicitly defined as deleted
```
There's more but it follows this pattern. I've read a few things about
type_traits but this is not the `static_assert` as it's not that message, so
don't know how relevant that is. It looks like maybe I've just done something
that has deleted some destructors, is that possible?
Thanks for reading.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>