Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix compile error: Use explicit conversion of
unique_ptr
to bool
The aging LLVM code is converting an object of type `unique_ptr` to an object of type `bool`, but is doing so implicitly, thereby causing a compile-time error with modern, standards-compliant compilers. This is explained well here: microsoft/DirectXShaderCompiler#1692 In particular: > The C++ standard specifies operator bool on unique_ptr > as being explicit, so this is clearly a bug in the LLVM > source code: https://en.cppreference.com/w/cpp/memory/unique_ptr/operator_bool This commit merely makes the conversion explicit, allowing the code to be built by GCC version 9.1.0. This bug was fixed by the LLVM project proper as part of the following commit (more than 4 years ago): 69341e6abca92f7f118ee7bd99be0cdfc649386f llvm/llvm-project@69341e6
- Loading branch information