brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.0 KiB · 54e0d9e Raw
118 lines · plain
1# REQUIRES: x862 3# RUN: rm -rf %t && split-file %s %t4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %t/test.s -o %t/test.o5# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %t/bcde-abcd-abde.s -o %t/bcde-abcd-abde.o6# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %t/bbcde-abcdd.s -o %t/bbcde-abcdd.o7# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %t/aabcde-abcdee.s -o %t/aabcde-abcdee.o8# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %t/bacde.s -o %t/bacde.o9# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %t/__Z3fooPi.s -o %t/__Z3fooPi.o10# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %t/__Z3fooPKi-__Z3fooPi.s -o %t/__Z3fooPKi-__Z3fooPi.o11# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %t/__Z3FOOPKi.s -o %t/__Z3FOOPKi.o12# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %t/__Z3fooPKi-__Z3FOOPKi.s -o %t/__Z3fooPKi-__Z3FOOPKi.o13 14## Insert a character.15## The spell corrector is enabled for the first two "undefined symbol" diagnostics.16# RUN: not %lld %t/test.o %t/bcde-abcd-abde.o -o /dev/null 2>&1 | FileCheck --check-prefix=INSERT %s -DFILE=%t/test.o17 18## Symbols defined in DSO can be suggested.19# RUN: %lld %t/test.o -dylib -o %t.dylib20# RUN: not %lld %t.dylib %t/bcde-abcd-abde.o -o /dev/null 2>&1 | FileCheck --check-prefix=INSERT %s -DFILE=%t.dylib21 22# INSERT:      error: undefined symbol: abde23# INSERT-NEXT: >>> referenced by {{.*}}24# INSERT-NEXT: >>> did you mean: abcde25# INSERT-NEXT: >>> defined in: [[FILE]]26# INSERT:      error: undefined symbol: abcd27# INSERT-NEXT: >>> referenced by {{.*}}28# INSERT-NEXT: >>> did you mean: abcde29# INSERT-NEXT: >>> defined in: [[FILE]]30# INSERT:      error: undefined symbol: bcde31# INSERT-NEXT: >>> referenced by {{.*}}32# INSERT-NOT:  >>>33 34## Substitute a character.35# RUN: not %lld %t/test.o %t/bbcde-abcdd.o -o /dev/null 2>&1 | FileCheck --check-prefix=SUBST %s36 37# SUBST:      error: undefined symbol: abcdd38# SUBST-NEXT: >>> referenced by {{.*}}39# SUBST-NEXT: >>> did you mean: abcde40# SUBST:      error: undefined symbol: bbcde41# SUBST-NEXT: >>> referenced by {{.*}}42# SUBST-NEXT: >>> did you mean: abcde43 44## Delete a character.45# RUN: not %lld %t/test.o %t/aabcde-abcdee.o -o /dev/null 2>&1 | FileCheck --check-prefix=DELETE %s46 47# DELETE:      error: undefined symbol: abcdee48# DELETE-NEXT: >>> referenced by {{.*}}49# DELETE-NEXT: >>> did you mean: abcde50# DELETE:      error: undefined symbol: aabcde51# DELETE-NEXT: >>> referenced by {{.*}}52# DELETE-NEXT: >>> did you mean: abcde53 54## Transpose.55# RUN: not %lld %t/test.o %t/bacde.o -o /dev/null 2>&1 | FileCheck --check-prefix=TRANSPOSE %s56 57# TRANSPOSE:      error: undefined symbol: bacde58# TRANSPOSE-NEXT: >>> referenced by {{.*}}59# TRANSPOSE-NEXT: >>> did you mean: abcde60 61## Missing const qualifier.62# RUN: not %lld %t/test.o %t/__Z3fooPi.o -demangle -o /dev/null 2>&1 | FileCheck --check-prefix=CONST %s63## Local defined symbols.64# RUN: not %lld %t/__Z3fooPKi-__Z3fooPi.o -demangle -o /dev/null 2>&1 | FileCheck --check-prefix=CONST %s65 66# CONST:      error: undefined symbol: foo(int*)67# CONST-NEXT: >>> referenced by {{.*}}68# CONST-NEXT: >>> did you mean: foo(int const*)69 70## Case mismatch.71# RUN: not %lld %t/test.o %t/__Z3FOOPKi.o -demangle -o /dev/null 2>&1 | FileCheck --check-prefix=CASE %s72# RUN: not %lld %t/__Z3fooPKi-__Z3FOOPKi.o -demangle -o /dev/null 2>&1 | FileCheck --check-prefix=CASE %s73 74# CASE:      error: undefined symbol: FOO(int const*)75# CASE-NEXT: >>> referenced by {{.*}}76# CASE-NEXT: >>> did you mean: foo(int const*)77 78#--- test.s79.globl _main, abcde, __Z3fooPKi80_main:81abcde:82__Z3fooPKi:83 84#--- bcde-abcd-abde.s85call bcde86call abcd87call abde88 89# Creates a nullptr entry in ObjFile::symbols, to test we don't crash on that.90.section  __DWARF,__debug_aranges,regular,debug91ltmp1:92  .byte 093 94.subsections_via_symbols95 96#--- bbcde-abcdd.s97call bbcde98call abcdd99 100#--- aabcde-abcdee.s101call aabcde102call abcdee103 104#--- bacde.s105call bacde106 107#--- __Z3fooPi.s108call __Z3fooPi109 110#--- __Z3fooPKi-__Z3fooPi.s111__Z3fooPKi: call __Z3fooPi112 113#--- __Z3FOOPKi.s114call __Z3FOOPKi115 116#--- __Z3fooPKi-__Z3FOOPKi.s117__Z3fooPKi: call __Z3FOOPKi118