summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter.cpp5
-rw-r--r--llvm/lib/CodeGen/DwarfWriter.cpp12
2 files changed, 9 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index 9cdae348338..80965020d0d 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter.cpp
@@ -684,7 +684,8 @@ void AsmPrinter::EmitFile(unsigned Number, const std::string &Name) const {
// Align = std::max(Align, ForcedAlignBits);
//
void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalValue *GV,
- unsigned ForcedAlignBits) const {
+ unsigned ForcedAlignBits,
+ bool UseFillExpr) const {
if (GV && GV->getAlignment())
NumBits = Log2_32(GV->getAlignment());
NumBits = std::max(NumBits, ForcedAlignBits);
@@ -694,7 +695,7 @@ void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalValue *GV,
O << TAI->getAlignDirective() << NumBits;
unsigned FillValue = TAI->getTextAlignFillValue();
- bool UseFillExpr = IsInTextSection && FillValue;
+ UseFillExpr &= IsInTextSection && FillValue;
if (UseFillExpr) O << ",0x" << std::hex << FillValue << std::dec;
O << "\n";
}
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp
index 8cc7f30979b..dd7ba9cb888 100644
--- a/llvm/lib/CodeGen/DwarfWriter.cpp
+++ b/llvm/lib/CodeGen/DwarfWriter.cpp
@@ -2379,7 +2379,7 @@ private:
EmitFrameMoves(NULL, 0, Moves, false);
- Asm->EmitAlignment(2);
+ Asm->EmitAlignment(2, 0, 0, false);
EmitLabel("debug_frame_common_end", 0);
Asm->EOL();
@@ -2412,7 +2412,7 @@ private:
EmitFrameMoves("func_begin", DebugFrameInfo.Number, DebugFrameInfo.Moves, false);
- Asm->EmitAlignment(2);
+ Asm->EmitAlignment(2, 0, 0, false);
EmitLabel("debug_frame_end", DebugFrameInfo.Number);
Asm->EOL();
@@ -2865,7 +2865,7 @@ private:
RI->getInitialFrameState(Moves);
EmitFrameMoves(NULL, 0, Moves, true);
- Asm->EmitAlignment(2);
+ Asm->EmitAlignment(2, 0, 0, false);
EmitLabel("eh_frame_common_end", Index);
Asm->EOL();
@@ -2951,7 +2951,7 @@ private:
// frame.
EmitFrameMoves("eh_func_begin", EHFrameInfo.Number, EHFrameInfo.Moves, true);
- Asm->EmitAlignment(2);
+ Asm->EmitAlignment(2, 0, 0, false);
EmitLabel("eh_frame_end", EHFrameInfo.Number);
// If the function is marked used, this table should be also. We cannot
@@ -3270,7 +3270,7 @@ private:
// Begin the exception table.
Asm->SwitchToDataSection(TAI->getDwarfExceptionSection());
O << "GCC_except_table" << SubprogramCount << ":\n";
- Asm->EmitAlignment(2);
+ Asm->EmitAlignment(2, 0, 0, false);
for (unsigned i = 0; i != SizeAlign; ++i) {
Asm->EmitInt8(0);
Asm->EOL("Padding");
@@ -3362,7 +3362,7 @@ private:
Asm->EOL("Filter TypeInfo index");
}
- Asm->EmitAlignment(2);
+ Asm->EmitAlignment(2, 0, 0, false);
}
public:
OpenPOWER on IntegriCloud