Compiler projects using llvm
## Test llvm-nm demangling of symbols for XCOFF object files.
## Test following symbols:
## 1. Empty name
## 2. Name consisting solely of .
## 3. Name starting with . that can't be demangled
## 4. Name starting with . that can be demangled
## 5. Name not starting with . that can't be demangled
## 6. Name not starting with . that can be demangled

# RUN: yaml2obj --docnum=1 %s -o %t.o
# RUN: llvm-nm --demangle --format=just-symbols %t.o 2>&1 | FileCheck %s --check-prefix=NM-DEMANGLE --match-full-lines

# NM-DEMANGLE:       {{$}}
# NM-DEMANGLE-NEXT:  .
# NM-DEMANGLE-NEXT:  ._5func1i
# NM-DEMANGLE-NEXT:  .func1(int)
# NM-DEMANGLE-NEXT:  L5func0v
# NM-DEMANGLE-NEXT:  func0()

--- !XCOFF
FileHeader:
  MagicNumber:       0x1DF
Sections:
  - Name:            .text
    Flags:           [ STYP_TEXT ]
  - Name:            .data
    Flags:           [ STYP_DATA ]
Symbols:
  - Name:            ""
    Section:         .text
  - Name:            .
    Section:         .text
  - Name:            ._Z5func1i
    Section:         .text
  - Name:            ._5func1i
    Section:         .text
  - Name:            _ZL5func0v
    Section:         .data
  - Name:            L5func0v
    Section:         .data