brintos

brintos / llvm-project-archived public Read only

0
0
Text · 901 B · 7afe3cd Raw
19 lines · plain
1## Test llvm-objdump's --source behaviour when a line number is greater than the2## file length and ensure that we emit a warning.3 4# RUN: sed -e "s,SRC_COMPDIR,%/p/Inputs,g" %p/Inputs/source-interleave.ll > %t.ll5# RUN: sed -e "s,line: 7,line: 9999,g" %t.ll > %t2.ll6 7# RUN: llc -o %t.o -filetype=obj -mtriple=x86_64-pc-linux %t.ll8# RUN: llc -o %t2.o -filetype=obj -mtriple=x86_64-pc-linux %t2.ll9 10# RUN: llvm-objdump --source %t.o | FileCheck %s --check-prefixes=CHECK,GOOD11# RUN: llvm-objdump --source %t2.o 2> %t2.e | FileCheck %s --check-prefixes=CHECK --implicit-check-not="int *b = &a;"12# RUN: FileCheck %s --input-file %t2.e --check-prefixes=WARN13 14# CHECK:      <main>:15# CHECK-NEXT: ; int main() {16# WARN:       warning: '{{.*}}': debug info line number 9999 exceeds the number of lines in {{.*}}source-interleave-x86_64.c17# GOOD:       ;   int *b = &a;18# CHECK:      ;   return *b + foo();19