From 9fbe16ee18a3e4639f0e6dadb01ab03dedbb99fb Mon Sep 17 00:00:00 2001 From: "Zi Xuan Wu (Zeson)" Date: Fri, 28 Oct 2022 10:26:32 +0800 Subject: [PATCH] [CSKY] Fix .bss directive compling error created by --save-temps .bss without symbol and num following can't be compiled in CSKY target, which is consistent to GCC behavior. So when --save-temps generates .bss, we should UsesELFSectionDirectiveForBSS to avoid such error. --- llvm/lib/Target/CSKY/MCTargetDesc/CSKYMCAsmInfo.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/lib/Target/CSKY/MCTargetDesc/CSKYMCAsmInfo.cpp b/llvm/lib/Target/CSKY/MCTargetDesc/CSKYMCAsmInfo.cpp index 543f2e3..e8576d3 100644 --- a/llvm/lib/Target/CSKY/MCTargetDesc/CSKYMCAsmInfo.cpp +++ b/llvm/lib/Target/CSKY/MCTargetDesc/CSKYMCAsmInfo.cpp @@ -23,5 +23,8 @@ CSKYMCAsmInfo::CSKYMCAsmInfo(const Triple &TargetTriple) { SupportsDebugInformation = true; CommentString = "#"; + // Uses '.section' before '.bss' directive + UsesELFSectionDirectiveForBSS = true; + ExceptionsType = ExceptionHandling::DwarfCFI; } -- 2.7.4