[llvm-bugs] [Bug 49378] New: Embedding failure with type_traits
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Mar 1 05:55:35 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49378
Bug ID: 49378
Summary: Embedding failure with type_traits
Product: libraries
Version: 11.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Core LLVM classes
Assignee: unassignedbugs at nondot.org
Reporter: scott.waye at hubse.com
CC: llvm-bugs at lists.llvm.org
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
https://github.com/dotnet/runtimelab/tree/feature/NativeAOT-LLVM for
https://github.com/dotnet/runtimelab/pull/647. 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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210301/35d4b143/attachment.html>
More information about the llvm-bugs
mailing list