mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
allow functions and modules to have an explicit alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24209 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7d09ab6b88
commit
b2f71b12f7
@ -42,11 +42,18 @@ protected:
|
||||
|
||||
LinkageTypes Linkage; // The linkage of this global
|
||||
Module *Parent;
|
||||
unsigned Alignment;
|
||||
public:
|
||||
~GlobalValue() {
|
||||
removeDeadConstantUsers(); // remove any dead constants using this.
|
||||
}
|
||||
|
||||
unsigned getAlignment() const { return Alignment; }
|
||||
void setAlignment(unsigned Align) {
|
||||
assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!");
|
||||
Alignment = Align;
|
||||
}
|
||||
|
||||
/// If the usage is empty (except transitively dead constants), then this
|
||||
/// global value can can be safely deleted since the destructor will
|
||||
/// delete the dead constants as well.
|
||||
|
Loading…
Reference in New Issue
Block a user