If bundle alignment is enabled, do not add data to a fragment with instructions
authorDerek Schuff <dschuff@google.com>
Fri, 15 Feb 2013 22:50:52 +0000 (22:50 +0000)
committerDerek Schuff <dschuff@google.com>
Fri, 15 Feb 2013 22:50:52 +0000 (22:50 +0000)
commit8878bcc9e7b68158281f251fe664378603d4edb9
tree0fd11e6fff685ee464289c39d520d82347078a35
parent5a92eeca6b2b769f9ddab026f2db9806879cdf47
If bundle alignment is enabled, do not add data to a fragment with instructions

With bundle alignment, instructions all get their own MCFragments
(unless they are in a bundle-locked group). For instructions with
fixups, this is an MCDataFragment. Emitting actual data (e.g. for
.long) attempts to re-use MCDataFragments, which we don't want int
this case since it leads to fragments which exceed the bundle size.
So, don't reuse them in this case.
Also adds a test and fixes some formatting.

llvm-svn: 175316
llvm/lib/MC/MCELFStreamer.cpp
llvm/lib/MC/MCObjectStreamer.cpp
llvm/test/MC/ARM/AlignedBundling/group-bundle-arm.s