aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backend/lib/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--backend/lib/AsmPrinter/AsmPrinter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/lib/AsmPrinter/AsmPrinter.cpp b/backend/lib/AsmPrinter/AsmPrinter.cpp
index 49388e1..1f237af 100644
--- a/backend/lib/AsmPrinter/AsmPrinter.cpp
+++ b/backend/lib/AsmPrinter/AsmPrinter.cpp
@@ -402,7 +402,8 @@ Expected<void> AsmPrinter::emitFunction(const MachineFunction &Function) {
if (!Type)
return std::unexpected(Type.error());
}
- if (const auto Alignment = Function.attributes().alignment()) {
+ if (const auto Alignment = Function.attributes().alignment();
+ Alignment && Alignment->bytes() > 1) {
auto Aligned = Streamer->emitAlignment(Alignment->bytes());
if (!Aligned)
return std::unexpected(Aligned.error());