1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[DWARF] Emit reasonable debug info for empty .s files.

llvm-svn: 352541
This commit is contained in:
Paul Robinson 2019-01-29 20:53:51 +00:00
parent e15a520f8c
commit e0007a64ee
2 changed files with 9 additions and 0 deletions

View File

@ -900,6 +900,9 @@ bool AsmParser::Run(bool NoInitialTextSection, bool NoFinalize) {
eatToEndOfStatement();
}
// Make sure we get proper DWARF even for empty files.
(void)enabledGenDwarfForAssembly();
getTargetParser().onEndOfFile();
printPendingErrors();

View File

@ -0,0 +1,6 @@
# RUN: llvm-mc -triple i386-linux-gnu -g -dwarf-version 4 < %s | FileCheck %s
# RUN: llvm-mc -triple i386-linux-gnu -g -dwarf-version 5 < %s | FileCheck %s
# CHECK: .section .debug_info
# CHECK: .section .debug_info
# CHECK-NOT: .section
# CHECK: .ascii "<stdin>"