aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-11-14 19:00:30 +0000
committerChris Lattner <sabre@nondot.org>2005-11-14 19:00:30 +0000
commitced704ba608ce0675bdba1677b612288b6e0956f (patch)
tree4654af2288d91c4c4f01ae2c9304ceacfb7ffc06
parenta1ab72daadbdc5b499ce7e7e97c4b80efad46736 (diff)
Handle globals with explicit alignment requests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24355 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/PowerPC/PPCAsmPrinter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
index e036f67719..4b1404b202 100644
--- a/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/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);
}