diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-11-14 19:00:30 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-11-14 19:00:30 +0000 |
| commit | 1a4adc7aeeecb76143563c3c76c655ce213a42cc (patch) | |
| tree | ef922e4a8c72ce8db2e85c935e592a39e4c2869b /llvm/lib/Target | |
| parent | dd8eeed096b636195cc4eba6b5c705c217a9a17d (diff) | |
| download | bcm5719-llvm-1a4adc7aeeecb76143563c3c76c655ce213a42cc.tar.gz bcm5719-llvm-1a4adc7aeeecb76143563c3c76c655ce213a42cc.zip | |
Handle globals with explicit alignment requests
llvm-svn: 24355
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp index e036f677192..4b1404b2021 100644 --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -74,7 +74,6 @@ namespace { else NS = NewSection; - if (CurSection != NS) { CurSection = NS; if (!CurSection.empty()) @@ -398,7 +397,7 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) { // Print out labels for the function. const Function *F = MF.getFunction(); SwitchSection(".text", F); - emitAlignment(4); + emitAlignment(4, F); if (!F->hasInternalLinkage()) O << "\t.globl\t" << CurrentFnName << "\n"; O << CurrentFnName << ":\n"; @@ -466,7 +465,8 @@ bool DarwinAsmPrinter::doFinalization(Module &M) { const TargetData &TD = TM.getTargetData(); // Print out module-level global variables here. - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) + for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); + I != E; ++I) if (I->hasInitializer()) { // External global require no code O << '\n'; std::string name = Mang->getValueName(I); @@ -512,7 +512,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) { abort(); } - emitAlignment(Align); + emitAlignment(Align, I); O << name << ":\t\t\t\t; '" << I->getName() << "'\n"; emitGlobalConstant(C); } |

