mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-31 09:22:31 +00:00
MCNullStreamer: assign file IDs to resolve crashes and errors
Use the MCStreamer base implementations for file ID tracking instead of overriding them as no-ops. Avoids assertions when streaming Dwarf debug info, and fixes ASM parsing of loc and file directives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211282 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e4d0a5ec18
commit
36a321160e
@ -81,15 +81,7 @@ namespace {
|
|||||||
unsigned char Value = 0) override { return false; }
|
unsigned char Value = 0) override { return false; }
|
||||||
|
|
||||||
void EmitFileDirective(StringRef Filename) override {}
|
void EmitFileDirective(StringRef Filename) override {}
|
||||||
unsigned EmitDwarfFileDirective(unsigned FileNo, StringRef Directory,
|
|
||||||
StringRef Filename,
|
|
||||||
unsigned CUID = 0) override {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
void EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
|
|
||||||
unsigned Column, unsigned Flags,
|
|
||||||
unsigned Isa, unsigned Discriminator,
|
|
||||||
StringRef FileName) override {}
|
|
||||||
void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo&) override {}
|
void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo&) override {}
|
||||||
|
|
||||||
void EmitBundleAlignMode(unsigned AlignPow2) override {}
|
void EmitBundleAlignMode(unsigned AlignPow2) override {}
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
; RUN: %llc_dwarf -O0 -filetype=obj < %s > %t
|
; RUN: %llc_dwarf -O0 -filetype=obj < %s > %t
|
||||||
; RUN: llvm-dwarfdump %t | FileCheck %s
|
; RUN: llvm-dwarfdump %t | FileCheck %s
|
||||||
|
|
||||||
|
; Also test that the null streamer doesn't crash with debug info.
|
||||||
|
; RUN: %llc_dwarf -O0 -filetype=null < %s
|
||||||
|
|
||||||
; generated from the following source compiled to bitcode with clang -g -O1
|
; generated from the following source compiled to bitcode with clang -g -O1
|
||||||
; static int i;
|
; static int i;
|
||||||
; int main() {
|
; int main() {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
|
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
|
||||||
|
# RUN: llvm-mc -triple i386-unknown-unknown %s -filetype=null
|
||||||
|
|
||||||
.file "hello"
|
.file "hello"
|
||||||
.file 1 "worl\144" # "\144" is "d"
|
.file 1 "worl\144" # "\144" is "d"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc -triple i386-unknown-unknown %s
|
# RUN: llvm-mc -triple i386-unknown-unknown %s
|
||||||
|
# RUN: llvm-mc -triple i386-unknown-unknown %s -filetype=null
|
||||||
# FIXME: Actually test the output.
|
# FIXME: Actually test the output.
|
||||||
|
|
||||||
.line
|
.line
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
|
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
|
||||||
|
# RUN: llvm-mc -triple i386-unknown-unknown %s -filetype=null
|
||||||
|
|
||||||
.file 1 "hello"
|
.file 1 "hello"
|
||||||
# CHECK: .file 1 "hello"
|
# CHECK: .file 1 "hello"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user