1 # llvm-symbolizer infers the number base from the form of the address.
2 RUN: llvm-symbolizer -e %p/Inputs/addr.exe -a 0x1234 | FileCheck %s
3 RUN: llvm-symbolizer -e %p/Inputs/addr.exe -a 0X1234 | FileCheck %s
4 RUN: llvm-symbolizer -e %p/Inputs/addr.exe -a 4660 | FileCheck %s
5 RUN: llvm-symbolizer -e %p/Inputs/addr.exe -a 011064 | FileCheck %s
6 RUN: llvm-symbolizer -e %p/Inputs/addr.exe -a 0b1001000110100 | FileCheck %s
7 RUN: llvm-symbolizer -e %p/Inputs/addr.exe -a 0B1001000110100 | FileCheck %s
8 RUN: llvm-symbolizer -e %p/Inputs/addr.exe -a 0o11064 | FileCheck %s
10 # llvm-symbolizer / StringRef::getAsInteger only accepts the 0o prefix in lowercase.
11 RUN: llvm-symbolizer -e %p/Inputs/addr.exe -a 0O1234 | FileCheck %s --check-prefix=INVALID
13 # llvm-addr2line always requires hexadecimal, but accepts an optional 0x prefix.
14 RUN: llvm-addr2line -e %p/Inputs/addr.exe -a 0x1234 | FileCheck %s
15 RUN: llvm-addr2line -e %p/Inputs/addr.exe -a 0X1234 | FileCheck %s
16 RUN: llvm-addr2line -e %p/Inputs/addr.exe -a 1234 | FileCheck %s
17 RUN: llvm-addr2line -e %p/Inputs/addr.exe -a 01234 | FileCheck %s
18 RUN: llvm-addr2line -e %p/Inputs/addr.exe -a 0b1010 | FileCheck %s --check-prefix=HEXADECIMAL-NOT-BINARY
19 RUN: llvm-addr2line -e %p/Inputs/addr.exe -a 0B1010 | FileCheck %s --check-prefix=HEXADECIMAL-NOT-BINARY
20 RUN: llvm-addr2line -e %p/Inputs/addr.exe -a 0o1234 | FileCheck %s --check-prefix=INVALID-NOT-OCTAL
21 RUN: llvm-addr2line -e %p/Inputs/addr.exe -a 0O1234 | FileCheck %s --check-prefix=INVALID-NOT-OCTAL
29 HEXADECIMAL-NOT-BINARY: 0xb1010
30 HEXADECIMAL-NOT-BINARY: ??
32 INVALID-NOT-OCTAL: ??:0