struct Align
Declaration
struct Align { /* full declaration omitted */ };
Description
This struct is a compact representation of a valid (non-zero power of two) alignment. It is suitable for use as static global constants.
Declared at: llvm/include/llvm/Support/Alignment.h:40
Method Overview
- public Align()
- public Align(const llvm::Align & Other)
- public Align(llvm::Align && Other)
- public Align(uint64_t Value)
- public constexpr Align(llvm::Align::LogValue CA)
- public template <size_t kValue>static constexpr llvm::Align::LogValue Constant()
- public static constexpr const llvm::Align None()
- public template <typename T>static constexpr llvm::Align::LogValue Of()
- public uint64_t value() const
Methods
¶Align()
Align()
Description
Default is byte-aligned.
Declared at: llvm/include/llvm/Support/Alignment.h:69
¶Align(const llvm::Align& Other)
Align(const llvm::Align& Other)
Description
Do not perform checks in case of copy/move construct/assign, because the checks have been performed when building `Other`.
Declared at: llvm/include/llvm/Support/Alignment.h:72
Parameters
- const llvm::Align& Other
¶Align(llvm::Align&& Other)
Align(llvm::Align&& Other)
Declared at: llvm/include/llvm/Support/Alignment.h:73
Parameters
- llvm::Align&& Other
¶Align(uint64_t Value)
Align(uint64_t Value)
Declared at: llvm/include/llvm/Support/Alignment.h:77
Parameters
- uint64_t Value
¶constexpr Align(llvm::Align::LogValue CA)
constexpr Align(llvm::Align::LogValue CA)
Description
Constexpr constructor from LogValue type.
Declared at: llvm/include/llvm/Support/Alignment.h:107
Parameters
¶template <size_t kValue>
static constexpr llvm::Align::LogValue Constant()
template <size_t kValue>
static constexpr llvm::Align::LogValue Constant()
Description
Allow constructions of constexpr Align.
Declared at: llvm/include/llvm/Support/Alignment.h:96
Templates
- size_t kValue
¶static constexpr const llvm::Align None()
static constexpr const llvm::Align None()
Description
Returns a default constructed Align which corresponds to no alignment. This is useful to test for unalignment as it conveys clear semantic. `if (A != Align::None())` would be better than `if (A > Align(1))`
Declared at: llvm/include/llvm/Support/Alignment.h:93
¶template <typename T>
static constexpr llvm::Align::LogValue Of()
template <typename T>
static constexpr llvm::Align::LogValue Of()
Description
Allow constructions of constexpr Align from types. Compile time equivalent to Align(alignof(T)).
Declared at: llvm/include/llvm/Support/Alignment.h:102
Templates
- T
¶uint64_t value() const
uint64_t value() const
Description
This is a hole in the type system and should not be abused. Needed to interact with C for instance.
Declared at: llvm/include/llvm/Support/Alignment.h:86