This repository was archived by the owner on Oct 9, 2019. It is now read-only.
Fix compile error: Use explicit conversion of unique_ptr to bool#238
Open
mfwitten wants to merge 1 commit into
Open
Fix compile error: Use explicit conversion of unique_ptr to bool#238mfwitten wants to merge 1 commit into
unique_ptr to bool#238mfwitten wants to merge 1 commit into
Conversation
The aging LLVM code is converting an object of type `unique_ptr` to
an object of type `bool`; this is being done implicitly, thereby
causing a compile-time error with a modern, standards-compliant
compiler.
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:
69341e6abca92f7f118ee7bd99be0cdfc649386f
2016-04-08
llvm/llvm-project@69341e6
Author
|
Really, the LLVM base for this project should be updated. |
Contributor
|
@mfwitten, active development of this tool/library has moved to https://github.com/KhronosGroup/SPIRV-LLVM-Translator. |
Author
|
Isn't it against the CoC to waste everybody's fscking time? Fix your links/website, you goofballs. |
Contributor
|
@bader Do you know who could answer whether this is still maintained, maybe bring it up on the tooling call? If it is no longer maintained, the README and/or description should be updated to say so (and point to SPIRV-LLVM-Translator), and the repo archived, imho. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The aging LLVM code is converting an object of type
unique_ptrtoan object of type
bool; this is being done implicitly, therebycausing a compile-time error with a modern, standards-compliant
compiler.
This is explained well here:
In particular:
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: