[MC] When using bundle aligment, align sections to bundle size
authorDerek Schuff <dschuff@google.com>
Tue, 21 Apr 2015 00:14:25 +0000 (00:14 +0000)
committerDerek Schuff <dschuff@google.com>
Tue, 21 Apr 2015 00:14:25 +0000 (00:14 +0000)
commit2a1678a7890a80b73b49c9ec185a65f11e0a6084
treec459b411db7f44f40f02e3bd0c8ef116ce7cbf24
parent0d41db11a2dcfc8f4410fb45aaa74d5ec1d10311
[MC] When using bundle aligment, align sections to bundle size

Summary:
Bundle aligment requires that the functions always start at an aligned address.
Usually this is ensured by the compiler, but assembly code does not always
begin with a .align directive.

This change ensures that sections get the correct alignment if they contain
any instructions and bundling is enabled. (It also makes LLVM match the
behavior of GNU as).

Differential Revision: http://reviews.llvm.org/D9131

llvm-svn: 235365
llvm/lib/MC/MCELFStreamer.cpp
llvm/test/MC/X86/AlignedBundling/section-alignment.s [new file with mode: 0644]