mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Remove getFunctionAlignment from TargetELFInfo and use new MachineFunction alignment method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74686 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -40,10 +40,11 @@ void ELFCodeEmitter::startFunction(MachineFunction &MF) {
|
||||
BufferBegin = &BD[0];
|
||||
BufferEnd = BufferBegin + BD.capacity();
|
||||
|
||||
// Align the output buffer with function alignment, and
|
||||
// upgrade the section alignment if required
|
||||
unsigned Align =
|
||||
TM.getELFWriterInfo()->getFunctionAlignment(MF.getFunction());
|
||||
// Get the function alignment in bytes
|
||||
unsigned Align = (1 << MF.getAlignment());
|
||||
|
||||
// Align the section size with the function alignment, so the function can
|
||||
// start in a aligned offset, also update the section alignment if needed.
|
||||
if (ES->Align < Align) ES->Align = Align;
|
||||
ES->Size = (ES->Size + (Align-1)) & (-Align);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user