forked from msys2/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reverts this change: llvm/llvm-project@95b27b2 fixes the Rust build, see msys2#16847
- Loading branch information
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- a/include/llvm/ADT/Any.h | ||
+++ b/include/llvm/ADT/Any.h | ||
@@ -33,7 +33,7 @@ | ||
// merges duplicate definitions across DSO boundaries. | ||
// We also cannot mark it as `const`, otherwise msvc merges all definitions | ||
// when lto is enabled, making any comparison return true. | ||
- template <typename T> struct TypeId { static char Id; }; | ||
+ template <typename T> struct TypeId { static const char Id; }; | ||
|
||
struct StorageBase { | ||
virtual ~StorageBase() = default; | ||
@@ -124,7 +124,7 @@ | ||
std::unique_ptr<StorageBase> Storage; | ||
}; | ||
|
||
-template <typename T> char Any::TypeId<T>::Id = 0; | ||
+template <typename T> const char Any::TypeId<T>::Id = 0; | ||
|
||
template <typename T> | ||
LLVM_DEPRECATED("Use any_cast(Any*) != nullptr instead", "any_cast") |
This file contains 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
This file contains 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