mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[llvm] Add default constructor of llvm::ElementCount
.
This patch prevents failures like those reported in http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/34173. We have enabled the default constructor for `llvm::ElementCount` to make sure the code compiles on Windows. Reviewed By: ormris Differential Revision: https://reviews.llvm.org/D86240
This commit is contained in:
parent
eb716376d3
commit
5fbee91974
@ -134,9 +134,7 @@ namespace Intrinsic {
|
||||
unsigned Pointer_AddressSpace;
|
||||
unsigned Struct_NumElements;
|
||||
unsigned Argument_Info;
|
||||
// There is no default constructor in `ElementCount`, so we need
|
||||
// to explicitly initialize this field with a value.
|
||||
ElementCount Vector_Width = ElementCount::getFixed(0);
|
||||
ElementCount Vector_Width;
|
||||
};
|
||||
|
||||
enum ArgKind {
|
||||
|
@ -35,14 +35,12 @@ private:
|
||||
ElementCount(unsigned Min, bool Scalable) : Min(Min), Scalable(Scalable) {}
|
||||
|
||||
public:
|
||||
/// No default constructor. Users should use one of the `get*`
|
||||
/// static methods below, as they should always make a conscious
|
||||
/// choice on the type of `ElementCount` they are requesting.
|
||||
ElementCount() = delete;
|
||||
unsigned Min; // Minimum number of vector elements.
|
||||
bool Scalable; // If true, NumElements is a multiple of 'Min' determined
|
||||
// at runtime rather than compile time.
|
||||
|
||||
ElementCount() = default;
|
||||
|
||||
ElementCount operator*(unsigned RHS) {
|
||||
return { Min * RHS, Scalable };
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user