diff options
author | Paul Robinson <paul.robinson@sony.com> | 2018-06-14 13:38:20 +0000 |
---|---|---|
committer | Paul Robinson <paul.robinson@sony.com> | 2018-06-14 13:38:20 +0000 |
commit | cc7344aae353493758a02a43d8c125ebfe500176 (patch) | |
tree | 217d1c604bcecd92149ba7cd93faa8d2e847ad4b /llvm/test/CodeGen/Generic | |
parent | 767e1521656a834da28a723134dd5f344e9dbd70 (diff) | |
download | bcm5719-llvm-cc7344aae353493758a02a43d8c125ebfe500176.tar.gz bcm5719-llvm-cc7344aae353493758a02a43d8c125ebfe500176.zip |
[DWARFv5] Tolerate files not all having an MD5 checksum.
In some cases, for example when compiling a preprocessed file, the
front-end is not able to provide an MD5 checksum for all files. When
that happens, omit the MD5 checksums from the final DWARF, because
DWARF doesn't have a way to indicate that some but not all files have
a checksum.
When assembling a .s file, and some but not all .file directives
provide an MD5 checksum, issue a warning and don't emit MD5 into the
DWARF.
Fixes PR37623.
Differential Revision: https://reviews.llvm.org/D48135
llvm-svn: 334710
Diffstat (limited to 'llvm/test/CodeGen/Generic')
-rw-r--r-- | llvm/test/CodeGen/Generic/dwarf-md5.ll | 14 | ||||
-rw-r--r-- | llvm/test/CodeGen/Generic/dwarf-source.ll | 10 |
2 files changed, 13 insertions, 11 deletions
diff --git a/llvm/test/CodeGen/Generic/dwarf-md5.ll b/llvm/test/CodeGen/Generic/dwarf-md5.ll index dc2d92c10d4..fc708f78d67 100644 --- a/llvm/test/CodeGen/Generic/dwarf-md5.ll +++ b/llvm/test/CodeGen/Generic/dwarf-md5.ll @@ -5,21 +5,21 @@ ; XFAIL: darwin ; REQUIRES: object-emission -; RUN: %llc_dwarf -dwarf-version 4 -filetype=asm -o - %s | FileCheck %s --check-prefixes=ASM,ASM-4 -; RUN: %llc_dwarf -dwarf-version 5 -filetype=asm -o - %s | FileCheck %s --check-prefixes=ASM,ASM-5 +; RUN: %llc_dwarf -dwarf-version 4 -filetype=asm -o - %s | FileCheck %s --check-prefix=ASM-4 +; RUN: %llc_dwarf -dwarf-version 5 -filetype=asm -o - %s | FileCheck %s --check-prefix=ASM-5 ; RUN: %llc_dwarf -dwarf-version 4 -filetype=obj -o %t4.o %s ; RUN: llvm-dwarfdump -debug-line %t4.o | FileCheck %s --check-prefix=OBJ ; RUN: %llc_dwarf -dwarf-version 5 -filetype=obj -o %t5.o %s ; RUN: llvm-dwarfdump -debug-line %t5.o | FileCheck %s --check-prefixes=OBJ,OBJ-5 ; ASM-4-NOT: .file 0 -; ASM-5: .file 0 "/scratch{{.*[/\\]}}t.c" md5 0x00000000000000000000000000000000 -; ASM: .file 1 "/scratch{{.*[/\\]}}t1.h" +; ASM-4: .file 1 "/scratch{{.*[/\\]}}t1.h" ; ASM-4-NOT: md5 -; ASM-5-SAME: md5 0x11111111111111111111111111111111 -; ASM: .file 2 "/scratch{{.*[/\\]}}t2.h" +; ASM-4: .file 2 "/scratch{{.*[/\\]}}t2.h" ; ASM-4-NOT: md5 -; ASM-5-SAME: md5 0x22222222222222222222222222222222 +; ASM-5: .file 0 "/scratch{{.*[/\\]}}t.c" md5 0x00000000000000000000000000000000 +; ASM-5: .file 1 "t1.h" md5 0x11111111111111111111111111111111 +; ASM-5: .file 2 "t2.h" md5 0x22222222222222222222222222222222 ; OBJ-5: file_names[ 0]: ; OBJ-5-NEXT: name: "t.c" diff --git a/llvm/test/CodeGen/Generic/dwarf-source.ll b/llvm/test/CodeGen/Generic/dwarf-source.ll index 6e9b26b0570..0636f926150 100644 --- a/llvm/test/CodeGen/Generic/dwarf-source.ll +++ b/llvm/test/CodeGen/Generic/dwarf-source.ll @@ -5,16 +5,18 @@ ; XFAIL: darwin ; REQUIRES: object-emission -; RUN: %llc_dwarf -dwarf-version 4 -filetype=asm -o - %s | FileCheck %s --check-prefix=ASM -; RUN: %llc_dwarf -dwarf-version 5 -filetype=asm -o - %s | FileCheck %s --check-prefixes=ASM,ASM-5 +; RUN: %llc_dwarf -dwarf-version 4 -filetype=asm -o - %s | FileCheck %s --check-prefix=ASM-4 +; RUN: %llc_dwarf -dwarf-version 5 -filetype=asm -o - %s | FileCheck %s --check-prefix=ASM-5 ; RUN: %llc_dwarf -dwarf-version 4 -filetype=obj -o %t4.o %s ; RUN: llvm-dwarfdump -debug-line %t4.o | FileCheck %s --check-prefixes=OBJ,OBJ-4 ; RUN: %llc_dwarf -dwarf-version 5 -filetype=obj -o %t5.o %s ; RUN: llvm-dwarfdump -debug-line %t5.o | FileCheck %s --check-prefixes=OBJ,OBJ-5 +; ASM-4: .file 1 "/test{{.*[/\\]}}t1.h" source "11111111111111111111111111111111" +; ASM-4: .file 2 "/test{{.*[/\\]}}t2.h" source "22222222222222222222222222222222" ; ASM-5: .file 0 "/test{{.*[/\\]}}t.c" source "00000000000000000000000000000000" -; ASM: .file 1 "/test{{.*[/\\]}}t1.h" source "11111111111111111111111111111111" -; ASM: .file 2 "/test{{.*[/\\]}}t2.h" source "22222222222222222222222222222222" +; ASM-5: .file 1 "t1.h" source "11111111111111111111111111111111" +; ASM-5: .file 2 "t2.h" source "22222222222222222222222222222222" ; OBJ-5: file_names[ 0]: ; OBJ-5-NEXT: name: "t.c" |