diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-05-25 18:34:26 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-05-25 18:34:26 +0000 |
commit | cd62518369a8a711b26f6bcb85d727b5e386b2f1 (patch) | |
tree | 6f1442ec08d66b816e5a62ff13c74b9b76087cde /llvm/lib/MC/MCELFStreamer.cpp | |
parent | 0be4fa761f21505099bf904652b3e061b3ce732f (diff) | |
download | bcm5719-llvm-cd62518369a8a711b26f6bcb85d727b5e386b2f1.tar.gz bcm5719-llvm-cd62518369a8a711b26f6bcb85d727b5e386b2f1.zip |
Move HasInstructions to MCSection.
llvm-svn: 238150
Diffstat (limited to 'llvm/lib/MC/MCELFStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCELFStreamer.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp index 0e4d637c8ce..23546cc085d 100644 --- a/llvm/lib/MC/MCELFStreamer.cpp +++ b/llvm/lib/MC/MCELFStreamer.cpp @@ -137,11 +137,14 @@ void MCELFStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) { // If bundle aligment is used and there are any instructions in the section, it // needs to be aligned to at least the bundle size. -static void setSectionAlignmentForBundling( - const MCAssembler &Assembler, MCSectionData *Section) { - if (Assembler.isBundlingEnabled() && Section && Section->hasInstructions() && - Section->getSection().getAlignment() < Assembler.getBundleAlignSize()) - Section->getSection().setAlignment(Assembler.getBundleAlignSize()); +static void setSectionAlignmentForBundling(const MCAssembler &Assembler, + MCSectionData *SD) { + if (!SD) + return; + MCSection &Section = SD->getSection(); + if (Assembler.isBundlingEnabled() && Section.hasInstructions() && + Section.getAlignment() < Assembler.getBundleAlignSize()) + Section.setAlignment(Assembler.getBundleAlignSize()); } void MCELFStreamer::ChangeSection(MCSection *Section, |