Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Remarks] Emit a section containing remark diagnostics metadata
A section containing metadata on remark diagnostics will be emitted if the flag (-mllvm) -remarks-section is present. For now, the metadata is: * a magic number for remarks: "REMARKS\0" * the version number: a little-endian uint64_t * the absolute file path to the serialized remark diagnostics: a null-terminated string. Differential Revision: https://reviews.llvm.org/D59571 llvm-svn: 357043
- Loading branch information
Showing
8 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
; RUN: llc < %s -mtriple=x86_64-linux -remarks-section -pass-remarks-output=%/t.yaml | FileCheck -DPATH=%/t.yaml %s | ||
; RUN: llc < %s -mtriple=x86_64-darwin -remarks-section -pass-remarks-output=%/t.yaml | FileCheck --check-prefix=CHECK-DARWIN -DPATH=%/t.yaml %s | ||
|
||
; CHECK-LABEL: func1: | ||
|
||
; CHECK: .section .remarks,"e",@progbits | ||
; The magic number: | ||
; CHECK-NEXT: .ascii "REMARKS" | ||
; Null-terminator: | ||
; CHECK-NEXT: .byte 0 | ||
; The version: | ||
; CHECK-NEXT: .byte 0x00, 0x00, 0x00, 0x00 | ||
; CHECK-NEXT: .byte 0x00, 0x00, 0x00, 0x00 | ||
; The remark file path: | ||
; CHECK-NEXT: .ascii "[[PATH]]" | ||
; Null-terminator: | ||
; CHECK-NEXT: .byte 0 | ||
|
||
; CHECK-DARWIN: .section __LLVM,__remarks,regular,debug | ||
; The magic number: | ||
; CHECK-DARWIN-NEXT: .ascii "REMARKS" | ||
; Null-terminator: | ||
; CHECK-DARWIN-NEXT: .byte 0 | ||
; The version: | ||
; CHECK-DARWIN-NEXT: .byte 0x00, 0x00, 0x00, 0x00 | ||
; CHECK-DARWIN-NEXT: .byte 0x00, 0x00, 0x00, 0x00 | ||
; The remark file path: | ||
; CHECK-DARWIN-NEXT: .ascii "[[PATH]]" | ||
; Null-terminator: | ||
; CHECK-DARWIN-NEXT: .byte 0 | ||
define void @func1() { | ||
ret void | ||
} |