Thanks for using Compiler Explorer
Sponsors
Jakt
C++
Ada
Analysis
Android Java
Android Kotlin
Assembly
C
C3
Carbon
C++ (Circle)
CIRCT
Clean
CMake
CMakeScript
COBOL
C++ for OpenCL
MLIR
Cppx
Cppx-Blue
Cppx-Gold
Cpp2-cppfront
Crystal
C#
CUDA C++
D
Dart
Elixir
Erlang
Fortran
F#
GLSL
Go
Haskell
HLSL
Hook
Hylo
IL
ispc
Java
Julia
Kotlin
LLVM IR
LLVM MIR
Modula-2
Nim
Objective-C
Objective-C++
OCaml
Odin
OpenCL C
Pascal
Pony
Python
Racket
Ruby
Rust
Snowball
Scala
Slang
Solidity
Spice
SPIR-V
Swift
LLVM TableGen
Toit
TypeScript Native
V
Vala
Visual Basic
Vyper
WASM
Zig
Javascript
GIMPLE
Ygen
c++ source #1
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
6502-c++ 11.1.0
ARM GCC 10.2.0
ARM GCC 10.3.0
ARM GCC 10.4.0
ARM GCC 10.5.0
ARM GCC 11.1.0
ARM GCC 11.2.0
ARM GCC 11.3.0
ARM GCC 11.4.0
ARM GCC 12.1.0
ARM GCC 12.2.0
ARM GCC 12.3.0
ARM GCC 12.4.0
ARM GCC 13.1.0
ARM GCC 13.2.0
ARM GCC 13.2.0 (unknown-eabi)
ARM GCC 13.3.0
ARM GCC 13.3.0 (unknown-eabi)
ARM GCC 14.1.0
ARM GCC 14.1.0 (unknown-eabi)
ARM GCC 14.2.0
ARM GCC 14.2.0 (unknown-eabi)
ARM GCC 4.5.4
ARM GCC 4.6.4
ARM GCC 5.4
ARM GCC 6.3.0
ARM GCC 6.4.0
ARM GCC 7.3.0
ARM GCC 7.5.0
ARM GCC 8.2.0
ARM GCC 8.5.0
ARM GCC 9.3.0
ARM GCC 9.4.0
ARM GCC 9.5.0
ARM GCC trunk
ARM gcc 10.2.1 (none)
ARM gcc 10.3.1 (2021.07 none)
ARM gcc 10.3.1 (2021.10 none)
ARM gcc 11.2.1 (none)
ARM gcc 5.4.1 (none)
ARM gcc 7.2.1 (none)
ARM gcc 8.2 (WinCE)
ARM gcc 8.3.1 (none)
ARM gcc 9.2.1 (none)
ARM msvc v19.0 (WINE)
ARM msvc v19.10 (WINE)
ARM msvc v19.14 (WINE)
ARM64 Morello gcc 10.1 Alpha 2
ARM64 gcc 10.2
ARM64 gcc 10.3
ARM64 gcc 10.4
ARM64 gcc 10.5.0
ARM64 gcc 11.1
ARM64 gcc 11.2
ARM64 gcc 11.3
ARM64 gcc 11.4.0
ARM64 gcc 12.1
ARM64 gcc 12.2.0
ARM64 gcc 12.3.0
ARM64 gcc 12.4.0
ARM64 gcc 13.1.0
ARM64 gcc 13.2.0
ARM64 gcc 13.3.0
ARM64 gcc 14.1.0
ARM64 gcc 14.2.0
ARM64 gcc 4.9.4
ARM64 gcc 5.4
ARM64 gcc 5.5.0
ARM64 gcc 6.3
ARM64 gcc 6.4
ARM64 gcc 7.3
ARM64 gcc 7.5
ARM64 gcc 8.2
ARM64 gcc 8.5
ARM64 gcc 9.3
ARM64 gcc 9.4
ARM64 gcc 9.5
ARM64 gcc trunk
ARM64 msvc v19.14 (WINE)
AVR gcc 10.3.0
AVR gcc 11.1.0
AVR gcc 12.1.0
AVR gcc 12.2.0
AVR gcc 12.3.0
AVR gcc 12.4.0
AVR gcc 13.1.0
AVR gcc 13.2.0
AVR gcc 13.3.0
AVR gcc 14.1.0
AVR gcc 14.2.0
AVR gcc 4.5.4
AVR gcc 4.6.4
AVR gcc 5.4.0
AVR gcc 9.2.0
AVR gcc 9.3.0
Arduino Mega (1.8.9)
Arduino Uno (1.8.9)
BPF clang (trunk)
BPF clang 13.0.0
BPF clang 14.0.0
BPF clang 15.0.0
BPF clang 16.0.0
BPF clang 17.0.1
BPF clang 18.1.0
BPF clang 19.1.0
EDG (experimental reflection)
EDG 6.5
EDG 6.5 (GNU mode gcc 13)
EDG 6.6
EDG 6.6 (GNU mode gcc 13)
FRC 2019
FRC 2020
FRC 2023
HPPA gcc 14.2.0
KVX ACB 4.1.0 (GCC 7.5.0)
KVX ACB 4.1.0-cd1 (GCC 7.5.0)
KVX ACB 4.10.0 (GCC 10.3.1)
KVX ACB 4.11.1 (GCC 10.3.1)
KVX ACB 4.12.0 (GCC 11.3.0)
KVX ACB 4.2.0 (GCC 7.5.0)
KVX ACB 4.3.0 (GCC 7.5.0)
KVX ACB 4.4.0 (GCC 7.5.0)
KVX ACB 4.6.0 (GCC 9.4.1)
KVX ACB 4.8.0 (GCC 9.4.1)
KVX ACB 4.9.0 (GCC 9.4.1)
KVX ACB 5.0.0 (GCC 12.2.1)
KVX ACB 5.2.0 (GCC 13.2.1)
LoongArch64 clang (trunk)
LoongArch64 clang 17.0.1
LoongArch64 clang 18.1.0
LoongArch64 clang 19.1.0
M68K gcc 13.1.0
M68K gcc 13.2.0
M68K gcc 13.3.0
M68K gcc 14.1.0
M68K gcc 14.2.0
M68k clang (trunk)
MRISC32 gcc (trunk)
MSP430 gcc 4.5.3
MSP430 gcc 5.3.0
MSP430 gcc 6.2.1
MinGW clang 14.0.3
MinGW clang 14.0.6
MinGW clang 15.0.7
MinGW clang 16.0.0
MinGW clang 16.0.2
MinGW gcc 11.3.0
MinGW gcc 12.1.0
MinGW gcc 12.2.0
MinGW gcc 13.1.0
RISC-V (32-bits) gcc (trunk)
RISC-V (32-bits) gcc 10.2.0
RISC-V (32-bits) gcc 10.3.0
RISC-V (32-bits) gcc 11.2.0
RISC-V (32-bits) gcc 11.3.0
RISC-V (32-bits) gcc 11.4.0
RISC-V (32-bits) gcc 12.1.0
RISC-V (32-bits) gcc 12.2.0
RISC-V (32-bits) gcc 12.3.0
RISC-V (32-bits) gcc 12.4.0
RISC-V (32-bits) gcc 13.1.0
RISC-V (32-bits) gcc 13.2.0
RISC-V (32-bits) gcc 13.3.0
RISC-V (32-bits) gcc 14.1.0
RISC-V (32-bits) gcc 14.2.0
RISC-V (32-bits) gcc 8.2.0
RISC-V (32-bits) gcc 8.5.0
RISC-V (32-bits) gcc 9.4.0
RISC-V (64-bits) gcc (trunk)
RISC-V (64-bits) gcc 10.2.0
RISC-V (64-bits) gcc 10.3.0
RISC-V (64-bits) gcc 11.2.0
RISC-V (64-bits) gcc 11.3.0
RISC-V (64-bits) gcc 11.4.0
RISC-V (64-bits) gcc 12.1.0
RISC-V (64-bits) gcc 12.2.0
RISC-V (64-bits) gcc 12.3.0
RISC-V (64-bits) gcc 12.4.0
RISC-V (64-bits) gcc 13.1.0
RISC-V (64-bits) gcc 13.2.0
RISC-V (64-bits) gcc 13.3.0
RISC-V (64-bits) gcc 14.1.0
RISC-V (64-bits) gcc 14.2.0
RISC-V (64-bits) gcc 8.2.0
RISC-V (64-bits) gcc 8.5.0
RISC-V (64-bits) gcc 9.4.0
RISC-V rv32gc clang (trunk)
RISC-V rv32gc clang 10.0.0
RISC-V rv32gc clang 10.0.1
RISC-V rv32gc clang 11.0.0
RISC-V rv32gc clang 11.0.1
RISC-V rv32gc clang 12.0.0
RISC-V rv32gc clang 12.0.1
RISC-V rv32gc clang 13.0.0
RISC-V rv32gc clang 13.0.1
RISC-V rv32gc clang 14.0.0
RISC-V rv32gc clang 15.0.0
RISC-V rv32gc clang 16.0.0
RISC-V rv32gc clang 17.0.1
RISC-V rv32gc clang 18.1.0
RISC-V rv32gc clang 19.1.0
RISC-V rv32gc clang 9.0.0
RISC-V rv32gc clang 9.0.1
RISC-V rv64gc clang (trunk)
RISC-V rv64gc clang 10.0.0
RISC-V rv64gc clang 10.0.1
RISC-V rv64gc clang 11.0.0
RISC-V rv64gc clang 11.0.1
RISC-V rv64gc clang 12.0.0
RISC-V rv64gc clang 12.0.1
RISC-V rv64gc clang 13.0.0
RISC-V rv64gc clang 13.0.1
RISC-V rv64gc clang 14.0.0
RISC-V rv64gc clang 15.0.0
RISC-V rv64gc clang 16.0.0
RISC-V rv64gc clang 17.0.1
RISC-V rv64gc clang 18.1.0
RISC-V rv64gc clang 19.1.0
RISC-V rv64gc clang 9.0.0
RISC-V rv64gc clang 9.0.1
Raspbian Buster
Raspbian Stretch
SPARC LEON gcc 12.2.0
SPARC LEON gcc 12.3.0
SPARC LEON gcc 12.4.0
SPARC LEON gcc 13.1.0
SPARC LEON gcc 13.2.0
SPARC LEON gcc 13.3.0
SPARC LEON gcc 14.1.0
SPARC LEON gcc 14.2.0
SPARC gcc 12.2.0
SPARC gcc 12.3.0
SPARC gcc 12.4.0
SPARC gcc 13.1.0
SPARC gcc 13.2.0
SPARC gcc 13.3.0
SPARC gcc 14.1.0
SPARC gcc 14.2.0
SPARC64 gcc 12.2.0
SPARC64 gcc 12.3.0
SPARC64 gcc 12.4.0
SPARC64 gcc 13.1.0
SPARC64 gcc 13.2.0
SPARC64 gcc 13.3.0
SPARC64 gcc 14.1.0
SPARC64 gcc 14.2.0
TI C6x gcc 12.2.0
TI C6x gcc 12.3.0
TI C6x gcc 12.4.0
TI C6x gcc 13.1.0
TI C6x gcc 13.2.0
TI C6x gcc 13.3.0
TI C6x gcc 14.1.0
TI C6x gcc 14.2.0
TI CL430 21.6.1
VAX gcc NetBSDELF 10.4.0
VAX gcc NetBSDELF 10.5.0 (Nov 15 03:50:22 2023)
WebAssembly clang (trunk)
Xtensa ESP32 gcc 11.2.0 (2022r1)
Xtensa ESP32 gcc 12.2.0 (20230208)
Xtensa ESP32 gcc 8.2.0 (2019r2)
Xtensa ESP32 gcc 8.2.0 (2020r1)
Xtensa ESP32 gcc 8.2.0 (2020r2)
Xtensa ESP32 gcc 8.4.0 (2020r3)
Xtensa ESP32 gcc 8.4.0 (2021r1)
Xtensa ESP32 gcc 8.4.0 (2021r2)
Xtensa ESP32-S2 gcc 11.2.0 (2022r1)
Xtensa ESP32-S2 gcc 12.2.0 (20230208)
Xtensa ESP32-S2 gcc 8.2.0 (2019r2)
Xtensa ESP32-S2 gcc 8.2.0 (2020r1)
Xtensa ESP32-S2 gcc 8.2.0 (2020r2)
Xtensa ESP32-S2 gcc 8.4.0 (2020r3)
Xtensa ESP32-S2 gcc 8.4.0 (2021r1)
Xtensa ESP32-S2 gcc 8.4.0 (2021r2)
Xtensa ESP32-S3 gcc 11.2.0 (2022r1)
Xtensa ESP32-S3 gcc 12.2.0 (20230208)
Xtensa ESP32-S3 gcc 8.4.0 (2020r3)
Xtensa ESP32-S3 gcc 8.4.0 (2021r1)
Xtensa ESP32-S3 gcc 8.4.0 (2021r2)
arm64 msvc v19.20 VS16.0
arm64 msvc v19.21 VS16.1
arm64 msvc v19.22 VS16.2
arm64 msvc v19.23 VS16.3
arm64 msvc v19.24 VS16.4
arm64 msvc v19.25 VS16.5
arm64 msvc v19.27 VS16.7
arm64 msvc v19.28 VS16.8
arm64 msvc v19.28 VS16.9
arm64 msvc v19.29 VS16.10
arm64 msvc v19.29 VS16.11
arm64 msvc v19.30 VS17.0
arm64 msvc v19.31 VS17.1
arm64 msvc v19.32 VS17.2
arm64 msvc v19.33 VS17.3
arm64 msvc v19.34 VS17.4
arm64 msvc v19.35 VS17.5
arm64 msvc v19.36 VS17.6
arm64 msvc v19.37 VS17.7
arm64 msvc v19.38 VS17.8
arm64 msvc v19.39 VS17.9
arm64 msvc v19.40 VS17.10
arm64 msvc v19.latest
armv7-a clang (trunk)
armv7-a clang 10.0.0
armv7-a clang 10.0.1
armv7-a clang 11.0.0
armv7-a clang 11.0.1
armv7-a clang 12.0.0
armv7-a clang 12.0.1
armv7-a clang 13.0.0
armv7-a clang 13.0.1
armv7-a clang 14.0.0
armv7-a clang 15.0.0
armv7-a clang 16.0.0
armv7-a clang 17.0.1
armv7-a clang 18.1.0
armv7-a clang 19.1.0
armv7-a clang 9.0.0
armv7-a clang 9.0.1
armv8-a clang (all architectural features, trunk)
armv8-a clang (trunk)
armv8-a clang 10.0.0
armv8-a clang 10.0.1
armv8-a clang 11.0.0
armv8-a clang 11.0.1
armv8-a clang 12.0.0
armv8-a clang 13.0.0
armv8-a clang 14.0.0
armv8-a clang 15.0.0
armv8-a clang 16.0.0
armv8-a clang 17.0.1
armv8-a clang 18.1.0
armv8-a clang 19.1.0
armv8-a clang 9.0.0
armv8-a clang 9.0.1
clang-cl 18.1.0
ellcc 0.1.33
ellcc 0.1.34
ellcc 2017-07-16
hexagon-clang 16.0.5
llvm-mos atari2600-3e
llvm-mos atari2600-4k
llvm-mos atari2600-common
llvm-mos atari5200-supercart
llvm-mos atari8-cart-megacart
llvm-mos atari8-cart-std
llvm-mos atari8-cart-xegs
llvm-mos atari8-common
llvm-mos atari8-dos
llvm-mos c128
llvm-mos c64
llvm-mos commodore
llvm-mos cpm65
llvm-mos cx16
llvm-mos dodo
llvm-mos eater
llvm-mos mega65
llvm-mos nes
llvm-mos nes-action53
llvm-mos nes-cnrom
llvm-mos nes-gtrom
llvm-mos nes-mmc1
llvm-mos nes-mmc3
llvm-mos nes-nrom
llvm-mos nes-unrom
llvm-mos nes-unrom-512
llvm-mos osi-c1p
llvm-mos pce
llvm-mos pce-cd
llvm-mos pce-common
llvm-mos pet
llvm-mos rp6502
llvm-mos rpc8e
llvm-mos supervision
llvm-mos vic20
loongarch64 gcc 12.2.0
loongarch64 gcc 12.3.0
loongarch64 gcc 12.4.0
loongarch64 gcc 13.1.0
loongarch64 gcc 13.2.0
loongarch64 gcc 13.3.0
loongarch64 gcc 14.1.0
loongarch64 gcc 14.2.0
mips clang 13.0.0
mips clang 14.0.0
mips clang 15.0.0
mips clang 16.0.0
mips clang 17.0.1
mips clang 18.1.0
mips clang 19.1.0
mips gcc 11.2.0
mips gcc 12.1.0
mips gcc 12.2.0
mips gcc 12.3.0
mips gcc 12.4.0
mips gcc 13.1.0
mips gcc 13.2.0
mips gcc 13.3.0
mips gcc 14.1.0
mips gcc 14.2.0
mips gcc 4.9.4
mips gcc 5.4
mips gcc 5.5.0
mips gcc 9.3.0 (codescape)
mips gcc 9.5.0
mips64 (el) gcc 12.1.0
mips64 (el) gcc 12.2.0
mips64 (el) gcc 12.3.0
mips64 (el) gcc 12.4.0
mips64 (el) gcc 13.1.0
mips64 (el) gcc 13.2.0
mips64 (el) gcc 13.3.0
mips64 (el) gcc 14.1.0
mips64 (el) gcc 14.2.0
mips64 (el) gcc 4.9.4
mips64 (el) gcc 5.4.0
mips64 (el) gcc 5.5.0
mips64 (el) gcc 9.5.0
mips64 clang 13.0.0
mips64 clang 14.0.0
mips64 clang 15.0.0
mips64 clang 16.0.0
mips64 clang 17.0.1
mips64 clang 18.1.0
mips64 clang 19.1.0
mips64 gcc 11.2.0
mips64 gcc 12.1.0
mips64 gcc 12.2.0
mips64 gcc 12.3.0
mips64 gcc 12.4.0
mips64 gcc 13.1.0
mips64 gcc 13.2.0
mips64 gcc 13.3.0
mips64 gcc 14.1.0
mips64 gcc 14.2.0
mips64 gcc 4.9.4
mips64 gcc 5.4.0
mips64 gcc 5.5.0
mips64 gcc 9.5.0
mips64el clang 13.0.0
mips64el clang 14.0.0
mips64el clang 15.0.0
mips64el clang 16.0.0
mips64el clang 17.0.1
mips64el clang 18.1.0
mips64el clang 19.1.0
mipsel clang 13.0.0
mipsel clang 14.0.0
mipsel clang 15.0.0
mipsel clang 16.0.0
mipsel clang 17.0.1
mipsel clang 18.1.0
mipsel clang 19.1.0
mipsel gcc 12.1.0
mipsel gcc 12.2.0
mipsel gcc 12.3.0
mipsel gcc 12.4.0
mipsel gcc 13.1.0
mipsel gcc 13.2.0
mipsel gcc 13.3.0
mipsel gcc 14.1.0
mipsel gcc 14.2.0
mipsel gcc 4.9.4
mipsel gcc 5.4.0
mipsel gcc 5.5.0
mipsel gcc 9.5.0
nanoMIPS gcc 6.3.0 (mtk)
power gcc 11.2.0
power gcc 12.1.0
power gcc 12.2.0
power gcc 12.3.0
power gcc 12.4.0
power gcc 13.1.0
power gcc 13.2.0
power gcc 13.3.0
power gcc 14.1.0
power gcc 14.2.0
power gcc 4.8.5
power64 AT12.0 (gcc8)
power64 AT13.0 (gcc9)
power64 gcc 11.2.0
power64 gcc 12.1.0
power64 gcc 12.2.0
power64 gcc 12.3.0
power64 gcc 12.4.0
power64 gcc 13.1.0
power64 gcc 13.2.0
power64 gcc 13.3.0
power64 gcc 14.1.0
power64 gcc 14.2.0
power64 gcc trunk
power64le AT12.0 (gcc8)
power64le AT13.0 (gcc9)
power64le clang (trunk)
power64le gcc 11.2.0
power64le gcc 12.1.0
power64le gcc 12.2.0
power64le gcc 12.3.0
power64le gcc 12.4.0
power64le gcc 13.1.0
power64le gcc 13.2.0
power64le gcc 13.3.0
power64le gcc 14.1.0
power64le gcc 14.2.0
power64le gcc 6.3.0
power64le gcc trunk
powerpc64 clang (trunk)
qnx 8.0.0
s390x gcc 11.2.0
s390x gcc 12.1.0
s390x gcc 12.2.0
s390x gcc 12.3.0
s390x gcc 12.4.0
s390x gcc 13.1.0
s390x gcc 13.2.0
s390x gcc 13.3.0
s390x gcc 14.1.0
s390x gcc 14.2.0
sh gcc 12.2.0
sh gcc 12.3.0
sh gcc 12.4.0
sh gcc 13.1.0
sh gcc 13.2.0
sh gcc 13.3.0
sh gcc 14.1.0
sh gcc 14.2.0
sh gcc 4.9.4
sh gcc 9.5.0
vast (trunk)
x64 msvc v19.0 (WINE)
x64 msvc v19.10 (WINE)
x64 msvc v19.14 (WINE)
x64 msvc v19.20 VS16.0
x64 msvc v19.21 VS16.1
x64 msvc v19.22 VS16.2
x64 msvc v19.23 VS16.3
x64 msvc v19.24 VS16.4
x64 msvc v19.25 VS16.5
x64 msvc v19.27 VS16.7
x64 msvc v19.28 VS16.8
x64 msvc v19.28 VS16.9
x64 msvc v19.29 VS16.10
x64 msvc v19.29 VS16.11
x64 msvc v19.30 VS17.0
x64 msvc v19.31 VS17.1
x64 msvc v19.32 VS17.2
x64 msvc v19.33 VS17.3
x64 msvc v19.34 VS17.4
x64 msvc v19.35 VS17.5
x64 msvc v19.36 VS17.6
x64 msvc v19.37 VS17.7
x64 msvc v19.38 VS17.8
x64 msvc v19.39 VS17.9
x64 msvc v19.40 VS17.10
x64 msvc v19.latest
x86 djgpp 4.9.4
x86 djgpp 5.5.0
x86 djgpp 6.4.0
x86 djgpp 7.2.0
x86 msvc v19.0 (WINE)
x86 msvc v19.10 (WINE)
x86 msvc v19.14 (WINE)
x86 msvc v19.20 VS16.0
x86 msvc v19.21 VS16.1
x86 msvc v19.22 VS16.2
x86 msvc v19.23 VS16.3
x86 msvc v19.24 VS16.4
x86 msvc v19.25 VS16.5
x86 msvc v19.27 VS16.7
x86 msvc v19.28 VS16.8
x86 msvc v19.28 VS16.9
x86 msvc v19.29 VS16.10
x86 msvc v19.29 VS16.11
x86 msvc v19.30 VS17.0
x86 msvc v19.31 VS17.1
x86 msvc v19.32 VS17.2
x86 msvc v19.33 VS17.3
x86 msvc v19.34 VS17.4
x86 msvc v19.35 VS17.5
x86 msvc v19.36 VS17.6
x86 msvc v19.37 VS17.7
x86 msvc v19.38 VS17.8
x86 msvc v19.39 VS17.9
x86 msvc v19.40 VS17.10
x86 msvc v19.latest
x86 nvc++ 22.11
x86 nvc++ 22.7
x86 nvc++ 22.9
x86 nvc++ 23.1
x86 nvc++ 23.11
x86 nvc++ 23.3
x86 nvc++ 23.5
x86 nvc++ 23.7
x86 nvc++ 23.9
x86 nvc++ 24.1
x86 nvc++ 24.11
x86 nvc++ 24.3
x86 nvc++ 24.5
x86 nvc++ 24.7
x86 nvc++ 24.9
x86-64 Zapcc 190308
x86-64 clang (Chris Bazley N3089)
x86-64 clang (EricWF contracts)
x86-64 clang (amd-staging)
x86-64 clang (assertions trunk)
x86-64 clang (clangir)
x86-64 clang (dascandy contracts)
x86-64 clang (experimental -Wlifetime)
x86-64 clang (experimental P1061)
x86-64 clang (experimental P1144)
x86-64 clang (experimental P1221)
x86-64 clang (experimental P2996)
x86-64 clang (experimental P2998)
x86-64 clang (experimental P3068)
x86-64 clang (experimental P3309)
x86-64 clang (experimental P3367)
x86-64 clang (experimental P3372)
x86-64 clang (experimental metaprogramming - P2632)
x86-64 clang (old concepts branch)
x86-64 clang (p1974)
x86-64 clang (pattern matching - P2688)
x86-64 clang (reflection)
x86-64 clang (resugar)
x86-64 clang (string interpolation - P3412)
x86-64 clang (thephd.dev)
x86-64 clang (trunk)
x86-64 clang (variadic friends - P2893)
x86-64 clang (widberg)
x86-64 clang 10.0.0
x86-64 clang 10.0.0 (assertions)
x86-64 clang 10.0.1
x86-64 clang 11.0.0
x86-64 clang 11.0.0 (assertions)
x86-64 clang 11.0.1
x86-64 clang 12.0.0
x86-64 clang 12.0.0 (assertions)
x86-64 clang 12.0.1
x86-64 clang 13.0.0
x86-64 clang 13.0.0 (assertions)
x86-64 clang 13.0.1
x86-64 clang 14.0.0
x86-64 clang 14.0.0 (assertions)
x86-64 clang 15.0.0
x86-64 clang 15.0.0 (assertions)
x86-64 clang 16.0.0
x86-64 clang 16.0.0 (assertions)
x86-64 clang 17.0.1
x86-64 clang 17.0.1 (assertions)
x86-64 clang 18.1.0
x86-64 clang 18.1.0 (assertions)
x86-64 clang 18.1.0 (clad 1.8)
x86-64 clang 19.1.0
x86-64 clang 19.1.0 (assertions)
x86-64 clang 2.6.0 (assertions)
x86-64 clang 2.7.0 (assertions)
x86-64 clang 2.8.0 (assertions)
x86-64 clang 2.9.0 (assertions)
x86-64 clang 3.0.0
x86-64 clang 3.0.0 (assertions)
x86-64 clang 3.1
x86-64 clang 3.1 (assertions)
x86-64 clang 3.2
x86-64 clang 3.2 (assertions)
x86-64 clang 3.3
x86-64 clang 3.3 (assertions)
x86-64 clang 3.4 (assertions)
x86-64 clang 3.4.1
x86-64 clang 3.5
x86-64 clang 3.5 (assertions)
x86-64 clang 3.5.1
x86-64 clang 3.5.2
x86-64 clang 3.6
x86-64 clang 3.6 (assertions)
x86-64 clang 3.7
x86-64 clang 3.7 (assertions)
x86-64 clang 3.7.1
x86-64 clang 3.8
x86-64 clang 3.8 (assertions)
x86-64 clang 3.8.1
x86-64 clang 3.9.0
x86-64 clang 3.9.0 (assertions)
x86-64 clang 3.9.1
x86-64 clang 4.0.0
x86-64 clang 4.0.0 (assertions)
x86-64 clang 4.0.1
x86-64 clang 5.0.0
x86-64 clang 5.0.0 (assertions)
x86-64 clang 5.0.1
x86-64 clang 5.0.2
x86-64 clang 6.0.0
x86-64 clang 6.0.0 (assertions)
x86-64 clang 6.0.1
x86-64 clang 7.0.0
x86-64 clang 7.0.0 (assertions)
x86-64 clang 7.0.1
x86-64 clang 7.1.0
x86-64 clang 8.0.0
x86-64 clang 8.0.0 (assertions)
x86-64 clang 8.0.1
x86-64 clang 9.0.0
x86-64 clang 9.0.0 (assertions)
x86-64 clang 9.0.1
x86-64 clang rocm-4.5.2
x86-64 clang rocm-5.0.2
x86-64 clang rocm-5.1.3
x86-64 clang rocm-5.2.3
x86-64 clang rocm-5.3.3
x86-64 clang rocm-5.7.0
x86-64 clang rocm-6.0.2
x86-64 clang rocm-6.1.2
x86-64 gcc (contract labels)
x86-64 gcc (contracts natural syntax)
x86-64 gcc (contracts)
x86-64 gcc (coroutines)
x86-64 gcc (modules)
x86-64 gcc (trunk)
x86-64 gcc 10.1
x86-64 gcc 10.2
x86-64 gcc 10.3
x86-64 gcc 10.3 (assertions)
x86-64 gcc 10.4
x86-64 gcc 10.4 (assertions)
x86-64 gcc 10.5
x86-64 gcc 10.5 (assertions)
x86-64 gcc 11.1
x86-64 gcc 11.1 (assertions)
x86-64 gcc 11.2
x86-64 gcc 11.2 (assertions)
x86-64 gcc 11.3
x86-64 gcc 11.3 (assertions)
x86-64 gcc 11.4
x86-64 gcc 11.4 (assertions)
x86-64 gcc 12.1
x86-64 gcc 12.1 (assertions)
x86-64 gcc 12.2
x86-64 gcc 12.2 (assertions)
x86-64 gcc 12.3
x86-64 gcc 12.3 (assertions)
x86-64 gcc 12.4
x86-64 gcc 12.4 (assertions)
x86-64 gcc 13.1
x86-64 gcc 13.1 (assertions)
x86-64 gcc 13.2
x86-64 gcc 13.2 (assertions)
x86-64 gcc 13.3
x86-64 gcc 13.3 (assertions)
x86-64 gcc 14.1
x86-64 gcc 14.1 (assertions)
x86-64 gcc 14.2
x86-64 gcc 14.2 (assertions)
x86-64 gcc 3.4.6
x86-64 gcc 4.0.4
x86-64 gcc 4.1.2
x86-64 gcc 4.4.7
x86-64 gcc 4.5.3
x86-64 gcc 4.6.4
x86-64 gcc 4.7.1
x86-64 gcc 4.7.2
x86-64 gcc 4.7.3
x86-64 gcc 4.7.4
x86-64 gcc 4.8.1
x86-64 gcc 4.8.2
x86-64 gcc 4.8.3
x86-64 gcc 4.8.4
x86-64 gcc 4.8.5
x86-64 gcc 4.9.0
x86-64 gcc 4.9.1
x86-64 gcc 4.9.2
x86-64 gcc 4.9.3
x86-64 gcc 4.9.4
x86-64 gcc 5.1
x86-64 gcc 5.2
x86-64 gcc 5.3
x86-64 gcc 5.4
x86-64 gcc 5.5
x86-64 gcc 6.1
x86-64 gcc 6.2
x86-64 gcc 6.3
x86-64 gcc 6.4
x86-64 gcc 6.5
x86-64 gcc 7.1
x86-64 gcc 7.2
x86-64 gcc 7.3
x86-64 gcc 7.4
x86-64 gcc 7.5
x86-64 gcc 8.1
x86-64 gcc 8.2
x86-64 gcc 8.3
x86-64 gcc 8.4
x86-64 gcc 8.5
x86-64 gcc 9.1
x86-64 gcc 9.2
x86-64 gcc 9.3
x86-64 gcc 9.4
x86-64 gcc 9.5
x86-64 icc 13.0.1
x86-64 icc 16.0.3
x86-64 icc 17.0.0
x86-64 icc 18.0.0
x86-64 icc 19.0.0
x86-64 icc 19.0.1
x86-64 icc 2021.1.2
x86-64 icc 2021.10.0
x86-64 icc 2021.2.0
x86-64 icc 2021.3.0
x86-64 icc 2021.4.0
x86-64 icc 2021.5.0
x86-64 icc 2021.6.0
x86-64 icc 2021.7.0
x86-64 icc 2021.7.1
x86-64 icc 2021.8.0
x86-64 icc 2021.9.0
x86-64 icx 2021.1.2
x86-64 icx 2021.2.0
x86-64 icx 2021.3.0
x86-64 icx 2021.4.0
x86-64 icx 2022.0.0
x86-64 icx 2022.1.0
x86-64 icx 2022.2.0
x86-64 icx 2022.2.1
x86-64 icx 2023.0.0
x86-64 icx 2023.1.0
x86-64 icx 2023.2.1
x86-64 icx 2024.0.0
x86-64 icx 2024.1.0
x86-64 icx 2024.2.0
x86-64 icx 2025.0.0
x86-64 icx 2025.0.0
zig c++ 0.10.0
zig c++ 0.11.0
zig c++ 0.12.0
zig c++ 0.12.1
zig c++ 0.13.0
zig c++ 0.6.0
zig c++ 0.7.0
zig c++ 0.7.1
zig c++ 0.8.0
zig c++ 0.9.0
zig c++ trunk
Options
Source code
# 1 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" # 1 "<built-in>" 1 # 1 "<built-in>" 3 # 350 "<built-in>" 3 # 1 "<command line>" 1 # 1 "<built-in>" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" 2 # 13 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.h" 1 # 16 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ArrayRef.h" 1 # 12 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ArrayRef.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" 1 # 47 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/DataTypes.h" 1 # 16 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/DataTypes.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm-c/DataTypes.h" 1 # 27 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm-c/DataTypes.h" # 1 "/usr/local/bin/../lib/clang/3.9.1/include/inttypes.h" 1 3 # 30 "/usr/local/bin/../lib/clang/3.9.1/include/inttypes.h" 3 # 1 "/usr/include/inttypes.h" 1 3 4 # 25 "/usr/include/inttypes.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 402 "/usr/include/features.h" 3 4 # 1 "/usr/include/stdc-predef.h" 1 3 4 # 403 "/usr/include/features.h" 2 3 4 # 424 "/usr/include/features.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4 # 442 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 443 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/long-double.h" 1 3 4 # 444 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4 # 425 "/usr/include/features.h" 2 3 4 # 448 "/usr/include/features.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4 # 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4 # 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4 # 449 "/usr/include/features.h" 2 3 4 # 26 "/usr/include/inttypes.h" 2 3 4 # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stdint.h" 1 3 4 # 63 "/usr/local/bin/../lib/clang/3.9.1/include/stdint.h" 3 4 # 1 "/usr/include/stdint.h" 1 3 4 # 26 "/usr/include/stdint.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 # 27 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; typedef signed long int __int64_t; typedef unsigned long int __uint64_t; typedef __int8_t __int_least8_t; typedef __uint8_t __uint_least8_t; typedef __int16_t __int_least16_t; typedef __uint16_t __uint_least16_t; typedef __int32_t __int_least32_t; typedef __uint32_t __uint_least32_t; typedef __int64_t __int_least64_t; typedef __uint64_t __uint_least64_t; typedef long int __quad_t; typedef unsigned long int __u_quad_t; typedef long int __intmax_t; typedef unsigned long int __uintmax_t; # 140 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4 # 141 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 typedef unsigned long int __dev_t; typedef unsigned int __uid_t; typedef unsigned int __gid_t; typedef unsigned long int __ino_t; typedef unsigned long int __ino64_t; typedef unsigned int __mode_t; typedef unsigned long int __nlink_t; typedef long int __off_t; typedef long int __off64_t; typedef int __pid_t; typedef struct { int __val[2]; } __fsid_t; typedef long int __clock_t; typedef unsigned long int __rlim_t; typedef unsigned long int __rlim64_t; typedef unsigned int __id_t; typedef long int __time_t; typedef unsigned int __useconds_t; typedef long int __suseconds_t; typedef int __daddr_t; typedef int __key_t; typedef int __clockid_t; typedef void * __timer_t; typedef long int __blksize_t; typedef long int __blkcnt_t; typedef long int __blkcnt64_t; typedef unsigned long int __fsblkcnt_t; typedef unsigned long int __fsblkcnt64_t; typedef unsigned long int __fsfilcnt_t; typedef unsigned long int __fsfilcnt64_t; typedef long int __fsword_t; typedef long int __ssize_t; typedef long int __syscall_slong_t; typedef unsigned long int __syscall_ulong_t; typedef __off64_t __loff_t; typedef char *__caddr_t; typedef long int __intptr_t; typedef unsigned int __socklen_t; typedef int __sig_atomic_t; # 28 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4 # 29 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 30 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 3 4 typedef __int8_t int8_t; typedef __int16_t int16_t; typedef __int32_t int32_t; typedef __int64_t int64_t; # 35 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 3 4 typedef __uint8_t uint8_t; typedef __uint16_t uint16_t; typedef __uint32_t uint32_t; typedef __uint64_t uint64_t; # 38 "/usr/include/stdint.h" 2 3 4 typedef __int_least8_t int_least8_t; typedef __int_least16_t int_least16_t; typedef __int_least32_t int_least32_t; typedef __int_least64_t int_least64_t; typedef __uint_least8_t uint_least8_t; typedef __uint_least16_t uint_least16_t; typedef __uint_least32_t uint_least32_t; typedef __uint_least64_t uint_least64_t; typedef signed char int_fast8_t; typedef long int int_fast16_t; typedef long int int_fast32_t; typedef long int int_fast64_t; # 71 "/usr/include/stdint.h" 3 4 typedef unsigned char uint_fast8_t; typedef unsigned long int uint_fast16_t; typedef unsigned long int uint_fast32_t; typedef unsigned long int uint_fast64_t; # 87 "/usr/include/stdint.h" 3 4 typedef long int intptr_t; typedef unsigned long int uintptr_t; # 101 "/usr/include/stdint.h" 3 4 typedef __intmax_t intmax_t; typedef __uintmax_t uintmax_t; # 64 "/usr/local/bin/../lib/clang/3.9.1/include/stdint.h" 2 3 4 # 28 "/usr/include/inttypes.h" 2 3 4 # 266 "/usr/include/inttypes.h" 3 4 extern "C" { typedef struct { long int quot; long int rem; } imaxdiv_t; # 290 "/usr/include/inttypes.h" 3 4 extern intmax_t imaxabs (intmax_t __n) throw () __attribute__ ((__const__)); extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) throw () __attribute__ ((__const__)); extern intmax_t strtoimax (const char *__restrict __nptr, char **__restrict __endptr, int __base) throw (); extern uintmax_t strtoumax (const char *__restrict __nptr, char ** __restrict __endptr, int __base) throw (); extern intmax_t wcstoimax (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); extern uintmax_t wcstoumax (const wchar_t *__restrict __nptr, wchar_t ** __restrict __endptr, int __base) throw (); extern long int __strtol_internal (const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern __inline __attribute__ ((__gnu_inline__)) intmax_t strtoimax (const char *__restrict nptr, char **__restrict endptr, int base) throw () { return __strtol_internal (nptr, endptr, base, 0); } extern unsigned long int __strtoul_internal (const char *__restrict __nptr, char ** __restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern __inline __attribute__ ((__gnu_inline__)) uintmax_t strtoumax (const char *__restrict nptr, char **__restrict endptr, int base) throw () { return __strtoul_internal (nptr, endptr, base, 0); } extern long int __wcstol_internal (const wchar_t * __restrict __nptr, wchar_t **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern __inline __attribute__ ((__gnu_inline__)) intmax_t wcstoimax (const wchar_t *__restrict nptr, wchar_t **__restrict endptr, int base) throw () { return __wcstol_internal (nptr, endptr, base, 0); } extern unsigned long int __wcstoul_internal (const wchar_t * __restrict __nptr, wchar_t ** __restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern __inline __attribute__ ((__gnu_inline__)) uintmax_t wcstoumax (const wchar_t *__restrict nptr, wchar_t **__restrict endptr, int base) throw () { return __wcstoul_internal (nptr, endptr, base, 0); } # 432 "/usr/include/inttypes.h" 3 4 } # 31 "/usr/local/bin/../lib/clang/3.9.1/include/inttypes.h" 2 3 # 28 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm-c/DataTypes.h" 2 # 43 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm-c/DataTypes.h" # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 extern "C" { typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; typedef __loff_t loff_t; typedef __ino_t ino_t; typedef __ino64_t ino64_t; typedef __dev_t dev_t; typedef __gid_t gid_t; typedef __mode_t mode_t; typedef __nlink_t nlink_t; typedef __uid_t uid_t; typedef __off_t off_t; typedef __off64_t off64_t; typedef __pid_t pid_t; typedef __id_t id_t; typedef __ssize_t ssize_t; typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; # 1 "/usr/include/x86_64-linux-gnu/bits/types/clock_t.h" 1 3 4 typedef __clock_t clock_t; # 127 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h" 1 3 4 typedef __clockid_t clockid_t; # 129 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/time_t.h" 1 3 4 typedef __time_t time_t; # 130 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/timer_t.h" 1 3 4 typedef __timer_t timer_t; # 131 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 typedef __useconds_t useconds_t; typedef __suseconds_t suseconds_t; # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 1 3 4 # 62 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 3 4 typedef long unsigned int size_t; # 145 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 177 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); typedef int register_t __attribute__ ((__mode__ (__word__))); # 193 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 1 "/usr/include/endian.h" 1 3 4 # 36 "/usr/include/endian.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4 # 37 "/usr/include/endian.h" 2 3 4 # 60 "/usr/include/endian.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4 # 33 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 static __inline __uint16_t __bswap_16 (__uint16_t __bsx) { return ((__uint16_t) ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8))); } static __inline __uint32_t __bswap_32 (__uint32_t __bsx) { return ((((__bsx) & 0xff000000u) >> 24) | (((__bsx) & 0x00ff0000u) >> 8) | (((__bsx) & 0x0000ff00u) << 8) | (((__bsx) & 0x000000ffu) << 24)); } # 69 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 __extension__ static __inline __uint64_t __bswap_64 (__uint64_t __bsx) { return ((((__bsx) & 0xff00000000000000ull) >> 56) | (((__bsx) & 0x00ff000000000000ull) >> 40) | (((__bsx) & 0x0000ff0000000000ull) >> 24) | (((__bsx) & 0x000000ff00000000ull) >> 8) | (((__bsx) & 0x00000000ff000000ull) << 8) | (((__bsx) & 0x0000000000ff0000ull) << 24) | (((__bsx) & 0x000000000000ff00ull) << 40) | (((__bsx) & 0x00000000000000ffull) << 56)); } # 61 "/usr/include/endian.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 1 3 4 # 32 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 3 4 static __inline __uint16_t __uint16_identity (__uint16_t __x) { return __x; } static __inline __uint32_t __uint32_identity (__uint32_t __x) { return __x; } static __inline __uint64_t __uint64_identity (__uint64_t __x) { return __x; } # 62 "/usr/include/endian.h" 2 3 4 # 194 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4 # 30 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/select.h" 2 3 4 # 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h" 1 3 4 typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 5 "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h" 2 3 4 typedef __sigset_t sigset_t; # 34 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h" 1 3 4 struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; # 38 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 1 3 4 struct timespec { __time_t tv_sec; __syscall_slong_t tv_nsec; }; # 40 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 # 49 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 typedef long int __fd_mask; # 59 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 typedef struct { __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; } fd_set; typedef __fd_mask fd_mask; # 91 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 extern "C" { # 101 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); # 113 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); # 126 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 } # 197 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 typedef __blksize_t blksize_t; typedef __blkcnt_t blkcnt_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; # 236 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __blkcnt64_t blkcnt64_t; typedef __fsblkcnt64_t fsblkcnt64_t; typedef __fsfilcnt64_t fsfilcnt64_t; # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 1 3 4 # 77 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 1 3 4 # 21 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 2 3 4 # 65 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 struct __pthread_rwlock_arch_t { unsigned int __readers; unsigned int __writers; unsigned int __wrphase_futex; unsigned int __writers_futex; unsigned int __pad3; unsigned int __pad4; int __cur_writer; int __shared; signed char __rwelision; unsigned char __pad1[7]; unsigned long int __pad2; unsigned int __flags; # 99 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 }; # 78 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4 typedef struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __pthread_list_t; # 118 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4 struct __pthread_mutex_s { int __lock ; unsigned int __count; int __owner; unsigned int __nusers; # 148 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4 int __kind; short __spins; short __elision; __pthread_list_t __list; # 166 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4 }; struct __pthread_cond_s { __extension__ union { __extension__ unsigned long long int __wseq; struct { unsigned int __low; unsigned int __high; } __wseq32; }; __extension__ union { __extension__ unsigned long long int __g1_start; struct { unsigned int __low; unsigned int __high; } __g1_start32; }; unsigned int __g_refs[2] ; unsigned int __g_size[2]; unsigned int __g1_orig_size; unsigned int __wrefs; unsigned int __g_signals[2]; }; # 24 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4 typedef unsigned long int pthread_t; typedef union { char __size[4]; int __align; } pthread_mutexattr_t; typedef union { char __size[4]; int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; union pthread_attr_t { char __size[56]; long int __align; }; typedef union pthread_attr_t pthread_attr_t; typedef union { struct __pthread_mutex_s __data; char __size[40]; long int __align; } pthread_mutex_t; typedef union { struct __pthread_cond_s __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; typedef union { struct __pthread_rwlock_arch_t __data; char __size[56]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef union { char __size[32]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; # 245 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 } # 44 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm-c/DataTypes.h" 2 # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/DataTypes.h" 2 # 48 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/ErrorHandling.h" 1 # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/ErrorHandling.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Compiler.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Compiler.h" # 1 "include/llvm/Config/llvm-config.h" 1 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Compiler.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/new" 1 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/new" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++config.h" 1 3 # 236 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++config.h" 3 namespace std { typedef long unsigned int size_t; typedef long int ptrdiff_t; typedef decltype(nullptr) nullptr_t; } # 258 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++config.h" 3 namespace std { inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } } namespace __gnu_cxx { inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } } # 508 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++config.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/os_defines.h" 1 3 # 509 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++config.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/cpu_defines.h" 1 3 # 512 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++config.h" 2 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/new" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/exception" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/exception" 3 #pragma GCC visibility push(default) # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/exception.h" 1 3 # 35 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/exception.h" 3 #pragma GCC visibility push(default) extern "C++" { namespace std { # 60 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/exception.h" 3 class exception { public: exception() noexcept { } virtual ~exception() noexcept; virtual const char* what() const noexcept; }; } } #pragma GCC visibility pop # 39 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/exception" 2 3 extern "C++" { namespace std { class bad_exception : public exception { public: bad_exception() noexcept { } virtual ~bad_exception() noexcept; virtual const char* what() const noexcept; }; typedef void (*terminate_handler) (); typedef void (*unexpected_handler) (); terminate_handler set_terminate(terminate_handler) noexcept; terminate_handler get_terminate() noexcept; void terminate() noexcept __attribute__ ((__noreturn__)); unexpected_handler set_unexpected(unexpected_handler) noexcept; unexpected_handler get_unexpected() noexcept; void unexpected() __attribute__ ((__noreturn__)); # 102 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/exception" 3 bool uncaught_exception() noexcept __attribute__ ((__pure__)); # 111 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/exception" 3 } namespace __gnu_cxx { # 133 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/exception" 3 void __verbose_terminate_handler(); } } #pragma GCC visibility pop # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/exception_ptr.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/exception_ptr.h" 3 #pragma GCC visibility push(default) # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/exception_defines.h" 1 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/exception_ptr.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/cxxabi_init_exception.h" 1 3 # 35 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/cxxabi_init_exception.h" 3 #pragma GCC visibility push(default) # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 1 3 # 51 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 3 typedef long int ptrdiff_t; # 118 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 3 # 1 "/usr/local/bin/../lib/clang/3.9.1/include/__stddef_max_align_t.h" 1 3 # 35 "/usr/local/bin/../lib/clang/3.9.1/include/__stddef_max_align_t.h" 3 typedef struct { long long __clang_max_align_nonce1 __attribute__((__aligned__(__alignof__(long long)))); long double __clang_max_align_nonce2 __attribute__((__aligned__(__alignof__(long double)))); } max_align_t; # 119 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 2 3 # 39 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/cxxabi_init_exception.h" 2 3 # 50 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/cxxabi_init_exception.h" 3 namespace std { class type_info; } namespace __cxxabiv1 { struct __cxa_refcounted_exception; extern "C" { void* __cxa_allocate_exception(size_t) noexcept; void __cxa_free_exception(void*) noexcept; __cxa_refcounted_exception* __cxa_init_primary_exception(void *object, std::type_info *tinfo, void ( *dest) (void *)) noexcept; } } #pragma GCC visibility pop # 39 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/exception_ptr.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/typeinfo" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/typeinfo" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/hash_bytes.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/hash_bytes.h" 3 namespace std { size_t _Hash_bytes(const void* __ptr, size_t __len, size_t __seed); size_t _Fnv_hash_bytes(const void* __ptr, size_t __len, size_t __seed); } # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/typeinfo" 2 3 #pragma GCC visibility push(default) extern "C++" { namespace __cxxabiv1 { class __class_type_info; } # 80 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/typeinfo" 3 namespace std { class type_info { public: virtual ~type_info(); const char* name() const noexcept { return __name[0] == '*' ? __name + 1 : __name; } # 115 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/typeinfo" 3 bool before(const type_info& __arg) const noexcept { return (__name[0] == '*' && __arg.__name[0] == '*') ? __name < __arg.__name : __builtin_strcmp (__name, __arg.__name) < 0; } bool operator==(const type_info& __arg) const noexcept { return ((__name == __arg.__name) || (__name[0] != '*' && __builtin_strcmp (__name, __arg.__name) == 0)); } # 136 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/typeinfo" 3 bool operator!=(const type_info& __arg) const noexcept { return !operator==(__arg); } size_t hash_code() const noexcept { return _Hash_bytes(name(), __builtin_strlen(name()), static_cast<size_t>(0xc70f6907UL)); } virtual bool __is_pointer_p() const; virtual bool __is_function_p() const; virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, unsigned __outer) const; virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, void **__obj_ptr) const; protected: const char *__name; explicit type_info(const char *__n): __name(__n) { } private: type_info& operator=(const type_info&); type_info(const type_info&); }; class bad_cast : public exception { public: bad_cast() noexcept { } virtual ~bad_cast() noexcept; virtual const char* what() const noexcept; }; class bad_typeid : public exception { public: bad_typeid () noexcept { } virtual ~bad_typeid() noexcept; virtual const char* what() const noexcept; }; } } #pragma GCC visibility pop # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/exception_ptr.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/new" 1 3 # 41 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/exception_ptr.h" 2 3 extern "C++" { namespace std { class type_info; namespace __exception_ptr { class exception_ptr; } using __exception_ptr::exception_ptr; exception_ptr current_exception() noexcept; template<typename _Ex> exception_ptr make_exception_ptr(_Ex) noexcept; void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__)); namespace __exception_ptr { using std::rethrow_exception; class exception_ptr { void* _M_exception_object; explicit exception_ptr(void* __e) noexcept; void _M_addref() noexcept; void _M_release() noexcept; void *_M_get() const noexcept __attribute__ ((__pure__)); friend exception_ptr std::current_exception() noexcept; friend void std::rethrow_exception(exception_ptr); template<typename _Ex> friend exception_ptr std::make_exception_ptr(_Ex) noexcept; public: exception_ptr() noexcept; exception_ptr(const exception_ptr&) noexcept; exception_ptr(nullptr_t) noexcept : _M_exception_object(0) { } exception_ptr(exception_ptr&& __o) noexcept : _M_exception_object(__o._M_exception_object) { __o._M_exception_object = 0; } # 117 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/exception_ptr.h" 3 exception_ptr& operator=(const exception_ptr&) noexcept; exception_ptr& operator=(exception_ptr&& __o) noexcept { exception_ptr(static_cast<exception_ptr&&>(__o)).swap(*this); return *this; } ~exception_ptr() noexcept; void swap(exception_ptr&) noexcept; # 144 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/exception_ptr.h" 3 explicit operator bool() const { return _M_exception_object; } friend bool operator==(const exception_ptr&, const exception_ptr&) noexcept __attribute__ ((__pure__)); const class std::type_info* __cxa_exception_type() const noexcept __attribute__ ((__pure__)); }; bool operator==(const exception_ptr&, const exception_ptr&) noexcept __attribute__ ((__pure__)); bool operator!=(const exception_ptr&, const exception_ptr&) noexcept __attribute__ ((__pure__)); inline void swap(exception_ptr& __lhs, exception_ptr& __rhs) { __lhs.swap(__rhs); } template<typename _Ex> inline void __dest_thunk(void* __x) { static_cast<_Ex*>(__x)->~_Ex(); } } template<typename _Ex> exception_ptr make_exception_ptr(_Ex __ex) noexcept { # 206 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/exception_ptr.h" 3 return exception_ptr(); } } } #pragma GCC visibility pop # 144 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/exception" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/nested_exception.h" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/nested_exception.h" 3 #pragma GCC visibility push(default) # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/move.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/move.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/concept_check.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/concept_check.h" 3 # 35 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/move.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> inline constexpr _Tp* __addressof(_Tp& __r) noexcept { return __builtin_addressof(__r); } } # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 56 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 template<typename _Tp, _Tp __v> struct integral_constant { static constexpr _Tp value = __v; typedef _Tp value_type; typedef integral_constant<_Tp, __v> type; constexpr operator value_type() const noexcept { return value; } constexpr value_type operator()() const noexcept { return value; } }; template<typename _Tp, _Tp __v> constexpr _Tp integral_constant<_Tp, __v>::value; typedef integral_constant<bool, true> true_type; typedef integral_constant<bool, false> false_type; template<bool __v> using __bool_constant = integral_constant<bool, __v>; # 91 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 template<bool, typename, typename> struct conditional; template<typename...> struct __or_; template<> struct __or_<> : public false_type { }; template<typename _B1> struct __or_<_B1> : public _B1 { }; template<typename _B1, typename _B2> struct __or_<_B1, _B2> : public conditional<_B1::value, _B1, _B2>::type { }; template<typename _B1, typename _B2, typename _B3, typename... _Bn> struct __or_<_B1, _B2, _B3, _Bn...> : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type { }; template<typename...> struct __and_; template<> struct __and_<> : public true_type { }; template<typename _B1> struct __and_<_B1> : public _B1 { }; template<typename _B1, typename _B2> struct __and_<_B1, _B2> : public conditional<_B1::value, _B2, _B1>::type { }; template<typename _B1, typename _B2, typename _B3, typename... _Bn> struct __and_<_B1, _B2, _B3, _Bn...> : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type { }; template<typename _Pp> struct __not_ : public __bool_constant<!bool(_Pp::value)> { }; # 180 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 template<typename _Tp> struct __success_type { typedef _Tp type; }; struct __failure_type { }; template<typename> struct remove_cv; template<typename> struct __is_void_helper : public false_type { }; template<> struct __is_void_helper<void> : public true_type { }; template<typename _Tp> struct is_void : public __is_void_helper<typename remove_cv<_Tp>::type>::type { }; template<typename> struct __is_integral_helper : public false_type { }; template<> struct __is_integral_helper<bool> : public true_type { }; template<> struct __is_integral_helper<char> : public true_type { }; template<> struct __is_integral_helper<signed char> : public true_type { }; template<> struct __is_integral_helper<unsigned char> : public true_type { }; template<> struct __is_integral_helper<wchar_t> : public true_type { }; template<> struct __is_integral_helper<char16_t> : public true_type { }; template<> struct __is_integral_helper<char32_t> : public true_type { }; template<> struct __is_integral_helper<short> : public true_type { }; template<> struct __is_integral_helper<unsigned short> : public true_type { }; template<> struct __is_integral_helper<int> : public true_type { }; template<> struct __is_integral_helper<unsigned int> : public true_type { }; template<> struct __is_integral_helper<long> : public true_type { }; template<> struct __is_integral_helper<unsigned long> : public true_type { }; template<> struct __is_integral_helper<long long> : public true_type { }; template<> struct __is_integral_helper<unsigned long long> : public true_type { }; # 312 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 template<typename _Tp> struct is_integral : public __is_integral_helper<typename remove_cv<_Tp>::type>::type { }; template<typename> struct __is_floating_point_helper : public false_type { }; template<> struct __is_floating_point_helper<float> : public true_type { }; template<> struct __is_floating_point_helper<double> : public true_type { }; template<> struct __is_floating_point_helper<long double> : public true_type { }; # 340 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 template<typename _Tp> struct is_floating_point : public __is_floating_point_helper<typename remove_cv<_Tp>::type>::type { }; template<typename> struct is_array : public false_type { }; template<typename _Tp, std::size_t _Size> struct is_array<_Tp[_Size]> : public true_type { }; template<typename _Tp> struct is_array<_Tp[]> : public true_type { }; template<typename> struct __is_pointer_helper : public false_type { }; template<typename _Tp> struct __is_pointer_helper<_Tp*> : public true_type { }; template<typename _Tp> struct is_pointer : public __is_pointer_helper<typename remove_cv<_Tp>::type>::type { }; template<typename> struct is_lvalue_reference : public false_type { }; template<typename _Tp> struct is_lvalue_reference<_Tp&> : public true_type { }; template<typename> struct is_rvalue_reference : public false_type { }; template<typename _Tp> struct is_rvalue_reference<_Tp&&> : public true_type { }; template<typename> struct is_function; template<typename> struct __is_member_object_pointer_helper : public false_type { }; template<typename _Tp, typename _Cp> struct __is_member_object_pointer_helper<_Tp _Cp::*> : public integral_constant<bool, !is_function<_Tp>::value> { }; template<typename _Tp> struct is_member_object_pointer : public __is_member_object_pointer_helper< typename remove_cv<_Tp>::type>::type { }; template<typename> struct __is_member_function_pointer_helper : public false_type { }; template<typename _Tp, typename _Cp> struct __is_member_function_pointer_helper<_Tp _Cp::*> : public integral_constant<bool, is_function<_Tp>::value> { }; template<typename _Tp> struct is_member_function_pointer : public __is_member_function_pointer_helper< typename remove_cv<_Tp>::type>::type { }; template<typename _Tp> struct is_enum : public integral_constant<bool, __is_enum(_Tp)> { }; template<typename _Tp> struct is_union : public integral_constant<bool, __is_union(_Tp)> { }; template<typename _Tp> struct is_class : public integral_constant<bool, __is_class(_Tp)> { }; template<typename> struct is_function : public false_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes...) > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes...) & > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes...) && > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes......) > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes......) & > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes......) && > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes...) const > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes...) const & > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes...) const && > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes......) const > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes......) const & > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes......) const && > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes...) volatile > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes...) volatile & > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes...) volatile && > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes......) volatile > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes......) volatile & > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes......) volatile && > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes...) const volatile > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes...) const volatile & > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes...) const volatile && > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes......) const volatile > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes......) const volatile & > : public true_type { }; template<typename _Res, typename... _ArgTypes > struct is_function<_Res(_ArgTypes......) const volatile && > : public true_type { }; template<typename> struct __is_null_pointer_helper : public false_type { }; template<> struct __is_null_pointer_helper<std::nullptr_t> : public true_type { }; template<typename _Tp> struct is_null_pointer : public __is_null_pointer_helper<typename remove_cv<_Tp>::type>::type { }; template<typename _Tp> struct __is_nullptr_t : public is_null_pointer<_Tp> { }; template<typename _Tp> struct is_reference : public __or_<is_lvalue_reference<_Tp>, is_rvalue_reference<_Tp>>::type { }; template<typename _Tp> struct is_arithmetic : public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type { }; template<typename _Tp> struct is_fundamental : public __or_<is_arithmetic<_Tp>, is_void<_Tp>, is_null_pointer<_Tp>>::type { }; template<typename _Tp> struct is_object : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>, is_void<_Tp>>>::type { }; template<typename> struct is_member_pointer; template<typename _Tp> struct is_scalar : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>, is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type { }; template<typename _Tp> struct is_compound : public integral_constant<bool, !is_fundamental<_Tp>::value> { }; template<typename _Tp> struct __is_member_pointer_helper : public false_type { }; template<typename _Tp, typename _Cp> struct __is_member_pointer_helper<_Tp _Cp::*> : public true_type { }; template<typename _Tp> struct is_member_pointer : public __is_member_pointer_helper<typename remove_cv<_Tp>::type>::type { }; template<typename _Tp> struct __is_referenceable : public __or_<is_object<_Tp>, is_reference<_Tp>>::type { }; template<typename _Res, typename... _Args > struct __is_referenceable<_Res(_Args...) > : public true_type { }; template<typename _Res, typename... _Args > struct __is_referenceable<_Res(_Args......) > : public true_type { }; template<typename> struct is_const : public false_type { }; template<typename _Tp> struct is_const<_Tp const> : public true_type { }; template<typename> struct is_volatile : public false_type { }; template<typename _Tp> struct is_volatile<_Tp volatile> : public true_type { }; template<typename _Tp> struct is_trivial : public integral_constant<bool, __is_trivial(_Tp)> { }; template<typename _Tp> struct is_trivially_copyable : public integral_constant<bool, __is_trivially_copyable(_Tp)> { }; template<typename _Tp> struct is_standard_layout : public integral_constant<bool, __is_standard_layout(_Tp)> { }; template<typename _Tp> struct is_pod : public integral_constant<bool, __is_pod(_Tp)> { }; template<typename _Tp> struct is_literal_type : public integral_constant<bool, __is_literal_type(_Tp)> { }; template<typename _Tp> struct is_empty : public integral_constant<bool, __is_empty(_Tp)> { }; template<typename _Tp> struct is_polymorphic : public integral_constant<bool, __is_polymorphic(_Tp)> { }; template<typename _Tp> struct is_final : public integral_constant<bool, __is_final(_Tp)> { }; template<typename _Tp> struct is_abstract : public integral_constant<bool, __is_abstract(_Tp)> { }; template<typename _Tp, bool = is_arithmetic<_Tp>::value> struct __is_signed_helper : public false_type { }; template<typename _Tp> struct __is_signed_helper<_Tp, true> : public integral_constant<bool, _Tp(-1) < _Tp(0)> { }; template<typename _Tp> struct is_signed : public __is_signed_helper<_Tp>::type { }; template<typename _Tp> struct is_unsigned : public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>> { }; # 747 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 template<typename _Tp, typename _Up = _Tp&&> _Up __declval(int); template<typename _Tp> _Tp __declval(long); template<typename _Tp> auto declval() noexcept -> decltype(__declval<_Tp>(0)); template<typename, unsigned = 0> struct extent; template<typename> struct remove_all_extents; template<typename _Tp> struct __is_array_known_bounds : public integral_constant<bool, (extent<_Tp>::value > 0)> { }; template<typename _Tp> struct __is_array_unknown_bounds : public __and_<is_array<_Tp>, __not_<extent<_Tp>>> { }; struct __do_is_destructible_impl { template<typename _Tp, typename = decltype(declval<_Tp&>().~_Tp())> static true_type __test(int); template<typename> static false_type __test(...); }; template<typename _Tp> struct __is_destructible_impl : public __do_is_destructible_impl { typedef decltype(__test<_Tp>(0)) type; }; template<typename _Tp, bool = __or_<is_void<_Tp>, __is_array_unknown_bounds<_Tp>, is_function<_Tp>>::value, bool = __or_<is_reference<_Tp>, is_scalar<_Tp>>::value> struct __is_destructible_safe; template<typename _Tp> struct __is_destructible_safe<_Tp, false, false> : public __is_destructible_impl<typename remove_all_extents<_Tp>::type>::type { }; template<typename _Tp> struct __is_destructible_safe<_Tp, true, false> : public false_type { }; template<typename _Tp> struct __is_destructible_safe<_Tp, false, true> : public true_type { }; template<typename _Tp> struct is_destructible : public __is_destructible_safe<_Tp>::type { }; struct __do_is_nt_destructible_impl { template<typename _Tp> static integral_constant<bool, noexcept(declval<_Tp&>().~_Tp())> __test(int); template<typename> static false_type __test(...); }; template<typename _Tp> struct __is_nt_destructible_impl : public __do_is_nt_destructible_impl { typedef decltype(__test<_Tp>(0)) type; }; template<typename _Tp, bool = __or_<is_void<_Tp>, __is_array_unknown_bounds<_Tp>, is_function<_Tp>>::value, bool = __or_<is_reference<_Tp>, is_scalar<_Tp>>::value> struct __is_nt_destructible_safe; template<typename _Tp> struct __is_nt_destructible_safe<_Tp, false, false> : public __is_nt_destructible_impl<typename remove_all_extents<_Tp>::type>::type { }; template<typename _Tp> struct __is_nt_destructible_safe<_Tp, true, false> : public false_type { }; template<typename _Tp> struct __is_nt_destructible_safe<_Tp, false, true> : public true_type { }; template<typename _Tp> struct is_nothrow_destructible : public __is_nt_destructible_safe<_Tp>::type { }; struct __do_is_default_constructible_impl { template<typename _Tp, typename = decltype(_Tp())> static true_type __test(int); template<typename> static false_type __test(...); }; template<typename _Tp> struct __is_default_constructible_impl : public __do_is_default_constructible_impl { typedef decltype(__test<_Tp>(0)) type; }; template<typename _Tp> struct __is_default_constructible_atom : public __and_<__not_<is_void<_Tp>>, __is_default_constructible_impl<_Tp>> { }; template<typename _Tp, bool = is_array<_Tp>::value> struct __is_default_constructible_safe; template<typename _Tp> struct __is_default_constructible_safe<_Tp, true> : public __and_<__is_array_known_bounds<_Tp>, __is_default_constructible_atom<typename remove_all_extents<_Tp>::type>> { }; template<typename _Tp> struct __is_default_constructible_safe<_Tp, false> : public __is_default_constructible_atom<_Tp>::type { }; template<typename _Tp> struct is_default_constructible : public __is_default_constructible_safe<_Tp>::type { }; template<typename _Tp, typename... _Args> struct is_constructible : public __bool_constant<__is_constructible(_Tp, _Args...)> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_copy_constructible_impl; template<typename _Tp> struct __is_copy_constructible_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_copy_constructible_impl<_Tp, true> : public is_constructible<_Tp, const _Tp&> { }; template<typename _Tp> struct is_copy_constructible : public __is_copy_constructible_impl<_Tp> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_move_constructible_impl; template<typename _Tp> struct __is_move_constructible_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_move_constructible_impl<_Tp, true> : public is_constructible<_Tp, _Tp&&> { }; template<typename _Tp> struct is_move_constructible : public __is_move_constructible_impl<_Tp> { }; template<typename _Tp> struct __is_nt_default_constructible_atom : public integral_constant<bool, noexcept(_Tp())> { }; template<typename _Tp, bool = is_array<_Tp>::value> struct __is_nt_default_constructible_impl; template<typename _Tp> struct __is_nt_default_constructible_impl<_Tp, true> : public __and_<__is_array_known_bounds<_Tp>, __is_nt_default_constructible_atom<typename remove_all_extents<_Tp>::type>> { }; template<typename _Tp> struct __is_nt_default_constructible_impl<_Tp, false> : public __is_nt_default_constructible_atom<_Tp> { }; template<typename _Tp> struct is_nothrow_default_constructible : public __and_<is_default_constructible<_Tp>, __is_nt_default_constructible_impl<_Tp>> { }; template<typename _Tp, typename... _Args> struct __is_nt_constructible_impl : public integral_constant<bool, noexcept(_Tp(declval<_Args>()...))> { }; template<typename _Tp, typename _Arg> struct __is_nt_constructible_impl<_Tp, _Arg> : public integral_constant<bool, noexcept(static_cast<_Tp>(declval<_Arg>()))> { }; template<typename _Tp> struct __is_nt_constructible_impl<_Tp> : public is_nothrow_default_constructible<_Tp> { }; template<typename _Tp, typename... _Args> struct is_nothrow_constructible : public __and_<is_constructible<_Tp, _Args...>, __is_nt_constructible_impl<_Tp, _Args...>> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_nothrow_copy_constructible_impl; template<typename _Tp> struct __is_nothrow_copy_constructible_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_nothrow_copy_constructible_impl<_Tp, true> : public is_nothrow_constructible<_Tp, const _Tp&> { }; template<typename _Tp> struct is_nothrow_copy_constructible : public __is_nothrow_copy_constructible_impl<_Tp> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_nothrow_move_constructible_impl; template<typename _Tp> struct __is_nothrow_move_constructible_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_nothrow_move_constructible_impl<_Tp, true> : public is_nothrow_constructible<_Tp, _Tp&&> { }; template<typename _Tp> struct is_nothrow_move_constructible : public __is_nothrow_move_constructible_impl<_Tp> { }; template<typename _Tp, typename _Up> struct is_assignable : public __bool_constant<__is_assignable(_Tp, _Up)> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_copy_assignable_impl; template<typename _Tp> struct __is_copy_assignable_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_copy_assignable_impl<_Tp, true> : public is_assignable<_Tp&, const _Tp&> { }; template<typename _Tp> struct is_copy_assignable : public __is_copy_assignable_impl<_Tp> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_move_assignable_impl; template<typename _Tp> struct __is_move_assignable_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_move_assignable_impl<_Tp, true> : public is_assignable<_Tp&, _Tp&&> { }; template<typename _Tp> struct is_move_assignable : public __is_move_assignable_impl<_Tp> { }; template<typename _Tp, typename _Up> struct __is_nt_assignable_impl : public integral_constant<bool, noexcept(declval<_Tp>() = declval<_Up>())> { }; template<typename _Tp, typename _Up> struct is_nothrow_assignable : public __and_<is_assignable<_Tp, _Up>, __is_nt_assignable_impl<_Tp, _Up>> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_nt_copy_assignable_impl; template<typename _Tp> struct __is_nt_copy_assignable_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_nt_copy_assignable_impl<_Tp, true> : public is_nothrow_assignable<_Tp&, const _Tp&> { }; template<typename _Tp> struct is_nothrow_copy_assignable : public __is_nt_copy_assignable_impl<_Tp> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_nt_move_assignable_impl; template<typename _Tp> struct __is_nt_move_assignable_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_nt_move_assignable_impl<_Tp, true> : public is_nothrow_assignable<_Tp&, _Tp&&> { }; template<typename _Tp> struct is_nothrow_move_assignable : public __is_nt_move_assignable_impl<_Tp> { }; template<typename _Tp, typename... _Args> struct is_trivially_constructible : public __and_<is_constructible<_Tp, _Args...>, __bool_constant< __is_trivially_constructible(_Tp, _Args...)>>::type { }; template<typename _Tp> struct is_trivially_default_constructible : public is_trivially_constructible<_Tp>::type { }; struct __do_is_implicitly_default_constructible_impl { template <typename _Tp> static void __helper(const _Tp&); template <typename _Tp> static true_type __test(const _Tp&, decltype(__helper<const _Tp&>({}))* = 0); static false_type __test(...); }; template<typename _Tp> struct __is_implicitly_default_constructible_impl : public __do_is_implicitly_default_constructible_impl { typedef decltype(__test(declval<_Tp>())) type; }; template<typename _Tp> struct __is_implicitly_default_constructible_safe : public __is_implicitly_default_constructible_impl<_Tp>::type { }; template <typename _Tp> struct __is_implicitly_default_constructible : public __and_<is_default_constructible<_Tp>, __is_implicitly_default_constructible_safe<_Tp>> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_trivially_copy_constructible_impl; template<typename _Tp> struct __is_trivially_copy_constructible_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_trivially_copy_constructible_impl<_Tp, true> : public __and_<is_copy_constructible<_Tp>, integral_constant<bool, __is_trivially_constructible(_Tp, const _Tp&)>> { }; template<typename _Tp> struct is_trivially_copy_constructible : public __is_trivially_copy_constructible_impl<_Tp> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_trivially_move_constructible_impl; template<typename _Tp> struct __is_trivially_move_constructible_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_trivially_move_constructible_impl<_Tp, true> : public __and_<is_move_constructible<_Tp>, integral_constant<bool, __is_trivially_constructible(_Tp, _Tp&&)>> { }; template<typename _Tp> struct is_trivially_move_constructible : public __is_trivially_move_constructible_impl<_Tp> { }; template<typename _Tp, typename _Up> struct is_trivially_assignable : public __bool_constant<__is_trivially_assignable(_Tp, _Up)> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_trivially_copy_assignable_impl; template<typename _Tp> struct __is_trivially_copy_assignable_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_trivially_copy_assignable_impl<_Tp, true> : public __and_<is_copy_assignable<_Tp>, integral_constant<bool, __is_trivially_assignable(_Tp&, const _Tp&)>> { }; template<typename _Tp> struct is_trivially_copy_assignable : public __is_trivially_copy_assignable_impl<_Tp> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_trivially_move_assignable_impl; template<typename _Tp> struct __is_trivially_move_assignable_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_trivially_move_assignable_impl<_Tp, true> : public __and_<is_move_assignable<_Tp>, integral_constant<bool, __is_trivially_assignable(_Tp&, _Tp&&)>> { }; template<typename _Tp> struct is_trivially_move_assignable : public __is_trivially_move_assignable_impl<_Tp> { }; template<typename _Tp> struct is_trivially_destructible : public __and_<is_destructible<_Tp>, integral_constant<bool, __has_trivial_destructor(_Tp)>> { }; template<typename _Tp> struct has_virtual_destructor : public integral_constant<bool, __has_virtual_destructor(_Tp)> { }; template<typename _Tp> struct alignment_of : public integral_constant<std::size_t, alignof(_Tp)> { }; template<typename> struct rank : public integral_constant<std::size_t, 0> { }; template<typename _Tp, std::size_t _Size> struct rank<_Tp[_Size]> : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; template<typename _Tp> struct rank<_Tp[]> : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; template<typename, unsigned _Uint> struct extent : public integral_constant<std::size_t, 0> { }; template<typename _Tp, unsigned _Uint, std::size_t _Size> struct extent<_Tp[_Size], _Uint> : public integral_constant<std::size_t, _Uint == 0 ? _Size : extent<_Tp, _Uint - 1>::value> { }; template<typename _Tp, unsigned _Uint> struct extent<_Tp[], _Uint> : public integral_constant<std::size_t, _Uint == 0 ? 0 : extent<_Tp, _Uint - 1>::value> { }; template<typename, typename> struct is_same : public false_type { }; template<typename _Tp> struct is_same<_Tp, _Tp> : public true_type { }; template<typename _Base, typename _Derived> struct is_base_of : public integral_constant<bool, __is_base_of(_Base, _Derived)> { }; template<typename _From, typename _To, bool = __or_<is_void<_From>, is_function<_To>, is_array<_To>>::value> struct __is_convertible_helper { typedef typename is_void<_To>::type type; }; template<typename _From, typename _To> class __is_convertible_helper<_From, _To, false> { template<typename _To1> static void __test_aux(_To1); template<typename _From1, typename _To1, typename = decltype(__test_aux<_To1>(std::declval<_From1>()))> static true_type __test(int); template<typename, typename> static false_type __test(...); public: typedef decltype(__test<_From, _To>(0)) type; }; template<typename _From, typename _To> struct is_convertible : public __is_convertible_helper<_From, _To>::type { }; template<typename _Tp> struct remove_const { typedef _Tp type; }; template<typename _Tp> struct remove_const<_Tp const> { typedef _Tp type; }; template<typename _Tp> struct remove_volatile { typedef _Tp type; }; template<typename _Tp> struct remove_volatile<_Tp volatile> { typedef _Tp type; }; template<typename _Tp> struct remove_cv { typedef typename remove_const<typename remove_volatile<_Tp>::type>::type type; }; template<typename _Tp> struct add_const { typedef _Tp const type; }; template<typename _Tp> struct add_volatile { typedef _Tp volatile type; }; template<typename _Tp> struct add_cv { typedef typename add_const<typename add_volatile<_Tp>::type>::type type; }; template<typename _Tp> using remove_const_t = typename remove_const<_Tp>::type; template<typename _Tp> using remove_volatile_t = typename remove_volatile<_Tp>::type; template<typename _Tp> using remove_cv_t = typename remove_cv<_Tp>::type; template<typename _Tp> using add_const_t = typename add_const<_Tp>::type; template<typename _Tp> using add_volatile_t = typename add_volatile<_Tp>::type; template<typename _Tp> using add_cv_t = typename add_cv<_Tp>::type; template<typename _Tp> struct remove_reference { typedef _Tp type; }; template<typename _Tp> struct remove_reference<_Tp&> { typedef _Tp type; }; template<typename _Tp> struct remove_reference<_Tp&&> { typedef _Tp type; }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __add_lvalue_reference_helper { typedef _Tp type; }; template<typename _Tp> struct __add_lvalue_reference_helper<_Tp, true> { typedef _Tp& type; }; template<typename _Tp> struct add_lvalue_reference : public __add_lvalue_reference_helper<_Tp> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __add_rvalue_reference_helper { typedef _Tp type; }; template<typename _Tp> struct __add_rvalue_reference_helper<_Tp, true> { typedef _Tp&& type; }; template<typename _Tp> struct add_rvalue_reference : public __add_rvalue_reference_helper<_Tp> { }; template<typename _Tp> using remove_reference_t = typename remove_reference<_Tp>::type; template<typename _Tp> using add_lvalue_reference_t = typename add_lvalue_reference<_Tp>::type; template<typename _Tp> using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type; template<typename _Unqualified, bool _IsConst, bool _IsVol> struct __cv_selector; template<typename _Unqualified> struct __cv_selector<_Unqualified, false, false> { typedef _Unqualified __type; }; template<typename _Unqualified> struct __cv_selector<_Unqualified, false, true> { typedef volatile _Unqualified __type; }; template<typename _Unqualified> struct __cv_selector<_Unqualified, true, false> { typedef const _Unqualified __type; }; template<typename _Unqualified> struct __cv_selector<_Unqualified, true, true> { typedef const volatile _Unqualified __type; }; template<typename _Qualified, typename _Unqualified, bool _IsConst = is_const<_Qualified>::value, bool _IsVol = is_volatile<_Qualified>::value> class __match_cv_qualifiers { typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match; public: typedef typename __match::__type __type; }; template<typename _Tp> struct __make_unsigned { typedef _Tp __type; }; template<> struct __make_unsigned<char> { typedef unsigned char __type; }; template<> struct __make_unsigned<signed char> { typedef unsigned char __type; }; template<> struct __make_unsigned<short> { typedef unsigned short __type; }; template<> struct __make_unsigned<int> { typedef unsigned int __type; }; template<> struct __make_unsigned<long> { typedef unsigned long __type; }; template<> struct __make_unsigned<long long> { typedef unsigned long long __type; }; # 1590 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 template<typename _Tp, bool _IsInt = is_integral<_Tp>::value, bool _IsEnum = is_enum<_Tp>::value> class __make_unsigned_selector; template<typename _Tp> class __make_unsigned_selector<_Tp, true, false> { typedef __make_unsigned<typename remove_cv<_Tp>::type> __unsignedt; typedef typename __unsignedt::__type __unsigned_type; typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned; public: typedef typename __cv_unsigned::__type __type; }; template<typename _Tp> class __make_unsigned_selector<_Tp, false, true> { typedef unsigned char __smallest; static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest); static const bool __b1 = sizeof(_Tp) <= sizeof(unsigned short); static const bool __b2 = sizeof(_Tp) <= sizeof(unsigned int); static const bool __b3 = sizeof(_Tp) <= sizeof(unsigned long); typedef conditional<__b3, unsigned long, unsigned long long> __cond3; typedef typename __cond3::type __cond3_type; typedef conditional<__b2, unsigned int, __cond3_type> __cond2; typedef typename __cond2::type __cond2_type; typedef conditional<__b1, unsigned short, __cond2_type> __cond1; typedef typename __cond1::type __cond1_type; typedef typename conditional<__b0, __smallest, __cond1_type>::type __unsigned_type; typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned; public: typedef typename __cv_unsigned::__type __type; }; template<typename _Tp> struct make_unsigned { typedef typename __make_unsigned_selector<_Tp>::__type type; }; template<> struct make_unsigned<bool>; template<typename _Tp> struct __make_signed { typedef _Tp __type; }; template<> struct __make_signed<char> { typedef signed char __type; }; template<> struct __make_signed<unsigned char> { typedef signed char __type; }; template<> struct __make_signed<unsigned short> { typedef signed short __type; }; template<> struct __make_signed<unsigned int> { typedef signed int __type; }; template<> struct __make_signed<unsigned long> { typedef signed long __type; }; template<> struct __make_signed<unsigned long long> { typedef signed long long __type; }; # 1694 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 template<typename _Tp, bool _IsInt = is_integral<_Tp>::value, bool _IsEnum = is_enum<_Tp>::value> class __make_signed_selector; template<typename _Tp> class __make_signed_selector<_Tp, true, false> { typedef __make_signed<typename remove_cv<_Tp>::type> __signedt; typedef typename __signedt::__type __signed_type; typedef __match_cv_qualifiers<_Tp, __signed_type> __cv_signed; public: typedef typename __cv_signed::__type __type; }; template<typename _Tp> class __make_signed_selector<_Tp, false, true> { typedef typename __make_unsigned_selector<_Tp>::__type __unsigned_type; public: typedef typename __make_signed_selector<__unsigned_type>::__type __type; }; template<typename _Tp> struct make_signed { typedef typename __make_signed_selector<_Tp>::__type type; }; template<> struct make_signed<bool>; template<typename _Tp> using make_signed_t = typename make_signed<_Tp>::type; template<typename _Tp> using make_unsigned_t = typename make_unsigned<_Tp>::type; template<typename _Tp> struct remove_extent { typedef _Tp type; }; template<typename _Tp, std::size_t _Size> struct remove_extent<_Tp[_Size]> { typedef _Tp type; }; template<typename _Tp> struct remove_extent<_Tp[]> { typedef _Tp type; }; template<typename _Tp> struct remove_all_extents { typedef _Tp type; }; template<typename _Tp, std::size_t _Size> struct remove_all_extents<_Tp[_Size]> { typedef typename remove_all_extents<_Tp>::type type; }; template<typename _Tp> struct remove_all_extents<_Tp[]> { typedef typename remove_all_extents<_Tp>::type type; }; template<typename _Tp> using remove_extent_t = typename remove_extent<_Tp>::type; template<typename _Tp> using remove_all_extents_t = typename remove_all_extents<_Tp>::type; template<typename _Tp, typename> struct __remove_pointer_helper { typedef _Tp type; }; template<typename _Tp, typename _Up> struct __remove_pointer_helper<_Tp, _Up*> { typedef _Up type; }; template<typename _Tp> struct remove_pointer : public __remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type> { }; template<typename _Tp, bool = __or_<__is_referenceable<_Tp>, is_void<_Tp>>::value> struct __add_pointer_helper { typedef _Tp type; }; template<typename _Tp> struct __add_pointer_helper<_Tp, true> { typedef typename remove_reference<_Tp>::type* type; }; template<typename _Tp> struct add_pointer : public __add_pointer_helper<_Tp> { }; template<typename _Tp> using remove_pointer_t = typename remove_pointer<_Tp>::type; template<typename _Tp> using add_pointer_t = typename add_pointer<_Tp>::type; template<std::size_t _Len> struct __aligned_storage_msa { union __type { unsigned char __data[_Len]; struct __attribute__((__aligned__)) { } __align; }; }; # 1840 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 template<std::size_t _Len, std::size_t _Align = __alignof__(typename __aligned_storage_msa<_Len>::__type)> struct aligned_storage { union type { unsigned char __data[_Len]; struct __attribute__((__aligned__((_Align)))) { } __align; }; }; template <typename... _Types> struct __strictest_alignment { static const size_t _S_alignment = 0; static const size_t _S_size = 0; }; template <typename _Tp, typename... _Types> struct __strictest_alignment<_Tp, _Types...> { static const size_t _S_alignment = alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment ? alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment; static const size_t _S_size = sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size ? sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size; }; # 1879 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 template <size_t _Len, typename... _Types> struct aligned_union { private: static_assert(sizeof...(_Types) != 0, "At least one type is required"); using __strictest = __strictest_alignment<_Types...>; static const size_t _S_len = _Len > __strictest::_S_size ? _Len : __strictest::_S_size; public: static const size_t alignment_value = __strictest::_S_alignment; typedef typename aligned_storage<_S_len, alignment_value>::type type; }; template <size_t _Len, typename... _Types> const size_t aligned_union<_Len, _Types...>::alignment_value; template<typename _Up, bool _IsArray = is_array<_Up>::value, bool _IsFunction = is_function<_Up>::value> struct __decay_selector; template<typename _Up> struct __decay_selector<_Up, false, false> { typedef typename remove_cv<_Up>::type __type; }; template<typename _Up> struct __decay_selector<_Up, true, false> { typedef typename remove_extent<_Up>::type* __type; }; template<typename _Up> struct __decay_selector<_Up, false, true> { typedef typename add_pointer<_Up>::type __type; }; template<typename _Tp> class decay { typedef typename remove_reference<_Tp>::type __remove_type; public: typedef typename __decay_selector<__remove_type>::__type type; }; template<typename _Tp> class reference_wrapper; template<typename _Tp> struct __strip_reference_wrapper { typedef _Tp __type; }; template<typename _Tp> struct __strip_reference_wrapper<reference_wrapper<_Tp> > { typedef _Tp& __type; }; template<typename _Tp> struct __decay_and_strip { typedef typename __strip_reference_wrapper< typename decay<_Tp>::type>::__type __type; }; template<bool, typename _Tp = void> struct enable_if { }; template<typename _Tp> struct enable_if<true, _Tp> { typedef _Tp type; }; template<typename... _Cond> using _Require = typename enable_if<__and_<_Cond...>::value>::type; template<bool _Cond, typename _Iftrue, typename _Iffalse> struct conditional { typedef _Iftrue type; }; template<typename _Iftrue, typename _Iffalse> struct conditional<false, _Iftrue, _Iffalse> { typedef _Iffalse type; }; template<typename... _Tp> struct common_type; struct __do_common_type_impl { template<typename _Tp, typename _Up> static __success_type<typename decay<decltype (true ? std::declval<_Tp>() : std::declval<_Up>())>::type> _S_test(int); template<typename, typename> static __failure_type _S_test(...); }; template<typename _Tp, typename _Up> struct __common_type_impl : private __do_common_type_impl { typedef decltype(_S_test<_Tp, _Up>(0)) type; }; struct __do_member_type_wrapper { template<typename _Tp> static __success_type<typename _Tp::type> _S_test(int); template<typename> static __failure_type _S_test(...); }; template<typename _Tp> struct __member_type_wrapper : private __do_member_type_wrapper { typedef decltype(_S_test<_Tp>(0)) type; }; template<typename _CTp, typename... _Args> struct __expanded_common_type_wrapper { typedef common_type<typename _CTp::type, _Args...> type; }; template<typename... _Args> struct __expanded_common_type_wrapper<__failure_type, _Args...> { typedef __failure_type type; }; template<typename _Tp> struct common_type<_Tp> { typedef typename decay<_Tp>::type type; }; template<typename _Tp, typename _Up> struct common_type<_Tp, _Up> : public __common_type_impl<_Tp, _Up>::type { }; template<typename _Tp, typename _Up, typename... _Vp> struct common_type<_Tp, _Up, _Vp...> : public __expanded_common_type_wrapper<typename __member_type_wrapper< common_type<_Tp, _Up>>::type, _Vp...>::type { }; template<typename _Tp> struct underlying_type { typedef __underlying_type(_Tp) type; }; template<typename _Tp> struct __declval_protector { static const bool __stop = false; }; template<typename _Tp> auto declval() noexcept -> decltype(__declval<_Tp>(0)) { static_assert(__declval_protector<_Tp>::__stop, "declval() must not be used!"); return __declval<_Tp>(0); } # 2072 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 template<> struct __make_unsigned<wchar_t> { using __type = typename __make_unsigned_selector<wchar_t, false, true>::__type; }; template<> struct __make_signed<wchar_t> { using __type = typename __make_signed_selector<wchar_t, false, true>::__type; }; template<> struct __make_unsigned<char16_t> { using __type = typename __make_unsigned_selector<char16_t, false, true>::__type; }; template<> struct __make_signed<char16_t> { using __type = typename __make_signed_selector<char16_t, false, true>::__type; }; template<> struct __make_unsigned<char32_t> { using __type = typename __make_unsigned_selector<char32_t, false, true>::__type; }; template<> struct __make_signed<char32_t> { using __type = typename __make_signed_selector<char32_t, false, true>::__type; }; template<typename _Signature> class result_of; struct __invoke_memfun_ref { }; struct __invoke_memfun_deref { }; struct __invoke_memobj_ref { }; struct __invoke_memobj_deref { }; struct __invoke_other { }; template<typename _Tp, typename _Tag> struct __result_of_success : __success_type<_Tp> { using __invoke_type = _Tag; }; struct __result_of_memfun_ref_impl { template<typename _Fp, typename _Tp1, typename... _Args> static __result_of_success<decltype( (std::declval<_Tp1>().*std::declval<_Fp>())(std::declval<_Args>()...) ), __invoke_memfun_ref> _S_test(int); template<typename...> static __failure_type _S_test(...); }; template<typename _MemPtr, typename _Arg, typename... _Args> struct __result_of_memfun_ref : private __result_of_memfun_ref_impl { typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; }; struct __result_of_memfun_deref_impl { template<typename _Fp, typename _Tp1, typename... _Args> static __result_of_success<decltype( ((*std::declval<_Tp1>()).*std::declval<_Fp>())(std::declval<_Args>()...) ), __invoke_memfun_deref> _S_test(int); template<typename...> static __failure_type _S_test(...); }; template<typename _MemPtr, typename _Arg, typename... _Args> struct __result_of_memfun_deref : private __result_of_memfun_deref_impl { typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; }; struct __result_of_memobj_ref_impl { template<typename _Fp, typename _Tp1> static __result_of_success<decltype( std::declval<_Tp1>().*std::declval<_Fp>() ), __invoke_memobj_ref> _S_test(int); template<typename, typename> static __failure_type _S_test(...); }; template<typename _MemPtr, typename _Arg> struct __result_of_memobj_ref : private __result_of_memobj_ref_impl { typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; }; struct __result_of_memobj_deref_impl { template<typename _Fp, typename _Tp1> static __result_of_success<decltype( (*std::declval<_Tp1>()).*std::declval<_Fp>() ), __invoke_memobj_deref> _S_test(int); template<typename, typename> static __failure_type _S_test(...); }; template<typename _MemPtr, typename _Arg> struct __result_of_memobj_deref : private __result_of_memobj_deref_impl { typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; }; template<typename _MemPtr, typename _Arg> struct __result_of_memobj; template<typename _Res, typename _Class, typename _Arg> struct __result_of_memobj<_Res _Class::*, _Arg> { typedef typename remove_cv<typename remove_reference< _Arg>::type>::type _Argval; typedef _Res _Class::* _MemPtr; typedef typename conditional<__or_<is_same<_Argval, _Class>, is_base_of<_Class, _Argval>>::value, __result_of_memobj_ref<_MemPtr, _Arg>, __result_of_memobj_deref<_MemPtr, _Arg> >::type::type type; }; template<typename _MemPtr, typename _Arg, typename... _Args> struct __result_of_memfun; template<typename _Res, typename _Class, typename _Arg, typename... _Args> struct __result_of_memfun<_Res _Class::*, _Arg, _Args...> { typedef typename remove_cv<typename remove_reference< _Arg>::type>::type _Argval; typedef _Res _Class::* _MemPtr; typedef typename conditional<__or_<is_same<_Argval, _Class>, is_base_of<_Class, _Argval>>::value, __result_of_memfun_ref<_MemPtr, _Arg, _Args...>, __result_of_memfun_deref<_MemPtr, _Arg, _Args...> >::type::type type; }; template<typename _Tp, typename _Up = typename decay<_Tp>::type> struct __inv_unwrap { using type = _Tp; }; template<typename _Tp, typename _Up> struct __inv_unwrap<_Tp, reference_wrapper<_Up>> { using type = _Up&; }; template<bool, bool, typename _Functor, typename... _ArgTypes> struct __result_of_impl { typedef __failure_type type; }; template<typename _MemPtr, typename _Arg> struct __result_of_impl<true, false, _MemPtr, _Arg> : public __result_of_memobj<typename decay<_MemPtr>::type, typename __inv_unwrap<_Arg>::type> { }; template<typename _MemPtr, typename _Arg, typename... _Args> struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...> : public __result_of_memfun<typename decay<_MemPtr>::type, typename __inv_unwrap<_Arg>::type, _Args...> { }; struct __result_of_other_impl { template<typename _Fn, typename... _Args> static __result_of_success<decltype( std::declval<_Fn>()(std::declval<_Args>()...) ), __invoke_other> _S_test(int); template<typename...> static __failure_type _S_test(...); }; template<typename _Functor, typename... _ArgTypes> struct __result_of_impl<false, false, _Functor, _ArgTypes...> : private __result_of_other_impl { typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type; }; template<typename _Functor, typename... _ArgTypes> struct __invoke_result : public __result_of_impl< is_member_object_pointer< typename remove_reference<_Functor>::type >::value, is_member_function_pointer< typename remove_reference<_Functor>::type >::value, _Functor, _ArgTypes... >::type { }; template<typename _Functor, typename... _ArgTypes> struct result_of<_Functor(_ArgTypes...)> : public __invoke_result<_Functor, _ArgTypes...> { }; template<size_t _Len, size_t _Align = __alignof__(typename __aligned_storage_msa<_Len>::__type)> using aligned_storage_t = typename aligned_storage<_Len, _Align>::type; template <size_t _Len, typename... _Types> using aligned_union_t = typename aligned_union<_Len, _Types...>::type; template<typename _Tp> using decay_t = typename decay<_Tp>::type; template<bool _Cond, typename _Tp = void> using enable_if_t = typename enable_if<_Cond, _Tp>::type; template<bool _Cond, typename _Iftrue, typename _Iffalse> using conditional_t = typename conditional<_Cond, _Iftrue, _Iffalse>::type; template<typename... _Tp> using common_type_t = typename common_type<_Tp...>::type; template<typename _Tp> using underlying_type_t = typename underlying_type<_Tp>::type; template<typename _Tp> using result_of_t = typename result_of<_Tp>::type; template<bool _Cond, typename _Tp = void> using __enable_if_t = typename enable_if<_Cond, _Tp>::type; template<typename...> using __void_t = void; # 2364 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 template<typename _Default, typename _AlwaysVoid, template<typename...> class _Op, typename... _Args> struct __detector { using value_t = false_type; using type = _Default; }; template<typename _Default, template<typename...> class _Op, typename... _Args> struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...> { using value_t = true_type; using type = _Op<_Args...>; }; template<typename _Default, template<typename...> class _Op, typename... _Args> using __detected_or = __detector<_Default, void, _Op, _Args...>; template<typename _Default, template<typename...> class _Op, typename... _Args> using __detected_or_t = typename __detected_or<_Default, _Op, _Args...>::type; # 2408 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 template <typename _Tp> struct __is_swappable; template <typename _Tp> struct __is_nothrow_swappable; template<typename... _Elements> class tuple; template<typename> struct __is_tuple_like_impl : false_type { }; template<typename... _Tps> struct __is_tuple_like_impl<tuple<_Tps...>> : true_type { }; template<typename _Tp> struct __is_tuple_like : public __is_tuple_like_impl<typename remove_cv< typename remove_reference<_Tp>::type>::type>::type { }; template<typename _Tp> inline typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, is_move_constructible<_Tp>, is_move_assignable<_Tp>>::value>::type swap(_Tp&, _Tp&) noexcept(__and_<is_nothrow_move_constructible<_Tp>, is_nothrow_move_assignable<_Tp>>::value); template<typename _Tp, size_t _Nm> inline typename enable_if<__is_swappable<_Tp>::value>::type swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) noexcept(__is_nothrow_swappable<_Tp>::value); namespace __swappable_details { using std::swap; struct __do_is_swappable_impl { template<typename _Tp, typename = decltype(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))> static true_type __test(int); template<typename> static false_type __test(...); }; struct __do_is_nothrow_swappable_impl { template<typename _Tp> static __bool_constant< noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>())) > __test(int); template<typename> static false_type __test(...); }; } template<typename _Tp> struct __is_swappable_impl : public __swappable_details::__do_is_swappable_impl { typedef decltype(__test<_Tp>(0)) type; }; template<typename _Tp> struct __is_nothrow_swappable_impl : public __swappable_details::__do_is_nothrow_swappable_impl { typedef decltype(__test<_Tp>(0)) type; }; template<typename _Tp> struct __is_swappable : public __is_swappable_impl<_Tp>::type { }; template<typename _Tp> struct __is_nothrow_swappable : public __is_nothrow_swappable_impl<_Tp>::type { }; # 2613 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 template<typename _Result, typename _Ret, typename = void> struct __is_invocable_impl : false_type { }; template<typename _Result, typename _Ret> struct __is_invocable_impl<_Result, _Ret, __void_t<typename _Result::type>> : __or_<is_void<_Ret>, is_convertible<typename _Result::type, _Ret>>::type { }; template<typename _Fn, typename... _ArgTypes> struct __is_invocable : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type { }; template<typename _Fn, typename _Tp, typename... _Args> constexpr bool __call_is_nt(__invoke_memfun_ref) { using _Up = typename __inv_unwrap<_Tp>::type; return noexcept((std::declval<_Up>().*std::declval<_Fn>())( std::declval<_Args>()...)); } template<typename _Fn, typename _Tp, typename... _Args> constexpr bool __call_is_nt(__invoke_memfun_deref) { return noexcept(((*std::declval<_Tp>()).*std::declval<_Fn>())( std::declval<_Args>()...)); } template<typename _Fn, typename _Tp> constexpr bool __call_is_nt(__invoke_memobj_ref) { using _Up = typename __inv_unwrap<_Tp>::type; return noexcept(std::declval<_Up>().*std::declval<_Fn>()); } template<typename _Fn, typename _Tp> constexpr bool __call_is_nt(__invoke_memobj_deref) { return noexcept((*std::declval<_Tp>()).*std::declval<_Fn>()); } template<typename _Fn, typename... _Args> constexpr bool __call_is_nt(__invoke_other) { return noexcept(std::declval<_Fn>()(std::declval<_Args>()...)); } template<typename _Result, typename _Fn, typename... _Args> struct __call_is_nothrow : __bool_constant< std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{}) > { }; template<typename _Fn, typename... _Args> using __call_is_nothrow_ = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>; template<typename _Fn, typename... _Args> struct __is_nothrow_invocable : __and_<__is_invocable<_Fn, _Args...>, __call_is_nothrow_<_Fn, _Args...>>::type { }; struct __nonesuch { __nonesuch() = delete; ~__nonesuch() = delete; __nonesuch(__nonesuch const&) = delete; void operator=(__nonesuch const&) = delete; }; # 2974 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits" 3 } # 56 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/move.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 72 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/move.h" 3 template<typename _Tp> constexpr _Tp&& forward(typename std::remove_reference<_Tp>::type& __t) noexcept { return static_cast<_Tp&&>(__t); } template<typename _Tp> constexpr _Tp&& forward(typename std::remove_reference<_Tp>::type&& __t) noexcept { static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument" " substituting _Tp is an lvalue reference type"); return static_cast<_Tp&&>(__t); } template<typename _Tp> constexpr typename std::remove_reference<_Tp>::type&& move(_Tp&& __t) noexcept { return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); } template<typename _Tp> struct __move_if_noexcept_cond : public __and_<__not_<is_nothrow_move_constructible<_Tp>>, is_copy_constructible<_Tp>>::type { }; # 116 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/move.h" 3 template<typename _Tp> constexpr typename conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type move_if_noexcept(_Tp& __x) noexcept { return std::move(__x); } # 136 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/move.h" 3 template<typename _Tp> inline _Tp* addressof(_Tp& __r) noexcept { return std::__addressof(__r); } template<typename _Tp> const _Tp* addressof(const _Tp&&) = delete; template <typename _Tp, typename _Up = _Tp> inline _Tp __exchange(_Tp& __obj, _Up&& __new_val) { _Tp __old_val = std::move(__obj); __obj = std::forward<_Up>(__new_val); return __old_val; } # 176 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/move.h" 3 template<typename _Tp> inline typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, is_move_constructible<_Tp>, is_move_assignable<_Tp>>::value>::type swap(_Tp& __a, _Tp& __b) noexcept(__and_<is_nothrow_move_constructible<_Tp>, is_nothrow_move_assignable<_Tp>>::value) { _Tp __tmp = std::move(__a); __a = std::move(__b); __b = std::move(__tmp); } template<typename _Tp, size_t _Nm> inline typename enable_if<__is_swappable<_Tp>::value>::type swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) noexcept(__is_nothrow_swappable<_Tp>::value) { for (size_t __n = 0; __n < _Nm; ++__n) swap(__a[__n], __b[__n]); } } # 41 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/nested_exception.h" 2 3 extern "C++" { namespace std { class nested_exception { exception_ptr _M_ptr; public: nested_exception() noexcept : _M_ptr(current_exception()) { } nested_exception(const nested_exception&) noexcept = default; nested_exception& operator=(const nested_exception&) noexcept = default; virtual ~nested_exception() noexcept; [[noreturn]] void rethrow_nested() const { if (_M_ptr) rethrow_exception(_M_ptr); std::terminate(); } exception_ptr nested_ptr() const noexcept { return _M_ptr; } }; template<typename _Except> struct _Nested_exception : public _Except, public nested_exception { explicit _Nested_exception(const _Except& __ex) : _Except(__ex) { } explicit _Nested_exception(_Except&& __ex) : _Except(static_cast<_Except&&>(__ex)) { } }; template<typename _Tp> [[noreturn]] inline void __throw_with_nested_impl(_Tp&& __t, true_type) { using _Up = typename remove_reference<_Tp>::type; throw _Nested_exception<_Up>{std::forward<_Tp>(__t)}; } template<typename _Tp> [[noreturn]] inline void __throw_with_nested_impl(_Tp&& __t, false_type) { throw std::forward<_Tp>(__t); } template<typename _Tp> [[noreturn]] inline void throw_with_nested(_Tp&& __t) { using _Up = typename decay<_Tp>::type; using _CopyConstructible = __and_<is_copy_constructible<_Up>, is_move_constructible<_Up>>; static_assert(_CopyConstructible::value, "throw_with_nested argument must be CopyConstructible"); using __nest = __and_<is_class<_Up>, __bool_constant<!__is_final(_Up)>, __not_<is_base_of<nested_exception, _Up>>>; std::__throw_with_nested_impl(std::forward<_Tp>(__t), __nest{}); } template<typename _Tp> using __rethrow_if_nested_cond = typename enable_if< __and_<is_polymorphic<_Tp>, __or_<__not_<is_base_of<nested_exception, _Tp>>, is_convertible<_Tp*, nested_exception*>>>::value >::type; template<typename _Ex> inline __rethrow_if_nested_cond<_Ex> __rethrow_if_nested_impl(const _Ex* __ptr) { if (auto __ne_ptr = dynamic_cast<const nested_exception*>(__ptr)) __ne_ptr->rethrow_nested(); } inline void __rethrow_if_nested_impl(const void*) { } template<typename _Ex> inline void rethrow_if_nested(const _Ex& __ex) { std::__rethrow_if_nested_impl(std::__addressof(__ex)); } } } #pragma GCC visibility pop # 145 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/exception" 2 3 # 41 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/new" 2 3 #pragma GCC visibility push(default) extern "C++" { namespace std { class bad_alloc : public exception { public: bad_alloc() throw() { } virtual ~bad_alloc() throw(); virtual const char* what() const throw(); }; class bad_array_new_length : public bad_alloc { public: bad_array_new_length() throw() { } virtual ~bad_array_new_length() throw(); virtual const char* what() const throw(); }; struct nothrow_t { explicit nothrow_t() = default; }; extern const nothrow_t nothrow; typedef void (*new_handler)(); new_handler set_new_handler(new_handler) throw(); new_handler get_new_handler() noexcept; } # 120 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/new" 3 void* operator new(std::size_t) __attribute__((__externally_visible__)); void* operator new[](std::size_t) __attribute__((__externally_visible__)); void operator delete(void*) noexcept __attribute__((__externally_visible__)); void operator delete[](void*) noexcept __attribute__((__externally_visible__)); void* operator new(std::size_t, const std::nothrow_t&) noexcept __attribute__((__externally_visible__)); void* operator new[](std::size_t, const std::nothrow_t&) noexcept __attribute__((__externally_visible__)); void operator delete(void*, const std::nothrow_t&) noexcept __attribute__((__externally_visible__)); void operator delete[](void*, const std::nothrow_t&) noexcept __attribute__((__externally_visible__)); # 168 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/new" 3 inline void* operator new(std::size_t, void* __p) noexcept { return __p; } inline void* operator new[](std::size_t, void* __p) noexcept { return __p; } inline void operator delete (void*, void*) noexcept { } inline void operator delete[](void*, void*) noexcept { } } # 216 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/new" 3 #pragma GCC visibility pop # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Compiler.h" 2 # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 1 3 # 24 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Compiler.h" 2 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/ErrorHandling.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/string" 1 3 # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/string" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stringfwd.h" 1 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stringfwd.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/memoryfwd.h" 1 3 # 47 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/memoryfwd.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 63 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/memoryfwd.h" 3 template<typename> class allocator; template<> class allocator<void>; template<typename, typename> struct uses_allocator; } # 41 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stringfwd.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 52 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stringfwd.h" 3 template<class _CharT> struct char_traits; template<> struct char_traits<char>; template<> struct char_traits<wchar_t>; template<> struct char_traits<char16_t>; template<> struct char_traits<char32_t>; namespace __cxx11 { template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_string; typedef basic_string<char> string; typedef basic_string<wchar_t> wstring; typedef basic_string<char16_t> u16string; typedef basic_string<char32_t> u32string; } } # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/string" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/char_traits.h" 1 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/char_traits.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 1 3 # 60 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/functexcept.h" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/functexcept.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { void __throw_bad_exception(void) __attribute__((__noreturn__)); void __throw_bad_alloc(void) __attribute__((__noreturn__)); void __throw_bad_cast(void) __attribute__((__noreturn__)); void __throw_bad_typeid(void) __attribute__((__noreturn__)); void __throw_logic_error(const char*) __attribute__((__noreturn__)); void __throw_domain_error(const char*) __attribute__((__noreturn__)); void __throw_invalid_argument(const char*) __attribute__((__noreturn__)); void __throw_length_error(const char*) __attribute__((__noreturn__)); void __throw_out_of_range(const char*) __attribute__((__noreturn__)); void __throw_out_of_range_fmt(const char*, ...) __attribute__((__noreturn__)) __attribute__((__format__(__gnu_printf__, 1, 2))); void __throw_runtime_error(const char*) __attribute__((__noreturn__)); void __throw_range_error(const char*) __attribute__((__noreturn__)); void __throw_overflow_error(const char*) __attribute__((__noreturn__)); void __throw_underflow_error(const char*) __attribute__((__noreturn__)); void __throw_ios_failure(const char*) __attribute__((__noreturn__)); void __throw_system_error(int) __attribute__((__noreturn__)); void __throw_future_error(int) __attribute__((__noreturn__)); void __throw_bad_function_call() __attribute__((__noreturn__)); } # 61 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/cpp_type_traits.h" 1 3 # 36 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/cpp_type_traits.h" 3 # 67 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/cpp_type_traits.h" 3 extern "C++" { namespace std __attribute__ ((__visibility__ ("default"))) { struct __true_type { }; struct __false_type { }; template<bool> struct __truth_type { typedef __false_type __type; }; template<> struct __truth_type<true> { typedef __true_type __type; }; template<class _Sp, class _Tp> struct __traitor { enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; typedef typename __truth_type<__value>::__type __type; }; template<typename, typename> struct __are_same { enum { __value = 0 }; typedef __false_type __type; }; template<typename _Tp> struct __are_same<_Tp, _Tp> { enum { __value = 1 }; typedef __true_type __type; }; template<typename _Tp> struct __is_void { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_void<void> { enum { __value = 1 }; typedef __true_type __type; }; template<typename _Tp> struct __is_integer { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_integer<bool> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<char> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<signed char> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<unsigned char> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<wchar_t> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<char16_t> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<char32_t> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<short> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<unsigned short> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<int> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<unsigned int> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<long> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<unsigned long> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<long long> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<unsigned long long> { enum { __value = 1 }; typedef __true_type __type; }; # 278 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/cpp_type_traits.h" 3 template<typename _Tp> struct __is_floating { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_floating<float> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_floating<double> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_floating<long double> { enum { __value = 1 }; typedef __true_type __type; }; template<typename _Tp> struct __is_pointer { enum { __value = 0 }; typedef __false_type __type; }; template<typename _Tp> struct __is_pointer<_Tp*> { enum { __value = 1 }; typedef __true_type __type; }; template<typename _Tp> struct __is_arithmetic : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > { }; template<typename _Tp> struct __is_scalar : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > { }; template<typename _Tp> struct __is_char { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_char<char> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_char<wchar_t> { enum { __value = 1 }; typedef __true_type __type; }; template<typename _Tp> struct __is_byte { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_byte<char> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_byte<signed char> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_byte<unsigned char> { enum { __value = 1 }; typedef __true_type __type; }; # 408 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/cpp_type_traits.h" 3 template<typename _Tp> struct __is_move_iterator { enum { __value = 0 }; typedef __false_type __type; }; template<typename _Iterator> inline _Iterator __miter_base(_Iterator __it) { return __it; } } } # 62 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/type_traits.h" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/type_traits.h" 3 extern "C++" { namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template<bool, typename> struct __enable_if { }; template<typename _Tp> struct __enable_if<true, _Tp> { typedef _Tp __type; }; template<bool _Cond, typename _Iftrue, typename _Iffalse> struct __conditional_type { typedef _Iftrue __type; }; template<typename _Iftrue, typename _Iffalse> struct __conditional_type<false, _Iftrue, _Iffalse> { typedef _Iffalse __type; }; template<typename _Tp> struct __add_unsigned { private: typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type; public: typedef typename __if_type::__type __type; }; template<> struct __add_unsigned<char> { typedef unsigned char __type; }; template<> struct __add_unsigned<signed char> { typedef unsigned char __type; }; template<> struct __add_unsigned<short> { typedef unsigned short __type; }; template<> struct __add_unsigned<int> { typedef unsigned int __type; }; template<> struct __add_unsigned<long> { typedef unsigned long __type; }; template<> struct __add_unsigned<long long> { typedef unsigned long long __type; }; template<> struct __add_unsigned<bool>; template<> struct __add_unsigned<wchar_t>; template<typename _Tp> struct __remove_unsigned { private: typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type; public: typedef typename __if_type::__type __type; }; template<> struct __remove_unsigned<char> { typedef signed char __type; }; template<> struct __remove_unsigned<unsigned char> { typedef signed char __type; }; template<> struct __remove_unsigned<unsigned short> { typedef short __type; }; template<> struct __remove_unsigned<unsigned int> { typedef int __type; }; template<> struct __remove_unsigned<unsigned long> { typedef long __type; }; template<> struct __remove_unsigned<unsigned long long> { typedef long long __type; }; template<> struct __remove_unsigned<bool>; template<> struct __remove_unsigned<wchar_t>; template<typename _Type> inline bool __is_null_pointer(_Type* __ptr) { return __ptr == 0; } template<typename _Type> inline bool __is_null_pointer(_Type) { return false; } inline bool __is_null_pointer(std::nullptr_t) { return true; } template<typename _Tp, bool = std::__is_integer<_Tp>::__value> struct __promote { typedef double __type; }; template<typename _Tp> struct __promote<_Tp, false> { }; template<> struct __promote<long double> { typedef long double __type; }; template<> struct __promote<double> { typedef double __type; }; template<> struct __promote<float> { typedef float __type; }; template<typename _Tp, typename _Up, typename _Tp2 = typename __promote<_Tp>::__type, typename _Up2 = typename __promote<_Up>::__type> struct __promote_2 { typedef __typeof__(_Tp2() + _Up2()) __type; }; template<typename _Tp, typename _Up, typename _Vp, typename _Tp2 = typename __promote<_Tp>::__type, typename _Up2 = typename __promote<_Up>::__type, typename _Vp2 = typename __promote<_Vp>::__type> struct __promote_3 { typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type; }; template<typename _Tp, typename _Up, typename _Vp, typename _Wp, typename _Tp2 = typename __promote<_Tp>::__type, typename _Up2 = typename __promote<_Up>::__type, typename _Vp2 = typename __promote<_Vp>::__type, typename _Wp2 = typename __promote<_Wp>::__type> struct __promote_4 { typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type; }; } } # 63 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/numeric_traits.h" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/numeric_traits.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 54 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/numeric_traits.h" 3 template<typename _Value> struct __numeric_traits_integer { static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0); static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0); static const bool __is_signed = ((_Value)(-1) < 0); static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 0)); }; template<typename _Value> const _Value __numeric_traits_integer<_Value>::__min; template<typename _Value> const _Value __numeric_traits_integer<_Value>::__max; template<typename _Value> const bool __numeric_traits_integer<_Value>::__is_signed; template<typename _Value> const int __numeric_traits_integer<_Value>::__digits; # 99 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/numeric_traits.h" 3 template<typename _Value> struct __numeric_traits_floating { static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 64) * 643L / 2136); static const bool __is_signed = true; static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 18); static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932); }; template<typename _Value> const int __numeric_traits_floating<_Value>::__max_digits10; template<typename _Value> const bool __numeric_traits_floating<_Value>::__is_signed; template<typename _Value> const int __numeric_traits_floating<_Value>::__digits10; template<typename _Value> const int __numeric_traits_floating<_Value>::__max_exponent10; template<typename _Value> struct __numeric_traits : public __conditional_type<std::__is_integer<_Value>::__value, __numeric_traits_integer<_Value>, __numeric_traits_floating<_Value> >::__type { }; } # 64 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_pair.h" 1 3 # 65 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_pair.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 76 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_pair.h" 3 struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); template<typename...> class tuple; template<std::size_t...> struct _Index_tuple; template <bool, typename _T1, typename _T2> struct _PCC { template <typename _U1, typename _U2> static constexpr bool _ConstructiblePair() { return __and_<is_constructible<_T1, const _U1&>, is_constructible<_T2, const _U2&>>::value; } template <typename _U1, typename _U2> static constexpr bool _ImplicitlyConvertiblePair() { return __and_<is_convertible<const _U1&, _T1>, is_convertible<const _U2&, _T2>>::value; } template <typename _U1, typename _U2> static constexpr bool _MoveConstructiblePair() { return __and_<is_constructible<_T1, _U1&&>, is_constructible<_T2, _U2&&>>::value; } template <typename _U1, typename _U2> static constexpr bool _ImplicitlyMoveConvertiblePair() { return __and_<is_convertible<_U1&&, _T1>, is_convertible<_U2&&, _T2>>::value; } template <bool __implicit, typename _U1, typename _U2> static constexpr bool _CopyMovePair() { using __do_converts = __and_<is_convertible<const _U1&, _T1>, is_convertible<_U2&&, _T2>>; using __converts = typename conditional<__implicit, __do_converts, __not_<__do_converts>>::type; return __and_<is_constructible<_T1, const _U1&>, is_constructible<_T2, _U2&&>, __converts >::value; } template <bool __implicit, typename _U1, typename _U2> static constexpr bool _MoveCopyPair() { using __do_converts = __and_<is_convertible<_U1&&, _T1>, is_convertible<const _U2&, _T2>>; using __converts = typename conditional<__implicit, __do_converts, __not_<__do_converts>>::type; return __and_<is_constructible<_T1, _U1&&>, is_constructible<_T2, const _U2&&>, __converts >::value; } }; template <typename _T1, typename _T2> struct _PCC<false, _T1, _T2> { template <typename _U1, typename _U2> static constexpr bool _ConstructiblePair() { return false; } template <typename _U1, typename _U2> static constexpr bool _ImplicitlyConvertiblePair() { return false; } template <typename _U1, typename _U2> static constexpr bool _MoveConstructiblePair() { return false; } template <typename _U1, typename _U2> static constexpr bool _ImplicitlyMoveConvertiblePair() { return false; } }; struct __nonesuch_no_braces : std::__nonesuch { explicit __nonesuch_no_braces(const __nonesuch&) = delete; }; template<typename _U1, typename _U2> class __pair_base { template<typename _T1, typename _T2> friend struct pair; __pair_base() = default; ~__pair_base() = default; __pair_base(const __pair_base&) = default; __pair_base& operator=(const __pair_base&) = delete; }; template<typename _T1, typename _T2> struct pair : private __pair_base<_T1, _T2> { typedef _T1 first_type; typedef _T2 second_type; _T1 first; _T2 second; template <typename _U1 = _T1, typename _U2 = _T2, typename enable_if<__and_< __is_implicitly_default_constructible<_U1>, __is_implicitly_default_constructible<_U2>> ::value, bool>::type = true> constexpr pair() : first(), second() { } template <typename _U1 = _T1, typename _U2 = _T2, typename enable_if<__and_< is_default_constructible<_U1>, is_default_constructible<_U2>, __not_< __and_<__is_implicitly_default_constructible<_U1>, __is_implicitly_default_constructible<_U2>>>> ::value, bool>::type = false> explicit constexpr pair() : first(), second() { } # 252 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_pair.h" 3 using _PCCP = _PCC<true, _T1, _T2>; template<typename _U1 = _T1, typename _U2=_T2, typename enable_if<_PCCP::template _ConstructiblePair<_U1, _U2>() && _PCCP::template _ImplicitlyConvertiblePair<_U1, _U2>(), bool>::type=true> constexpr pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } template<typename _U1 = _T1, typename _U2=_T2, typename enable_if<_PCCP::template _ConstructiblePair<_U1, _U2>() && !_PCCP::template _ImplicitlyConvertiblePair<_U1, _U2>(), bool>::type=false> explicit constexpr pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } # 280 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_pair.h" 3 template <typename _U1, typename _U2> using _PCCFP = _PCC<!is_same<_T1, _U1>::value || !is_same<_T2, _U2>::value, _T1, _T2>; template<typename _U1, typename _U2, typename enable_if<_PCCFP<_U1, _U2>::template _ConstructiblePair<_U1, _U2>() && _PCCFP<_U1, _U2>::template _ImplicitlyConvertiblePair<_U1, _U2>(), bool>::type=true> constexpr pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) { } template<typename _U1, typename _U2, typename enable_if<_PCCFP<_U1, _U2>::template _ConstructiblePair<_U1, _U2>() && !_PCCFP<_U1, _U2>::template _ImplicitlyConvertiblePair<_U1, _U2>(), bool>::type=false> explicit constexpr pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) { } constexpr pair(const pair&) = default; constexpr pair(pair&&) = default; template<typename _U1, typename enable_if<_PCCP::template _MoveCopyPair<true, _U1, _T2>(), bool>::type=true> constexpr pair(_U1&& __x, const _T2& __y) : first(std::forward<_U1>(__x)), second(__y) { } template<typename _U1, typename enable_if<_PCCP::template _MoveCopyPair<false, _U1, _T2>(), bool>::type=false> explicit constexpr pair(_U1&& __x, const _T2& __y) : first(std::forward<_U1>(__x)), second(__y) { } template<typename _U2, typename enable_if<_PCCP::template _CopyMovePair<true, _T1, _U2>(), bool>::type=true> constexpr pair(const _T1& __x, _U2&& __y) : first(__x), second(std::forward<_U2>(__y)) { } template<typename _U2, typename enable_if<_PCCP::template _CopyMovePair<false, _T1, _U2>(), bool>::type=false> explicit pair(const _T1& __x, _U2&& __y) : first(__x), second(std::forward<_U2>(__y)) { } template<typename _U1, typename _U2, typename enable_if<_PCCP::template _MoveConstructiblePair<_U1, _U2>() && _PCCP::template _ImplicitlyMoveConvertiblePair<_U1, _U2>(), bool>::type=true> constexpr pair(_U1&& __x, _U2&& __y) : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } template<typename _U1, typename _U2, typename enable_if<_PCCP::template _MoveConstructiblePair<_U1, _U2>() && !_PCCP::template _ImplicitlyMoveConvertiblePair<_U1, _U2>(), bool>::type=false> explicit constexpr pair(_U1&& __x, _U2&& __y) : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } template<typename _U1, typename _U2, typename enable_if<_PCCFP<_U1, _U2>::template _MoveConstructiblePair<_U1, _U2>() && _PCCFP<_U1, _U2>::template _ImplicitlyMoveConvertiblePair<_U1, _U2>(), bool>::type=true> constexpr pair(pair<_U1, _U2>&& __p) : first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) { } template<typename _U1, typename _U2, typename enable_if<_PCCFP<_U1, _U2>::template _MoveConstructiblePair<_U1, _U2>() && !_PCCFP<_U1, _U2>::template _ImplicitlyMoveConvertiblePair<_U1, _U2>(), bool>::type=false> explicit constexpr pair(pair<_U1, _U2>&& __p) : first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) { } template<typename... _Args1, typename... _Args2> pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>); pair& operator=(typename conditional< __and_<is_copy_assignable<_T1>, is_copy_assignable<_T2>>::value, const pair&, const __nonesuch_no_braces&>::type __p) { first = __p.first; second = __p.second; return *this; } pair& operator=(typename conditional< __and_<is_move_assignable<_T1>, is_move_assignable<_T2>>::value, pair&&, __nonesuch_no_braces&&>::type __p) noexcept(__and_<is_nothrow_move_assignable<_T1>, is_nothrow_move_assignable<_T2>>::value) { first = std::forward<first_type>(__p.first); second = std::forward<second_type>(__p.second); return *this; } template<typename _U1, typename _U2> typename enable_if<__and_<is_assignable<_T1&, const _U1&>, is_assignable<_T2&, const _U2&>>::value, pair&>::type operator=(const pair<_U1, _U2>& __p) { first = __p.first; second = __p.second; return *this; } template<typename _U1, typename _U2> typename enable_if<__and_<is_assignable<_T1&, _U1&&>, is_assignable<_T2&, _U2&&>>::value, pair&>::type operator=(pair<_U1, _U2>&& __p) { first = std::forward<_U1>(__p.first); second = std::forward<_U2>(__p.second); return *this; } void swap(pair& __p) noexcept(__and_<__is_nothrow_swappable<_T1>, __is_nothrow_swappable<_T2>>::value) { using std::swap; swap(first, __p.first); swap(second, __p.second); } private: template<typename... _Args1, std::size_t... _Indexes1, typename... _Args2, std::size_t... _Indexes2> pair(tuple<_Args1...>&, tuple<_Args2...>&, _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); }; template<typename _T1, typename _T2> inline constexpr bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first == __y.first && __x.second == __y.second; } template<typename _T1, typename _T2> inline constexpr bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first < __y.first || (!(__y.first < __x.first) && __x.second < __y.second); } template<typename _T1, typename _T2> inline constexpr bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x == __y); } template<typename _T1, typename _T2> inline constexpr bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __y < __x; } template<typename _T1, typename _T2> inline constexpr bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__y < __x); } template<typename _T1, typename _T2> inline constexpr bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x < __y); } template<typename _T1, typename _T2> inline void swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } # 521 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_pair.h" 3 template<typename _T1, typename _T2> constexpr pair<typename __decay_and_strip<_T1>::__type, typename __decay_and_strip<_T2>::__type> make_pair(_T1&& __x, _T2&& __y) { typedef typename __decay_and_strip<_T1>::__type __ds_type1; typedef typename __decay_and_strip<_T2>::__type __ds_type2; typedef pair<__ds_type1, __ds_type2> __pair_type; return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y)); } # 541 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_pair.h" 3 } # 65 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator_base_types.h" 1 3 # 63 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator_base_types.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 89 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator_base_types.h" 3 struct input_iterator_tag { }; struct output_iterator_tag { }; struct forward_iterator_tag : public input_iterator_tag { }; struct bidirectional_iterator_tag : public forward_iterator_tag { }; struct random_access_iterator_tag : public bidirectional_iterator_tag { }; # 116 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator_base_types.h" 3 template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&> struct iterator { typedef _Category iterator_category; typedef _Tp value_type; typedef _Distance difference_type; typedef _Pointer pointer; typedef _Reference reference; }; # 143 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator_base_types.h" 3 template<typename _Iterator, typename = __void_t<>> struct __iterator_traits { }; template<typename _Iterator> struct __iterator_traits<_Iterator, __void_t<typename _Iterator::iterator_category, typename _Iterator::value_type, typename _Iterator::difference_type, typename _Iterator::pointer, typename _Iterator::reference>> { typedef typename _Iterator::iterator_category iterator_category; typedef typename _Iterator::value_type value_type; typedef typename _Iterator::difference_type difference_type; typedef typename _Iterator::pointer pointer; typedef typename _Iterator::reference reference; }; template<typename _Iterator> struct iterator_traits : public __iterator_traits<_Iterator> { }; # 177 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator_base_types.h" 3 template<typename _Tp> struct iterator_traits<_Tp*> { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef _Tp& reference; }; template<typename _Tp> struct iterator_traits<const _Tp*> { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef ptrdiff_t difference_type; typedef const _Tp* pointer; typedef const _Tp& reference; }; template<typename _Iter> inline constexpr typename iterator_traits<_Iter>::iterator_category __iterator_category(const _Iter&) { return typename iterator_traits<_Iter>::iterator_category(); } # 231 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator_base_types.h" 3 template<typename _InIter> using _RequireInputIter = typename enable_if<is_convertible<typename iterator_traits<_InIter>::iterator_category, input_iterator_tag>::value>::type; } # 66 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator_base_funcs.h" 1 3 # 63 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator_base_funcs.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/debug/assertions.h" 1 3 # 66 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator_base_funcs.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template <typename> struct _List_iterator; template <typename> struct _List_const_iterator; template<typename _InputIterator> inline constexpr typename iterator_traits<_InputIterator>::difference_type __distance(_InputIterator __first, _InputIterator __last, input_iterator_tag) { typename iterator_traits<_InputIterator>::difference_type __n = 0; while (__first != __last) { ++__first; ++__n; } return __n; } template<typename _RandomAccessIterator> inline constexpr typename iterator_traits<_RandomAccessIterator>::difference_type __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag) { return __last - __first; } template<typename _Tp> ptrdiff_t __distance(std::_List_iterator<_Tp>, std::_List_iterator<_Tp>, input_iterator_tag); template<typename _Tp> ptrdiff_t __distance(std::_List_const_iterator<_Tp>, std::_List_const_iterator<_Tp>, input_iterator_tag); # 135 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator_base_funcs.h" 3 template<typename _InputIterator> inline typename iterator_traits<_InputIterator>::difference_type distance(_InputIterator __first, _InputIterator __last) { return std::__distance(__first, __last, std::__iterator_category(__first)); } template<typename _InputIterator, typename _Distance> inline constexpr void __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) { ; while (__n--) ++__i; } template<typename _BidirectionalIterator, typename _Distance> inline constexpr void __advance(_BidirectionalIterator& __i, _Distance __n, bidirectional_iterator_tag) { if (__n > 0) while (__n--) ++__i; else while (__n++) --__i; } template<typename _RandomAccessIterator, typename _Distance> inline constexpr void __advance(_RandomAccessIterator& __i, _Distance __n, random_access_iterator_tag) { if (__builtin_constant_p(__n) && __n == 1) ++__i; else if (__builtin_constant_p(__n) && __n == -1) --__i; else __i += __n; } # 200 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator_base_funcs.h" 3 template<typename _InputIterator, typename _Distance> inline void advance(_InputIterator& __i, _Distance __n) { typename iterator_traits<_InputIterator>::difference_type __d = __n; std::__advance(__i, __d, std::__iterator_category(__i)); } template<typename _InputIterator> inline _InputIterator next(_InputIterator __x, typename iterator_traits<_InputIterator>::difference_type __n = 1) { std::advance(__x, __n); return __x; } template<typename _BidirectionalIterator> inline _BidirectionalIterator prev(_BidirectionalIterator __x, typename iterator_traits<_BidirectionalIterator>::difference_type __n = 1) { std::advance(__x, -__n); return __x; } } # 67 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 1 3 # 66 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ptr_traits.h" 1 3 # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ptr_traits.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { class __undefined; template<typename _Tp> struct __get_first_arg { using type = __undefined; }; template<template<typename, typename...> class _Template, typename _Tp, typename... _Types> struct __get_first_arg<_Template<_Tp, _Types...>> { using type = _Tp; }; template<typename _Tp> using __get_first_arg_t = typename __get_first_arg<_Tp>::type; template<typename _Tp, typename _Up> struct __replace_first_arg { }; template<template<typename, typename...> class _Template, typename _Up, typename _Tp, typename... _Types> struct __replace_first_arg<_Template<_Tp, _Types...>, _Up> { using type = _Template<_Up, _Types...>; }; template<typename _Tp, typename _Up> using __replace_first_arg_t = typename __replace_first_arg<_Tp, _Up>::type; template<typename _Tp> using __make_not_void = typename conditional<is_void<_Tp>::value, __undefined, _Tp>::type; template<typename _Ptr> struct pointer_traits { private: template<typename _Tp> using __element_type = typename _Tp::element_type; template<typename _Tp> using __difference_type = typename _Tp::difference_type; template<typename _Tp, typename _Up, typename = void> struct __rebind : __replace_first_arg<_Tp, _Up> { }; template<typename _Tp, typename _Up> struct __rebind<_Tp, _Up, __void_t<typename _Tp::template rebind<_Up>>> { using type = typename _Tp::template rebind<_Up>; }; public: using pointer = _Ptr; using element_type = __detected_or_t<__get_first_arg_t<_Ptr>, __element_type, _Ptr>; using difference_type = __detected_or_t<ptrdiff_t, __difference_type, _Ptr>; template<typename _Up> using rebind = typename __rebind<_Ptr, _Up>::type; static _Ptr pointer_to(__make_not_void<element_type>& __e) { return _Ptr::pointer_to(__e); } static_assert(!is_same<element_type, __undefined>::value, "pointer type defines element_type or is like SomePointer<T, Args>"); }; template<typename _Tp> struct pointer_traits<_Tp*> { typedef _Tp* pointer; typedef _Tp element_type; typedef ptrdiff_t difference_type; template<typename _Up> using rebind = _Up*; static pointer pointer_to(__make_not_void<element_type>& __r) noexcept { return std::addressof(__r); } }; template<typename _Ptr, typename _Tp> using __ptr_rebind = typename pointer_traits<_Ptr>::template rebind<_Tp>; template<typename _Tp> constexpr _Tp* __to_address(_Tp* __ptr) noexcept { static_assert(!std::is_function<_Tp>::value, "not a function pointer"); return __ptr; } template<typename _Ptr> constexpr typename std::pointer_traits<_Ptr>::element_type* __to_address(const _Ptr& __ptr) { return std::__to_address(__ptr.operator->()); } # 199 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ptr_traits.h" 3 } # 67 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 100 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 template<typename _Iterator> class reverse_iterator : public iterator<typename iterator_traits<_Iterator>::iterator_category, typename iterator_traits<_Iterator>::value_type, typename iterator_traits<_Iterator>::difference_type, typename iterator_traits<_Iterator>::pointer, typename iterator_traits<_Iterator>::reference> { protected: _Iterator current; typedef iterator_traits<_Iterator> __traits_type; public: typedef _Iterator iterator_type; typedef typename __traits_type::difference_type difference_type; typedef typename __traits_type::pointer pointer; typedef typename __traits_type::reference reference; # 127 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 reverse_iterator() : current() { } explicit reverse_iterator(iterator_type __x) : current(__x) { } reverse_iterator(const reverse_iterator& __x) : current(__x.current) { } template<typename _Iter> reverse_iterator(const reverse_iterator<_Iter>& __x) : current(__x.base()) { } iterator_type base() const { return current; } # 168 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 reference operator*() const { _Iterator __tmp = current; return *--__tmp; } # 182 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 pointer operator->() const { return std::__addressof(operator*()); } reverse_iterator& operator++() { --current; return *this; } reverse_iterator operator++(int) { reverse_iterator __tmp = *this; --current; return __tmp; } reverse_iterator& operator--() { ++current; return *this; } reverse_iterator operator--(int) { reverse_iterator __tmp = *this; ++current; return __tmp; } reverse_iterator operator+(difference_type __n) const { return reverse_iterator(current - __n); } reverse_iterator& operator+=(difference_type __n) { current -= __n; return *this; } reverse_iterator operator-(difference_type __n) const { return reverse_iterator(current + __n); } reverse_iterator& operator-=(difference_type __n) { current += __n; return *this; } reference operator[](difference_type __n) const { return *(*this + __n); } }; # 300 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 template<typename _Iterator> inline bool operator==(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __x.base() == __y.base(); } template<typename _Iterator> inline bool operator<(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() < __x.base(); } template<typename _Iterator> inline bool operator!=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__x == __y); } template<typename _Iterator> inline bool operator>(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y < __x; } template<typename _Iterator> inline bool operator<=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__y < __x); } template<typename _Iterator> inline bool operator>=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__x < __y); } template<typename _IteratorL, typename _IteratorR> inline bool operator==(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __x.base() == __y.base(); } template<typename _IteratorL, typename _IteratorR> inline bool operator<(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y.base() < __x.base(); } template<typename _IteratorL, typename _IteratorR> inline bool operator!=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__x == __y); } template<typename _IteratorL, typename _IteratorR> inline bool operator>(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y < __x; } template<typename _IteratorL, typename _IteratorR> inline bool operator<=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__y < __x); } template<typename _IteratorL, typename _IteratorR> inline bool operator>=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__x < __y); } # 390 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 template<typename _IteratorL, typename _IteratorR> inline auto operator-(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) -> decltype(__y.base() - __x.base()) { return __y.base() - __x.base(); } template<typename _Iterator> inline reverse_iterator<_Iterator> operator+(typename reverse_iterator<_Iterator>::difference_type __n, const reverse_iterator<_Iterator>& __x) { return reverse_iterator<_Iterator>(__x.base() - __n); } template<typename _Iterator> inline reverse_iterator<_Iterator> __make_reverse_iterator(_Iterator __i) { return reverse_iterator<_Iterator>(__i); } template<typename _Iterator> inline reverse_iterator<_Iterator> make_reverse_iterator(_Iterator __i) { return reverse_iterator<_Iterator>(__i); } template<typename _Iterator> auto __niter_base(reverse_iterator<_Iterator> __it) -> decltype(__make_reverse_iterator(__niter_base(__it.base()))) { return __make_reverse_iterator(__niter_base(__it.base())); } template<typename _Iterator> struct __is_move_iterator<reverse_iterator<_Iterator> > : __is_move_iterator<_Iterator> { }; template<typename _Iterator> auto __miter_base(reverse_iterator<_Iterator> __it) -> decltype(__make_reverse_iterator(__miter_base(__it.base()))) { return __make_reverse_iterator(__miter_base(__it.base())); } # 454 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 template<typename _Container> class back_insert_iterator : public iterator<output_iterator_tag, void, void, void, void> { protected: _Container* container; public: typedef _Container container_type; explicit back_insert_iterator(_Container& __x) : container(std::__addressof(__x)) { } # 489 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 back_insert_iterator& operator=(const typename _Container::value_type& __value) { container->push_back(__value); return *this; } back_insert_iterator& operator=(typename _Container::value_type&& __value) { container->push_back(std::move(__value)); return *this; } back_insert_iterator& operator*() { return *this; } back_insert_iterator& operator++() { return *this; } back_insert_iterator operator++(int) { return *this; } }; # 531 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 template<typename _Container> inline back_insert_iterator<_Container> back_inserter(_Container& __x) { return back_insert_iterator<_Container>(__x); } # 546 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 template<typename _Container> class front_insert_iterator : public iterator<output_iterator_tag, void, void, void, void> { protected: _Container* container; public: typedef _Container container_type; explicit front_insert_iterator(_Container& __x) : container(std::__addressof(__x)) { } # 580 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 front_insert_iterator& operator=(const typename _Container::value_type& __value) { container->push_front(__value); return *this; } front_insert_iterator& operator=(typename _Container::value_type&& __value) { container->push_front(std::move(__value)); return *this; } front_insert_iterator& operator*() { return *this; } front_insert_iterator& operator++() { return *this; } front_insert_iterator operator++(int) { return *this; } }; # 622 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 template<typename _Container> inline front_insert_iterator<_Container> front_inserter(_Container& __x) { return front_insert_iterator<_Container>(__x); } # 641 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 template<typename _Container> class insert_iterator : public iterator<output_iterator_tag, void, void, void, void> { protected: _Container* container; typename _Container::iterator iter; public: typedef _Container container_type; insert_iterator(_Container& __x, typename _Container::iterator __i) : container(std::__addressof(__x)), iter(__i) {} # 692 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 insert_iterator& operator=(const typename _Container::value_type& __value) { iter = container->insert(iter, __value); ++iter; return *this; } insert_iterator& operator=(typename _Container::value_type&& __value) { iter = container->insert(iter, std::move(__value)); ++iter; return *this; } insert_iterator& operator*() { return *this; } insert_iterator& operator++() { return *this; } insert_iterator& operator++(int) { return *this; } }; # 737 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 template<typename _Container, typename _Iterator> inline insert_iterator<_Container> inserter(_Container& __x, _Iterator __i) { return insert_iterator<_Container>(__x, typename _Container::iterator(__i)); } } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 761 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 using std::iterator_traits; using std::iterator; template<typename _Iterator, typename _Container> class __normal_iterator { protected: _Iterator _M_current; typedef iterator_traits<_Iterator> __traits_type; public: typedef _Iterator iterator_type; typedef typename __traits_type::iterator_category iterator_category; typedef typename __traits_type::value_type value_type; typedef typename __traits_type::difference_type difference_type; typedef typename __traits_type::reference reference; typedef typename __traits_type::pointer pointer; constexpr __normal_iterator() noexcept : _M_current(_Iterator()) { } explicit __normal_iterator(const _Iterator& __i) noexcept : _M_current(__i) { } template<typename _Iter> __normal_iterator(const __normal_iterator<_Iter, typename __enable_if< (std::__are_same<_Iter, typename _Container::pointer>::__value), _Container>::__type>& __i) noexcept : _M_current(__i.base()) { } reference operator*() const noexcept { return *_M_current; } pointer operator->() const noexcept { return _M_current; } __normal_iterator& operator++() noexcept { ++_M_current; return *this; } __normal_iterator operator++(int) noexcept { return __normal_iterator(_M_current++); } __normal_iterator& operator--() noexcept { --_M_current; return *this; } __normal_iterator operator--(int) noexcept { return __normal_iterator(_M_current--); } reference operator[](difference_type __n) const noexcept { return _M_current[__n]; } __normal_iterator& operator+=(difference_type __n) noexcept { _M_current += __n; return *this; } __normal_iterator operator+(difference_type __n) const noexcept { return __normal_iterator(_M_current + __n); } __normal_iterator& operator-=(difference_type __n) noexcept { _M_current -= __n; return *this; } __normal_iterator operator-(difference_type __n) const noexcept { return __normal_iterator(_M_current - __n); } const _Iterator& base() const noexcept { return _M_current; } }; # 861 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept { return __lhs.base() == __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator==(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) noexcept { return __lhs.base() == __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept { return __lhs.base() != __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) noexcept { return __lhs.base() != __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept { return __lhs.base() < __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator<(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) noexcept { return __lhs.base() < __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept { return __lhs.base() > __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator>(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) noexcept { return __lhs.base() > __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept { return __lhs.base() <= __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) noexcept { return __lhs.base() <= __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept { return __lhs.base() >= __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) noexcept { return __lhs.base() >= __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Container> inline auto operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept -> decltype(__lhs.base() - __rhs.base()) { return __lhs.base() - __rhs.base(); } template<typename _Iterator, typename _Container> inline typename __normal_iterator<_Iterator, _Container>::difference_type operator-(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) noexcept { return __lhs.base() - __rhs.base(); } template<typename _Iterator, typename _Container> inline __normal_iterator<_Iterator, _Container> operator+(typename __normal_iterator<_Iterator, _Container>::difference_type __n, const __normal_iterator<_Iterator, _Container>& __i) noexcept { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Iterator, typename _Container> _Iterator __niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it) { return __it.base(); } # 1006 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 template<typename _Iterator> class move_iterator { protected: _Iterator _M_current; typedef iterator_traits<_Iterator> __traits_type; typedef typename __traits_type::reference __base_ref; public: typedef _Iterator iterator_type; typedef typename __traits_type::iterator_category iterator_category; typedef typename __traits_type::value_type value_type; typedef typename __traits_type::difference_type difference_type; typedef _Iterator pointer; typedef typename conditional<is_reference<__base_ref>::value, typename remove_reference<__base_ref>::type&&, __base_ref>::type reference; move_iterator() : _M_current() { } explicit move_iterator(iterator_type __i) : _M_current(__i) { } template<typename _Iter> move_iterator(const move_iterator<_Iter>& __i) : _M_current(__i.base()) { } iterator_type base() const { return _M_current; } reference operator*() const { return static_cast<reference>(*_M_current); } pointer operator->() const { return _M_current; } move_iterator& operator++() { ++_M_current; return *this; } move_iterator operator++(int) { move_iterator __tmp = *this; ++_M_current; return __tmp; } move_iterator& operator--() { --_M_current; return *this; } move_iterator operator--(int) { move_iterator __tmp = *this; --_M_current; return __tmp; } move_iterator operator+(difference_type __n) const { return move_iterator(_M_current + __n); } move_iterator& operator+=(difference_type __n) { _M_current += __n; return *this; } move_iterator operator-(difference_type __n) const { return move_iterator(_M_current - __n); } move_iterator& operator-=(difference_type __n) { _M_current -= __n; return *this; } reference operator[](difference_type __n) const { return std::move(_M_current[__n]); } }; template<typename _IteratorL, typename _IteratorR> inline bool operator==(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return __x.base() == __y.base(); } template<typename _Iterator> inline bool operator==(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return __x.base() == __y.base(); } template<typename _IteratorL, typename _IteratorR> inline bool operator!=(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return !(__x == __y); } template<typename _Iterator> inline bool operator!=(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return !(__x == __y); } template<typename _IteratorL, typename _IteratorR> inline bool operator<(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return __x.base() < __y.base(); } template<typename _Iterator> inline bool operator<(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return __x.base() < __y.base(); } template<typename _IteratorL, typename _IteratorR> inline bool operator<=(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return !(__y < __x); } template<typename _Iterator> inline bool operator<=(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return !(__y < __x); } template<typename _IteratorL, typename _IteratorR> inline bool operator>(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return __y < __x; } template<typename _Iterator> inline bool operator>(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return __y < __x; } template<typename _IteratorL, typename _IteratorR> inline bool operator>=(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return !(__x < __y); } template<typename _Iterator> inline bool operator>=(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return !(__x < __y); } template<typename _IteratorL, typename _IteratorR> inline auto operator-(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) -> decltype(__x.base() - __y.base()) { return __x.base() - __y.base(); } template<typename _Iterator> inline move_iterator<_Iterator> operator+(typename move_iterator<_Iterator>::difference_type __n, const move_iterator<_Iterator>& __x) { return __x + __n; } template<typename _Iterator> inline move_iterator<_Iterator> make_move_iterator(_Iterator __i) { return move_iterator<_Iterator>(__i); } template<typename _Iterator, typename _ReturnType = typename conditional<__move_if_noexcept_cond <typename iterator_traits<_Iterator>::value_type>::value, _Iterator, move_iterator<_Iterator>>::type> inline _ReturnType __make_move_if_noexcept_iterator(_Iterator __i) { return _ReturnType(__i); } template<typename _Tp, typename _ReturnType = typename conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp*, move_iterator<_Tp*>>::type> inline _ReturnType __make_move_if_noexcept_iterator(_Tp* __i) { return _ReturnType(__i); } template<typename _Iterator> auto __niter_base(move_iterator<_Iterator> __it) -> decltype(make_move_iterator(__niter_base(__it.base()))) { return make_move_iterator(__niter_base(__it.base())); } template<typename _Iterator> struct __is_move_iterator<move_iterator<_Iterator> > { enum { __value = 1 }; typedef __true_type __type; }; template<typename _Iterator> auto __miter_base(move_iterator<_Iterator> __it) -> decltype(__miter_base(__it.base())) { return __miter_base(__it.base()); } # 1272 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_iterator.h" 3 } # 68 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/debug/debug.h" 1 3 # 48 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/debug/debug.h" 3 namespace std { namespace __debug { } } namespace __gnu_debug { using namespace std::__debug; } # 70 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/predefined_ops.h" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/predefined_ops.h" 3 namespace __gnu_cxx { namespace __ops { struct _Iter_less_iter { template<typename _Iterator1, typename _Iterator2> constexpr bool operator()(_Iterator1 __it1, _Iterator2 __it2) const { return *__it1 < *__it2; } }; constexpr inline _Iter_less_iter __iter_less_iter() { return _Iter_less_iter(); } struct _Iter_less_val { constexpr _Iter_less_val() = default; explicit _Iter_less_val(_Iter_less_iter) { } template<typename _Iterator, typename _Value> bool operator()(_Iterator __it, _Value& __val) const { return *__it < __val; } }; inline _Iter_less_val __iter_less_val() { return _Iter_less_val(); } inline _Iter_less_val __iter_comp_val(_Iter_less_iter) { return _Iter_less_val(); } struct _Val_less_iter { constexpr _Val_less_iter() = default; explicit _Val_less_iter(_Iter_less_iter) { } template<typename _Value, typename _Iterator> bool operator()(_Value& __val, _Iterator __it) const { return __val < *__it; } }; inline _Val_less_iter __val_less_iter() { return _Val_less_iter(); } inline _Val_less_iter __val_comp_iter(_Iter_less_iter) { return _Val_less_iter(); } struct _Iter_equal_to_iter { template<typename _Iterator1, typename _Iterator2> bool operator()(_Iterator1 __it1, _Iterator2 __it2) const { return *__it1 == *__it2; } }; inline _Iter_equal_to_iter __iter_equal_to_iter() { return _Iter_equal_to_iter(); } struct _Iter_equal_to_val { template<typename _Iterator, typename _Value> bool operator()(_Iterator __it, _Value& __val) const { return *__it == __val; } }; inline _Iter_equal_to_val __iter_equal_to_val() { return _Iter_equal_to_val(); } inline _Iter_equal_to_val __iter_comp_val(_Iter_equal_to_iter) { return _Iter_equal_to_val(); } template<typename _Compare> struct _Iter_comp_iter { _Compare _M_comp; explicit constexpr _Iter_comp_iter(_Compare __comp) : _M_comp(std::move(__comp)) { } template<typename _Iterator1, typename _Iterator2> constexpr bool operator()(_Iterator1 __it1, _Iterator2 __it2) { return bool(_M_comp(*__it1, *__it2)); } }; template<typename _Compare> constexpr inline _Iter_comp_iter<_Compare> __iter_comp_iter(_Compare __comp) { return _Iter_comp_iter<_Compare>(std::move(__comp)); } template<typename _Compare> struct _Iter_comp_val { _Compare _M_comp; explicit _Iter_comp_val(_Compare __comp) : _M_comp(std::move(__comp)) { } explicit _Iter_comp_val(const _Iter_comp_iter<_Compare>& __comp) : _M_comp(__comp._M_comp) { } explicit _Iter_comp_val(_Iter_comp_iter<_Compare>&& __comp) : _M_comp(std::move(__comp._M_comp)) { } template<typename _Iterator, typename _Value> bool operator()(_Iterator __it, _Value& __val) { return bool(_M_comp(*__it, __val)); } }; template<typename _Compare> inline _Iter_comp_val<_Compare> __iter_comp_val(_Compare __comp) { return _Iter_comp_val<_Compare>(std::move(__comp)); } template<typename _Compare> inline _Iter_comp_val<_Compare> __iter_comp_val(_Iter_comp_iter<_Compare> __comp) { return _Iter_comp_val<_Compare>(std::move(__comp)); } template<typename _Compare> struct _Val_comp_iter { _Compare _M_comp; explicit _Val_comp_iter(_Compare __comp) : _M_comp(std::move(__comp)) { } explicit _Val_comp_iter(const _Iter_comp_iter<_Compare>& __comp) : _M_comp(__comp._M_comp) { } explicit _Val_comp_iter(_Iter_comp_iter<_Compare>&& __comp) : _M_comp(std::move(__comp._M_comp)) { } template<typename _Value, typename _Iterator> bool operator()(_Value& __val, _Iterator __it) { return bool(_M_comp(__val, *__it)); } }; template<typename _Compare> inline _Val_comp_iter<_Compare> __val_comp_iter(_Compare __comp) { return _Val_comp_iter<_Compare>(std::move(__comp)); } template<typename _Compare> inline _Val_comp_iter<_Compare> __val_comp_iter(_Iter_comp_iter<_Compare> __comp) { return _Val_comp_iter<_Compare>(std::move(__comp)); } template<typename _Value> struct _Iter_equals_val { _Value& _M_value; explicit _Iter_equals_val(_Value& __value) : _M_value(__value) { } template<typename _Iterator> bool operator()(_Iterator __it) { return *__it == _M_value; } }; template<typename _Value> inline _Iter_equals_val<_Value> __iter_equals_val(_Value& __val) { return _Iter_equals_val<_Value>(__val); } template<typename _Iterator1> struct _Iter_equals_iter { _Iterator1 _M_it1; explicit _Iter_equals_iter(_Iterator1 __it1) : _M_it1(__it1) { } template<typename _Iterator2> bool operator()(_Iterator2 __it2) { return *__it2 == *_M_it1; } }; template<typename _Iterator> inline _Iter_equals_iter<_Iterator> __iter_comp_iter(_Iter_equal_to_iter, _Iterator __it) { return _Iter_equals_iter<_Iterator>(__it); } template<typename _Predicate> struct _Iter_pred { _Predicate _M_pred; explicit _Iter_pred(_Predicate __pred) : _M_pred(std::move(__pred)) { } template<typename _Iterator> bool operator()(_Iterator __it) { return bool(_M_pred(*__it)); } }; template<typename _Predicate> inline _Iter_pred<_Predicate> __pred_iter(_Predicate __pred) { return _Iter_pred<_Predicate>(std::move(__pred)); } template<typename _Compare, typename _Value> struct _Iter_comp_to_val { _Compare _M_comp; _Value& _M_value; _Iter_comp_to_val(_Compare __comp, _Value& __value) : _M_comp(std::move(__comp)), _M_value(__value) { } template<typename _Iterator> bool operator()(_Iterator __it) { return bool(_M_comp(*__it, _M_value)); } }; template<typename _Compare, typename _Value> _Iter_comp_to_val<_Compare, _Value> __iter_comp_val(_Compare __comp, _Value &__val) { return _Iter_comp_to_val<_Compare, _Value>(std::move(__comp), __val); } template<typename _Compare, typename _Iterator1> struct _Iter_comp_to_iter { _Compare _M_comp; _Iterator1 _M_it1; _Iter_comp_to_iter(_Compare __comp, _Iterator1 __it1) : _M_comp(std::move(__comp)), _M_it1(__it1) { } template<typename _Iterator2> bool operator()(_Iterator2 __it2) { return bool(_M_comp(*__it2, *_M_it1)); } }; template<typename _Compare, typename _Iterator> inline _Iter_comp_to_iter<_Compare, _Iterator> __iter_comp_iter(_Iter_comp_iter<_Compare> __comp, _Iterator __it) { return _Iter_comp_to_iter<_Compare, _Iterator>( std::move(__comp._M_comp), __it); } template<typename _Predicate> struct _Iter_negate { _Predicate _M_pred; explicit _Iter_negate(_Predicate __pred) : _M_pred(std::move(__pred)) { } template<typename _Iterator> bool operator()(_Iterator __it) { return !bool(_M_pred(*__it)); } }; template<typename _Predicate> inline _Iter_negate<_Predicate> __negate(_Iter_pred<_Predicate> __pred) { return _Iter_negate<_Predicate>(std::move(__pred._M_pred)); } } } # 72 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 118 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _ForwardIterator1, typename _ForwardIterator2> inline void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { # 148 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 swap(*__a, *__b); } # 164 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _ForwardIterator1, typename _ForwardIterator2> _ForwardIterator2 swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) { ; for (; __first1 != __last1; ++__first1, (void)++__first2) std::iter_swap(__first1, __first2); return __first2; } # 192 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _Tp> constexpr inline const _Tp& min(const _Tp& __a, const _Tp& __b) { if (__b < __a) return __b; return __a; } # 216 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _Tp> constexpr inline const _Tp& max(const _Tp& __a, const _Tp& __b) { if (__a < __b) return __b; return __a; } # 240 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _Tp, typename _Compare> constexpr inline const _Tp& min(const _Tp& __a, const _Tp& __b, _Compare __comp) { if (__comp(__b, __a)) return __b; return __a; } # 262 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _Tp, typename _Compare> constexpr inline const _Tp& max(const _Tp& __a, const _Tp& __b, _Compare __comp) { if (__comp(__a, __b)) return __b; return __a; } template<typename _Iterator> inline _Iterator __niter_base(_Iterator __it) { return __it; } template<bool, bool, typename> struct __copy_move { template<typename _II, typename _OI> static _OI __copy_m(_II __first, _II __last, _OI __result) { for (; __first != __last; ++__result, (void)++__first) *__result = *__first; return __result; } }; template<typename _Category> struct __copy_move<true, false, _Category> { template<typename _II, typename _OI> static _OI __copy_m(_II __first, _II __last, _OI __result) { for (; __first != __last; ++__result, (void)++__first) *__result = std::move(*__first); return __result; } }; template<> struct __copy_move<false, false, random_access_iterator_tag> { template<typename _II, typename _OI> static _OI __copy_m(_II __first, _II __last, _OI __result) { typedef typename iterator_traits<_II>::difference_type _Distance; for(_Distance __n = __last - __first; __n > 0; --__n) { *__result = *__first; ++__first; ++__result; } return __result; } }; template<> struct __copy_move<true, false, random_access_iterator_tag> { template<typename _II, typename _OI> static _OI __copy_m(_II __first, _II __last, _OI __result) { typedef typename iterator_traits<_II>::difference_type _Distance; for(_Distance __n = __last - __first; __n > 0; --__n) { *__result = std::move(*__first); ++__first; ++__result; } return __result; } }; template<bool _IsMove> struct __copy_move<_IsMove, true, random_access_iterator_tag> { template<typename _Tp> static _Tp* __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) { using __assignable = conditional<_IsMove, is_move_assignable<_Tp>, is_copy_assignable<_Tp>>; static_assert( __assignable::type::value, "type is not assignable" ); const ptrdiff_t _Num = __last - __first; if (_Num) __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); return __result + _Num; } }; template<bool _IsMove, typename _II, typename _OI> inline _OI __copy_move_a(_II __first, _II __last, _OI __result) { typedef typename iterator_traits<_II>::value_type _ValueTypeI; typedef typename iterator_traits<_OI>::value_type _ValueTypeO; typedef typename iterator_traits<_II>::iterator_category _Category; const bool __simple = (__is_trivial(_ValueTypeI) && __is_pointer<_II>::__value && __is_pointer<_OI>::__value && __are_same<_ValueTypeI, _ValueTypeO>::__value); return std::__copy_move<_IsMove, __simple, _Category>::__copy_m(__first, __last, __result); } template<typename _CharT> struct char_traits; template<typename _CharT, typename _Traits> class istreambuf_iterator; template<typename _CharT, typename _Traits> class ostreambuf_iterator; template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type __copy_move_a2(_CharT*, _CharT*, ostreambuf_iterator<_CharT, char_traits<_CharT> >); template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type __copy_move_a2(const _CharT*, const _CharT*, ostreambuf_iterator<_CharT, char_traits<_CharT> >); template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, _CharT*>::__type __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); template<bool _IsMove, typename _II, typename _OI> inline _OI __copy_move_a2(_II __first, _II __last, _OI __result) { return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first), std::__niter_base(__last), std::__niter_base(__result))); } # 444 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _II, typename _OI> inline _OI copy(_II __first, _II __last, _OI __result) { ; return (std::__copy_move_a2<__is_move_iterator<_II>::__value> (std::__miter_base(__first), std::__miter_base(__last), __result)); } # 477 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _II, typename _OI> inline _OI move(_II __first, _II __last, _OI __result) { ; return std::__copy_move_a2<true>(std::__miter_base(__first), std::__miter_base(__last), __result); } template<bool, bool, typename> struct __copy_move_backward { template<typename _BI1, typename _BI2> static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { while (__first != __last) *--__result = *--__last; return __result; } }; template<typename _Category> struct __copy_move_backward<true, false, _Category> { template<typename _BI1, typename _BI2> static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { while (__first != __last) *--__result = std::move(*--__last); return __result; } }; template<> struct __copy_move_backward<false, false, random_access_iterator_tag> { template<typename _BI1, typename _BI2> static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { typename iterator_traits<_BI1>::difference_type __n; for (__n = __last - __first; __n > 0; --__n) *--__result = *--__last; return __result; } }; template<> struct __copy_move_backward<true, false, random_access_iterator_tag> { template<typename _BI1, typename _BI2> static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { typename iterator_traits<_BI1>::difference_type __n; for (__n = __last - __first; __n > 0; --__n) *--__result = std::move(*--__last); return __result; } }; template<bool _IsMove> struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> { template<typename _Tp> static _Tp* __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) { using __assignable = conditional<_IsMove, is_move_assignable<_Tp>, is_copy_assignable<_Tp>>; static_assert( __assignable::type::value, "type is not assignable" ); const ptrdiff_t _Num = __last - __first; if (_Num) __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); return __result - _Num; } }; template<bool _IsMove, typename _BI1, typename _BI2> inline _BI2 __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result) { typedef typename iterator_traits<_BI1>::value_type _ValueType1; typedef typename iterator_traits<_BI2>::value_type _ValueType2; typedef typename iterator_traits<_BI1>::iterator_category _Category; const bool __simple = (__is_trivial(_ValueType1) && __is_pointer<_BI1>::__value && __is_pointer<_BI2>::__value && __are_same<_ValueType1, _ValueType2>::__value); return std::__copy_move_backward<_IsMove, __simple, _Category>::__copy_move_b(__first, __last, __result); } template<bool _IsMove, typename _BI1, typename _BI2> inline _BI2 __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) { return _BI2(std::__copy_move_backward_a<_IsMove> (std::__niter_base(__first), std::__niter_base(__last), std::__niter_base(__result))); } # 620 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _BI1, typename _BI2> inline _BI2 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) { ; return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value> (std::__miter_base(__first), std::__miter_base(__last), __result)); } # 656 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _BI1, typename _BI2> inline _BI2 move_backward(_BI1 __first, _BI1 __last, _BI2 __result) { ; return std::__copy_move_backward_a2<true>(std::__miter_base(__first), std::__miter_base(__last), __result); } template<typename _ForwardIterator, typename _Tp> inline typename __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, void>::__type __fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { for (; __first != __last; ++__first) *__first = __value; } template<typename _ForwardIterator, typename _Tp> inline typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type __fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { const _Tp __tmp = __value; for (; __first != __last; ++__first) *__first = __tmp; } template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c) { const _Tp __tmp = __c; if (const size_t __len = __last - __first) __builtin_memset(__first, static_cast<unsigned char>(__tmp), __len); } # 722 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _ForwardIterator, typename _Tp> inline void fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { ; std::__fill_a(std::__niter_base(__first), std::__niter_base(__last), __value); } template<typename _OutputIterator, typename _Size, typename _Tp> inline typename __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) { for (__decltype(__n + 0) __niter = __n; __niter > 0; --__niter, (void) ++__first) *__first = __value; return __first; } template<typename _OutputIterator, typename _Size, typename _Tp> inline typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) { const _Tp __tmp = __value; for (__decltype(__n + 0) __niter = __n; __niter > 0; --__niter, (void) ++__first) *__first = __tmp; return __first; } template<typename _Size, typename _Tp> inline typename __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c) { std::__fill_a(__first, __first + __n, __c); return __first + __n; } # 782 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _OI, typename _Size, typename _Tp> inline _OI fill_n(_OI __first, _Size __n, const _Tp& __value) { return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value)); } template<bool _BoolType> struct __equal { template<typename _II1, typename _II2> static bool equal(_II1 __first1, _II1 __last1, _II2 __first2) { for (; __first1 != __last1; ++__first1, (void) ++__first2) if (!(*__first1 == *__first2)) return false; return true; } }; template<> struct __equal<true> { template<typename _Tp> static bool equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) { if (const size_t __len = (__last1 - __first1)) return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) * __len); return true; } }; template<typename _II1, typename _II2> inline bool __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) { typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; const bool __simple = ((__is_integer<_ValueType1>::__value || __is_pointer<_ValueType1>::__value) && __is_pointer<_II1>::__value && __is_pointer<_II2>::__value && __are_same<_ValueType1, _ValueType2>::__value); return std::__equal<__simple>::equal(__first1, __last1, __first2); } template<typename, typename> struct __lc_rai { template<typename _II1, typename _II2> static _II1 __newlast1(_II1, _II1 __last1, _II2, _II2) { return __last1; } template<typename _II> static bool __cnd2(_II __first, _II __last) { return __first != __last; } }; template<> struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag> { template<typename _RAI1, typename _RAI2> static _RAI1 __newlast1(_RAI1 __first1, _RAI1 __last1, _RAI2 __first2, _RAI2 __last2) { const typename iterator_traits<_RAI1>::difference_type __diff1 = __last1 - __first1; const typename iterator_traits<_RAI2>::difference_type __diff2 = __last2 - __first2; return __diff2 < __diff1 ? __first1 + __diff2 : __last1; } template<typename _RAI> static bool __cnd2(_RAI, _RAI) { return true; } }; template<typename _II1, typename _II2, typename _Compare> bool __lexicographical_compare_impl(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _Compare __comp) { typedef typename iterator_traits<_II1>::iterator_category _Category1; typedef typename iterator_traits<_II2>::iterator_category _Category2; typedef std::__lc_rai<_Category1, _Category2> __rai_type; __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); ++__first1, (void)++__first2) { if (__comp(__first1, __first2)) return true; if (__comp(__first2, __first1)) return false; } return __first1 == __last1 && __first2 != __last2; } template<bool _BoolType> struct __lexicographical_compare { template<typename _II1, typename _II2> static bool __lc(_II1, _II1, _II2, _II2); }; template<bool _BoolType> template<typename _II1, typename _II2> bool __lexicographical_compare<_BoolType>:: __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { return std::__lexicographical_compare_impl(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_less_iter()); } template<> struct __lexicographical_compare<true> { template<typename _Tp, typename _Up> static bool __lc(const _Tp* __first1, const _Tp* __last1, const _Up* __first2, const _Up* __last2) { const size_t __len1 = __last1 - __first1; const size_t __len2 = __last2 - __first2; if (const size_t __len = std::min(__len1, __len2)) if (int __result = __builtin_memcmp(__first1, __first2, __len)) return __result < 0; return __len1 < __len2; } }; template<typename _II1, typename _II2> inline bool __lexicographical_compare_aux(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; const bool __simple = (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed && __is_pointer<_II1>::__value && __is_pointer<_II2>::__value); return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, __first2, __last2); } template<typename _ForwardIterator, typename _Tp, typename _Compare> _ForwardIterator __lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; _DistanceType __len = std::distance(__first, __last); while (__len > 0) { _DistanceType __half = __len >> 1; _ForwardIterator __middle = __first; std::advance(__middle, __half); if (__comp(__middle, __val)) { __first = __middle; ++__first; __len = __len - __half - 1; } else __len = __half; } return __first; } # 982 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _ForwardIterator, typename _Tp> inline _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { ; return std::__lower_bound(__first, __last, __val, __gnu_cxx::__ops::__iter_less_val()); } inline constexpr int __lg(int __n) { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } inline constexpr unsigned __lg(unsigned __n) { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } inline constexpr long __lg(long __n) { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } inline constexpr unsigned long __lg(unsigned long __n) { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } inline constexpr long long __lg(long long __n) { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } inline constexpr unsigned long long __lg(unsigned long long __n) { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } # 1037 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _II1, typename _II2> inline bool equal(_II1 __first1, _II1 __last1, _II2 __first2) { ; return std::__equal_aux(std::__niter_base(__first1), std::__niter_base(__last1), std::__niter_base(__first2)); } # 1069 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> inline bool equal(_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _BinaryPredicate __binary_pred) { ; for (; __first1 != __last1; ++__first1, (void)++__first2) if (!bool(__binary_pred(*__first1, *__first2))) return false; return true; } template<typename _II1, typename _II2> inline bool __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { using _RATag = random_access_iterator_tag; using _Cat1 = typename iterator_traits<_II1>::iterator_category; using _Cat2 = typename iterator_traits<_II2>::iterator_category; using _RAIters = __and_<is_same<_Cat1, _RATag>, is_same<_Cat2, _RATag>>; if (_RAIters()) { auto __d1 = std::distance(__first1, __last1); auto __d2 = std::distance(__first2, __last2); if (__d1 != __d2) return false; return std::equal(__first1, __last1, __first2); } for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void)++__first2) if (!(*__first1 == *__first2)) return false; return __first1 == __last1 && __first2 == __last2; } template<typename _II1, typename _II2, typename _BinaryPredicate> inline bool __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _BinaryPredicate __binary_pred) { using _RATag = random_access_iterator_tag; using _Cat1 = typename iterator_traits<_II1>::iterator_category; using _Cat2 = typename iterator_traits<_II2>::iterator_category; using _RAIters = __and_<is_same<_Cat1, _RATag>, is_same<_Cat2, _RATag>>; if (_RAIters()) { auto __d1 = std::distance(__first1, __last1); auto __d2 = std::distance(__first2, __last2); if (__d1 != __d2) return false; return std::equal(__first1, __last1, __first2, __binary_pred); } for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void)++__first2) if (!bool(__binary_pred(*__first1, *__first2))) return false; return __first1 == __last1 && __first2 == __last2; } # 1156 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _II1, typename _II2> inline bool equal(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { ; ; return std::__equal4(__first1, __last1, __first2, __last2); } # 1188 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> inline bool equal(_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _IIter2 __last2, _BinaryPredicate __binary_pred) { ; ; return std::__equal4(__first1, __last1, __first2, __last2, __binary_pred); } # 1219 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _II1, typename _II2> inline bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { # 1233 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 ; ; return std::__lexicographical_compare_aux(std::__niter_base(__first1), std::__niter_base(__last1), std::__niter_base(__first2), std::__niter_base(__last2)); } # 1255 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _II1, typename _II2, typename _Compare> inline bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _Compare __comp) { ; ; return std::__lexicographical_compare_impl (__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate> pair<_InputIterator1, _InputIterator2> __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __binary_pred) { while (__first1 != __last1 && __binary_pred(__first1, __first2)) { ++__first1; ++__first2; } return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } # 1298 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _InputIterator1, typename _InputIterator2> inline pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) { ; return std::__mismatch(__first1, __last1, __first2, __gnu_cxx::__ops::__iter_equal_to_iter()); } # 1331 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate> inline pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __binary_pred) { ; return std::__mismatch(__first1, __last1, __first2, __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); } template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate> pair<_InputIterator1, _InputIterator2> __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _BinaryPredicate __binary_pred) { while (__first1 != __last1 && __first2 != __last2 && __binary_pred(__first1, __first2)) { ++__first1; ++__first2; } return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } # 1378 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _InputIterator1, typename _InputIterator2> inline pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) { ; ; return std::__mismatch(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_equal_to_iter()); } # 1413 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algobase.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate> inline pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _BinaryPredicate __binary_pred) { ; ; return std::__mismatch(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); } } # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/char_traits.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/postypes.h" 1 3 # 39 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/postypes.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwchar" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwchar" 3 # 1 "/usr/include/wchar.h" 1 3 4 # 27 "/usr/include/wchar.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 # 28 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 1 3 4 # 120 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/long-double.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 2 3 4 # 214 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 typedef float _Float32; # 251 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 typedef double _Float64; # 268 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 typedef double _Float32x; # 285 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 typedef long double _Float64x; # 121 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 2 3 4 # 31 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 1 3 4 # 36 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stdarg.h" 1 3 4 # 30 "/usr/local/bin/../lib/clang/3.9.1/include/stdarg.h" 3 4 typedef __builtin_va_list va_list; # 50 "/usr/local/bin/../lib/clang/3.9.1/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 39 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/wint_t.h" 1 3 4 # 20 "/usr/include/x86_64-linux-gnu/bits/types/wint_t.h" 3 4 typedef unsigned int wint_t; # 42 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 1 3 4 # 13 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 3 4 typedef struct { int __count; union { unsigned int __wch; char __wchb[4]; } __value; } __mbstate_t; # 5 "/usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h" 2 3 4 typedef __mbstate_t mbstate_t; # 43 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__FILE.h" 1 3 4 struct _IO_FILE; typedef struct _IO_FILE __FILE; # 44 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/FILE.h" 1 3 4 struct _IO_FILE; typedef struct _IO_FILE FILE; # 47 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 1 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h" 3 4 struct __locale_struct { struct __locale_data *__locales[13]; const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; const char *__names[13]; }; typedef struct __locale_struct *__locale_t; # 23 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 2 3 4 typedef __locale_t locale_t; # 50 "/usr/include/wchar.h" 2 3 4 # 79 "/usr/include/wchar.h" 3 4 extern "C" { struct tm; extern wchar_t *wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern wchar_t *wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern wchar_t *wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern wchar_t *wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) throw (); extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) throw (); extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2, locale_t __loc) throw (); extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2, size_t __n, locale_t __loc) throw (); extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) throw (); extern size_t wcsxfrm (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) throw (); extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2, locale_t __loc) throw (); extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, size_t __n, locale_t __loc) throw (); extern wchar_t *wcsdup (const wchar_t *__s) throw () __attribute__ ((__malloc__)); # 164 "/usr/include/wchar.h" 3 4 extern wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) throw () __attribute__ ((__pure__)); # 174 "/usr/include/wchar.h" 3 4 extern wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) throw () __attribute__ ((__pure__)); extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc) throw () __attribute__ ((__pure__)); extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) throw () __attribute__ ((__pure__)); extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) throw () __attribute__ ((__pure__)); # 201 "/usr/include/wchar.h" 3 4 extern wchar_t *wcspbrk (const wchar_t *__wcs, const wchar_t *__accept) throw () __attribute__ ((__pure__)); # 212 "/usr/include/wchar.h" 3 4 extern wchar_t *wcsstr (const wchar_t *__haystack, const wchar_t *__needle) throw () __attribute__ ((__pure__)); extern wchar_t *wcstok (wchar_t *__restrict __s, const wchar_t *__restrict __delim, wchar_t **__restrict __ptr) throw (); extern size_t wcslen (const wchar_t *__s) throw () __attribute__ ((__pure__)); # 233 "/usr/include/wchar.h" 3 4 extern wchar_t *wcswcs (const wchar_t *__haystack, const wchar_t *__needle) throw () __attribute__ ((__pure__)); extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) throw () __attribute__ ((__pure__)); # 253 "/usr/include/wchar.h" 3 4 extern wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, size_t __n) throw () __attribute__ ((__pure__)); extern int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) throw () __attribute__ ((__pure__)); extern wchar_t *wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) throw (); extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) throw (); extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); extern wchar_t *wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) throw (); extern wint_t btowc (int __c) throw (); extern int wctob (wint_t __c) throw (); extern int mbsinit (const mbstate_t *__ps) throw () __attribute__ ((__pure__)); extern size_t mbrtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n, mbstate_t *__restrict __p) throw (); extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, mbstate_t *__restrict __ps) throw (); extern size_t __mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw (); extern size_t mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw (); extern wint_t __btowc_alias (int __c) __asm ("btowc"); extern __inline __attribute__ ((__gnu_inline__)) wint_t btowc (int __c) throw () { return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' ? (wint_t) __c : __btowc_alias (__c)); } extern int __wctob_alias (wint_t __c) __asm ("wctob"); extern __inline __attribute__ ((__gnu_inline__)) int wctob (wint_t __wc) throw () { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' ? (int) __wc : __wctob_alias (__wc)); } extern __inline __attribute__ ((__gnu_inline__)) size_t mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw () { return (__ps != __null ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } extern size_t mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw (); extern size_t wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw (); extern size_t mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw (); extern size_t wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw (); extern int wcwidth (wchar_t __c) throw (); extern int wcswidth (const wchar_t *__s, size_t __n) throw (); extern double wcstod (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); extern float wcstof (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); extern long double wcstold (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); # 396 "/usr/include/wchar.h" 3 4 extern _Float32 wcstof32 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); extern _Float64 wcstof64 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); # 411 "/usr/include/wchar.h" 3 4 extern _Float32x wcstof32x (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); extern _Float64x wcstof64x (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); # 428 "/usr/include/wchar.h" 3 4 extern long int wcstol (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); extern unsigned long int wcstoul (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); __extension__ extern long long int wcstoll (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); __extension__ extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); __extension__ extern long long int wcstoq (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); __extension__ extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); extern long int wcstol_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, locale_t __loc) throw (); extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, locale_t __loc) throw (); __extension__ extern long long int wcstoll_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, locale_t __loc) throw (); __extension__ extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, locale_t __loc) throw (); extern double wcstod_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) throw (); extern float wcstof_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) throw (); extern long double wcstold_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) throw (); # 511 "/usr/include/wchar.h" 3 4 extern _Float32 wcstof32_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) throw (); extern _Float64 wcstof64_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) throw (); # 529 "/usr/include/wchar.h" 3 4 extern _Float32x wcstof32x_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) throw (); extern _Float64x wcstof64x_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) throw (); # 551 "/usr/include/wchar.h" 3 4 extern wchar_t *wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw (); extern wchar_t *wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw (); # 567 "/usr/include/wchar.h" 3 4 extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); extern int fwide (__FILE *__fp, int __mode) throw (); extern int fwprintf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...) ; extern int wprintf (const wchar_t *__restrict __format, ...) ; extern int swprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __format, ...) throw () ; extern int vfwprintf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vwprintf (const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vswprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __format, __gnuc_va_list __arg) throw () ; extern int fwscanf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...) ; extern int wscanf (const wchar_t *__restrict __format, ...) ; extern int swscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...) throw () ; # 673 "/usr/include/wchar.h" 3 4 extern int vfwscanf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vwscanf (const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vswscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) throw () ; # 727 "/usr/include/wchar.h" 3 4 extern wint_t fgetwc (__FILE *__stream); extern wint_t getwc (__FILE *__stream); extern wint_t getwchar (void); extern wint_t fputwc (wchar_t __wc, __FILE *__stream); extern wint_t putwc (wchar_t __wc, __FILE *__stream); extern wint_t putwchar (wchar_t __wc); extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); extern int fputws (const wchar_t *__restrict __ws, __FILE *__restrict __stream); extern wint_t ungetwc (wint_t __wc, __FILE *__stream); # 782 "/usr/include/wchar.h" 3 4 extern wint_t getwc_unlocked (__FILE *__stream); extern wint_t getwchar_unlocked (void); extern wint_t fgetwc_unlocked (__FILE *__stream); extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); # 808 "/usr/include/wchar.h" 3 4 extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); extern wint_t putwchar_unlocked (wchar_t __wc); # 818 "/usr/include/wchar.h" 3 4 extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); extern int fputws_unlocked (const wchar_t *__restrict __ws, __FILE *__restrict __stream); extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, const wchar_t *__restrict __format, const struct tm *__restrict __tp) throw (); extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, const wchar_t *__restrict __format, const struct tm *__restrict __tp, locale_t __loc) throw (); # 857 "/usr/include/wchar.h" 3 4 } # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwchar" 2 3 # 62 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwchar" 3 namespace std { using ::mbstate_t; } # 135 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwchar" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::wint_t; using ::btowc; using ::fgetwc; using ::fgetws; using ::fputwc; using ::fputws; using ::fwide; using ::fwprintf; using ::fwscanf; using ::getwc; using ::getwchar; using ::mbrlen; using ::mbrtowc; using ::mbsinit; using ::mbsrtowcs; using ::putwc; using ::putwchar; using ::swprintf; using ::swscanf; using ::ungetwc; using ::vfwprintf; using ::vfwscanf; using ::vswprintf; using ::vswscanf; using ::vwprintf; using ::vwscanf; using ::wcrtomb; using ::wcscat; using ::wcscmp; using ::wcscoll; using ::wcscpy; using ::wcscspn; using ::wcsftime; using ::wcslen; using ::wcsncat; using ::wcsncmp; using ::wcsncpy; using ::wcsrtombs; using ::wcsspn; using ::wcstod; using ::wcstof; using ::wcstok; using ::wcstol; using ::wcstoul; using ::wcsxfrm; using ::wctob; using ::wmemcmp; using ::wmemcpy; using ::wmemmove; using ::wmemset; using ::wprintf; using ::wscanf; using ::wcschr; using ::wcspbrk; using ::wcsrchr; using ::wcsstr; using ::wmemchr; inline wchar_t* wcschr(wchar_t* __p, wchar_t __c) { return wcschr(const_cast<const wchar_t*>(__p), __c); } inline wchar_t* wcspbrk(wchar_t* __s1, const wchar_t* __s2) { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); } inline wchar_t* wcsrchr(wchar_t* __p, wchar_t __c) { return wcsrchr(const_cast<const wchar_t*>(__p), __c); } inline wchar_t* wcsstr(wchar_t* __s1, const wchar_t* __s2) { return wcsstr(const_cast<const wchar_t*>(__s1), __s2); } inline wchar_t* wmemchr(wchar_t* __p, wchar_t __c, size_t __n) { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); } } namespace __gnu_cxx { using ::wcstold; # 257 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwchar" 3 using ::wcstoll; using ::wcstoull; } namespace std { using ::__gnu_cxx::wcstold; using ::__gnu_cxx::wcstoll; using ::__gnu_cxx::wcstoull; } # 277 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwchar" 3 namespace std { using std::wcstof; using std::vfwscanf; using std::vswscanf; using std::vwscanf; using std::wcstold; using std::wcstoll; using std::wcstoull; } # 41 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/postypes.h" 2 3 # 68 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/postypes.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 88 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/postypes.h" 3 typedef long streamoff; # 98 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/postypes.h" 3 typedef ptrdiff_t streamsize; # 111 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/postypes.h" 3 template<typename _StateT> class fpos { private: streamoff _M_off; _StateT _M_state; public: fpos() : _M_off(0), _M_state() { } # 133 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/postypes.h" 3 fpos(streamoff __off) : _M_off(__off), _M_state() { } operator streamoff() const { return _M_off; } void state(_StateT __st) { _M_state = __st; } _StateT state() const { return _M_state; } fpos& operator+=(streamoff __off) { _M_off += __off; return *this; } fpos& operator-=(streamoff __off) { _M_off -= __off; return *this; } fpos operator+(streamoff __off) const { fpos __pos(*this); __pos += __off; return __pos; } fpos operator-(streamoff __off) const { fpos __pos(*this); __pos -= __off; return __pos; } streamoff operator-(const fpos& __other) const { return _M_off - __other._M_off; } }; template<typename _StateT> inline bool operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) { return streamoff(__lhs) == streamoff(__rhs); } template<typename _StateT> inline bool operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) { return streamoff(__lhs) != streamoff(__rhs); } typedef fpos<mbstate_t> streampos; typedef fpos<mbstate_t> wstreampos; typedef fpos<mbstate_t> u16streampos; typedef fpos<mbstate_t> u32streampos; } # 41 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/char_traits.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwchar" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwchar" 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/char_traits.h" 2 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 61 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/char_traits.h" 3 template<typename _CharT> struct _Char_types { typedef unsigned long int_type; typedef std::streampos pos_type; typedef std::streamoff off_type; typedef std::mbstate_t state_type; }; # 86 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/char_traits.h" 3 template<typename _CharT> struct char_traits { typedef _CharT char_type; typedef typename _Char_types<_CharT>::int_type int_type; typedef typename _Char_types<_CharT>::pos_type pos_type; typedef typename _Char_types<_CharT>::off_type off_type; typedef typename _Char_types<_CharT>::state_type state_type; static constexpr void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } static constexpr int compare(const char_type* __s1, const char_type* __s2, std::size_t __n); static constexpr std::size_t length(const char_type* __s); static constexpr const char_type* find(const char_type* __s, std::size_t __n, const char_type& __a); static char_type* move(char_type* __s1, const char_type* __s2, std::size_t __n); static char_type* copy(char_type* __s1, const char_type* __s2, std::size_t __n); static char_type* assign(char_type* __s, std::size_t __n, char_type __a); static constexpr char_type to_char_type(const int_type& __c) { return static_cast<char_type>(__c); } static constexpr int_type to_int_type(const char_type& __c) { return static_cast<int_type>(__c); } static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } static constexpr int_type eof() { return static_cast<int_type>(-1); } static constexpr int_type not_eof(const int_type& __c) { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } }; template<typename _CharT> constexpr int char_traits<_CharT>:: compare(const char_type* __s1, const char_type* __s2, std::size_t __n) { for (std::size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } template<typename _CharT> constexpr std::size_t char_traits<_CharT>:: length(const char_type* __p) { std::size_t __i = 0; while (!eq(__p[__i], char_type())) ++__i; return __i; } template<typename _CharT> constexpr const typename char_traits<_CharT>::char_type* char_traits<_CharT>:: find(const char_type* __s, std::size_t __n, const char_type& __a) { for (std::size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } template<typename _CharT> typename char_traits<_CharT>::char_type* char_traits<_CharT>:: move(char_type* __s1, const char_type* __s2, std::size_t __n) { if (__n == 0) return __s1; return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, __n * sizeof(char_type))); } template<typename _CharT> typename char_traits<_CharT>::char_type* char_traits<_CharT>:: copy(char_type* __s1, const char_type* __s2, std::size_t __n) { std::copy(__s2, __s2 + __n, __s1); return __s1; } template<typename _CharT> typename char_traits<_CharT>::char_type* char_traits<_CharT>:: assign(char_type* __s, std::size_t __n, char_type __a) { std::fill_n(__s, __n, __a); return __s; } } namespace std __attribute__ ((__visibility__ ("default"))) { # 270 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/char_traits.h" 3 template<class _CharT> struct char_traits : public __gnu_cxx::char_traits<_CharT> { }; template<> struct char_traits<char> { typedef char char_type; typedef int int_type; typedef streampos pos_type; typedef streamoff off_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept { return (static_cast<unsigned char>(__c1) < static_cast<unsigned char>(__c2)); } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return 0; return __builtin_memcmp(__s1, __s2, __n); } static size_t length(const char_type* __s) { return __builtin_strlen(__s); } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { if (__n == 0) return 0; return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n)); } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return static_cast<char_type*>(__builtin_memmove(__s1, __s2, __n)); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { if (__n == 0) return __s; return static_cast<char_type*>(__builtin_memset(__s, __a, __n)); } static constexpr char_type to_char_type(const int_type& __c) noexcept { return static_cast<char_type>(__c); } static constexpr int_type to_int_type(const char_type& __c) noexcept { return static_cast<int_type>(static_cast<unsigned char>(__c)); } static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept { return __c1 == __c2; } static constexpr int_type eof() noexcept { return static_cast<int_type>(-1); } static constexpr int_type not_eof(const int_type& __c) noexcept { return (__c == eof()) ? 0 : __c; } }; template<> struct char_traits<wchar_t> { typedef wchar_t char_type; typedef wint_t int_type; typedef streamoff off_type; typedef wstreampos pos_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return 0; else return wmemcmp(__s1, __s2, __n); } static size_t length(const char_type* __s) { return wcslen(__s); } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { if (__n == 0) return 0; else return wmemchr(__s, __a, __n); } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return wmemmove(__s1, __s2, __n); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return wmemcpy(__s1, __s2, __n); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { if (__n == 0) return __s; return wmemset(__s, __a, __n); } static constexpr char_type to_char_type(const int_type& __c) noexcept { return char_type(__c); } static constexpr int_type to_int_type(const char_type& __c) noexcept { return int_type(__c); } static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept { return __c1 == __c2; } static constexpr int_type eof() noexcept { return static_cast<int_type>((0xffffffffu)); } static constexpr int_type not_eof(const int_type& __c) noexcept { return eq_int_type(__c, eof()) ? 0 : __c; } }; } # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdint" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdint" 3 # 46 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdint" 3 namespace std { using ::int8_t; using ::int16_t; using ::int32_t; using ::int64_t; using ::int_fast8_t; using ::int_fast16_t; using ::int_fast32_t; using ::int_fast64_t; using ::int_least8_t; using ::int_least16_t; using ::int_least32_t; using ::int_least64_t; using ::intmax_t; using ::intptr_t; using ::uint8_t; using ::uint16_t; using ::uint32_t; using ::uint64_t; using ::uint_fast8_t; using ::uint_fast16_t; using ::uint_fast32_t; using ::uint_fast64_t; using ::uint_least8_t; using ::uint_least16_t; using ::uint_least32_t; using ::uint_least64_t; using ::uintmax_t; using ::uintptr_t; } # 504 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/char_traits.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<> struct char_traits<char16_t> { typedef char16_t char_type; typedef uint_least16_t int_type; typedef streamoff off_type; typedef u16streampos pos_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { for (size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } static size_t length(const char_type* __s) { size_t __i = 0; while (!eq(__s[__i], char_type())) ++__i; return __i; } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { for (size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return (static_cast<char_type*> (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return (static_cast<char_type*> (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { for (size_t __i = 0; __i < __n; ++__i) assign(__s[__i], __a); return __s; } static constexpr char_type to_char_type(const int_type& __c) noexcept { return char_type(__c); } static constexpr int_type to_int_type(const char_type& __c) noexcept { return __c == eof() ? int_type(0xfffd) : int_type(__c); } static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept { return __c1 == __c2; } static constexpr int_type eof() noexcept { return static_cast<int_type>(-1); } static constexpr int_type not_eof(const int_type& __c) noexcept { return eq_int_type(__c, eof()) ? 0 : __c; } }; template<> struct char_traits<char32_t> { typedef char32_t char_type; typedef uint_least32_t int_type; typedef streamoff off_type; typedef u32streampos pos_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { for (size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } static size_t length(const char_type* __s) { size_t __i = 0; while (!eq(__s[__i], char_type())) ++__i; return __i; } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { for (size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return (static_cast<char_type*> (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return (static_cast<char_type*> (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { for (size_t __i = 0; __i < __n; ++__i) assign(__s[__i], __a); return __s; } static constexpr char_type to_char_type(const int_type& __c) noexcept { return char_type(__c); } static constexpr int_type to_int_type(const char_type& __c) noexcept { return int_type(__c); } static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept { return __c1 == __c2; } static constexpr int_type eof() noexcept { return static_cast<int_type>(-1); } static constexpr int_type not_eof(const int_type& __c) noexcept { return eq_int_type(__c, eof()) ? 0 : __c; } }; } # 41 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/string" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/allocator.h" 1 3 # 46 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/allocator.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++allocator.h" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++allocator.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/new_allocator.h" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/new_allocator.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { using std::size_t; using std::ptrdiff_t; # 57 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/new_allocator.h" 3 template<typename _Tp> class new_allocator { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef const _Tp* const_pointer; typedef _Tp& reference; typedef const _Tp& const_reference; typedef _Tp value_type; template<typename _Tp1> struct rebind { typedef new_allocator<_Tp1> other; }; typedef std::true_type propagate_on_container_move_assignment; new_allocator() noexcept { } new_allocator(const new_allocator&) noexcept { } template<typename _Tp1> new_allocator(const new_allocator<_Tp1>&) noexcept { } ~new_allocator() noexcept { } pointer address(reference __x) const noexcept { return std::__addressof(__x); } const_pointer address(const_reference __x) const noexcept { return std::__addressof(__x); } pointer allocate(size_type __n, const void* = static_cast<const void*>(0)) { if (__n > this->max_size()) std::__throw_bad_alloc(); # 111 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/new_allocator.h" 3 return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); } void deallocate(pointer __p, size_type) { ::operator delete(__p); } size_type max_size() const noexcept { return size_t(-1) / sizeof(_Tp); } template<typename _Up, typename... _Args> void construct(_Up* __p, _Args&&... __args) { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } template<typename _Up> void destroy(_Up* __p) { __p->~_Up(); } # 151 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/new_allocator.h" 3 }; template<typename _Tp> inline bool operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) { return true; } template<typename _Tp> inline bool operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) { return false; } } # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++allocator.h" 2 3 namespace std { # 47 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++allocator.h" 3 template<typename _Tp> using __allocator_base = __gnu_cxx::new_allocator<_Tp>; } # 47 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/allocator.h" 2 3 # 57 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/allocator.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 67 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/allocator.h" 3 template<> class allocator<void> { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef void* pointer; typedef const void* const_pointer; typedef void value_type; template<typename _Tp1> struct rebind { typedef allocator<_Tp1> other; }; typedef true_type propagate_on_container_move_assignment; typedef true_type is_always_equal; template<typename _Up, typename... _Args> void construct(_Up* __p, _Args&&... __args) { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } template<typename _Up> void destroy(_Up* __p) { __p->~_Up(); } }; # 107 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/allocator.h" 3 template<typename _Tp> class allocator : public __allocator_base<_Tp> { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef const _Tp* const_pointer; typedef _Tp& reference; typedef const _Tp& const_reference; typedef _Tp value_type; template<typename _Tp1> struct rebind { typedef allocator<_Tp1> other; }; typedef true_type propagate_on_container_move_assignment; typedef true_type is_always_equal; allocator() throw() { } allocator(const allocator& __a) throw() : __allocator_base<_Tp>(__a) { } template<typename _Tp1> allocator(const allocator<_Tp1>&) throw() { } ~allocator() throw() { } }; template<typename _T1, typename _T2> inline bool operator==(const allocator<_T1>&, const allocator<_T2>&) noexcept { return true; } template<typename _Tp> inline bool operator==(const allocator<_Tp>&, const allocator<_Tp>&) noexcept { return true; } template<typename _T1, typename _T2> inline bool operator!=(const allocator<_T1>&, const allocator<_T2>&) noexcept { return false; } template<typename _Tp> inline bool operator!=(const allocator<_Tp>&, const allocator<_Tp>&) noexcept { return false; } template<typename _Tp> class allocator<const _Tp> { public: typedef _Tp value_type; template<typename _Up> allocator(const allocator<_Up>&) { } }; template<typename _Tp> class allocator<volatile _Tp> { public: typedef _Tp value_type; template<typename _Up> allocator(const allocator<_Up>&) { } }; template<typename _Tp> class allocator<const volatile _Tp> { public: typedef _Tp value_type; template<typename _Up> allocator(const allocator<_Up>&) { } }; extern template class allocator<char>; extern template class allocator<wchar_t>; template<typename _Alloc, bool = __is_empty(_Alloc)> struct __alloc_swap { static void _S_do_it(_Alloc&, _Alloc&) noexcept { } }; template<typename _Alloc> struct __alloc_swap<_Alloc, false> { static void _S_do_it(_Alloc& __one, _Alloc& __two) noexcept { if (__one != __two) swap(__one, __two); } }; template<typename _Alloc, bool = __is_empty(_Alloc)> struct __alloc_neq { static bool _S_do_it(const _Alloc&, const _Alloc&) { return false; } }; template<typename _Alloc> struct __alloc_neq<_Alloc, false> { static bool _S_do_it(const _Alloc& __one, const _Alloc& __two) { return __one != __two; } }; template<typename _Tp, bool = __or_<is_copy_constructible<typename _Tp::value_type>, is_nothrow_move_constructible<typename _Tp::value_type>>::value> struct __shrink_to_fit_aux { static bool _S_do_it(_Tp&) noexcept { return false; } }; template<typename _Tp> struct __shrink_to_fit_aux<_Tp, true> { static bool _S_do_it(_Tp& __c) noexcept { # 264 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/allocator.h" 3 return false; } }; } # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/string" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/localefwd.h" 1 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/localefwd.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++locale.h" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++locale.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/clocale" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/clocale" 3 # 1 "/usr/include/locale.h" 1 3 4 # 28 "/usr/include/locale.h" 3 4 # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 1 3 4 # 29 "/usr/include/locale.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/locale.h" 1 3 4 # 30 "/usr/include/locale.h" 2 3 4 extern "C" { # 51 "/usr/include/locale.h" 3 4 struct lconv { char *decimal_point; char *thousands_sep; char *grouping; char *int_curr_symbol; char *currency_symbol; char *mon_decimal_point; char *mon_thousands_sep; char *mon_grouping; char *positive_sign; char *negative_sign; char int_frac_digits; char frac_digits; char p_cs_precedes; char p_sep_by_space; char n_cs_precedes; char n_sep_by_space; char p_sign_posn; char n_sign_posn; char int_p_cs_precedes; char int_p_sep_by_space; char int_n_cs_precedes; char int_n_sep_by_space; char int_p_sign_posn; char int_n_sign_posn; # 118 "/usr/include/locale.h" 3 4 }; extern char *setlocale (int __category, const char *__locale) throw (); extern struct lconv *localeconv (void) throw (); # 141 "/usr/include/locale.h" 3 4 extern locale_t newlocale (int __category_mask, const char *__locale, locale_t __base) throw (); # 176 "/usr/include/locale.h" 3 4 extern locale_t duplocale (locale_t __dataset) throw (); extern void freelocale (locale_t __dataset) throw (); extern locale_t uselocale (locale_t __dataset) throw (); } # 43 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/clocale" 2 3 namespace std { using ::lconv; using ::setlocale; using ::localeconv; } # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++locale.h" 2 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { extern "C" __typeof(uselocale) __uselocale; } namespace std __attribute__ ((__visibility__ ("default"))) { typedef __locale_t __c_locale; inline int __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), char* __out, const int __size __attribute__ ((__unused__)), const char* __fmt, ...) { __c_locale __old = __gnu_cxx::__uselocale(__cloc); # 88 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++locale.h" 3 __builtin_va_list __args; __builtin_va_start(__args, __fmt); const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); __builtin_va_end(__args); __gnu_cxx::__uselocale(__old); return __ret; } } # 41 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/localefwd.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/iosfwd" 1 3 # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/iosfwd" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 74 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/iosfwd" 3 class ios_base; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_ios; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_streambuf; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_istream; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_ostream; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_iostream; namespace __cxx11 { template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_stringbuf; template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_istringstream; template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_ostringstream; template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_stringstream; } template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_filebuf; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_ifstream; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_ofstream; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_fstream; template<typename _CharT, typename _Traits = char_traits<_CharT> > class istreambuf_iterator; template<typename _CharT, typename _Traits = char_traits<_CharT> > class ostreambuf_iterator; typedef basic_ios<char> ios; typedef basic_streambuf<char> streambuf; typedef basic_istream<char> istream; typedef basic_ostream<char> ostream; typedef basic_iostream<char> iostream; typedef basic_stringbuf<char> stringbuf; typedef basic_istringstream<char> istringstream; typedef basic_ostringstream<char> ostringstream; typedef basic_stringstream<char> stringstream; typedef basic_filebuf<char> filebuf; typedef basic_ifstream<char> ifstream; typedef basic_ofstream<char> ofstream; typedef basic_fstream<char> fstream; typedef basic_ios<wchar_t> wios; typedef basic_streambuf<wchar_t> wstreambuf; typedef basic_istream<wchar_t> wistream; typedef basic_ostream<wchar_t> wostream; typedef basic_iostream<wchar_t> wiostream; typedef basic_stringbuf<wchar_t> wstringbuf; typedef basic_istringstream<wchar_t> wistringstream; typedef basic_ostringstream<wchar_t> wostringstream; typedef basic_stringstream<wchar_t> wstringstream; typedef basic_filebuf<wchar_t> wfilebuf; typedef basic_ifstream<wchar_t> wifstream; typedef basic_ofstream<wchar_t> wofstream; typedef basic_fstream<wchar_t> wfstream; } # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/localefwd.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cctype" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cctype" 3 # 1 "/usr/include/ctype.h" 1 3 4 # 28 "/usr/include/ctype.h" 3 4 extern "C" { # 46 "/usr/include/ctype.h" 3 4 enum { _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) }; # 79 "/usr/include/ctype.h" 3 4 extern const unsigned short int **__ctype_b_loc (void) throw () __attribute__ ((__const__)); extern const __int32_t **__ctype_tolower_loc (void) throw () __attribute__ ((__const__)); extern const __int32_t **__ctype_toupper_loc (void) throw () __attribute__ ((__const__)); # 108 "/usr/include/ctype.h" 3 4 extern int isalnum (int) throw (); extern int isalpha (int) throw (); extern int iscntrl (int) throw (); extern int isdigit (int) throw (); extern int islower (int) throw (); extern int isgraph (int) throw (); extern int isprint (int) throw (); extern int ispunct (int) throw (); extern int isspace (int) throw (); extern int isupper (int) throw (); extern int isxdigit (int) throw (); extern int tolower (int __c) throw (); extern int toupper (int __c) throw (); extern int isblank (int) throw (); extern int isctype (int __c, int __mask) throw (); extern int isascii (int __c) throw (); extern int toascii (int __c) throw (); extern int _toupper (int) throw (); extern int _tolower (int) throw (); # 251 "/usr/include/ctype.h" 3 4 extern int isalnum_l (int, locale_t) throw (); extern int isalpha_l (int, locale_t) throw (); extern int iscntrl_l (int, locale_t) throw (); extern int isdigit_l (int, locale_t) throw (); extern int islower_l (int, locale_t) throw (); extern int isgraph_l (int, locale_t) throw (); extern int isprint_l (int, locale_t) throw (); extern int ispunct_l (int, locale_t) throw (); extern int isspace_l (int, locale_t) throw (); extern int isupper_l (int, locale_t) throw (); extern int isxdigit_l (int, locale_t) throw (); extern int isblank_l (int, locale_t) throw (); extern int __tolower_l (int __c, locale_t __l) throw (); extern int tolower_l (int __c, locale_t __l) throw (); extern int __toupper_l (int __c, locale_t __l) throw (); extern int toupper_l (int __c, locale_t __l) throw (); # 327 "/usr/include/ctype.h" 3 4 } # 43 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cctype" 2 3 # 62 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cctype" 3 namespace std { using ::isalnum; using ::isalpha; using ::iscntrl; using ::isdigit; using ::isgraph; using ::islower; using ::isprint; using ::ispunct; using ::isspace; using ::isupper; using ::isxdigit; using ::tolower; using ::toupper; } namespace std { using ::isblank; } # 43 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/localefwd.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 55 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/localefwd.h" 3 class locale; template<typename _Facet> bool has_facet(const locale&) throw(); template<typename _Facet> const _Facet& use_facet(const locale&); template<typename _CharT> bool isspace(_CharT, const locale&); template<typename _CharT> bool isprint(_CharT, const locale&); template<typename _CharT> bool iscntrl(_CharT, const locale&); template<typename _CharT> bool isupper(_CharT, const locale&); template<typename _CharT> bool islower(_CharT, const locale&); template<typename _CharT> bool isalpha(_CharT, const locale&); template<typename _CharT> bool isdigit(_CharT, const locale&); template<typename _CharT> bool ispunct(_CharT, const locale&); template<typename _CharT> bool isxdigit(_CharT, const locale&); template<typename _CharT> bool isalnum(_CharT, const locale&); template<typename _CharT> bool isgraph(_CharT, const locale&); template<typename _CharT> bool isblank(_CharT, const locale&); template<typename _CharT> _CharT toupper(_CharT, const locale&); template<typename _CharT> _CharT tolower(_CharT, const locale&); class ctype_base; template<typename _CharT> class ctype; template<> class ctype<char>; template<> class ctype<wchar_t>; template<typename _CharT> class ctype_byname; class codecvt_base; template<typename _InternT, typename _ExternT, typename _StateT> class codecvt; template<> class codecvt<char, char, mbstate_t>; template<> class codecvt<wchar_t, char, mbstate_t>; template<typename _InternT, typename _ExternT, typename _StateT> class codecvt_byname; template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > class num_get; template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class num_put; namespace __cxx11 { template<typename _CharT> class numpunct; template<typename _CharT> class numpunct_byname; } namespace __cxx11 { template<typename _CharT> class collate; template<typename _CharT> class collate_byname; } class time_base; namespace __cxx11 { template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > class time_get; template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > class time_get_byname; } template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class time_put; template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class time_put_byname; class money_base; namespace __cxx11 { template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > class money_get; template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class money_put; } namespace __cxx11 { template<typename _CharT, bool _Intl = false> class moneypunct; template<typename _CharT, bool _Intl = false> class moneypunct_byname; } class messages_base; namespace __cxx11 { template<typename _CharT> class messages; template<typename _CharT> class messages_byname; } } # 44 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/string" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ostream_insert.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ostream_insert.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/cxxabi_forced.h" 1 3 # 35 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/cxxabi_forced.h" 3 #pragma GCC visibility push(default) namespace __cxxabiv1 { class __forced_unwind { virtual ~__forced_unwind() throw(); virtual void __pure_dummy() = 0; }; } #pragma GCC visibility pop # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ostream_insert.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, typename _Traits> inline void __ostream_write(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const streamsize __put = __out.rdbuf()->sputn(__s, __n); if (__put != __n) __out.setstate(__ios_base::badbit); } template<typename _CharT, typename _Traits> inline void __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const _CharT __c = __out.fill(); for (; __n > 0; --__n) { const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); if (_Traits::eq_int_type(__put, _Traits::eof())) { __out.setstate(__ios_base::badbit); break; } } } template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& __ostream_insert(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; typename __ostream_type::sentry __cerb(__out); if (__cerb) { if (true) { const streamsize __w = __out.width(); if (__w > __n) { const bool __left = ((__out.flags() & __ios_base::adjustfield) == __ios_base::left); if (!__left) __ostream_fill(__out, __w - __n); if (__out.good()) __ostream_write(__out, __s, __n); if (__left && __out.good()) __ostream_fill(__out, __w - __n); } else __ostream_write(__out, __s, __n); __out.width(0); } if (false) { __out._M_setstate(__ios_base::badbit); ; } if (false) { __out._M_setstate(__ios_base::badbit); } } return __out; } extern template ostream& __ostream_insert(ostream&, const char*, streamsize); extern template wostream& __ostream_insert(wostream&, const wchar_t*, streamsize); } # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/string" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_function.h" 1 3 # 63 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_function.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 104 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_function.h" 3 template<typename _Arg, typename _Result> struct unary_function { typedef _Arg argument_type; typedef _Result result_type; }; template<typename _Arg1, typename _Arg2, typename _Result> struct binary_function { typedef _Arg1 first_argument_type; typedef _Arg2 second_argument_type; typedef _Result result_type; }; # 144 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_function.h" 3 struct __is_transparent; template<typename _Tp = void> struct plus; template<typename _Tp = void> struct minus; template<typename _Tp = void> struct multiplies; template<typename _Tp = void> struct divides; template<typename _Tp = void> struct modulus; template<typename _Tp = void> struct negate; template<typename _Tp> struct plus : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; } }; template<typename _Tp> struct minus : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; } }; template<typename _Tp> struct multiplies : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; } }; template<typename _Tp> struct divides : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; } }; template<typename _Tp> struct modulus : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; } }; template<typename _Tp> struct negate : public unary_function<_Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x) const { return -__x; } }; template<> struct plus<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) + std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) + std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) + std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template<> struct minus<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) - std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) - std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) - std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template<> struct multiplies<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) * std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) * std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) * std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template<> struct divides<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) / std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) / std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) / std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template<> struct modulus<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) % std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) % std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) % std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template<> struct negate<void> { template <typename _Tp> constexpr auto operator()(_Tp&& __t) const noexcept(noexcept(-std::forward<_Tp>(__t))) -> decltype(-std::forward<_Tp>(__t)) { return -std::forward<_Tp>(__t); } typedef __is_transparent is_transparent; }; # 330 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_function.h" 3 template<typename _Tp = void> struct equal_to; template<typename _Tp = void> struct not_equal_to; template<typename _Tp = void> struct greater; template<typename _Tp = void> struct less; template<typename _Tp = void> struct greater_equal; template<typename _Tp = void> struct less_equal; template<typename _Tp> struct equal_to : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; } }; template<typename _Tp> struct not_equal_to : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; } }; template<typename _Tp> struct greater : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; } }; template<typename _Tp> struct less : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; } }; template<typename _Tp> struct greater_equal : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; } }; template<typename _Tp> struct less_equal : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; } }; template<typename _Tp> struct greater<_Tp*> : public binary_function<_Tp*, _Tp*, bool> { constexpr bool operator()(_Tp* __x, _Tp* __y) const noexcept { if (__builtin_constant_p (__x > __y)) return __x > __y; return (long unsigned int)__x > (long unsigned int)__y; } }; template<typename _Tp> struct less<_Tp*> : public binary_function<_Tp*, _Tp*, bool> { constexpr bool operator()(_Tp* __x, _Tp* __y) const noexcept { if (__builtin_constant_p (__x < __y)) return __x < __y; return (long unsigned int)__x < (long unsigned int)__y; } }; template<typename _Tp> struct greater_equal<_Tp*> : public binary_function<_Tp*, _Tp*, bool> { constexpr bool operator()(_Tp* __x, _Tp* __y) const noexcept { if (__builtin_constant_p (__x >= __y)) return __x >= __y; return (long unsigned int)__x >= (long unsigned int)__y; } }; template<typename _Tp> struct less_equal<_Tp*> : public binary_function<_Tp*, _Tp*, bool> { constexpr bool operator()(_Tp* __x, _Tp* __y) const noexcept { if (__builtin_constant_p (__x <= __y)) return __x <= __y; return (long unsigned int)__x <= (long unsigned int)__y; } }; template<> struct equal_to<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) == std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) == std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template<> struct not_equal_to<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) != std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) != std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) != std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template<> struct greater<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) > std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) > std::forward<_Up>(__u)) { return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), __ptr_cmp<_Tp, _Up>{}); } template<typename _Tp, typename _Up> constexpr bool operator()(_Tp* __t, _Up* __u) const noexcept { return greater<common_type_t<_Tp*, _Up*>>{}(__t, __u); } typedef __is_transparent is_transparent; private: template <typename _Tp, typename _Up> static constexpr decltype(auto) _S_cmp(_Tp&& __t, _Up&& __u, false_type) { return std::forward<_Tp>(__t) > std::forward<_Up>(__u); } template <typename _Tp, typename _Up> static constexpr bool _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept { return greater<const volatile void*>{}( static_cast<const volatile void*>(std::forward<_Tp>(__t)), static_cast<const volatile void*>(std::forward<_Up>(__u))); } template<typename _Tp, typename _Up, typename = void> struct __not_overloaded2 : true_type { }; template<typename _Tp, typename _Up> struct __not_overloaded2<_Tp, _Up, __void_t< decltype(std::declval<_Tp>().operator>(std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up, typename = void> struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; template<typename _Tp, typename _Up> struct __not_overloaded<_Tp, _Up, __void_t< decltype(operator>(std::declval<_Tp>(), std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up> using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, is_convertible<_Tp, const volatile void*>, is_convertible<_Up, const volatile void*>>; }; template<> struct less<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) < std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) < std::forward<_Up>(__u)) { return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), __ptr_cmp<_Tp, _Up>{}); } template<typename _Tp, typename _Up> constexpr bool operator()(_Tp* __t, _Up* __u) const noexcept { return less<common_type_t<_Tp*, _Up*>>{}(__t, __u); } typedef __is_transparent is_transparent; private: template <typename _Tp, typename _Up> static constexpr decltype(auto) _S_cmp(_Tp&& __t, _Up&& __u, false_type) { return std::forward<_Tp>(__t) < std::forward<_Up>(__u); } template <typename _Tp, typename _Up> static constexpr bool _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept { return less<const volatile void*>{}( static_cast<const volatile void*>(std::forward<_Tp>(__t)), static_cast<const volatile void*>(std::forward<_Up>(__u))); } template<typename _Tp, typename _Up, typename = void> struct __not_overloaded2 : true_type { }; template<typename _Tp, typename _Up> struct __not_overloaded2<_Tp, _Up, __void_t< decltype(std::declval<_Tp>().operator<(std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up, typename = void> struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; template<typename _Tp, typename _Up> struct __not_overloaded<_Tp, _Up, __void_t< decltype(operator<(std::declval<_Tp>(), std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up> using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, is_convertible<_Tp, const volatile void*>, is_convertible<_Up, const volatile void*>>; }; template<> struct greater_equal<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) >= std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) >= std::forward<_Up>(__u)) { return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), __ptr_cmp<_Tp, _Up>{}); } template<typename _Tp, typename _Up> constexpr bool operator()(_Tp* __t, _Up* __u) const noexcept { return greater_equal<common_type_t<_Tp*, _Up*>>{}(__t, __u); } typedef __is_transparent is_transparent; private: template <typename _Tp, typename _Up> static constexpr decltype(auto) _S_cmp(_Tp&& __t, _Up&& __u, false_type) { return std::forward<_Tp>(__t) >= std::forward<_Up>(__u); } template <typename _Tp, typename _Up> static constexpr bool _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept { return greater_equal<const volatile void*>{}( static_cast<const volatile void*>(std::forward<_Tp>(__t)), static_cast<const volatile void*>(std::forward<_Up>(__u))); } template<typename _Tp, typename _Up, typename = void> struct __not_overloaded2 : true_type { }; template<typename _Tp, typename _Up> struct __not_overloaded2<_Tp, _Up, __void_t< decltype(std::declval<_Tp>().operator>=(std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up, typename = void> struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; template<typename _Tp, typename _Up> struct __not_overloaded<_Tp, _Up, __void_t< decltype(operator>=(std::declval<_Tp>(), std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up> using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, is_convertible<_Tp, const volatile void*>, is_convertible<_Up, const volatile void*>>; }; template<> struct less_equal<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) <= std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) <= std::forward<_Up>(__u)) { return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), __ptr_cmp<_Tp, _Up>{}); } template<typename _Tp, typename _Up> constexpr bool operator()(_Tp* __t, _Up* __u) const noexcept { return less_equal<common_type_t<_Tp*, _Up*>>{}(__t, __u); } typedef __is_transparent is_transparent; private: template <typename _Tp, typename _Up> static constexpr decltype(auto) _S_cmp(_Tp&& __t, _Up&& __u, false_type) { return std::forward<_Tp>(__t) <= std::forward<_Up>(__u); } template <typename _Tp, typename _Up> static constexpr bool _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept { return less_equal<const volatile void*>{}( static_cast<const volatile void*>(std::forward<_Tp>(__t)), static_cast<const volatile void*>(std::forward<_Up>(__u))); } template<typename _Tp, typename _Up, typename = void> struct __not_overloaded2 : true_type { }; template<typename _Tp, typename _Up> struct __not_overloaded2<_Tp, _Up, __void_t< decltype(std::declval<_Tp>().operator<=(std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up, typename = void> struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; template<typename _Tp, typename _Up> struct __not_overloaded<_Tp, _Up, __void_t< decltype(operator<=(std::declval<_Tp>(), std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up> using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, is_convertible<_Tp, const volatile void*>, is_convertible<_Up, const volatile void*>>; }; # 750 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_function.h" 3 template<typename _Tp = void> struct logical_and; template<typename _Tp = void> struct logical_or; template<typename _Tp = void> struct logical_not; template<typename _Tp> struct logical_and : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; } }; template<typename _Tp> struct logical_or : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; } }; template<typename _Tp> struct logical_not : public unary_function<_Tp, bool> { constexpr bool operator()(const _Tp& __x) const { return !__x; } }; template<> struct logical_and<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) && std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) && std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) && std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template<> struct logical_or<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) || std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) || std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) || std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template<> struct logical_not<void> { template <typename _Tp> constexpr auto operator()(_Tp&& __t) const noexcept(noexcept(!std::forward<_Tp>(__t))) -> decltype(!std::forward<_Tp>(__t)) { return !std::forward<_Tp>(__t); } typedef __is_transparent is_transparent; }; template<typename _Tp = void> struct bit_and; template<typename _Tp = void> struct bit_or; template<typename _Tp = void> struct bit_xor; template<typename _Tp = void> struct bit_not; template<typename _Tp> struct bit_and : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x & __y; } }; template<typename _Tp> struct bit_or : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x | __y; } }; template<typename _Tp> struct bit_xor : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x ^ __y; } }; template<typename _Tp> struct bit_not : public unary_function<_Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x) const { return ~__x; } }; template <> struct bit_and<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) & std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) & std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) & std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template <> struct bit_or<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) | std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) | std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) | std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template <> struct bit_xor<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) ^ std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template <> struct bit_not<void> { template <typename _Tp> constexpr auto operator()(_Tp&& __t) const noexcept(noexcept(~std::forward<_Tp>(__t))) -> decltype(~std::forward<_Tp>(__t)) { return ~std::forward<_Tp>(__t); } typedef __is_transparent is_transparent; }; # 978 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_function.h" 3 template<typename _Predicate> class unary_negate : public unary_function<typename _Predicate::argument_type, bool> { protected: _Predicate _M_pred; public: constexpr explicit unary_negate(const _Predicate& __x) : _M_pred(__x) { } constexpr bool operator()(const typename _Predicate::argument_type& __x) const { return !_M_pred(__x); } }; template<typename _Predicate> constexpr inline unary_negate<_Predicate> not1(const _Predicate& __pred) { return unary_negate<_Predicate>(__pred); } template<typename _Predicate> class binary_negate : public binary_function<typename _Predicate::first_argument_type, typename _Predicate::second_argument_type, bool> { protected: _Predicate _M_pred; public: constexpr explicit binary_negate(const _Predicate& __x) : _M_pred(__x) { } constexpr bool operator()(const typename _Predicate::first_argument_type& __x, const typename _Predicate::second_argument_type& __y) const { return !_M_pred(__x, __y); } }; template<typename _Predicate> constexpr inline binary_negate<_Predicate> not2(const _Predicate& __pred) { return binary_negate<_Predicate>(__pred); } # 1055 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_function.h" 3 template<typename _Arg, typename _Result> class pointer_to_unary_function : public unary_function<_Arg, _Result> { protected: _Result (*_M_ptr)(_Arg); public: pointer_to_unary_function() { } explicit pointer_to_unary_function(_Result (*__x)(_Arg)) : _M_ptr(__x) { } _Result operator()(_Arg __x) const { return _M_ptr(__x); } }; template<typename _Arg, typename _Result> inline pointer_to_unary_function<_Arg, _Result> ptr_fun(_Result (*__x)(_Arg)) { return pointer_to_unary_function<_Arg, _Result>(__x); } template<typename _Arg1, typename _Arg2, typename _Result> class pointer_to_binary_function : public binary_function<_Arg1, _Arg2, _Result> { protected: _Result (*_M_ptr)(_Arg1, _Arg2); public: pointer_to_binary_function() { } explicit pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) : _M_ptr(__x) { } _Result operator()(_Arg1 __x, _Arg2 __y) const { return _M_ptr(__x, __y); } }; template<typename _Arg1, typename _Arg2, typename _Result> inline pointer_to_binary_function<_Arg1, _Arg2, _Result> ptr_fun(_Result (*__x)(_Arg1, _Arg2)) { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } template<typename _Tp> struct _Identity : public unary_function<_Tp, _Tp> { _Tp& operator()(_Tp& __x) const { return __x; } const _Tp& operator()(const _Tp& __x) const { return __x; } }; template<typename _Tp> struct _Identity<const _Tp> : _Identity<_Tp> { }; template<typename _Pair> struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> { typename _Pair::first_type& operator()(_Pair& __x) const { return __x.first; } const typename _Pair::first_type& operator()(const _Pair& __x) const { return __x.first; } template<typename _Pair2> typename _Pair2::first_type& operator()(_Pair2& __x) const { return __x.first; } template<typename _Pair2> const typename _Pair2::first_type& operator()(const _Pair2& __x) const { return __x.first; } }; template<typename _Pair> struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type> { typename _Pair::second_type& operator()(_Pair& __x) const { return __x.second; } const typename _Pair::second_type& operator()(const _Pair& __x) const { return __x.second; } }; # 1178 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_function.h" 3 template<typename _Ret, typename _Tp> class mem_fun_t : public unary_function<_Tp*, _Ret> { public: explicit mem_fun_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) { } _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); } private: _Ret (_Tp::*_M_f)(); }; template<typename _Ret, typename _Tp> class const_mem_fun_t : public unary_function<const _Tp*, _Ret> { public: explicit const_mem_fun_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) { } _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); } private: _Ret (_Tp::*_M_f)() const; }; template<typename _Ret, typename _Tp> class mem_fun_ref_t : public unary_function<_Tp, _Ret> { public: explicit mem_fun_ref_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) { } _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); } private: _Ret (_Tp::*_M_f)(); }; template<typename _Ret, typename _Tp> class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> { public: explicit const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) { } _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); } private: _Ret (_Tp::*_M_f)() const; }; template<typename _Ret, typename _Tp, typename _Arg> class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> { public: explicit mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) { } _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg); }; template<typename _Ret, typename _Tp, typename _Arg> class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret> { public: explicit const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) { } _Ret operator()(const _Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg) const; }; template<typename _Ret, typename _Tp, typename _Arg> class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> { public: explicit mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) { } _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg); }; template<typename _Ret, typename _Tp, typename _Arg> class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> { public: explicit const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) { } _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg) const; }; template<typename _Ret, typename _Tp> inline mem_fun_t<_Ret, _Tp> mem_fun(_Ret (_Tp::*__f)()) { return mem_fun_t<_Ret, _Tp>(__f); } template<typename _Ret, typename _Tp> inline const_mem_fun_t<_Ret, _Tp> mem_fun(_Ret (_Tp::*__f)() const) { return const_mem_fun_t<_Ret, _Tp>(__f); } template<typename _Ret, typename _Tp> inline mem_fun_ref_t<_Ret, _Tp> mem_fun_ref(_Ret (_Tp::*__f)()) { return mem_fun_ref_t<_Ret, _Tp>(__f); } template<typename _Ret, typename _Tp> inline const_mem_fun_ref_t<_Ret, _Tp> mem_fun_ref(_Ret (_Tp::*__f)() const) { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } template<typename _Ret, typename _Tp, typename _Arg> inline mem_fun1_t<_Ret, _Tp, _Arg> mem_fun(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } template<typename _Ret, typename _Tp, typename _Arg> inline const_mem_fun1_t<_Ret, _Tp, _Arg> mem_fun(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } template<typename _Ret, typename _Tp, typename _Arg> inline mem_fun1_ref_t<_Ret, _Tp, _Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } template<typename _Ret, typename _Tp, typename _Arg> inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } } # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/binders.h" 1 3 # 60 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/binders.h" 3 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" namespace std __attribute__ ((__visibility__ ("default"))) { # 107 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/binders.h" 3 template<typename _Operation> class binder1st : public unary_function<typename _Operation::second_argument_type, typename _Operation::result_type> { protected: _Operation op; typename _Operation::first_argument_type value; public: binder1st(const _Operation& __x, const typename _Operation::first_argument_type& __y) : op(__x), value(__y) { } typename _Operation::result_type operator()(const typename _Operation::second_argument_type& __x) const { return op(value, __x); } typename _Operation::result_type operator()(typename _Operation::second_argument_type& __x) const { return op(value, __x); } } __attribute__ ((__deprecated__)); template<typename _Operation, typename _Tp> inline binder1st<_Operation> bind1st(const _Operation& __fn, const _Tp& __x) { typedef typename _Operation::first_argument_type _Arg1_type; return binder1st<_Operation>(__fn, _Arg1_type(__x)); } template<typename _Operation> class binder2nd : public unary_function<typename _Operation::first_argument_type, typename _Operation::result_type> { protected: _Operation op; typename _Operation::second_argument_type value; public: binder2nd(const _Operation& __x, const typename _Operation::second_argument_type& __y) : op(__x), value(__y) { } typename _Operation::result_type operator()(const typename _Operation::first_argument_type& __x) const { return op(__x, value); } typename _Operation::result_type operator()(typename _Operation::first_argument_type& __x) const { return op(__x, value); } } __attribute__ ((__deprecated__)); template<typename _Operation, typename _Tp> inline binder2nd<_Operation> bind2nd(const _Operation& __fn, const _Tp& __x) { typedef typename _Operation::second_argument_type _Arg2_type; return binder2nd<_Operation>(__fn, _Arg2_type(__x)); } } #pragma GCC diagnostic pop # 1369 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_function.h" 2 3 # 49 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/string" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/range_access.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/range_access.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/initializer_list" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/initializer_list" 3 #pragma GCC visibility push(default) namespace std { template<class _E> class initializer_list { public: typedef _E value_type; typedef const _E& reference; typedef const _E& const_reference; typedef size_t size_type; typedef const _E* iterator; typedef const _E* const_iterator; private: iterator _M_array; size_type _M_len; constexpr initializer_list(const_iterator __a, size_type __l) : _M_array(__a), _M_len(__l) { } public: constexpr initializer_list() noexcept : _M_array(0), _M_len(0) { } constexpr size_type size() const noexcept { return _M_len; } constexpr const_iterator begin() const noexcept { return _M_array; } constexpr const_iterator end() const noexcept { return begin() + size(); } }; template<class _Tp> constexpr const _Tp* begin(initializer_list<_Tp> __ils) noexcept { return __ils.begin(); } template<class _Tp> constexpr const _Tp* end(initializer_list<_Tp> __ils) noexcept { return __ils.end(); } } #pragma GCC visibility pop # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/range_access.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Container> inline auto begin(_Container& __cont) -> decltype(__cont.begin()) { return __cont.begin(); } template<typename _Container> inline auto begin(const _Container& __cont) -> decltype(__cont.begin()) { return __cont.begin(); } template<typename _Container> inline auto end(_Container& __cont) -> decltype(__cont.end()) { return __cont.end(); } template<typename _Container> inline auto end(const _Container& __cont) -> decltype(__cont.end()) { return __cont.end(); } template<typename _Tp, size_t _Nm> inline constexpr _Tp* begin(_Tp (&__arr)[_Nm]) { return __arr; } template<typename _Tp, size_t _Nm> inline constexpr _Tp* end(_Tp (&__arr)[_Nm]) { return __arr + _Nm; } template<typename _Tp> class valarray; template<typename _Tp> _Tp* begin(valarray<_Tp>&); template<typename _Tp> const _Tp* begin(const valarray<_Tp>&); template<typename _Tp> _Tp* end(valarray<_Tp>&); template<typename _Tp> const _Tp* end(const valarray<_Tp>&); template<typename _Container> inline constexpr auto cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont))) -> decltype(std::begin(__cont)) { return std::begin(__cont); } template<typename _Container> inline constexpr auto cend(const _Container& __cont) noexcept(noexcept(std::end(__cont))) -> decltype(std::end(__cont)) { return std::end(__cont); } template<typename _Container> inline auto rbegin(_Container& __cont) -> decltype(__cont.rbegin()) { return __cont.rbegin(); } template<typename _Container> inline auto rbegin(const _Container& __cont) -> decltype(__cont.rbegin()) { return __cont.rbegin(); } template<typename _Container> inline auto rend(_Container& __cont) -> decltype(__cont.rend()) { return __cont.rend(); } template<typename _Container> inline auto rend(const _Container& __cont) -> decltype(__cont.rend()) { return __cont.rend(); } template<typename _Tp, size_t _Nm> inline reverse_iterator<_Tp*> rbegin(_Tp (&__arr)[_Nm]) { return reverse_iterator<_Tp*>(__arr + _Nm); } template<typename _Tp, size_t _Nm> inline reverse_iterator<_Tp*> rend(_Tp (&__arr)[_Nm]) { return reverse_iterator<_Tp*>(__arr); } template<typename _Tp> inline reverse_iterator<const _Tp*> rbegin(initializer_list<_Tp> __il) { return reverse_iterator<const _Tp*>(__il.end()); } template<typename _Tp> inline reverse_iterator<const _Tp*> rend(initializer_list<_Tp> __il) { return reverse_iterator<const _Tp*>(__il.begin()); } template<typename _Container> inline auto crbegin(const _Container& __cont) -> decltype(std::rbegin(__cont)) { return std::rbegin(__cont); } template<typename _Container> inline auto crend(const _Container& __cont) -> decltype(std::rend(__cont)) { return std::rend(__cont); } # 324 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/range_access.h" 3 } # 52 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/string" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 1 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/atomicity.h" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/atomicity.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/gthr.h" 1 3 # 30 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/gthr.h" 3 #pragma GCC visibility push(default) # 148 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/gthr.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/gthr-default.h" 1 3 # 35 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/gthr-default.h" 3 # 1 "/usr/include/pthread.h" 1 3 4 # 23 "/usr/include/pthread.h" 3 4 # 1 "/usr/include/sched.h" 1 3 4 # 29 "/usr/include/sched.h" 3 4 # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 1 3 4 # 30 "/usr/include/sched.h" 2 3 4 # 43 "/usr/include/sched.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/sched.h" 1 3 4 # 74 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h" 3 4 struct sched_param { int sched_priority; }; # 75 "/usr/include/x86_64-linux-gnu/bits/sched.h" 2 3 4 extern "C" { extern int clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg, ...) throw (); extern int unshare (int __flags) throw (); extern int sched_getcpu (void) throw (); extern int setns (int __fd, int __nstype) throw (); } # 44 "/usr/include/sched.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 1 3 4 # 32 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4 typedef unsigned long int __cpu_mask; typedef struct { __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; } cpu_set_t; # 115 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4 extern "C" { extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) throw (); extern cpu_set_t *__sched_cpualloc (size_t __count) throw () ; extern void __sched_cpufree (cpu_set_t *__set) throw (); } # 45 "/usr/include/sched.h" 2 3 4 extern "C" { extern int sched_setparam (__pid_t __pid, const struct sched_param *__param) throw (); extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); extern int sched_setscheduler (__pid_t __pid, int __policy, const struct sched_param *__param) throw (); extern int sched_getscheduler (__pid_t __pid) throw (); extern int sched_yield (void) throw (); extern int sched_get_priority_max (int __algorithm) throw (); extern int sched_get_priority_min (int __algorithm) throw (); extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); # 121 "/usr/include/sched.h" 3 4 extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, const cpu_set_t *__cpuset) throw (); extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, cpu_set_t *__cpuset) throw (); } # 24 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/time.h" 1 3 4 # 29 "/usr/include/time.h" 3 4 # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 1 3 4 # 30 "/usr/include/time.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4 # 73 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/timex.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/timex.h" 3 4 struct timex { unsigned int modes; __syscall_slong_t offset; __syscall_slong_t freq; __syscall_slong_t maxerror; __syscall_slong_t esterror; int status; __syscall_slong_t constant; __syscall_slong_t precision; __syscall_slong_t tolerance; struct timeval time; __syscall_slong_t tick; __syscall_slong_t ppsfreq; __syscall_slong_t jitter; int shift; __syscall_slong_t stabil; __syscall_slong_t jitcnt; __syscall_slong_t calcnt; __syscall_slong_t errcnt; __syscall_slong_t stbcnt; int tai; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; }; # 74 "/usr/include/x86_64-linux-gnu/bits/time.h" 2 3 4 extern "C" { extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) throw (); } # 34 "/usr/include/time.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h" 1 3 4 struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; long int tm_gmtoff; const char *tm_zone; }; # 40 "/usr/include/time.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h" 1 3 4 struct itimerspec { struct timespec it_interval; struct timespec it_value; }; # 49 "/usr/include/time.h" 2 3 4 struct sigevent; # 68 "/usr/include/time.h" 3 4 extern "C" { extern clock_t clock (void) throw (); extern time_t time (time_t *__timer) throw (); extern double difftime (time_t __time1, time_t __time0) throw () __attribute__ ((__const__)); extern time_t mktime (struct tm *__tp) throw (); extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) throw (); extern char *strptime (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp) throw (); extern size_t strftime_l (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp, locale_t __loc) throw (); extern char *strptime_l (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp, locale_t __loc) throw (); extern struct tm *gmtime (const time_t *__timer) throw (); extern struct tm *localtime (const time_t *__timer) throw (); extern struct tm *gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) throw (); extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) throw (); extern char *asctime (const struct tm *__tp) throw (); extern char *ctime (const time_t *__timer) throw (); extern char *asctime_r (const struct tm *__restrict __tp, char *__restrict __buf) throw (); extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) throw (); extern char *__tzname[2]; extern int __daylight; extern long int __timezone; extern char *tzname[2]; extern void tzset (void) throw (); extern int daylight; extern long int timezone; extern int stime (const time_t *__when) throw (); # 196 "/usr/include/time.h" 3 4 extern time_t timegm (struct tm *__tp) throw (); extern time_t timelocal (struct tm *__tp) throw (); extern int dysize (int __year) throw () __attribute__ ((__const__)); # 211 "/usr/include/time.h" 3 4 extern int nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) throw (); extern int clock_nanosleep (clockid_t __clock_id, int __flags, const struct timespec *__req, struct timespec *__rem); extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) throw (); extern int timer_delete (timer_t __timerid) throw (); extern int timer_settime (timer_t __timerid, int __flags, const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) throw (); extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) throw (); extern int timer_getoverrun (timer_t __timerid) throw (); extern int timespec_get (struct timespec *__ts, int __base) throw () __attribute__ ((__nonnull__ (1))); # 280 "/usr/include/time.h" 3 4 extern int getdate_err; # 289 "/usr/include/time.h" 3 4 extern struct tm *getdate (const char *__string); # 303 "/usr/include/time.h" 3 4 extern int getdate_r (const char *__restrict __string, struct tm *__restrict __resbufp); } # 25 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 2 3 4 typedef long int __jmp_buf[8]; # 28 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 29 "/usr/include/pthread.h" 2 3 4 enum { PTHREAD_CREATE_JOINABLE, PTHREAD_CREATE_DETACHED }; enum { PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_ADAPTIVE_NP , PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP }; enum { PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_ROBUST, PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST }; enum { PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT }; # 115 "/usr/include/pthread.h" 3 4 enum { PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP }; # 156 "/usr/include/pthread.h" 3 4 enum { PTHREAD_INHERIT_SCHED, PTHREAD_EXPLICIT_SCHED }; enum { PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS }; enum { PTHREAD_PROCESS_PRIVATE, PTHREAD_PROCESS_SHARED }; # 191 "/usr/include/pthread.h" 3 4 struct _pthread_cleanup_buffer { void (*__routine) (void *); void *__arg; int __canceltype; struct _pthread_cleanup_buffer *__prev; }; enum { PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DISABLE }; enum { PTHREAD_CANCEL_DEFERRED, PTHREAD_CANCEL_ASYNCHRONOUS }; # 229 "/usr/include/pthread.h" 3 4 extern "C" { extern int pthread_create (pthread_t *__restrict __newthread, const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); extern int pthread_join (pthread_t __th, void **__thread_return); extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, const struct timespec *__abstime); extern int pthread_detach (pthread_t __th) throw (); extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () __attribute__ ((__const__)); extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_destroy (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, int *__detachstate) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, size_t *__guardsize) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, const struct sched_param *__restrict __param) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict __attr, int *__restrict __policy) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict __attr, int *__restrict __inherit) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, int *__restrict __scope) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) throw () __attribute__ ((__nonnull__ (1, 2, 3))); extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, size_t __cpusetsize, const cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (1, 3))); extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, size_t __cpusetsize, cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (1, 3))); extern int pthread_getattr_default_np (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_setattr_default_np (const pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (2))); extern int pthread_setschedparam (pthread_t __target_thread, int __policy, const struct sched_param *__param) throw () __attribute__ ((__nonnull__ (3))); extern int pthread_getschedparam (pthread_t __target_thread, int *__restrict __policy, struct sched_param *__restrict __param) throw () __attribute__ ((__nonnull__ (2, 3))); extern int pthread_setschedprio (pthread_t __target_thread, int __prio) throw (); extern int pthread_getname_np (pthread_t __target_thread, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern int pthread_setname_np (pthread_t __target_thread, const char *__name) throw () __attribute__ ((__nonnull__ (2))); extern int pthread_getconcurrency (void) throw (); extern int pthread_setconcurrency (int __level) throw (); extern int pthread_yield (void) throw (); extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, const cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (3))); extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (3))); # 495 "/usr/include/pthread.h" 3 4 extern int pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); # 507 "/usr/include/pthread.h" 3 4 extern int pthread_setcancelstate (int __state, int *__oldstate); extern int pthread_setcanceltype (int __type, int *__oldtype); extern int pthread_cancel (pthread_t __th); extern void pthread_testcancel (void); typedef struct { struct { __jmp_buf __cancel_jmp_buf; int __mask_was_saved; } __cancel_jmp_buf[1]; void *__pad[4]; } __pthread_unwind_buf_t __attribute__ ((__aligned__)); # 541 "/usr/include/pthread.h" 3 4 struct __pthread_cleanup_frame { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; }; # 681 "/usr/include/pthread.h" 3 4 extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) ; # 693 "/usr/include/pthread.h" 3 4 extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) ; # 716 "/usr/include/pthread.h" 3 4 extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) ; # 729 "/usr/include/pthread.h" 3 4 extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) ; extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) __attribute__ ((__noreturn__)) __attribute__ ((__weak__)) ; struct __jmp_buf_tag; extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); extern int pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__mutexattr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_lock (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_getprioceiling (const pthread_mutex_t * __restrict __mutex, int *__restrict __prioceiling) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, int __prioceiling, int *__restrict __old_ceiling) throw () __attribute__ ((__nonnull__ (1, 3))); extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); # 807 "/usr/include/pthread.h" 3 4 extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * __restrict __attr, int *__restrict __protocol) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, int __protocol) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * __restrict __attr, int *__restrict __prioceiling) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, int __prioceiling) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, int *__robustness) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr, int *__robustness) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, int __robustness) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, int __robustness) throw () __attribute__ ((__nonnull__ (1))); # 889 "/usr/include/pthread.h" 3 4 extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, const pthread_rwlockattr_t *__restrict __attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pref) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, int __pref) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_init (pthread_cond_t *__restrict __cond, const pthread_condattr_t *__restrict __cond_attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_destroy (pthread_cond_t *__cond) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_signal (pthread_cond_t *__cond) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_broadcast (pthread_cond_t *__cond) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex) __attribute__ ((__nonnull__ (1, 2))); # 1001 "/usr/include/pthread.h" 3 4 extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); extern int pthread_condattr_init (pthread_condattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_destroy (pthread_condattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_getpshared (const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_getclock (const pthread_condattr_t * __restrict __attr, __clockid_t *__restrict __clock_id) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_condattr_setclock (pthread_condattr_t *__attr, __clockid_t __clock_id) throw () __attribute__ ((__nonnull__ (1))); # 1045 "/usr/include/pthread.h" 3 4 extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_spin_destroy (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_spin_lock (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_spin_trylock (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_spin_unlock (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, const pthread_barrierattr_t *__restrict __attr, unsigned int __count) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_wait (pthread_barrier_t *__barrier) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); # 1112 "/usr/include/pthread.h" 3 4 extern int pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_key_delete (pthread_key_t __key) throw (); extern void *pthread_getspecific (pthread_key_t __key) throw (); extern int pthread_setspecific (pthread_key_t __key, const void *__pointer) throw () ; extern int pthread_getcpuclockid (pthread_t __thread_id, __clockid_t *__clock_id) throw () __attribute__ ((__nonnull__ (2))); # 1146 "/usr/include/pthread.h" 3 4 extern int pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) throw (); extern __inline __attribute__ ((__gnu_inline__)) int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () { return __thread1 == __thread2; } } # 36 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/gthr-default.h" 2 3 # 47 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/gthr-default.h" 3 typedef pthread_t __gthread_t; typedef pthread_key_t __gthread_key_t; typedef pthread_once_t __gthread_once_t; typedef pthread_mutex_t __gthread_mutex_t; typedef pthread_mutex_t __gthread_recursive_mutex_t; typedef pthread_cond_t __gthread_cond_t; typedef struct timespec __gthread_time_t; # 101 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/gthr-default.h" 3 static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); static __typeof(pthread_join) __gthrw_pthread_join __attribute__ ((__weakref__("pthread_join"))); static __typeof(pthread_equal) __gthrw_pthread_equal __attribute__ ((__weakref__("pthread_equal"))); static __typeof(pthread_self) __gthrw_pthread_self __attribute__ ((__weakref__("pthread_self"))); static __typeof(pthread_detach) __gthrw_pthread_detach __attribute__ ((__weakref__("pthread_detach"))); static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); static __typeof(sched_yield) __gthrw_sched_yield __attribute__ ((__weakref__("sched_yield"))); static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); static __typeof(pthread_mutex_timedlock) __gthrw_pthread_mutex_timedlock __attribute__ ((__weakref__("pthread_mutex_timedlock"))); static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); static __typeof(pthread_mutex_destroy) __gthrw_pthread_mutex_destroy __attribute__ ((__weakref__("pthread_mutex_destroy"))); static __typeof(pthread_cond_init) __gthrw_pthread_cond_init __attribute__ ((__weakref__("pthread_cond_init"))); static __typeof(pthread_cond_broadcast) __gthrw_pthread_cond_broadcast __attribute__ ((__weakref__("pthread_cond_broadcast"))); static __typeof(pthread_cond_signal) __gthrw_pthread_cond_signal __attribute__ ((__weakref__("pthread_cond_signal"))); static __typeof(pthread_cond_wait) __gthrw_pthread_cond_wait __attribute__ ((__weakref__("pthread_cond_wait"))); static __typeof(pthread_cond_timedwait) __gthrw_pthread_cond_timedwait __attribute__ ((__weakref__("pthread_cond_timedwait"))); static __typeof(pthread_cond_destroy) __gthrw_pthread_cond_destroy __attribute__ ((__weakref__("pthread_cond_destroy"))); static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); # 236 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/gthr-default.h" 3 static __typeof(pthread_key_create) __gthrw___pthread_key_create __attribute__ ((__weakref__("__pthread_key_create"))); # 246 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/gthr-default.h" 3 static inline int __gthread_active_p (void) { static void *const __gthread_active_ptr = __extension__ (void *) &__gthrw___pthread_key_create; return __gthread_active_ptr != 0; } # 658 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/gthr-default.h" 3 static inline int __gthread_create (__gthread_t *__threadid, void *(*__func) (void*), void *__args) { return __gthrw_pthread_create (__threadid, __null, __func, __args); } static inline int __gthread_join (__gthread_t __threadid, void **__value_ptr) { return __gthrw_pthread_join (__threadid, __value_ptr); } static inline int __gthread_detach (__gthread_t __threadid) { return __gthrw_pthread_detach (__threadid); } static inline int __gthread_equal (__gthread_t __t1, __gthread_t __t2) { return __gthrw_pthread_equal (__t1, __t2); } static inline __gthread_t __gthread_self (void) { return __gthrw_pthread_self (); } static inline int __gthread_yield (void) { return __gthrw_sched_yield (); } static inline int __gthread_once (__gthread_once_t *__once, void (*__func) (void)) { if (__gthread_active_p ()) return __gthrw_pthread_once (__once, __func); else return -1; } static inline int __gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) { return __gthrw_pthread_key_create (__key, __dtor); } static inline int __gthread_key_delete (__gthread_key_t __key) { return __gthrw_pthread_key_delete (__key); } static inline void * __gthread_getspecific (__gthread_key_t __key) { return __gthrw_pthread_getspecific (__key); } static inline int __gthread_setspecific (__gthread_key_t __key, const void *__ptr) { return __gthrw_pthread_setspecific (__key, __ptr); } static inline void __gthread_mutex_init_function (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) __gthrw_pthread_mutex_init (__mutex, __null); } static inline int __gthread_mutex_destroy (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_destroy (__mutex); else return 0; } static inline int __gthread_mutex_lock (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_lock (__mutex); else return 0; } static inline int __gthread_mutex_trylock (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_trylock (__mutex); else return 0; } static inline int __gthread_mutex_timedlock (__gthread_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_timedlock (__mutex, __abs_timeout); else return 0; } static inline int __gthread_mutex_unlock (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_unlock (__mutex); else return 0; } # 807 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/gthr-default.h" 3 static inline int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) { return __gthread_mutex_lock (__mutex); } static inline int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) { return __gthread_mutex_trylock (__mutex); } static inline int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { return __gthread_mutex_timedlock (__mutex, __abs_timeout); } static inline int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) { return __gthread_mutex_unlock (__mutex); } static inline int __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) { return __gthread_mutex_destroy (__mutex); } # 849 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/gthr-default.h" 3 static inline int __gthread_cond_broadcast (__gthread_cond_t *__cond) { return __gthrw_pthread_cond_broadcast (__cond); } static inline int __gthread_cond_signal (__gthread_cond_t *__cond) { return __gthrw_pthread_cond_signal (__cond); } static inline int __gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) { return __gthrw_pthread_cond_wait (__cond, __mutex); } static inline int __gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { return __gthrw_pthread_cond_timedwait (__cond, __mutex, __abs_timeout); } static inline int __gthread_cond_wait_recursive (__gthread_cond_t *__cond, __gthread_recursive_mutex_t *__mutex) { return __gthread_cond_wait (__cond, __mutex); } static inline int __gthread_cond_destroy (__gthread_cond_t* __cond) { return __gthrw_pthread_cond_destroy (__cond); } # 149 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/gthr.h" 2 3 #pragma GCC visibility pop # 36 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/atomicity.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/atomic_word.h" 1 3 # 32 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/atomic_word.h" 3 typedef int _Atomic_word; # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/atomicity.h" 2 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { static inline _Atomic_word __exchange_and_add(volatile _Atomic_word* __mem, int __val) { return __atomic_fetch_add(__mem, __val, 4); } static inline void __atomic_add(volatile _Atomic_word* __mem, int __val) { __atomic_fetch_add(__mem, __val, 4); } # 64 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/atomicity.h" 3 static inline _Atomic_word __exchange_and_add_single(_Atomic_word* __mem, int __val) { _Atomic_word __result = *__mem; *__mem += __val; return __result; } static inline void __atomic_add_single(_Atomic_word* __mem, int __val) { *__mem += __val; } static inline _Atomic_word __attribute__ ((__unused__)) __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) { if (__gthread_active_p()) return __exchange_and_add(__mem, __val); else return __exchange_and_add_single(__mem, __val); } static inline void __attribute__ ((__unused__)) __atomic_add_dispatch(_Atomic_word* __mem, int __val) { if (__gthread_active_p()) __atomic_add(__mem, __val); else __atomic_add_single(__mem, __val); } } # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/alloc_traits.h" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/alloc_traits.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h" 1 3 # 41 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { struct __allocator_traits_base { template<typename _Tp, typename _Up, typename = void> struct __rebind : __replace_first_arg<_Tp, _Up> { }; template<typename _Tp, typename _Up> struct __rebind<_Tp, _Up, __void_t<typename _Tp::template rebind<_Up>::other>> { using type = typename _Tp::template rebind<_Up>::other; }; protected: template<typename _Tp> using __pointer = typename _Tp::pointer; template<typename _Tp> using __c_pointer = typename _Tp::const_pointer; template<typename _Tp> using __v_pointer = typename _Tp::void_pointer; template<typename _Tp> using __cv_pointer = typename _Tp::const_void_pointer; template<typename _Tp> using __pocca = typename _Tp::propagate_on_container_copy_assignment; template<typename _Tp> using __pocma = typename _Tp::propagate_on_container_move_assignment; template<typename _Tp> using __pocs = typename _Tp::propagate_on_container_swap; template<typename _Tp> using __equal = typename _Tp::is_always_equal; }; template<typename _Alloc, typename _Up> using __alloc_rebind = typename __allocator_traits_base::template __rebind<_Alloc, _Up>::type; template<typename _Alloc> struct allocator_traits : __allocator_traits_base { typedef _Alloc allocator_type; typedef typename _Alloc::value_type value_type; using pointer = __detected_or_t<value_type*, __pointer, _Alloc>; private: template<template<typename> class _Func, typename _Tp, typename = void> struct _Ptr { using type = typename pointer_traits<pointer>::template rebind<_Tp>; }; template<template<typename> class _Func, typename _Tp> struct _Ptr<_Func, _Tp, __void_t<_Func<_Alloc>>> { using type = _Func<_Alloc>; }; template<typename _A2, typename _PtrT, typename = void> struct _Diff { using type = typename pointer_traits<_PtrT>::difference_type; }; template<typename _A2, typename _PtrT> struct _Diff<_A2, _PtrT, __void_t<typename _A2::difference_type>> { using type = typename _A2::difference_type; }; template<typename _A2, typename _DiffT, typename = void> struct _Size : make_unsigned<_DiffT> { }; template<typename _A2, typename _DiffT> struct _Size<_A2, _DiffT, __void_t<typename _A2::size_type>> { using type = typename _A2::size_type; }; public: using const_pointer = typename _Ptr<__c_pointer, const value_type>::type; using void_pointer = typename _Ptr<__v_pointer, void>::type; using const_void_pointer = typename _Ptr<__cv_pointer, const void>::type; using difference_type = typename _Diff<_Alloc, pointer>::type; using size_type = typename _Size<_Alloc, difference_type>::type; using propagate_on_container_copy_assignment = __detected_or_t<false_type, __pocca, _Alloc>; using propagate_on_container_move_assignment = __detected_or_t<false_type, __pocma, _Alloc>; using propagate_on_container_swap = __detected_or_t<false_type, __pocs, _Alloc>; using is_always_equal = __detected_or_t<typename is_empty<_Alloc>::type, __equal, _Alloc>; template<typename _Tp> using rebind_alloc = __alloc_rebind<_Alloc, _Tp>; template<typename _Tp> using rebind_traits = allocator_traits<rebind_alloc<_Tp>>; private: template<typename _Alloc2> static auto _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint, int) -> decltype(__a.allocate(__n, __hint)) { return __a.allocate(__n, __hint); } template<typename _Alloc2> static pointer _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer, ...) { return __a.allocate(__n); } template<typename _Tp, typename... _Args> struct __construct_helper { template<typename _Alloc2, typename = decltype(std::declval<_Alloc2*>()->construct( std::declval<_Tp*>(), std::declval<_Args>()...))> static true_type __test(int); template<typename> static false_type __test(...); using type = decltype(__test<_Alloc>(0)); }; template<typename _Tp, typename... _Args> using __has_construct = typename __construct_helper<_Tp, _Args...>::type; template<typename _Tp, typename... _Args> static _Require<__has_construct<_Tp, _Args...>> _S_construct(_Alloc& __a, _Tp* __p, _Args&&... __args) { __a.construct(__p, std::forward<_Args>(__args)...); } template<typename _Tp, typename... _Args> static _Require<__and_<__not_<__has_construct<_Tp, _Args...>>, is_constructible<_Tp, _Args...>>> _S_construct(_Alloc&, _Tp* __p, _Args&&... __args) { ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); } template<typename _Alloc2, typename _Tp> static auto _S_destroy(_Alloc2& __a, _Tp* __p, int) -> decltype(__a.destroy(__p)) { __a.destroy(__p); } template<typename _Alloc2, typename _Tp> static void _S_destroy(_Alloc2&, _Tp* __p, ...) { __p->~_Tp(); } template<typename _Alloc2> static auto _S_max_size(_Alloc2& __a, int) -> decltype(__a.max_size()) { return __a.max_size(); } template<typename _Alloc2> static size_type _S_max_size(_Alloc2&, ...) { return __gnu_cxx::__numeric_traits<size_type>::__max / sizeof(value_type); } template<typename _Alloc2> static auto _S_select(_Alloc2& __a, int) -> decltype(__a.select_on_container_copy_construction()) { return __a.select_on_container_copy_construction(); } template<typename _Alloc2> static _Alloc2 _S_select(_Alloc2& __a, ...) { return __a; } public: # 299 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h" 3 static pointer allocate(_Alloc& __a, size_type __n) { return __a.allocate(__n); } # 314 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h" 3 static pointer allocate(_Alloc& __a, size_type __n, const_void_pointer __hint) { return _S_allocate(__a, __n, __hint, 0); } # 326 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h" 3 static void deallocate(_Alloc& __a, pointer __p, size_type __n) { __a.deallocate(__p, __n); } # 341 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h" 3 template<typename _Tp, typename... _Args> static auto construct(_Alloc& __a, _Tp* __p, _Args&&... __args) -> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...)) { _S_construct(__a, __p, std::forward<_Args>(__args)...); } # 354 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h" 3 template<typename _Tp> static void destroy(_Alloc& __a, _Tp* __p) { _S_destroy(__a, __p, 0); } # 366 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h" 3 static size_type max_size(const _Alloc& __a) noexcept { return _S_max_size(__a, 0); } # 377 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h" 3 static _Alloc select_on_container_copy_construction(const _Alloc& __rhs) { return _S_select(__rhs, 0); } }; template<typename _Tp> struct allocator_traits<allocator<_Tp>> { using allocator_type = allocator<_Tp>; using value_type = _Tp; using pointer = _Tp*; using const_pointer = const _Tp*; using void_pointer = void*; using const_void_pointer = const void*; using difference_type = std::ptrdiff_t; using size_type = std::size_t; using propagate_on_container_copy_assignment = false_type; using propagate_on_container_move_assignment = true_type; using propagate_on_container_swap = false_type; using is_always_equal = true_type; template<typename _Up> using rebind_alloc = allocator<_Up>; template<typename _Up> using rebind_traits = allocator_traits<allocator<_Up>>; # 434 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h" 3 static pointer allocate(allocator_type& __a, size_type __n) { return __a.allocate(__n); } # 448 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h" 3 static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) { return __a.allocate(__n, __hint); } # 460 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h" 3 static void deallocate(allocator_type& __a, pointer __p, size_type __n) { __a.deallocate(__p, __n); } # 472 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h" 3 template<typename _Up, typename... _Args> static void construct(allocator_type& __a, _Up* __p, _Args&&... __args) { __a.construct(__p, std::forward<_Args>(__args)...); } # 484 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h" 3 template<typename _Up> static void destroy(allocator_type& __a, _Up* __p) { __a.destroy(__p); } static size_type max_size(const allocator_type& __a) noexcept { return __a.max_size(); } static allocator_type select_on_container_copy_construction(const allocator_type& __rhs) { return __rhs; } }; template<typename _Alloc> inline void __do_alloc_on_copy(_Alloc& __one, const _Alloc& __two, true_type) { __one = __two; } template<typename _Alloc> inline void __do_alloc_on_copy(_Alloc&, const _Alloc&, false_type) { } template<typename _Alloc> inline void __alloc_on_copy(_Alloc& __one, const _Alloc& __two) { typedef allocator_traits<_Alloc> __traits; typedef typename __traits::propagate_on_container_copy_assignment __pocca; __do_alloc_on_copy(__one, __two, __pocca()); } template<typename _Alloc> inline _Alloc __alloc_on_copy(const _Alloc& __a) { typedef allocator_traits<_Alloc> __traits; return __traits::select_on_container_copy_construction(__a); } template<typename _Alloc> inline void __do_alloc_on_move(_Alloc& __one, _Alloc& __two, true_type) { __one = std::move(__two); } template<typename _Alloc> inline void __do_alloc_on_move(_Alloc&, _Alloc&, false_type) { } template<typename _Alloc> inline void __alloc_on_move(_Alloc& __one, _Alloc& __two) { typedef allocator_traits<_Alloc> __traits; typedef typename __traits::propagate_on_container_move_assignment __pocma; __do_alloc_on_move(__one, __two, __pocma()); } template<typename _Alloc> inline void __do_alloc_on_swap(_Alloc& __one, _Alloc& __two, true_type) { using std::swap; swap(__one, __two); } template<typename _Alloc> inline void __do_alloc_on_swap(_Alloc&, _Alloc&, false_type) { } template<typename _Alloc> inline void __alloc_on_swap(_Alloc& __one, _Alloc& __two) { typedef allocator_traits<_Alloc> __traits; typedef typename __traits::propagate_on_container_swap __pocs; __do_alloc_on_swap(__one, __two, __pocs()); } template<typename _Alloc> class __is_copy_insertable_impl { typedef allocator_traits<_Alloc> _Traits; template<typename _Up, typename = decltype(_Traits::construct(std::declval<_Alloc&>(), std::declval<_Up*>(), std::declval<const _Up&>()))> static true_type _M_select(int); template<typename _Up> static false_type _M_select(...); public: typedef decltype(_M_select<typename _Alloc::value_type>(0)) type; }; template<typename _Alloc> struct __is_copy_insertable : __is_copy_insertable_impl<_Alloc>::type { }; template<typename _Tp> struct __is_copy_insertable<allocator<_Tp>> : is_copy_constructible<_Tp> { }; template<typename _Alloc, typename = void> struct __is_allocator : false_type { }; template<typename _Alloc> struct __is_allocator<_Alloc, __void_t<typename _Alloc::value_type, decltype(std::declval<_Alloc&>().allocate(size_t{}))>> : true_type { }; template<typename _Alloc> using _RequireAllocator = typename enable_if<__is_allocator<_Alloc>::value, _Alloc>::type; } # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/alloc_traits.h" 2 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template<typename _Alloc, typename = typename _Alloc::value_type> struct __alloc_traits : std::allocator_traits<_Alloc> { typedef _Alloc allocator_type; typedef std::allocator_traits<_Alloc> _Base_type; typedef typename _Base_type::value_type value_type; typedef typename _Base_type::pointer pointer; typedef typename _Base_type::const_pointer const_pointer; typedef typename _Base_type::size_type size_type; typedef typename _Base_type::difference_type difference_type; typedef value_type& reference; typedef const value_type& const_reference; using _Base_type::allocate; using _Base_type::deallocate; using _Base_type::construct; using _Base_type::destroy; using _Base_type::max_size; private: template<typename _Ptr> using __is_custom_pointer = std::__and_<std::is_same<pointer, _Ptr>, std::__not_<std::is_pointer<_Ptr>>>; public: template<typename _Ptr, typename... _Args> static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type construct(_Alloc& __a, _Ptr __p, _Args&&... __args) { _Base_type::construct(__a, std::__to_address(__p), std::forward<_Args>(__args)...); } template<typename _Ptr> static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type destroy(_Alloc& __a, _Ptr __p) { _Base_type::destroy(__a, std::__to_address(__p)); } static _Alloc _S_select_on_copy(const _Alloc& __a) { return _Base_type::select_on_container_copy_construction(__a); } static void _S_on_swap(_Alloc& __a, _Alloc& __b) { std::__alloc_on_swap(__a, __b); } static constexpr bool _S_propagate_on_copy_assign() { return _Base_type::propagate_on_container_copy_assignment::value; } static constexpr bool _S_propagate_on_move_assign() { return _Base_type::propagate_on_container_move_assignment::value; } static constexpr bool _S_propagate_on_swap() { return _Base_type::propagate_on_container_swap::value; } static constexpr bool _S_always_equal() { return _Base_type::is_always_equal::value; } static constexpr bool _S_nothrow_move() { return _S_propagate_on_move_assign() || _S_always_equal(); } template<typename _Tp> struct rebind { typedef typename _Base_type::template rebind_alloc<_Tp> other; }; # 158 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/alloc_traits.h" 3 }; } # 41 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 2 3 # 52 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { namespace __cxx11 { # 76 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<typename _CharT, typename _Traits, typename _Alloc> class basic_string { typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_CharT>::other _Char_alloc_type; typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits; public: typedef _Traits traits_type; typedef typename _Traits::char_type value_type; typedef _Char_alloc_type allocator_type; typedef typename _Alloc_traits::size_type size_type; typedef typename _Alloc_traits::difference_type difference_type; typedef typename _Alloc_traits::reference reference; typedef typename _Alloc_traits::const_reference const_reference; typedef typename _Alloc_traits::pointer pointer; typedef typename _Alloc_traits::const_pointer const_pointer; typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator; typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string> const_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; static const size_type npos = static_cast<size_type>(-1); private: typedef const_iterator __const_iterator; # 139 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 struct _Alloc_hider : allocator_type { _Alloc_hider(pointer __dat, const _Alloc& __a) : allocator_type(__a), _M_p(__dat) { } _Alloc_hider(pointer __dat, _Alloc&& __a = _Alloc()) : allocator_type(std::move(__a)), _M_p(__dat) { } pointer _M_p; }; _Alloc_hider _M_dataplus; size_type _M_string_length; enum { _S_local_capacity = 15 / sizeof(_CharT) }; union { _CharT _M_local_buf[_S_local_capacity + 1]; size_type _M_allocated_capacity; }; void _M_data(pointer __p) { _M_dataplus._M_p = __p; } void _M_length(size_type __length) { _M_string_length = __length; } pointer _M_data() const { return _M_dataplus._M_p; } pointer _M_local_data() { return std::pointer_traits<pointer>::pointer_to(*_M_local_buf); } const_pointer _M_local_data() const { return std::pointer_traits<const_pointer>::pointer_to(*_M_local_buf); } void _M_capacity(size_type __capacity) { _M_allocated_capacity = __capacity; } void _M_set_length(size_type __n) { _M_length(__n); traits_type::assign(_M_data()[__n], _CharT()); } bool _M_is_local() const { return _M_data() == _M_local_data(); } pointer _M_create(size_type&, size_type); void _M_dispose() { if (!_M_is_local()) _M_destroy(_M_allocated_capacity); } void _M_destroy(size_type __size) throw() { _Alloc_traits::deallocate(_M_get_allocator(), _M_data(), __size + 1); } template<typename _InIterator> void _M_construct_aux(_InIterator __beg, _InIterator __end, std::__false_type) { typedef typename iterator_traits<_InIterator>::iterator_category _Tag; _M_construct(__beg, __end, _Tag()); } template<typename _Integer> void _M_construct_aux(_Integer __beg, _Integer __end, std::__true_type) { _M_construct_aux_2(static_cast<size_type>(__beg), __end); } void _M_construct_aux_2(size_type __req, _CharT __c) { _M_construct(__req, __c); } template<typename _InIterator> void _M_construct(_InIterator __beg, _InIterator __end) { typedef typename std::__is_integer<_InIterator>::__type _Integral; _M_construct_aux(__beg, __end, _Integral()); } template<typename _InIterator> void _M_construct(_InIterator __beg, _InIterator __end, std::input_iterator_tag); template<typename _FwdIterator> void _M_construct(_FwdIterator __beg, _FwdIterator __end, std::forward_iterator_tag); void _M_construct(size_type __req, _CharT __c); allocator_type& _M_get_allocator() { return _M_dataplus; } const allocator_type& _M_get_allocator() const { return _M_dataplus; } private: # 298 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type _M_check(size_type __pos, const char* __s) const { if (__pos > this->size()) __throw_out_of_range_fmt(("%s: __pos (which is %zu) > " "this->size() (which is %zu)"), __s, __pos, this->size()); return __pos; } void _M_check_length(size_type __n1, size_type __n2, const char* __s) const { if (this->max_size() - (this->size() - __n1) < __n2) __throw_length_error((__s)); } size_type _M_limit(size_type __pos, size_type __off) const noexcept { const bool __testoff = __off < this->size() - __pos; return __testoff ? __off : this->size() - __pos; } bool _M_disjunct(const _CharT* __s) const noexcept { return (less<const _CharT*>()(__s, _M_data()) || less<const _CharT*>()(_M_data() + this->size(), __s)); } static void _S_copy(_CharT* __d, const _CharT* __s, size_type __n) { if (__n == 1) traits_type::assign(*__d, *__s); else traits_type::copy(__d, __s, __n); } static void _S_move(_CharT* __d, const _CharT* __s, size_type __n) { if (__n == 1) traits_type::assign(*__d, *__s); else traits_type::move(__d, __s, __n); } static void _S_assign(_CharT* __d, size_type __n, _CharT __c) { if (__n == 1) traits_type::assign(*__d, __c); else traits_type::assign(__d, __n, __c); } template<class _Iterator> static void _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) { for (; __k1 != __k2; ++__k1, (void)++__p) traits_type::assign(*__p, *__k1); } static void _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) noexcept { _S_copy_chars(__p, __k1.base(), __k2.base()); } static void _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) noexcept { _S_copy_chars(__p, __k1.base(), __k2.base()); } static void _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) noexcept { _S_copy(__p, __k1, __k2 - __k1); } static void _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) noexcept { _S_copy(__p, __k1, __k2 - __k1); } static int _S_compare(size_type __n1, size_type __n2) noexcept { const difference_type __d = difference_type(__n1 - __n2); if (__d > __gnu_cxx::__numeric_traits<int>::__max) return __gnu_cxx::__numeric_traits<int>::__max; else if (__d < __gnu_cxx::__numeric_traits<int>::__min) return __gnu_cxx::__numeric_traits<int>::__min; else return int(__d); } void _M_assign(const basic_string&); void _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, size_type __len2); void _M_erase(size_type __pos, size_type __n); public: basic_string() noexcept(is_nothrow_default_constructible<_Alloc>::value) : _M_dataplus(_M_local_data()) { _M_set_length(0); } explicit basic_string(const _Alloc& __a) noexcept : _M_dataplus(_M_local_data(), __a) { _M_set_length(0); } basic_string(const basic_string& __str) : _M_dataplus(_M_local_data(), _Alloc_traits::_S_select_on_copy(__str._M_get_allocator())) { _M_construct(__str._M_data(), __str._M_data() + __str.length()); } # 450 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string(const basic_string& __str, size_type __pos, const _Alloc& __a = _Alloc()) : _M_dataplus(_M_local_data(), __a) { const _CharT* __start = __str._M_data() + __str._M_check(__pos, "basic_string::basic_string"); _M_construct(__start, __start + __str._M_limit(__pos, npos)); } basic_string(const basic_string& __str, size_type __pos, size_type __n) : _M_dataplus(_M_local_data()) { const _CharT* __start = __str._M_data() + __str._M_check(__pos, "basic_string::basic_string"); _M_construct(__start, __start + __str._M_limit(__pos, __n)); } # 481 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Alloc& __a) : _M_dataplus(_M_local_data(), __a) { const _CharT* __start = __str._M_data() + __str._M_check(__pos, "string::string"); _M_construct(__start, __start + __str._M_limit(__pos, __n)); } # 499 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string(const _CharT* __s, size_type __n, const _Alloc& __a = _Alloc()) : _M_dataplus(_M_local_data(), __a) { _M_construct(__s, __s + __n); } # 514 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) : _M_dataplus(_M_local_data(), __a) { _M_construct(__s, __s ? __s + traits_type::length(__s) : __s+npos); } # 529 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) : _M_dataplus(_M_local_data(), __a) { _M_construct(__n, __c); } # 541 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string(basic_string&& __str) noexcept : _M_dataplus(_M_local_data(), std::move(__str._M_get_allocator())) { if (__str._M_is_local()) { traits_type::copy(_M_local_buf, __str._M_local_buf, _S_local_capacity + 1); } else { _M_data(__str._M_data()); _M_capacity(__str._M_allocated_capacity); } _M_length(__str.length()); __str._M_data(__str._M_local_data()); __str._M_set_length(0); } basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) : _M_dataplus(_M_local_data(), __a) { _M_construct(__l.begin(), __l.end()); } basic_string(const basic_string& __str, const _Alloc& __a) : _M_dataplus(_M_local_data(), __a) { _M_construct(__str.begin(), __str.end()); } basic_string(basic_string&& __str, const _Alloc& __a) noexcept(_Alloc_traits::_S_always_equal()) : _M_dataplus(_M_local_data(), __a) { if (__str._M_is_local()) { traits_type::copy(_M_local_buf, __str._M_local_buf, _S_local_capacity + 1); _M_length(__str.length()); __str._M_set_length(0); } else if (_Alloc_traits::_S_always_equal() || __str.get_allocator() == __a) { _M_data(__str._M_data()); _M_length(__str.length()); _M_capacity(__str._M_allocated_capacity); __str._M_data(__str._M_local_buf); __str._M_set_length(0); } else _M_construct(__str.begin(), __str.end()); } # 609 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a = _Alloc()) : _M_dataplus(_M_local_data(), __a) { _M_construct(__beg, __end); } # 656 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 ~basic_string() { _M_dispose(); } basic_string& operator=(const basic_string& __str) { if (_Alloc_traits::_S_propagate_on_copy_assign()) { if (!_Alloc_traits::_S_always_equal() && !_M_is_local() && _M_get_allocator() != __str._M_get_allocator()) { if (__str.size() <= _S_local_capacity) { _M_destroy(_M_allocated_capacity); _M_data(_M_local_data()); _M_set_length(0); } else { const auto __len = __str.size(); auto __alloc = __str._M_get_allocator(); auto __ptr = _Alloc_traits::allocate(__alloc, __len + 1); _M_destroy(_M_allocated_capacity); _M_data(__ptr); _M_capacity(__len); _M_set_length(__len); } } std::__alloc_on_copy(_M_get_allocator(), __str._M_get_allocator()); } return this->assign(__str); } basic_string& operator=(const _CharT* __s) { return this->assign(__s); } # 713 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& operator=(_CharT __c) { this->assign(1, __c); return *this; } # 731 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& operator=(basic_string&& __str) noexcept(_Alloc_traits::_S_nothrow_move()) { if (!_M_is_local() && _Alloc_traits::_S_propagate_on_move_assign() && !_Alloc_traits::_S_always_equal() && _M_get_allocator() != __str._M_get_allocator()) { _M_destroy(_M_allocated_capacity); _M_data(_M_local_data()); _M_set_length(0); } std::__alloc_on_move(_M_get_allocator(), __str._M_get_allocator()); if (__str._M_is_local()) { if (__str.size()) this->_S_copy(_M_data(), __str._M_data(), __str.size()); _M_set_length(__str.size()); } else if (_Alloc_traits::_S_propagate_on_move_assign() || _Alloc_traits::_S_always_equal() || _M_get_allocator() == __str._M_get_allocator()) { pointer __data = nullptr; size_type __capacity; if (!_M_is_local()) { if (_Alloc_traits::_S_always_equal()) { __data = _M_data(); __capacity = _M_allocated_capacity; } else _M_destroy(_M_allocated_capacity); } _M_data(__str._M_data()); _M_length(__str.length()); _M_capacity(__str._M_allocated_capacity); if (__data) { __str._M_data(__data); __str._M_capacity(__capacity); } else __str._M_data(__str._M_local_buf); } else assign(__str); __str.clear(); return *this; } basic_string& operator=(initializer_list<_CharT> __l) { this->assign(__l.begin(), __l.size()); return *this; } # 825 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 iterator begin() noexcept { return iterator(_M_data()); } const_iterator begin() const noexcept { return const_iterator(_M_data()); } iterator end() noexcept { return iterator(_M_data() + this->size()); } const_iterator end() const noexcept { return const_iterator(_M_data() + this->size()); } reverse_iterator rbegin() noexcept { return reverse_iterator(this->end()); } const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(this->end()); } reverse_iterator rend() noexcept { return reverse_iterator(this->begin()); } const_reverse_iterator rend() const noexcept { return const_reverse_iterator(this->begin()); } const_iterator cbegin() const noexcept { return const_iterator(this->_M_data()); } const_iterator cend() const noexcept { return const_iterator(this->_M_data() + this->size()); } const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(this->end()); } const_reverse_iterator crend() const noexcept { return const_reverse_iterator(this->begin()); } public: size_type size() const noexcept { return _M_string_length; } size_type length() const noexcept { return _M_string_length; } size_type max_size() const noexcept { return (_Alloc_traits::max_size(_M_get_allocator()) - 1) / 2; } # 954 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 void resize(size_type __n, _CharT __c); # 967 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 void resize(size_type __n) { this->resize(__n, _CharT()); } void shrink_to_fit() noexcept { # 985 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 } size_type capacity() const noexcept { return _M_is_local() ? size_type(_S_local_capacity) : _M_allocated_capacity; } # 1016 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 void reserve(size_type __res_arg = 0); void clear() noexcept { _M_set_length(0); } bool empty() const noexcept { return this->size() == 0; } # 1045 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 const_reference operator[] (size_type __pos) const noexcept { ; return _M_data()[__pos]; } # 1062 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 reference operator[](size_type __pos) { ; ; return _M_data()[__pos]; } # 1083 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 const_reference at(size_type __n) const { if (__n >= this->size()) __throw_out_of_range_fmt(("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)"), __n, this->size()); return _M_data()[__n]; } # 1104 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 reference at(size_type __n) { if (__n >= size()) __throw_out_of_range_fmt(("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)"), __n, this->size()); return _M_data()[__n]; } reference front() noexcept { ; return operator[](0); } const_reference front() const noexcept { ; return operator[](0); } reference back() noexcept { ; return operator[](this->size() - 1); } const_reference back() const noexcept { ; return operator[](this->size() - 1); } # 1167 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& operator+=(const basic_string& __str) { return this->append(__str); } basic_string& operator+=(const _CharT* __s) { return this->append(__s); } basic_string& operator+=(_CharT __c) { this->push_back(__c); return *this; } basic_string& operator+=(initializer_list<_CharT> __l) { return this->append(__l.begin(), __l.size()); } # 1220 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& append(const basic_string& __str) { return _M_append(__str._M_data(), __str.size()); } # 1237 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& append(const basic_string& __str, size_type __pos, size_type __n = npos) { return _M_append(__str._M_data() + __str._M_check(__pos, "basic_string::append"), __str._M_limit(__pos, __n)); } basic_string& append(const _CharT* __s, size_type __n) { ; _M_check_length(size_type(0), __n, "basic_string::append"); return _M_append(__s, __n); } basic_string& append(const _CharT* __s) { ; const size_type __n = traits_type::length(__s); _M_check_length(size_type(0), __n, "basic_string::append"); return _M_append(__s, __n); } # 1279 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& append(size_type __n, _CharT __c) { return _M_replace_aux(this->size(), size_type(0), __n, __c); } basic_string& append(initializer_list<_CharT> __l) { return this->append(__l.begin(), __l.size()); } # 1303 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<class _InputIterator, typename = std::_RequireInputIter<_InputIterator>> basic_string& append(_InputIterator __first, _InputIterator __last) { return this->replace(end(), end(), __first, __last); } # 1348 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 void push_back(_CharT __c) { const size_type __size = this->size(); if (__size + 1 > this->capacity()) this->_M_mutate(__size, size_type(0), 0, size_type(1)); traits_type::assign(this->_M_data()[__size], __c); this->_M_set_length(__size + 1); } basic_string& assign(const basic_string& __str) { this->_M_assign(__str); return *this; } # 1379 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& assign(basic_string&& __str) noexcept(_Alloc_traits::_S_nothrow_move()) { return *this = std::move(__str); } # 1402 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& assign(const basic_string& __str, size_type __pos, size_type __n = npos) { return _M_replace(size_type(0), this->size(), __str._M_data() + __str._M_check(__pos, "basic_string::assign"), __str._M_limit(__pos, __n)); } # 1418 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& assign(const _CharT* __s, size_type __n) { ; return _M_replace(size_type(0), this->size(), __s, __n); } # 1434 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& assign(const _CharT* __s) { ; return _M_replace(size_type(0), this->size(), __s, traits_type::length(__s)); } # 1451 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& assign(size_type __n, _CharT __c) { return _M_replace_aux(size_type(0), this->size(), __n, __c); } # 1464 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<class _InputIterator, typename = std::_RequireInputIter<_InputIterator>> basic_string& assign(_InputIterator __first, _InputIterator __last) { return this->replace(begin(), end(), __first, __last); } basic_string& assign(initializer_list<_CharT> __l) { return this->assign(__l.begin(), __l.size()); } # 1532 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 iterator insert(const_iterator __p, size_type __n, _CharT __c) { ; const size_type __pos = __p - begin(); this->replace(__p, __p, __n, __c); return iterator(this->_M_data() + __pos); } # 1574 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<class _InputIterator, typename = std::_RequireInputIter<_InputIterator>> iterator insert(const_iterator __p, _InputIterator __beg, _InputIterator __end) { ; const size_type __pos = __p - begin(); this->replace(__p, __p, __beg, __end); return iterator(this->_M_data() + __pos); } # 1610 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 void insert(iterator __p, initializer_list<_CharT> __l) { ; this->insert(__p - begin(), __l.begin(), __l.size()); } # 1630 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& insert(size_type __pos1, const basic_string& __str) { return this->replace(__pos1, size_type(0), __str._M_data(), __str.size()); } # 1653 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n = npos) { return this->replace(__pos1, size_type(0), __str._M_data() + __str._M_check(__pos2, "basic_string::insert"), __str._M_limit(__pos2, __n)); } # 1676 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& insert(size_type __pos, const _CharT* __s, size_type __n) { return this->replace(__pos, size_type(0), __s, __n); } # 1695 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& insert(size_type __pos, const _CharT* __s) { ; return this->replace(__pos, size_type(0), __s, traits_type::length(__s)); } # 1719 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& insert(size_type __pos, size_type __n, _CharT __c) { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), size_type(0), __n, __c); } # 1737 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 iterator insert(__const_iterator __p, _CharT __c) { ; const size_type __pos = __p - begin(); _M_replace_aux(__pos, size_type(0), size_type(1), __c); return iterator(_M_data() + __pos); } # 1797 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& erase(size_type __pos = 0, size_type __n = npos) { _M_check(__pos, "basic_string::erase"); if (__n == npos) this->_M_set_length(__pos); else if (__n != 0) this->_M_erase(__pos, _M_limit(__pos, __n)); return *this; } # 1816 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 iterator erase(__const_iterator __position) { ; const size_type __pos = __position - begin(); this->_M_erase(__pos, size_type(1)); return iterator(_M_data() + __pos); } # 1835 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 iterator erase(__const_iterator __first, __const_iterator __last) { ; const size_type __pos = __first - begin(); if (__last == end()) this->_M_set_length(__pos); else this->_M_erase(__pos, __last - __first); return iterator(this->_M_data() + __pos); } void pop_back() noexcept { ; _M_erase(size() - 1, 1); } # 1879 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& replace(size_type __pos, size_type __n, const basic_string& __str) { return this->replace(__pos, __n, __str._M_data(), __str.size()); } # 1901 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2 = npos) { return this->replace(__pos1, __n1, __str._M_data() + __str._M_check(__pos2, "basic_string::replace"), __str._M_limit(__pos2, __n2)); } # 1926 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) { ; return _M_replace(_M_check(__pos, "basic_string::replace"), _M_limit(__pos, __n1), __s, __n2); } # 1951 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s) { ; return this->replace(__pos, __n1, __s, traits_type::length(__s)); } # 1975 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), _M_limit(__pos, __n1), __n2, __c); } # 1993 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& replace(__const_iterator __i1, __const_iterator __i2, const basic_string& __str) { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } # 2013 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s, size_type __n) { ; return this->replace(__i1 - begin(), __i2 - __i1, __s, __n); } # 2035 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s) { ; return this->replace(__i1, __i2, __s, traits_type::length(__s)); } # 2056 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& replace(__const_iterator __i1, __const_iterator __i2, size_type __n, _CharT __c) { ; return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __c); } # 2081 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<class _InputIterator, typename = std::_RequireInputIter<_InputIterator>> basic_string& replace(const_iterator __i1, const_iterator __i2, _InputIterator __k1, _InputIterator __k2) { ; ; return this->_M_replace_dispatch(__i1, __i2, __k1, __k2, std::__false_type()); } # 2113 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& replace(__const_iterator __i1, __const_iterator __i2, _CharT* __k1, _CharT* __k2) { ; ; return this->replace(__i1 - begin(), __i2 - __i1, __k1, __k2 - __k1); } basic_string& replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __k1, const _CharT* __k2) { ; ; return this->replace(__i1 - begin(), __i2 - __i1, __k1, __k2 - __k1); } basic_string& replace(__const_iterator __i1, __const_iterator __i2, iterator __k1, iterator __k2) { ; ; return this->replace(__i1 - begin(), __i2 - __i1, __k1.base(), __k2 - __k1); } basic_string& replace(__const_iterator __i1, __const_iterator __i2, const_iterator __k1, const_iterator __k2) { ; ; return this->replace(__i1 - begin(), __i2 - __i1, __k1.base(), __k2 - __k1); } # 2172 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string& replace(const_iterator __i1, const_iterator __i2, initializer_list<_CharT> __l) { return this->replace(__i1, __i2, __l.begin(), __l.size()); } # 2231 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 private: template<class _Integer> basic_string& _M_replace_dispatch(const_iterator __i1, const_iterator __i2, _Integer __n, _Integer __val, __true_type) { return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __val); } template<class _InputIterator> basic_string& _M_replace_dispatch(const_iterator __i1, const_iterator __i2, _InputIterator __k1, _InputIterator __k2, __false_type); basic_string& _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c); basic_string& _M_replace(size_type __pos, size_type __len1, const _CharT* __s, const size_type __len2); basic_string& _M_append(const _CharT* __s, size_type __n); public: # 2269 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const; # 2279 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 void swap(basic_string& __s) noexcept; # 2289 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 const _CharT* c_str() const noexcept { return _M_data(); } # 2301 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 const _CharT* data() const noexcept { return _M_data(); } # 2320 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 allocator_type get_allocator() const noexcept { return _M_get_allocator(); } # 2336 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find(const _CharT* __s, size_type __pos, size_type __n) const noexcept; # 2350 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find(const basic_string& __str, size_type __pos = 0) const noexcept { return this->find(__str.data(), __pos, __str.size()); } # 2382 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find(const _CharT* __s, size_type __pos = 0) const noexcept { ; return this->find(__s, __pos, traits_type::length(__s)); } # 2399 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find(_CharT __c, size_type __pos = 0) const noexcept; # 2412 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type rfind(const basic_string& __str, size_type __pos = npos) const noexcept { return this->rfind(__str.data(), __pos, __str.size()); } # 2446 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const noexcept; # 2460 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type rfind(const _CharT* __s, size_type __pos = npos) const { ; return this->rfind(__s, __pos, traits_type::length(__s)); } # 2477 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type rfind(_CharT __c, size_type __pos = npos) const noexcept; # 2491 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_first_of(const basic_string& __str, size_type __pos = 0) const noexcept { return this->find_first_of(__str.data(), __pos, __str.size()); } # 2526 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const noexcept; # 2540 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_first_of(const _CharT* __s, size_type __pos = 0) const noexcept { ; return this->find_first_of(__s, __pos, traits_type::length(__s)); } # 2560 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_first_of(_CharT __c, size_type __pos = 0) const noexcept { return this->find(__c, __pos); } # 2575 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_last_of(const basic_string& __str, size_type __pos = npos) const noexcept { return this->find_last_of(__str.data(), __pos, __str.size()); } # 2610 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const noexcept; # 2624 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_last_of(const _CharT* __s, size_type __pos = npos) const noexcept { ; return this->find_last_of(__s, __pos, traits_type::length(__s)); } # 2644 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_last_of(_CharT __c, size_type __pos = npos) const noexcept { return this->rfind(__c, __pos); } # 2658 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const noexcept { return this->find_first_not_of(__str.data(), __pos, __str.size()); } # 2693 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const noexcept; # 2707 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const noexcept { ; return this->find_first_not_of(__s, __pos, traits_type::length(__s)); } # 2725 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_first_not_of(_CharT __c, size_type __pos = 0) const noexcept; # 2740 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const noexcept { return this->find_last_not_of(__str.data(), __pos, __str.size()); } # 2775 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const noexcept; # 2789 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const noexcept { ; return this->find_last_not_of(__s, __pos, traits_type::length(__s)); } # 2807 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 size_type find_last_not_of(_CharT __c, size_type __pos = npos) const noexcept; # 2823 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 basic_string substr(size_type __pos = 0, size_type __n = npos) const { return basic_string(*this, _M_check(__pos, "basic_string::substr"), __n); } # 2842 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 int compare(const basic_string& __str) const { const size_type __size = this->size(); const size_type __osize = __str.size(); const size_type __len = std::min(__size, __osize); int __r = traits_type::compare(_M_data(), __str.data(), __len); if (!__r) __r = _S_compare(__size, __osize); return __r; } # 2935 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 int compare(size_type __pos, size_type __n, const basic_string& __str) const; # 2961 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 int compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2 = npos) const; # 2979 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 int compare(const _CharT* __s) const noexcept; # 3003 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 int compare(size_type __pos, size_type __n1, const _CharT* __s) const; # 3030 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 int compare(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) const; template<typename, typename, typename> friend class basic_stringbuf; }; } # 5925 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { basic_string<_CharT, _Traits, _Alloc> __str(__lhs); __str.append(__rhs); return __str; } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT,_Traits,_Alloc> operator+(const _CharT* __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT,_Traits,_Alloc> operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { basic_string<_CharT, _Traits, _Alloc> __str(__lhs); __str.append(__rhs); return __str; } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) { typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; __string_type __str(__lhs); __str.append(__size_type(1), __rhs); return __str; } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return std::move(__lhs.append(__rhs)); } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) { return std::move(__rhs.insert(0, __lhs)); } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) { const auto __size = __lhs.size() + __rhs.size(); const bool __cond = (__size > __lhs.capacity() && __size <= __rhs.capacity()); return __cond ? std::move(__rhs.insert(0, __lhs)) : std::move(__lhs.append(__rhs)); } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(const _CharT* __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) { return std::move(__rhs.insert(0, __lhs)); } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(_CharT __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) { return std::move(__rhs.insert(0, 1, __lhs)); } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, const _CharT* __rhs) { return std::move(__lhs.append(__rhs)); } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, _CharT __rhs) { return std::move(__lhs.append(1, __rhs)); } # 6046 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) noexcept { return __lhs.compare(__rhs) == 0; } template<typename _CharT> inline typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type operator==(const basic_string<_CharT>& __lhs, const basic_string<_CharT>& __rhs) noexcept { return (__lhs.size() == __rhs.size() && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), __lhs.size())); } template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator==(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) == 0; } template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) == 0; } # 6093 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) noexcept { return !(__lhs == __rhs); } template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator!=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return !(__lhs == __rhs); } template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return !(__lhs == __rhs); } # 6131 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) noexcept { return __lhs.compare(__rhs) < 0; } template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) < 0; } template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) > 0; } # 6169 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) noexcept { return __lhs.compare(__rhs) > 0; } template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) > 0; } template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) < 0; } # 6207 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) noexcept { return __lhs.compare(__rhs) <= 0; } template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) <= 0; } template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) >= 0; } # 6245 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) noexcept { return __lhs.compare(__rhs) >= 0; } template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) >= 0; } template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) <= 0; } # 6283 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<typename _CharT, typename _Traits, typename _Alloc> inline void swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, basic_string<_CharT, _Traits, _Alloc>& __rhs) noexcept(noexcept(__lhs.swap(__rhs))) { __lhs.swap(__rhs); } # 6303 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<typename _CharT, typename _Traits, typename _Alloc> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str); template<> basic_istream<char>& operator>>(basic_istream<char>& __is, basic_string<char>& __str); # 6321 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<typename _CharT, typename _Traits, typename _Alloc> inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const basic_string<_CharT, _Traits, _Alloc>& __str) { return __ostream_insert(__os, __str.data(), __str.size()); } # 6344 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<typename _CharT, typename _Traits, typename _Alloc> basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); # 6361 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 3 template<typename _CharT, typename _Traits, typename _Alloc> inline basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str) { return std::getline(__is, __str, __is.widen('\n')); } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>&& __is, basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) { return std::getline(__is, __str, __delim); } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>&& __is, basic_string<_CharT, _Traits, _Alloc>& __str) { return std::getline(__is, __str); } template<> basic_istream<char>& getline(basic_istream<char>& __in, basic_string<char>& __str, char __delim); template<> basic_istream<wchar_t>& getline(basic_istream<wchar_t>& __in, basic_string<wchar_t>& __str, wchar_t __delim); } # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/string_conversions.h" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/string_conversions.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 3 # 75 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 3 # 1 "/usr/include/stdlib.h" 1 3 4 # 25 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 # 26 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 1 3 4 # 32 "/usr/include/stdlib.h" 2 3 4 extern "C" { # 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4 # 52 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4 typedef enum { P_ALL, P_PID, P_PGID } idtype_t; # 40 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4 # 41 "/usr/include/stdlib.h" 2 3 4 # 58 "/usr/include/stdlib.h" 3 4 typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; __extension__ typedef struct { long long int quot; long long int rem; } lldiv_t; # 97 "/usr/include/stdlib.h" 3 4 extern size_t __ctype_get_mb_cur_max (void) throw () ; extern double atof (const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern int atoi (const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern long int atol (const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int atoll (const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern double strtod (const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))); extern float strtof (const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))); extern long double strtold (const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))); # 140 "/usr/include/stdlib.h" 3 4 extern _Float32 strtof32 (const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))); extern _Float64 strtof64 (const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))); # 158 "/usr/include/stdlib.h" 3 4 extern _Float32x strtof32x (const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))); extern _Float64x strtof64x (const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))); # 176 "/usr/include/stdlib.h" 3 4 extern long int strtol (const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))); extern unsigned long int strtoul (const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))); __extension__ extern long long int strtoq (const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))); __extension__ extern unsigned long long int strtouq (const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))); __extension__ extern long long int strtoll (const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))); __extension__ extern unsigned long long int strtoull (const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))); extern int strfromd (char *__dest, size_t __size, const char *__format, double __f) throw () __attribute__ ((__nonnull__ (3))); extern int strfromf (char *__dest, size_t __size, const char *__format, float __f) throw () __attribute__ ((__nonnull__ (3))); extern int strfroml (char *__dest, size_t __size, const char *__format, long double __f) throw () __attribute__ ((__nonnull__ (3))); # 232 "/usr/include/stdlib.h" 3 4 extern int strfromf32 (char *__dest, size_t __size, const char * __format, _Float32 __f) throw () __attribute__ ((__nonnull__ (3))); extern int strfromf64 (char *__dest, size_t __size, const char * __format, _Float64 __f) throw () __attribute__ ((__nonnull__ (3))); # 250 "/usr/include/stdlib.h" 3 4 extern int strfromf32x (char *__dest, size_t __size, const char * __format, _Float32x __f) throw () __attribute__ ((__nonnull__ (3))); extern int strfromf64x (char *__dest, size_t __size, const char * __format, _Float64x __f) throw () __attribute__ ((__nonnull__ (3))); # 274 "/usr/include/stdlib.h" 3 4 extern long int strtol_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))); extern unsigned long int strtoul_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))); __extension__ extern long long int strtoll_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))); __extension__ extern unsigned long long int strtoull_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))); extern double strtod_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))); extern float strtof_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))); extern long double strtold_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))); # 316 "/usr/include/stdlib.h" 3 4 extern _Float32 strtof32_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))); extern _Float64 strtof64_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))); # 337 "/usr/include/stdlib.h" 3 4 extern _Float32x strtof32x_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))); extern _Float64x strtof64x_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))); # 360 "/usr/include/stdlib.h" 3 4 extern __inline __attribute__ ((__gnu_inline__)) int atoi (const char *__nptr) throw () { return (int) strtol (__nptr, (char **) __null, 10); } extern __inline __attribute__ ((__gnu_inline__)) long int atol (const char *__nptr) throw () { return strtol (__nptr, (char **) __null, 10); } __extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int atoll (const char *__nptr) throw () { return strtoll (__nptr, (char **) __null, 10); } # 385 "/usr/include/stdlib.h" 3 4 extern char *l64a (long int __n) throw () ; extern long int a64l (const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; # 401 "/usr/include/stdlib.h" 3 4 extern long int random (void) throw (); extern void srandom (unsigned int __seed) throw (); extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); struct random_data { int32_t *fptr; int32_t *rptr; int32_t *state; int rand_type; int rand_deg; int rand_sep; int32_t *end_ptr; }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int srandom_r (unsigned int __seed, struct random_data *__buf) throw () __attribute__ ((__nonnull__ (2))); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) throw () __attribute__ ((__nonnull__ (2, 4))); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); extern int rand (void) throw (); extern void srand (unsigned int __seed) throw (); extern int rand_r (unsigned int *__seed) throw (); extern double drand48 (void) throw (); extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern long int lrand48 (void) throw (); extern long int nrand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern long int mrand48 (void) throw (); extern long int jrand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern void srand48 (long int __seedval) throw (); extern unsigned short int *seed48 (unsigned short int __seed16v[3]) throw () __attribute__ ((__nonnull__ (1))); extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); struct drand48_data { unsigned short int __x[3]; unsigned short int __old_x[3]; unsigned short int __c; unsigned short int __init; __extension__ unsigned long long int __a; }; extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int srand48_r (long int __seedval, struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (2))); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ; extern void *calloc (size_t __nmemb, size_t __size) throw () __attribute__ ((__malloc__)) ; extern void *realloc (void *__ptr, size_t __size) throw () __attribute__ ((__warn_unused_result__)); extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) throw () __attribute__ ((__warn_unused_result__)); extern void free (void *__ptr) throw (); # 1 "/usr/include/alloca.h" 1 3 4 # 24 "/usr/include/alloca.h" 3 4 # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 1 3 4 # 25 "/usr/include/alloca.h" 2 3 4 extern "C" { extern void *alloca (size_t __size) throw (); } # 567 "/usr/include/stdlib.h" 2 3 4 extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ; extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) throw () __attribute__ ((__nonnull__ (1))) ; extern void *aligned_alloc (size_t __alignment, size_t __size) throw () __attribute__ ((__malloc__)) ; extern void abort (void) throw () __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); extern "C++" int at_quick_exit (void (*__func) (void)) throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); # 607 "/usr/include/stdlib.h" 3 4 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) throw () __attribute__ ((__nonnull__ (1))); extern void exit (int __status) throw () __attribute__ ((__noreturn__)); extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); extern char *getenv (const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; extern char *secure_getenv (const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern int setenv (const char *__name, const char *__value, int __replace) throw () __attribute__ ((__nonnull__ (2))); extern int unsetenv (const char *__name) throw () __attribute__ ((__nonnull__ (1))); extern int clearenv (void) throw (); # 672 "/usr/include/stdlib.h" 3 4 extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))); # 685 "/usr/include/stdlib.h" 3 4 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; # 695 "/usr/include/stdlib.h" 3 4 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; # 707 "/usr/include/stdlib.h" 3 4 extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ; # 717 "/usr/include/stdlib.h" 3 4 extern int mkstemps64 (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ; # 728 "/usr/include/stdlib.h" 3 4 extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; # 739 "/usr/include/stdlib.h" 3 4 extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ; # 749 "/usr/include/stdlib.h" 3 4 extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ; # 759 "/usr/include/stdlib.h" 3 4 extern int mkostemps (char *__template, int __suffixlen, int __flags) __attribute__ ((__nonnull__ (1))) ; # 771 "/usr/include/stdlib.h" 3 4 extern int mkostemps64 (char *__template, int __suffixlen, int __flags) __attribute__ ((__nonnull__ (1))) ; # 781 "/usr/include/stdlib.h" 3 4 extern int system (const char *__command) ; extern char *canonicalize_file_name (const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; # 797 "/usr/include/stdlib.h" 3 4 extern char *realpath (const char *__restrict __name, char *__restrict __resolved) throw () ; typedef int (*__compar_fn_t) (const void *, const void *); typedef __compar_fn_t comparison_fn_t; typedef int (*__compar_d_fn_t) (const void *, const void *, void *); extern void *bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 2, 5))) ; # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h" 1 3 4 # 19 "/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h" 3 4 extern __inline __attribute__ ((__gnu_inline__)) void * bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) { size_t __l, __u, __idx; const void *__p; int __comparison; __l = 0; __u = __nmemb; while (__l < __u) { __idx = (__l + __u) / 2; __p = (void *) (((const char *) __base) + (__idx * __size)); __comparison = (*__compar) (__key, __p); if (__comparison < 0) __u = __idx; else if (__comparison > 0) __l = __idx + 1; else return (void *) __p; } return __null; } # 823 "/usr/include/stdlib.h" 2 3 4 extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); extern void qsort_r (void *__base, size_t __nmemb, size_t __size, __compar_d_fn_t __compar, void *__arg) __attribute__ ((__nonnull__ (1, 4))); extern int abs (int __x) throw () __attribute__ ((__const__)) ; extern long int labs (long int __x) throw () __attribute__ ((__const__)) ; __extension__ extern long long int llabs (long long int __x) throw () __attribute__ ((__const__)) ; extern div_t div (int __numer, int __denom) throw () __attribute__ ((__const__)) ; extern ldiv_t ldiv (long int __numer, long int __denom) throw () __attribute__ ((__const__)) ; __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) throw () __attribute__ ((__const__)) ; # 869 "/usr/include/stdlib.h" 3 4 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *gcvt (double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))) ; extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *qgcvt (long double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))) ; extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int mblen (const char *__s, size_t __n) throw (); extern int mbtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n) throw (); extern int wctomb (char *__s, wchar_t __wchar) throw (); extern size_t mbstowcs (wchar_t *__restrict __pwcs, const char *__restrict __s, size_t __n) throw (); extern size_t wcstombs (char *__restrict __s, const wchar_t *__restrict __pwcs, size_t __n) throw (); extern int rpmatch (const char *__response) throw () __attribute__ ((__nonnull__ (1))) ; # 954 "/usr/include/stdlib.h" 3 4 extern int getsubopt (char **__restrict __optionp, char *const *__restrict __tokens, char **__restrict __valuep) throw () __attribute__ ((__nonnull__ (1, 2, 3))) ; extern int posix_openpt (int __oflag) ; extern int grantpt (int __fd) throw (); extern int unlockpt (int __fd) throw (); extern char *ptsname (int __fd) throw () ; extern int ptsname_r (int __fd, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern int getpt (void); extern int getloadavg (double __loadavg[], int __nelem) throw () __attribute__ ((__nonnull__ (1))); # 1010 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 3 4 extern __inline __attribute__ ((__gnu_inline__)) double atof (const char *__nptr) throw () { return strtod (__nptr, (char **) __null); } # 1011 "/usr/include/stdlib.h" 2 3 4 # 1020 "/usr/include/stdlib.h" 3 4 } # 76 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_abs.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_abs.h" 3 # 46 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_abs.h" 3 extern "C++" { namespace std __attribute__ ((__visibility__ ("default"))) { using ::abs; inline long abs(long __i) { return __builtin_labs(__i); } inline long long abs(long long __x) { return __builtin_llabs (__x); } inline constexpr double abs(double __x) { return __builtin_fabs(__x); } inline constexpr float abs(float __x) { return __builtin_fabsf(__x); } inline constexpr long double abs(long double __x) { return __builtin_fabsl(__x); } # 107 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_abs.h" 3 } } # 78 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 2 3 # 121 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 3 extern "C++" { namespace std __attribute__ ((__visibility__ ("default"))) { using ::div_t; using ::ldiv_t; using ::abort; using ::atexit; using ::at_quick_exit; using ::atof; using ::atoi; using ::atol; using ::bsearch; using ::calloc; using ::div; using ::exit; using ::free; using ::getenv; using ::labs; using ::ldiv; using ::malloc; using ::mblen; using ::mbstowcs; using ::mbtowc; using ::qsort; using ::quick_exit; using ::rand; using ::realloc; using ::srand; using ::strtod; using ::strtol; using ::strtoul; using ::system; using ::wcstombs; using ::wctomb; inline ldiv_t div(long __i, long __j) { return ldiv(__i, __j); } } # 195 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { using ::lldiv_t; using ::_Exit; using ::llabs; inline lldiv_t div(long long __n, long long __d) { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } using ::lldiv; # 227 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 3 using ::atoll; using ::strtoll; using ::strtoull; using ::strtof; using ::strtold; } namespace std { using ::__gnu_cxx::lldiv_t; using ::__gnu_cxx::_Exit; using ::__gnu_cxx::llabs; using ::__gnu_cxx::div; using ::__gnu_cxx::lldiv; using ::__gnu_cxx::atoll; using ::__gnu_cxx::strtof; using ::__gnu_cxx::strtoll; using ::__gnu_cxx::strtoull; using ::__gnu_cxx::strtold; } } # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/string_conversions.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwchar" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwchar" 3 # 43 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/string_conversions.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdio" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdio" 3 # 1 "/usr/include/stdio.h" 1 3 4 # 27 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 # 28 "/usr/include/stdio.h" 2 3 4 extern "C" { # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 1 3 4 # 34 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 1 3 4 # 10 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 3 4 typedef struct _G_fpos_t { __off_t __pos; __mbstate_t __state; } __fpos_t; # 40 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 1 3 4 # 10 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 3 4 typedef struct _G_fpos64_t { __off64_t __pos; __mbstate_t __state; } __fpos64_t; # 41 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 1 3 4 # 35 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 3 4 struct _IO_FILE; struct _IO_marker; struct _IO_codecvt; struct _IO_wide_data; typedef void _IO_lock_t; struct _IO_FILE { int _flags; char *_IO_read_ptr; char *_IO_read_end; char *_IO_read_base; char *_IO_write_base; char *_IO_write_ptr; char *_IO_write_end; char *_IO_buf_base; char *_IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; __off64_t _offset; struct _IO_codecvt *_codecvt; struct _IO_wide_data *_wide_data; struct _IO_FILE *_freeres_list; void *_freeres_buf; size_t __pad5; int _mode; char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; # 44 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h" 3 4 typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf, size_t __nbytes); typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf, size_t __nbytes); typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w); typedef int cookie_close_function_t (void *__cookie); typedef struct _IO_cookie_io_functions_t { cookie_read_function_t *read; cookie_write_function_t *write; cookie_seek_function_t *seek; cookie_close_function_t *close; } cookie_io_functions_t; # 47 "/usr/include/stdio.h" 2 3 4 typedef __gnuc_va_list va_list; # 84 "/usr/include/stdio.h" 3 4 typedef __fpos_t fpos_t; typedef __fpos64_t fpos64_t; # 133 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4 # 134 "/usr/include/stdio.h" 2 3 4 extern FILE *stdin; extern FILE *stdout; extern FILE *stderr; extern int remove (const char *__filename) throw (); extern int rename (const char *__old, const char *__new) throw (); extern int renameat (int __oldfd, const char *__old, int __newfd, const char *__new) throw (); # 164 "/usr/include/stdio.h" 3 4 extern int renameat2 (int __oldfd, const char *__old, int __newfd, const char *__new, unsigned int __flags) throw (); extern FILE *tmpfile (void) ; # 183 "/usr/include/stdio.h" 3 4 extern FILE *tmpfile64 (void) ; extern char *tmpnam (char *__s) throw () ; extern char *tmpnam_r (char *__s) throw () ; # 204 "/usr/include/stdio.h" 3 4 extern char *tempnam (const char *__dir, const char *__pfx) throw () __attribute__ ((__malloc__)) ; extern int fclose (FILE *__stream); extern int fflush (FILE *__stream); # 227 "/usr/include/stdio.h" 3 4 extern int fflush_unlocked (FILE *__stream); # 237 "/usr/include/stdio.h" 3 4 extern int fcloseall (void); # 246 "/usr/include/stdio.h" 3 4 extern FILE *fopen (const char *__restrict __filename, const char *__restrict __modes) ; extern FILE *freopen (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) ; # 270 "/usr/include/stdio.h" 3 4 extern FILE *fopen64 (const char *__restrict __filename, const char *__restrict __modes) ; extern FILE *freopen64 (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) ; extern FILE *fdopen (int __fd, const char *__modes) throw () ; extern FILE *fopencookie (void *__restrict __magic_cookie, const char *__restrict __modes, cookie_io_functions_t __io_funcs) throw () ; extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) throw () ; extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ; extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) throw (); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) throw (); extern void setlinebuf (FILE *__stream) throw (); extern int fprintf (FILE *__restrict __stream, const char *__restrict __format, ...); extern int printf (const char *__restrict __format, ...); extern int sprintf (char *__restrict __s, const char *__restrict __format, ...) throw (); extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg); extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); extern int vsprintf (char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) throw (); extern int snprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 3, 0))); extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 2, 0))) ; extern int __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; extern int asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; extern int vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) ; extern int scanf (const char *__restrict __format, ...) ; extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) throw (); # 434 "/usr/include/stdio.h" 3 4 extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) ; extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) ; extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__scanf__, 2, 0))); # 491 "/usr/include/stdio.h" 3 4 extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); extern int getchar (void); extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); # 516 "/usr/include/stdio.h" 3 4 extern int fgetc_unlocked (FILE *__stream); # 527 "/usr/include/stdio.h" 3 4 extern int fputc (int __c, FILE *__stream); extern int putc (int __c, FILE *__stream); extern int putchar (int __c); # 543 "/usr/include/stdio.h" 3 4 extern int fputc_unlocked (int __c, FILE *__stream); extern int putc_unlocked (int __c, FILE *__stream); extern int putchar_unlocked (int __c); extern int getw (FILE *__stream); extern int putw (int __w, FILE *__stream); extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) ; # 593 "/usr/include/stdio.h" 3 4 extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) ; # 609 "/usr/include/stdio.h" 3 4 extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) ; extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) ; extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) ; extern int fputs (const char *__restrict __s, FILE *__restrict __stream); extern int puts (const char *__s); extern int ungetc (int __c, FILE *__stream); extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s); # 668 "/usr/include/stdio.h" 3 4 extern int fputs_unlocked (const char *__restrict __s, FILE *__restrict __stream); # 679 "/usr/include/stdio.h" 3 4 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream); extern int fseek (FILE *__stream, long int __off, int __whence); extern long int ftell (FILE *__stream) ; extern void rewind (FILE *__stream); # 713 "/usr/include/stdio.h" 3 4 extern int fseeko (FILE *__stream, __off_t __off, int __whence); extern __off_t ftello (FILE *__stream) ; # 737 "/usr/include/stdio.h" 3 4 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); extern int fsetpos (FILE *__stream, const fpos_t *__pos); # 756 "/usr/include/stdio.h" 3 4 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); extern __off64_t ftello64 (FILE *__stream) ; extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); extern void clearerr (FILE *__stream) throw (); extern int feof (FILE *__stream) throw () ; extern int ferror (FILE *__stream) throw () ; extern void clearerr_unlocked (FILE *__stream) throw (); extern int feof_unlocked (FILE *__stream) throw () ; extern int ferror_unlocked (FILE *__stream) throw () ; extern void perror (const char *__s); # 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4 extern int sys_nerr; extern const char *const sys_errlist[]; extern int _sys_nerr; extern const char *const _sys_errlist[]; # 788 "/usr/include/stdio.h" 2 3 4 extern int fileno (FILE *__stream) throw () ; extern int fileno_unlocked (FILE *__stream) throw () ; # 806 "/usr/include/stdio.h" 3 4 extern FILE *popen (const char *__command, const char *__modes) ; extern int pclose (FILE *__stream); extern char *ctermid (char *__s) throw (); extern char *cuserid (char *__s); struct obstack; extern int obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __format, __gnuc_va_list __args) throw () __attribute__ ((__format__ (__printf__, 2, 0))); extern void flockfile (FILE *__stream) throw (); extern int ftrylockfile (FILE *__stream) throw () ; extern void funlockfile (FILE *__stream) throw (); # 864 "/usr/include/stdio.h" 3 4 extern int __uflow (FILE *); extern int __overflow (FILE *, int); # 1 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 1 3 4 # 38 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 3 4 extern __inline __attribute__ ((__gnu_inline__)) int vprintf (const char *__restrict __fmt, __gnuc_va_list __arg) { return vfprintf (stdout, __fmt, __arg); } extern __inline __attribute__ ((__gnu_inline__)) int getchar (void) { return getc (stdin); } extern __inline __attribute__ ((__gnu_inline__)) int fgetc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int getc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int getchar_unlocked (void) { return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int putchar (int __c) { return putc (__c, stdout); } extern __inline __attribute__ ((__gnu_inline__)) int fputc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) int putc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) int putchar_unlocked (int __c) { return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) __ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); } extern __inline __attribute__ ((__gnu_inline__)) int feof_unlocked (FILE *__stream) throw () { return (((__stream)->_flags & 0x0010) != 0); } extern __inline __attribute__ ((__gnu_inline__)) int ferror_unlocked (FILE *__stream) throw () { return (((__stream)->_flags & 0x0020) != 0); } # 871 "/usr/include/stdio.h" 2 3 4 } # 43 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdio" 2 3 # 96 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdio" 3 namespace std { using ::FILE; using ::fpos_t; using ::clearerr; using ::fclose; using ::feof; using ::ferror; using ::fflush; using ::fgetc; using ::fgetpos; using ::fgets; using ::fopen; using ::fprintf; using ::fputc; using ::fputs; using ::fread; using ::freopen; using ::fscanf; using ::fseek; using ::fsetpos; using ::ftell; using ::fwrite; using ::getc; using ::getchar; using ::perror; using ::printf; using ::putc; using ::putchar; using ::puts; using ::remove; using ::rename; using ::rewind; using ::scanf; using ::setbuf; using ::setvbuf; using ::sprintf; using ::sscanf; using ::tmpfile; using ::tmpnam; using ::ungetc; using ::vfprintf; using ::vprintf; using ::vsprintf; } # 157 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdio" 3 namespace __gnu_cxx { # 175 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdio" 3 using ::snprintf; using ::vfscanf; using ::vscanf; using ::vsnprintf; using ::vsscanf; } namespace std { using ::__gnu_cxx::snprintf; using ::__gnu_cxx::vfscanf; using ::__gnu_cxx::vscanf; using ::__gnu_cxx::vsnprintf; using ::__gnu_cxx::vsscanf; } # 44 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/string_conversions.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cerrno" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cerrno" 3 # 1 "/usr/include/errno.h" 1 3 4 # 28 "/usr/include/errno.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/errno.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 # 1 "/usr/include/linux/errno.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/errno.h" 1 3 4 # 1 "/usr/include/asm-generic/errno.h" 1 3 4 # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 # 6 "/usr/include/asm-generic/errno.h" 2 3 4 # 2 "/usr/include/x86_64-linux-gnu/asm/errno.h" 2 3 4 # 2 "/usr/include/linux/errno.h" 2 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/errno.h" 2 3 4 # 29 "/usr/include/errno.h" 2 3 4 extern "C" { extern int *__errno_location (void) throw () __attribute__ ((__const__)); extern char *program_invocation_name; extern char *program_invocation_short_name; # 1 "/usr/include/x86_64-linux-gnu/bits/types/error_t.h" 1 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/types/error_t.h" 3 4 typedef int error_t; # 49 "/usr/include/errno.h" 2 3 4 } # 43 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cerrno" 2 3 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/string_conversions.h" 2 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template<typename _TRet, typename _Ret = _TRet, typename _CharT, typename... _Base> _Ret __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...), const char* __name, const _CharT* __str, std::size_t* __idx, _Base... __base) { _Ret __ret; _CharT* __endptr; struct _Save_errno { _Save_errno() : _M_errno((*__errno_location ())) { (*__errno_location ()) = 0; } ~_Save_errno() { if ((*__errno_location ()) == 0) (*__errno_location ()) = _M_errno; } int _M_errno; } const __save_errno; struct _Range_chk { static bool _S_chk(_TRet, std::false_type) { return false; } static bool _S_chk(_TRet __val, std::true_type) { return __val < _TRet(__numeric_traits<int>::__min) || __val > _TRet(__numeric_traits<int>::__max); } }; const _TRet __tmp = __convf(__str, &__endptr, __base...); if (__endptr == __str) std::__throw_invalid_argument(__name); else if ((*__errno_location ()) == 34 || _Range_chk::_S_chk(__tmp, std::is_same<_Ret, int>{})) std::__throw_out_of_range(__name); else __ret = __tmp; if (__idx) *__idx = __endptr - __str; return __ret; } template<typename _String, typename _CharT = typename _String::value_type> _String __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*, __builtin_va_list), std::size_t __n, const _CharT* __fmt, ...) { _CharT* __s = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __n)); __builtin_va_list __args; __builtin_va_start(__args, __fmt); const int __len = __convf(__s, __n, __fmt, __args); __builtin_va_end(__args); return _String(__s, __s + __len); } } # 6401 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { namespace __cxx11 { inline int stoi(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa<long, int>(&std::strtol, "stoi", __str.c_str(), __idx, __base); } inline long stol(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(), __idx, __base); } inline unsigned long stoul(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(), __idx, __base); } inline long long stoll(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(), __idx, __base); } inline unsigned long long stoull(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(), __idx, __base); } inline float stof(const string& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); } inline double stod(const string& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); } inline long double stold(const string& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); } inline string to_string(int __val) { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(int), "%d", __val); } inline string to_string(unsigned __val) { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(unsigned), "%u", __val); } inline string to_string(long __val) { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(long), "%ld", __val); } inline string to_string(unsigned long __val) { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(unsigned long), "%lu", __val); } inline string to_string(long long __val) { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(long long), "%lld", __val); } inline string to_string(unsigned long long __val) { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(unsigned long long), "%llu", __val); } inline string to_string(float __val) { const int __n = __gnu_cxx::__numeric_traits<float>::__max_exponent10 + 20; return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n, "%f", __val); } inline string to_string(double __val) { const int __n = __gnu_cxx::__numeric_traits<double>::__max_exponent10 + 20; return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n, "%f", __val); } inline string to_string(long double __val) { const int __n = __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 20; return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n, "%Lf", __val); } inline int stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(), __idx, __base); } inline long stol(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(), __idx, __base); } inline unsigned long stoul(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(), __idx, __base); } inline long long stoll(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(), __idx, __base); } inline unsigned long long stoull(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(), __idx, __base); } inline float stof(const wstring& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); } inline double stod(const wstring& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); } inline long double stold(const wstring& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); } inline wstring to_wstring(int __val) { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(int), L"%d", __val); } inline wstring to_wstring(unsigned __val) { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(unsigned), L"%u", __val); } inline wstring to_wstring(long __val) { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(long), L"%ld", __val); } inline wstring to_wstring(unsigned long __val) { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(unsigned long), L"%lu", __val); } inline wstring to_wstring(long long __val) { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(long long), L"%lld", __val); } inline wstring to_wstring(unsigned long long __val) { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(unsigned long long), L"%llu", __val); } inline wstring to_wstring(float __val) { const int __n = __gnu_cxx::__numeric_traits<float>::__max_exponent10 + 20; return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n, L"%f", __val); } inline wstring to_wstring(double __val) { const int __n = __gnu_cxx::__numeric_traits<double>::__max_exponent10 + 20; return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n, L"%f", __val); } inline wstring to_wstring(long double __val) { const int __n = __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 20; return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n, L"%Lf", __val); } } } # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/functional_hash.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/functional_hash.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 49 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/functional_hash.h" 3 template<typename _Result, typename _Arg> struct __hash_base { typedef _Result result_type ; typedef _Arg argument_type ; }; template<typename _Tp> struct hash; template<typename _Tp, typename = void> struct __poison_hash { static constexpr bool __enable_hash_call = false; private: __poison_hash(__poison_hash&&); ~__poison_hash(); }; template<typename _Tp> struct __poison_hash<_Tp, __void_t<decltype(hash<_Tp>()(declval<_Tp>()))>> { static constexpr bool __enable_hash_call = true; }; template<typename _Tp, bool = is_enum<_Tp>::value> struct __hash_enum { private: __hash_enum(__hash_enum&&); ~__hash_enum(); }; template<typename _Tp> struct __hash_enum<_Tp, true> : public __hash_base<size_t, _Tp> { size_t operator()(_Tp __val) const noexcept { using __type = typename underlying_type<_Tp>::type; return hash<__type>{}(static_cast<__type>(__val)); } }; template<typename _Tp> struct hash : __hash_enum<_Tp> { }; template<typename _Tp> struct hash<_Tp*> : public __hash_base<size_t, _Tp*> { size_t operator()(_Tp* __p) const noexcept { return reinterpret_cast<size_t>(__p); } }; # 124 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/functional_hash.h" 3 template<> struct hash<bool> : public __hash_base<size_t, bool> { size_t operator()(bool __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<char> : public __hash_base<size_t, char> { size_t operator()(char __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<signed char> : public __hash_base<size_t, signed char> { size_t operator()(signed char __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<unsigned char> : public __hash_base<size_t, unsigned char> { size_t operator()(unsigned char __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<wchar_t> : public __hash_base<size_t, wchar_t> { size_t operator()(wchar_t __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<char16_t> : public __hash_base<size_t, char16_t> { size_t operator()(char16_t __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<char32_t> : public __hash_base<size_t, char32_t> { size_t operator()(char32_t __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<short> : public __hash_base<size_t, short> { size_t operator()(short __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<int> : public __hash_base<size_t, int> { size_t operator()(int __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<long> : public __hash_base<size_t, long> { size_t operator()(long __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<long long> : public __hash_base<size_t, long long> { size_t operator()(long long __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<unsigned short> : public __hash_base<size_t, unsigned short> { size_t operator()(unsigned short __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<unsigned int> : public __hash_base<size_t, unsigned int> { size_t operator()(unsigned int __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<unsigned long> : public __hash_base<size_t, unsigned long> { size_t operator()(unsigned long __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<unsigned long long> : public __hash_base<size_t, unsigned long long> { size_t operator()(unsigned long long __val) const noexcept { return static_cast<size_t>(__val); } }; # 187 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/functional_hash.h" 3 struct _Hash_impl { static size_t hash(const void* __ptr, size_t __clength, size_t __seed = static_cast<size_t>(0xc70f6907UL)) { return _Hash_bytes(__ptr, __clength, __seed); } template<typename _Tp> static size_t hash(const _Tp& __val) { return hash(&__val, sizeof(__val)); } template<typename _Tp> static size_t __hash_combine(const _Tp& __val, size_t __hash) { return hash(&__val, sizeof(__val), __hash); } }; struct _Fnv_hash_impl { static size_t hash(const void* __ptr, size_t __clength, size_t __seed = static_cast<size_t>(2166136261UL)) { return _Fnv_hash_bytes(__ptr, __clength, __seed); } template<typename _Tp> static size_t hash(const _Tp& __val) { return hash(&__val, sizeof(__val)); } template<typename _Tp> static size_t __hash_combine(const _Tp& __val, size_t __hash) { return hash(&__val, sizeof(__val), __hash); } }; template<> struct hash<float> : public __hash_base<size_t, float> { size_t operator()(float __val) const noexcept { return __val != 0.0f ? std::_Hash_impl::hash(__val) : 0; } }; template<> struct hash<double> : public __hash_base<size_t, double> { size_t operator()(double __val) const noexcept { return __val != 0.0 ? std::_Hash_impl::hash(__val) : 0; } }; template<> struct hash<long double> : public __hash_base<size_t, long double> { __attribute__ ((__pure__)) size_t operator()(long double __val) const noexcept; }; template<typename _Hash> struct __is_fast_hash : public std::true_type { }; template<> struct __is_fast_hash<hash<long double>> : public std::false_type { }; } # 6627 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<> struct hash<string> : public __hash_base<size_t, string> { size_t operator()(const string& __s) const noexcept { return std::_Hash_impl::hash(__s.data(), __s.length()); } }; template<> struct __is_fast_hash<hash<string>> : std::false_type { }; template<> struct hash<wstring> : public __hash_base<size_t, wstring> { size_t operator()(const wstring& __s) const noexcept { return std::_Hash_impl::hash(__s.data(), __s.length() * sizeof(wchar_t)); } }; template<> struct __is_fast_hash<hash<wstring>> : std::false_type { }; template<> struct hash<u16string> : public __hash_base<size_t, u16string> { size_t operator()(const u16string& __s) const noexcept { return std::_Hash_impl::hash(__s.data(), __s.length() * sizeof(char16_t)); } }; template<> struct __is_fast_hash<hash<u16string>> : std::false_type { }; template<> struct hash<u32string> : public __hash_base<size_t, u32string> { size_t operator()(const u32string& __s) const noexcept { return std::_Hash_impl::hash(__s.data(), __s.length() * sizeof(char32_t)); } }; template<> struct __is_fast_hash<hash<u32string>> : std::false_type { }; inline namespace literals { inline namespace string_literals { #pragma GCC diagnostic push __attribute ((__abi_tag__ ("cxx11"))) inline basic_string<char> operator""s(const char* __str, size_t __len) { return basic_string<char>{__str, __len}; } __attribute ((__abi_tag__ ("cxx11"))) inline basic_string<wchar_t> operator""s(const wchar_t* __str, size_t __len) { return basic_string<wchar_t>{__str, __len}; } __attribute ((__abi_tag__ ("cxx11"))) inline basic_string<char16_t> operator""s(const char16_t* __str, size_t __len) { return basic_string<char16_t>{__str, __len}; } __attribute ((__abi_tag__ ("cxx11"))) inline basic_string<char32_t> operator""s(const char32_t* __str, size_t __len) { return basic_string<char32_t>{__str, __len}; } #pragma GCC diagnostic pop } } } # 53 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/string" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.tcc" 1 3 # 43 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, typename _Traits, typename _Alloc> const typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>::npos; template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: swap(basic_string& __s) noexcept { if (this == &__s) return; _Alloc_traits::_S_on_swap(_M_get_allocator(), __s._M_get_allocator()); if (_M_is_local()) if (__s._M_is_local()) { if (length() && __s.length()) { _CharT __tmp_data[_S_local_capacity + 1]; traits_type::copy(__tmp_data, __s._M_local_buf, _S_local_capacity + 1); traits_type::copy(__s._M_local_buf, _M_local_buf, _S_local_capacity + 1); traits_type::copy(_M_local_buf, __tmp_data, _S_local_capacity + 1); } else if (__s.length()) { traits_type::copy(_M_local_buf, __s._M_local_buf, _S_local_capacity + 1); _M_length(__s.length()); __s._M_set_length(0); return; } else if (length()) { traits_type::copy(__s._M_local_buf, _M_local_buf, _S_local_capacity + 1); __s._M_length(length()); _M_set_length(0); return; } } else { const size_type __tmp_capacity = __s._M_allocated_capacity; traits_type::copy(__s._M_local_buf, _M_local_buf, _S_local_capacity + 1); _M_data(__s._M_data()); __s._M_data(__s._M_local_buf); _M_capacity(__tmp_capacity); } else { const size_type __tmp_capacity = _M_allocated_capacity; if (__s._M_is_local()) { traits_type::copy(_M_local_buf, __s._M_local_buf, _S_local_capacity + 1); __s._M_data(_M_data()); _M_data(_M_local_buf); } else { pointer __tmp_ptr = _M_data(); _M_data(__s._M_data()); __s._M_data(__tmp_ptr); _M_capacity(__s._M_allocated_capacity); } __s._M_capacity(__tmp_capacity); } const size_type __tmp_length = length(); _M_length(__s.length()); __s._M_length(__tmp_length); } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::pointer basic_string<_CharT, _Traits, _Alloc>:: _M_create(size_type& __capacity, size_type __old_capacity) { if (__capacity > max_size()) std::__throw_length_error(("basic_string::_M_create")); if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) { __capacity = 2 * __old_capacity; if (__capacity > max_size()) __capacity = max_size(); } return _Alloc_traits::allocate(_M_get_allocator(), __capacity + 1); } template<typename _CharT, typename _Traits, typename _Alloc> template<typename _InIterator> void basic_string<_CharT, _Traits, _Alloc>:: _M_construct(_InIterator __beg, _InIterator __end, std::input_iterator_tag) { size_type __len = 0; size_type __capacity = size_type(_S_local_capacity); while (__beg != __end && __len < __capacity) { _M_data()[__len++] = *__beg; ++__beg; } if (true) { while (__beg != __end) { if (__len == __capacity) { __capacity = __len + 1; pointer __another = _M_create(__capacity, __len); this->_S_copy(__another, _M_data(), __len); _M_dispose(); _M_data(__another); _M_capacity(__capacity); } _M_data()[__len++] = *__beg; ++__beg; } } if (false) { _M_dispose(); ; } _M_set_length(__len); } template<typename _CharT, typename _Traits, typename _Alloc> template<typename _InIterator> void basic_string<_CharT, _Traits, _Alloc>:: _M_construct(_InIterator __beg, _InIterator __end, std::forward_iterator_tag) { if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) std::__throw_logic_error(("basic_string::" "_M_construct null not valid")); size_type __dnew = static_cast<size_type>(std::distance(__beg, __end)); if (__dnew > size_type(_S_local_capacity)) { _M_data(_M_create(__dnew, size_type(0))); _M_capacity(__dnew); } if (true) { this->_S_copy_chars(_M_data(), __beg, __end); } if (false) { _M_dispose(); ; } _M_set_length(__dnew); } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: _M_construct(size_type __n, _CharT __c) { if (__n > size_type(_S_local_capacity)) { _M_data(_M_create(__n, size_type(0))); _M_capacity(__n); } if (__n) this->_S_assign(_M_data(), __n, __c); _M_set_length(__n); } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: _M_assign(const basic_string& __str) { if (this != &__str) { const size_type __rsize = __str.length(); const size_type __capacity = capacity(); if (__rsize > __capacity) { size_type __new_capacity = __rsize; pointer __tmp = _M_create(__new_capacity, __capacity); _M_dispose(); _M_data(__tmp); _M_capacity(__new_capacity); } if (__rsize) this->_S_copy(_M_data(), __str._M_data(), __rsize); _M_set_length(__rsize); } } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: reserve(size_type __res) { if (__res < length()) __res = length(); const size_type __capacity = capacity(); if (__res != __capacity) { if (__res > __capacity || __res > size_type(_S_local_capacity)) { pointer __tmp = _M_create(__res, __capacity); this->_S_copy(__tmp, _M_data(), length() + 1); _M_dispose(); _M_data(__tmp); _M_capacity(__res); } else if (!_M_is_local()) { this->_S_copy(_M_local_data(), _M_data(), length() + 1); _M_destroy(__capacity); _M_data(_M_local_data()); } } } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, size_type __len2) { const size_type __how_much = length() - __pos - __len1; size_type __new_capacity = length() + __len2 - __len1; pointer __r = _M_create(__new_capacity, capacity()); if (__pos) this->_S_copy(__r, _M_data(), __pos); if (__s && __len2) this->_S_copy(__r + __pos, __s, __len2); if (__how_much) this->_S_copy(__r + __pos + __len2, _M_data() + __pos + __len1, __how_much); _M_dispose(); _M_data(__r); _M_capacity(__new_capacity); } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: _M_erase(size_type __pos, size_type __n) { const size_type __how_much = length() - __pos - __n; if (__how_much && __n) this->_S_move(_M_data() + __pos, _M_data() + __pos + __n, __how_much); _M_set_length(length() - __n); } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: resize(size_type __n, _CharT __c) { const size_type __size = this->size(); if (__size < __n) this->append(__n - __size, __c); else if (__n < __size) this->_M_set_length(__n); } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_append(const _CharT* __s, size_type __n) { const size_type __len = __n + this->size(); if (__len <= this->capacity()) { if (__n) this->_S_copy(this->_M_data() + this->size(), __s, __n); } else this->_M_mutate(this->size(), size_type(0), __s, __n); this->_M_set_length(__len); return *this; } template<typename _CharT, typename _Traits, typename _Alloc> template<typename _InputIterator> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_dispatch(const_iterator __i1, const_iterator __i2, _InputIterator __k1, _InputIterator __k2, std::__false_type) { const basic_string __s(__k1, __k2); const size_type __n1 = __i2 - __i1; return _M_replace(__i1 - begin(), __n1, __s._M_data(), __s.size()); } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c) { _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); const size_type __old_size = this->size(); const size_type __new_size = __old_size + __n2 - __n1; if (__new_size <= this->capacity()) { pointer __p = this->_M_data() + __pos1; const size_type __how_much = __old_size - __pos1 - __n1; if (__how_much && __n1 != __n2) this->_S_move(__p + __n2, __p + __n1, __how_much); } else this->_M_mutate(__pos1, __n1, 0, __n2); if (__n2) this->_S_assign(this->_M_data() + __pos1, __n2, __c); this->_M_set_length(__new_size); return *this; } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace(size_type __pos, size_type __len1, const _CharT* __s, const size_type __len2) { _M_check_length(__len1, __len2, "basic_string::_M_replace"); const size_type __old_size = this->size(); const size_type __new_size = __old_size + __len2 - __len1; if (__new_size <= this->capacity()) { pointer __p = this->_M_data() + __pos; const size_type __how_much = __old_size - __pos - __len1; if (_M_disjunct(__s)) { if (__how_much && __len1 != __len2) this->_S_move(__p + __len2, __p + __len1, __how_much); if (__len2) this->_S_copy(__p, __s, __len2); } else { if (__len2 && __len2 <= __len1) this->_S_move(__p, __s, __len2); if (__how_much && __len1 != __len2) this->_S_move(__p + __len2, __p + __len1, __how_much); if (__len2 > __len1) { if (__s + __len2 <= __p + __len1) this->_S_move(__p, __s, __len2); else if (__s >= __p + __len1) this->_S_copy(__p, __s + __len2 - __len1, __len2); else { const size_type __nleft = (__p + __len1) - __s; this->_S_move(__p, __s, __nleft); this->_S_copy(__p + __nleft, __p + __len2, __len2 - __nleft); } } } } else this->_M_mutate(__pos, __len1, __s, __len2); this->_M_set_length(__new_size); return *this; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: copy(_CharT* __s, size_type __n, size_type __pos) const { _M_check(__pos, "basic_string::copy"); __n = _M_limit(__pos, __n); ; if (__n) _S_copy(__s, _M_data() + __pos, __n); return __n; } # 1155 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.tcc" 3 template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc> operator+(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { ; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; const __size_type __len = _Traits::length(__lhs); __string_type __str; __str.reserve(__len + __rhs.size()); __str.append(__lhs, __len); __str.append(__rhs); return __str; } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc> operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; __string_type __str; const __size_type __len = __rhs.size(); __str.reserve(__len + 1); __str.append(__size_type(1), __lhs); __str.append(__rhs); return __str; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find(const _CharT* __s, size_type __pos, size_type __n) const noexcept { ; const size_type __size = this->size(); if (__n == 0) return __pos <= __size ? __pos : npos; if (__pos >= __size) return npos; const _CharT __elem0 = __s[0]; const _CharT* const __data = data(); const _CharT* __first = __data + __pos; const _CharT* const __last = __data + __size; size_type __len = __size - __pos; while (__len >= __n) { __first = traits_type::find(__first, __len - __n + 1, __elem0); if (!__first) return npos; if (traits_type::compare(__first, __s, __n) == 0) return __first - __data; __len = __last - ++__first; } return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find(_CharT __c, size_type __pos) const noexcept { size_type __ret = npos; const size_type __size = this->size(); if (__pos < __size) { const _CharT* __data = _M_data(); const size_type __n = __size - __pos; const _CharT* __p = traits_type::find(__data + __pos, __n, __c); if (__p) __ret = __p - __data; } return __ret; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(const _CharT* __s, size_type __pos, size_type __n) const noexcept { ; const size_type __size = this->size(); if (__n <= __size) { __pos = std::min(size_type(__size - __n), __pos); const _CharT* __data = _M_data(); do { if (traits_type::compare(__data + __pos, __s, __n) == 0) return __pos; } while (__pos-- > 0); } return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(_CharT __c, size_type __pos) const noexcept { size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; for (++__size; __size-- > 0; ) if (traits_type::eq(_M_data()[__size], __c)) return __size; } return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_of(const _CharT* __s, size_type __pos, size_type __n) const noexcept { ; for (; __n && __pos < this->size(); ++__pos) { const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); if (__p) return __pos; } return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_of(const _CharT* __s, size_type __pos, size_type __n) const noexcept { ; size_type __size = this->size(); if (__size && __n) { if (--__size > __pos) __size = __pos; do { if (traits_type::find(__s, __n, _M_data()[__size])) return __size; } while (__size-- != 0); } return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const noexcept { ; for (; __pos < this->size(); ++__pos) if (!traits_type::find(__s, __n, _M_data()[__pos])) return __pos; return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_not_of(_CharT __c, size_type __pos) const noexcept { for (; __pos < this->size(); ++__pos) if (!traits_type::eq(_M_data()[__pos], __c)) return __pos; return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const noexcept { ; size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; do { if (!traits_type::find(__s, __n, _M_data()[__size])) return __size; } while (__size--); } return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_not_of(_CharT __c, size_type __pos) const noexcept { size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; do { if (!traits_type::eq(_M_data()[__size], __c)) return __size; } while (__size--); } return npos; } template<typename _CharT, typename _Traits, typename _Alloc> int basic_string<_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n, const basic_string& __str) const { _M_check(__pos, "basic_string::compare"); __n = _M_limit(__pos, __n); const size_type __osize = __str.size(); const size_type __len = std::min(__n, __osize); int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); if (!__r) __r = _S_compare(__n, __osize); return __r; } template<typename _CharT, typename _Traits, typename _Alloc> int basic_string<_CharT, _Traits, _Alloc>:: compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) const { _M_check(__pos1, "basic_string::compare"); __str._M_check(__pos2, "basic_string::compare"); __n1 = _M_limit(__pos1, __n1); __n2 = __str._M_limit(__pos2, __n2); const size_type __len = std::min(__n1, __n2); int __r = traits_type::compare(_M_data() + __pos1, __str.data() + __pos2, __len); if (!__r) __r = _S_compare(__n1, __n2); return __r; } template<typename _CharT, typename _Traits, typename _Alloc> int basic_string<_CharT, _Traits, _Alloc>:: compare(const _CharT* __s) const noexcept { ; const size_type __size = this->size(); const size_type __osize = traits_type::length(__s); const size_type __len = std::min(__size, __osize); int __r = traits_type::compare(_M_data(), __s, __len); if (!__r) __r = _S_compare(__size, __osize); return __r; } template<typename _CharT, typename _Traits, typename _Alloc> int basic_string <_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n1, const _CharT* __s) const { ; _M_check(__pos, "basic_string::compare"); __n1 = _M_limit(__pos, __n1); const size_type __osize = traits_type::length(__s); const size_type __len = std::min(__n1, __osize); int __r = traits_type::compare(_M_data() + __pos, __s, __len); if (!__r) __r = _S_compare(__n1, __osize); return __r; } template<typename _CharT, typename _Traits, typename _Alloc> int basic_string <_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) const { ; _M_check(__pos, "basic_string::compare"); __n1 = _M_limit(__pos, __n1); const size_type __len = std::min(__n1, __n2); int __r = traits_type::compare(_M_data() + __pos, __s, __len); if (!__r) __r = _S_compare(__n1, __n2); return __r; } template<typename _CharT, typename _Traits, typename _Alloc> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, basic_string<_CharT, _Traits, _Alloc>& __str) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __istream_type::ios_base __ios_base; typedef typename __istream_type::int_type __int_type; typedef typename __string_type::size_type __size_type; typedef ctype<_CharT> __ctype_type; typedef typename __ctype_type::ctype_base __ctype_base; __size_type __extracted = 0; typename __ios_base::iostate __err = __ios_base::goodbit; typename __istream_type::sentry __cerb(__in, false); if (__cerb) { if (true) { __str.erase(); _CharT __buf[128]; __size_type __len = 0; const streamsize __w = __in.width(); const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) : __str.max_size(); const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); const __int_type __eof = _Traits::eof(); __int_type __c = __in.rdbuf()->sgetc(); while (__extracted < __n && !_Traits::eq_int_type(__c, __eof) && !__ct.is(__ctype_base::space, _Traits::to_char_type(__c))) { if (__len == sizeof(__buf) / sizeof(_CharT)) { __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); __len = 0; } __buf[__len++] = _Traits::to_char_type(__c); ++__extracted; __c = __in.rdbuf()->snextc(); } __str.append(__buf, __len); if (_Traits::eq_int_type(__c, __eof)) __err |= __ios_base::eofbit; __in.width(0); } if (false) { __in._M_setstate(__ios_base::badbit); ; } if (false) { __in._M_setstate(__ios_base::badbit); } } if (!__extracted) __err |= __ios_base::failbit; if (__err) __in.setstate(__err); return __in; } template<typename _CharT, typename _Traits, typename _Alloc> basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __in, basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __istream_type::ios_base __ios_base; typedef typename __istream_type::int_type __int_type; typedef typename __string_type::size_type __size_type; __size_type __extracted = 0; const __size_type __n = __str.max_size(); typename __ios_base::iostate __err = __ios_base::goodbit; typename __istream_type::sentry __cerb(__in, true); if (__cerb) { if (true) { __str.erase(); const __int_type __idelim = _Traits::to_int_type(__delim); const __int_type __eof = _Traits::eof(); __int_type __c = __in.rdbuf()->sgetc(); while (__extracted < __n && !_Traits::eq_int_type(__c, __eof) && !_Traits::eq_int_type(__c, __idelim)) { __str += _Traits::to_char_type(__c); ++__extracted; __c = __in.rdbuf()->snextc(); } if (_Traits::eq_int_type(__c, __eof)) __err |= __ios_base::eofbit; else if (_Traits::eq_int_type(__c, __idelim)) { ++__extracted; __in.rdbuf()->sbumpc(); } else __err |= __ios_base::failbit; } if (false) { __in._M_setstate(__ios_base::badbit); ; } if (false) { __in._M_setstate(__ios_base::badbit); } } if (!__extracted) __err |= __ios_base::failbit; if (__err) __in.setstate(__err); return __in; } # 1607 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.tcc" 3 extern template class basic_string<char>; extern template basic_istream<char>& operator>>(basic_istream<char>&, string&); extern template basic_ostream<char>& operator<<(basic_ostream<char>&, const string&); extern template basic_istream<char>& getline(basic_istream<char>&, string&, char); extern template basic_istream<char>& getline(basic_istream<char>&, string&); extern template class basic_string<wchar_t>; extern template basic_istream<wchar_t>& operator>>(basic_istream<wchar_t>&, wstring&); extern template basic_ostream<wchar_t>& operator<<(basic_ostream<wchar_t>&, const wstring&); extern template basic_istream<wchar_t>& getline(basic_istream<wchar_t>&, wstring&, wchar_t); extern template basic_istream<wchar_t>& getline(basic_istream<wchar_t>&, wstring&); } # 54 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/string" 2 3 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/ErrorHandling.h" 2 namespace llvm { class StringRef; class Twine; typedef void (*fatal_error_handler_t)(void *user_data, const std::string& reason, bool gen_crash_diag); # 45 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/ErrorHandling.h" void install_fatal_error_handler(fatal_error_handler_t handler, void *user_data = nullptr); void remove_fatal_error_handler(); struct ScopedFatalErrorHandler { explicit ScopedFatalErrorHandler(fatal_error_handler_t handler, void *user_data = nullptr) { install_fatal_error_handler(handler, user_data); } ~ScopedFatalErrorHandler() { remove_fatal_error_handler(); } }; # 71 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/ErrorHandling.h" __attribute__((noreturn)) void report_fatal_error(const char *reason, bool gen_crash_diag = true); __attribute__((noreturn)) void report_fatal_error(const std::string &reason, bool gen_crash_diag = true); __attribute__((noreturn)) void report_fatal_error(StringRef reason, bool gen_crash_diag = true); __attribute__((noreturn)) void report_fatal_error(const Twine &reason, bool gen_crash_diag = true); # 96 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/ErrorHandling.h" void install_bad_alloc_error_handler(fatal_error_handler_t handler, void *user_data = nullptr); void remove_bad_alloc_error_handler(); void install_out_of_memory_new_handler(); # 116 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/ErrorHandling.h" __attribute__((noreturn)) void report_bad_alloc_error(const char *Reason, bool GenCrashDiag = true); __attribute__((noreturn)) void llvm_unreachable_internal(const char *msg = nullptr, const char *file = nullptr, unsigned line = 0); } # 49 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/SwapByteOrder.h" 1 # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/SwapByteOrder.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstddef" 1 3 # 43 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstddef" 3 # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 1 3 # 51 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstddef" 2 3 namespace std { using ::max_align_t; } # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/SwapByteOrder.h" 2 # 49 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/SwapByteOrder.h" namespace llvm { inline uint16_t ByteSwap_16(uint16_t value) { uint16_t Hi = value << 8; uint16_t Lo = value >> 8; return Hi | Lo; } inline uint32_t ByteSwap_32(uint32_t value) { return __builtin_bswap32(value); # 78 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/SwapByteOrder.h" } inline uint64_t ByteSwap_64(uint64_t value) { return __builtin_bswap64(value); } namespace sys { constexpr bool IsBigEndianHost = false; static const bool IsLittleEndianHost = !IsBigEndianHost; inline unsigned char getSwappedBytes(unsigned char C) { return C; } inline signed char getSwappedBytes(signed char C) { return C; } inline char getSwappedBytes(char C) { return C; } inline unsigned short getSwappedBytes(unsigned short C) { return ByteSwap_16(C); } inline signed short getSwappedBytes( signed short C) { return ByteSwap_16(C); } inline unsigned int getSwappedBytes(unsigned int C) { return ByteSwap_32(C); } inline signed int getSwappedBytes( signed int C) { return ByteSwap_32(C); } inline unsigned long getSwappedBytes(unsigned long C) { return sizeof(long) == sizeof(int) ? ByteSwap_32((uint32_t)C) : ByteSwap_64((uint64_t)C); } inline signed long getSwappedBytes(signed long C) { return sizeof(long) == sizeof(int) ? ByteSwap_32((uint32_t)C) : ByteSwap_64((uint64_t)C); } inline unsigned long long getSwappedBytes(unsigned long long C) { return ByteSwap_64(C); } inline signed long long getSwappedBytes(signed long long C) { return ByteSwap_64(C); } inline float getSwappedBytes(float C) { union { uint32_t i; float f; } in, out; in.f = C; out.i = ByteSwap_32(in.i); return out.f; } inline double getSwappedBytes(double C) { union { uint64_t i; double d; } in, out; in.d = C; out.i = ByteSwap_64(in.i); return out.d; } template <typename T> inline std::enable_if_t<std::is_enum<T>::value, T> getSwappedBytes(T C) { return static_cast<T>( getSwappedBytes(static_cast<std::underlying_type_t<T>>(C))); } template<typename T> inline void swapByteOrder(T &Value) { Value = getSwappedBytes(Value); } } } # 50 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/type_traits.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/type_traits.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/utility" 1 3 # 59 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/utility" 3 # 69 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/utility" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_relops.h" 1 3 # 67 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_relops.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { namespace rel_ops { # 85 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_relops.h" 3 template <class _Tp> inline bool operator!=(const _Tp& __x, const _Tp& __y) { return !(__x == __y); } # 98 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_relops.h" 3 template <class _Tp> inline bool operator>(const _Tp& __x, const _Tp& __y) { return __y < __x; } # 111 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_relops.h" 3 template <class _Tp> inline bool operator<=(const _Tp& __x, const _Tp& __y) { return !(__y < __x); } # 124 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_relops.h" 3 template <class _Tp> inline bool operator>=(const _Tp& __x, const _Tp& __y) { return !(__x < __y); } } } # 70 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/utility" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> struct tuple_size; template<typename _Tp, typename _Up = typename remove_cv<_Tp>::type, typename = typename enable_if<is_same<_Tp, _Up>::value>::type, size_t = tuple_size<_Tp>::value> using __enable_if_has_tuple_size = _Tp; template<typename _Tp> struct tuple_size<const __enable_if_has_tuple_size<_Tp>> : public tuple_size<_Tp> { }; template<typename _Tp> struct tuple_size<volatile __enable_if_has_tuple_size<_Tp>> : public tuple_size<_Tp> { }; template<typename _Tp> struct tuple_size<const volatile __enable_if_has_tuple_size<_Tp>> : public tuple_size<_Tp> { }; template<std::size_t __i, typename _Tp> struct tuple_element; template<std::size_t __i, typename _Tp> using __tuple_element_t = typename tuple_element<__i, _Tp>::type; template<std::size_t __i, typename _Tp> struct tuple_element<__i, const _Tp> { typedef typename add_const<__tuple_element_t<__i, _Tp>>::type type; }; template<std::size_t __i, typename _Tp> struct tuple_element<__i, volatile _Tp> { typedef typename add_volatile<__tuple_element_t<__i, _Tp>>::type type; }; template<std::size_t __i, typename _Tp> struct tuple_element<__i, const volatile _Tp> { typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type; }; template<std::size_t __i, typename _Tp> using tuple_element_t = typename tuple_element<__i, _Tp>::type; template<typename _T1, typename _T2> struct __is_tuple_like_impl<std::pair<_T1, _T2>> : true_type { }; template<class _Tp1, class _Tp2> struct tuple_size<std::pair<_Tp1, _Tp2>> : public integral_constant<std::size_t, 2> { }; template<class _Tp1, class _Tp2> struct tuple_element<0, std::pair<_Tp1, _Tp2>> { typedef _Tp1 type; }; template<class _Tp1, class _Tp2> struct tuple_element<1, std::pair<_Tp1, _Tp2>> { typedef _Tp2 type; }; template<std::size_t _Int> struct __pair_get; template<> struct __pair_get<0> { template<typename _Tp1, typename _Tp2> static constexpr _Tp1& __get(std::pair<_Tp1, _Tp2>& __pair) noexcept { return __pair.first; } template<typename _Tp1, typename _Tp2> static constexpr _Tp1&& __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept { return std::forward<_Tp1>(__pair.first); } template<typename _Tp1, typename _Tp2> static constexpr const _Tp1& __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept { return __pair.first; } template<typename _Tp1, typename _Tp2> static constexpr const _Tp1&& __const_move_get(const std::pair<_Tp1, _Tp2>&& __pair) noexcept { return std::forward<const _Tp1>(__pair.first); } }; template<> struct __pair_get<1> { template<typename _Tp1, typename _Tp2> static constexpr _Tp2& __get(std::pair<_Tp1, _Tp2>& __pair) noexcept { return __pair.second; } template<typename _Tp1, typename _Tp2> static constexpr _Tp2&& __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept { return std::forward<_Tp2>(__pair.second); } template<typename _Tp1, typename _Tp2> static constexpr const _Tp2& __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept { return __pair.second; } template<typename _Tp1, typename _Tp2> static constexpr const _Tp2&& __const_move_get(const std::pair<_Tp1, _Tp2>&& __pair) noexcept { return std::forward<const _Tp2>(__pair.second); } }; template<std::size_t _Int, class _Tp1, class _Tp2> constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& get(std::pair<_Tp1, _Tp2>& __in) noexcept { return __pair_get<_Int>::__get(__in); } template<std::size_t _Int, class _Tp1, class _Tp2> constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& get(std::pair<_Tp1, _Tp2>&& __in) noexcept { return __pair_get<_Int>::__move_get(std::move(__in)); } template<std::size_t _Int, class _Tp1, class _Tp2> constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& get(const std::pair<_Tp1, _Tp2>& __in) noexcept { return __pair_get<_Int>::__const_get(__in); } template<std::size_t _Int, class _Tp1, class _Tp2> constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& get(const std::pair<_Tp1, _Tp2>&& __in) noexcept { return __pair_get<_Int>::__const_move_get(std::move(__in)); } template <typename _Tp, typename _Up> constexpr _Tp& get(pair<_Tp, _Up>& __p) noexcept { return __p.first; } template <typename _Tp, typename _Up> constexpr const _Tp& get(const pair<_Tp, _Up>& __p) noexcept { return __p.first; } template <typename _Tp, typename _Up> constexpr _Tp&& get(pair<_Tp, _Up>&& __p) noexcept { return std::move(__p.first); } template <typename _Tp, typename _Up> constexpr const _Tp&& get(const pair<_Tp, _Up>&& __p) noexcept { return std::move(__p.first); } template <typename _Tp, typename _Up> constexpr _Tp& get(pair<_Up, _Tp>& __p) noexcept { return __p.second; } template <typename _Tp, typename _Up> constexpr const _Tp& get(const pair<_Up, _Tp>& __p) noexcept { return __p.second; } template <typename _Tp, typename _Up> constexpr _Tp&& get(pair<_Up, _Tp>&& __p) noexcept { return std::move(__p.second); } template <typename _Tp, typename _Up> constexpr const _Tp&& get(const pair<_Up, _Tp>&& __p) noexcept { return std::move(__p.second); } template <typename _Tp, typename _Up = _Tp> inline _Tp exchange(_Tp& __obj, _Up&& __new_val) { return std::__exchange(__obj, std::forward<_Up>(__new_val)); } template<size_t... _Indexes> struct _Index_tuple { }; # 298 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/utility" 3 template<size_t _Num> struct _Build_index_tuple { template<typename, size_t... _Indices> using _IdxTuple = _Index_tuple<_Indices...>; using __type = __make_integer_seq<_IdxTuple, size_t, _Num>; }; template<typename _Tp, _Tp... _Idx> struct integer_sequence { typedef _Tp value_type; static constexpr size_t size() noexcept { return sizeof...(_Idx); } }; template<typename _Tp, _Tp _Num> using make_integer_sequence = __make_integer_seq<integer_sequence, _Tp, _Num>; template<size_t... _Idx> using index_sequence = integer_sequence<size_t, _Idx...>; template<size_t _Num> using make_index_sequence = make_integer_sequence<size_t, _Num>; template<typename... _Types> using index_sequence_for = make_index_sequence<sizeof...(_Types)>; # 394 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/utility" 3 } # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/type_traits.h" 2 namespace llvm { # 30 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/type_traits.h" template <typename T> class is_integral_or_enum { using UnderlyingT = std::remove_reference_t<T>; public: static const bool value = !std::is_class<UnderlyingT>::value && !std::is_pointer<UnderlyingT>::value && !std::is_floating_point<UnderlyingT>::value && (std::is_enum<UnderlyingT>::value || std::is_convertible<UnderlyingT, unsigned long long>::value); }; template<typename T, typename Enable = void> struct add_lvalue_reference_if_not_pointer { using type = T &; }; template <typename T> struct add_lvalue_reference_if_not_pointer< T, std::enable_if_t<std::is_pointer<T>::value>> { using type = T; }; template<typename T, typename Enable = void> struct add_const_past_pointer { using type = const T; }; template <typename T> struct add_const_past_pointer<T, std::enable_if_t<std::is_pointer<T>::value>> { using type = const std::remove_pointer_t<T> *; }; template <typename T, typename Enable = void> struct const_pointer_or_const_ref { using type = const T &; }; template <typename T> struct const_pointer_or_const_ref<T, std::enable_if_t<std::is_pointer<T>::value>> { using type = typename add_const_past_pointer<T>::type; }; namespace detail { template<typename T> union copy_construction_triviality_helper { T t; copy_construction_triviality_helper() = default; copy_construction_triviality_helper(const copy_construction_triviality_helper&) = default; ~copy_construction_triviality_helper() = default; }; template<typename T> union move_construction_triviality_helper { T t; move_construction_triviality_helper() = default; move_construction_triviality_helper(move_construction_triviality_helper&&) = default; ~move_construction_triviality_helper() = default; }; template<class T> union trivial_helper { T t; }; } template <typename T> struct is_trivially_copy_constructible : std::is_copy_constructible< ::llvm::detail::copy_construction_triviality_helper<T>> {}; template <typename T> struct is_trivially_copy_constructible<T &> : std::true_type {}; template <typename T> struct is_trivially_copy_constructible<T &&> : std::false_type {}; template <typename T> struct is_trivially_move_constructible : std::is_move_constructible< ::llvm::detail::move_construction_triviality_helper<T>> {}; template <typename T> struct is_trivially_move_constructible<T &> : std::true_type {}; template <typename T> struct is_trivially_move_constructible<T &&> : std::true_type {}; template <typename T> struct is_copy_assignable { template<class F> static auto get(F*) -> decltype(std::declval<F &>() = std::declval<const F &>(), std::true_type{}); static std::false_type get(...); static constexpr bool value = decltype(get((T*)nullptr))::value; }; template <typename T> struct is_move_assignable { template<class F> static auto get(F*) -> decltype(std::declval<F &>() = std::declval<F &&>(), std::true_type{}); static std::false_type get(...); static constexpr bool value = decltype(get((T*)nullptr))::value; }; template <typename T> class is_trivially_copyable { static constexpr bool has_trivial_copy_constructor = std::is_copy_constructible<detail::trivial_helper<T>>::value; static constexpr bool has_deleted_copy_constructor = !std::is_copy_constructible<T>::value; static constexpr bool has_trivial_move_constructor = std::is_move_constructible<detail::trivial_helper<T>>::value; static constexpr bool has_deleted_move_constructor = !std::is_move_constructible<T>::value; static constexpr bool has_trivial_copy_assign = is_copy_assignable<detail::trivial_helper<T>>::value; static constexpr bool has_deleted_copy_assign = !is_copy_assignable<T>::value; static constexpr bool has_trivial_move_assign = is_move_assignable<detail::trivial_helper<T>>::value; static constexpr bool has_deleted_move_assign = !is_move_assignable<T>::value; static constexpr bool has_trivial_destructor = std::is_destructible<detail::trivial_helper<T>>::value; public: static constexpr bool value = has_trivial_destructor && (has_deleted_move_assign || has_trivial_move_assign) && (has_deleted_move_constructor || has_trivial_move_constructor) && (has_deleted_copy_assign || has_trivial_copy_assign) && (has_deleted_copy_constructor || has_trivial_copy_constructor); }; template <typename T> class is_trivially_copyable<T*> : public std::true_type { }; } # 51 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/algorithm" 1 3 # 59 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/algorithm" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 1 3 # 59 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 3 # 60 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/algorithmfwd.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/algorithmfwd.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 195 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/algorithmfwd.h" 3 template<typename _IIter, typename _Predicate> bool all_of(_IIter, _IIter, _Predicate); template<typename _IIter, typename _Predicate> bool any_of(_IIter, _IIter, _Predicate); template<typename _FIter, typename _Tp> bool binary_search(_FIter, _FIter, const _Tp&); template<typename _FIter, typename _Tp, typename _Compare> bool binary_search(_FIter, _FIter, const _Tp&, _Compare); # 224 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/algorithmfwd.h" 3 template<typename _IIter, typename _OIter> _OIter copy(_IIter, _IIter, _OIter); template<typename _BIter1, typename _BIter2> _BIter2 copy_backward(_BIter1, _BIter1, _BIter2); template<typename _IIter, typename _OIter, typename _Predicate> _OIter copy_if(_IIter, _IIter, _OIter, _Predicate); template<typename _IIter, typename _Size, typename _OIter> _OIter copy_n(_IIter, _Size, _OIter); template<typename _FIter, typename _Tp> pair<_FIter, _FIter> equal_range(_FIter, _FIter, const _Tp&); template<typename _FIter, typename _Tp, typename _Compare> pair<_FIter, _FIter> equal_range(_FIter, _FIter, const _Tp&, _Compare); template<typename _FIter, typename _Tp> void fill(_FIter, _FIter, const _Tp&); template<typename _OIter, typename _Size, typename _Tp> _OIter fill_n(_OIter, _Size, const _Tp&); template<typename _FIter1, typename _FIter2> _FIter1 find_end(_FIter1, _FIter1, _FIter2, _FIter2); template<typename _FIter1, typename _FIter2, typename _BinaryPredicate> _FIter1 find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); template<typename _IIter, typename _Predicate> _IIter find_if_not(_IIter, _IIter, _Predicate); template<typename _IIter1, typename _IIter2> bool includes(_IIter1, _IIter1, _IIter2, _IIter2); template<typename _IIter1, typename _IIter2, typename _Compare> bool includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); template<typename _BIter> void inplace_merge(_BIter, _BIter, _BIter); template<typename _BIter, typename _Compare> void inplace_merge(_BIter, _BIter, _BIter, _Compare); template<typename _RAIter> bool is_heap(_RAIter, _RAIter); template<typename _RAIter, typename _Compare> bool is_heap(_RAIter, _RAIter, _Compare); template<typename _RAIter> _RAIter is_heap_until(_RAIter, _RAIter); template<typename _RAIter, typename _Compare> _RAIter is_heap_until(_RAIter, _RAIter, _Compare); template<typename _IIter, typename _Predicate> bool is_partitioned(_IIter, _IIter, _Predicate); template<typename _FIter1, typename _FIter2> bool is_permutation(_FIter1, _FIter1, _FIter2); template<typename _FIter1, typename _FIter2, typename _BinaryPredicate> bool is_permutation(_FIter1, _FIter1, _FIter2, _BinaryPredicate); template<typename _FIter> bool is_sorted(_FIter, _FIter); template<typename _FIter, typename _Compare> bool is_sorted(_FIter, _FIter, _Compare); template<typename _FIter> _FIter is_sorted_until(_FIter, _FIter); template<typename _FIter, typename _Compare> _FIter is_sorted_until(_FIter, _FIter, _Compare); template<typename _FIter1, typename _FIter2> void iter_swap(_FIter1, _FIter2); template<typename _FIter, typename _Tp> _FIter lower_bound(_FIter, _FIter, const _Tp&); template<typename _FIter, typename _Tp, typename _Compare> _FIter lower_bound(_FIter, _FIter, const _Tp&, _Compare); template<typename _RAIter> void make_heap(_RAIter, _RAIter); template<typename _RAIter, typename _Compare> void make_heap(_RAIter, _RAIter, _Compare); template<typename _Tp> constexpr const _Tp& max(const _Tp&, const _Tp&); template<typename _Tp, typename _Compare> constexpr const _Tp& max(const _Tp&, const _Tp&, _Compare); template<typename _Tp> constexpr const _Tp& min(const _Tp&, const _Tp&); template<typename _Tp, typename _Compare> constexpr const _Tp& min(const _Tp&, const _Tp&, _Compare); template<typename _Tp> constexpr pair<const _Tp&, const _Tp&> minmax(const _Tp&, const _Tp&); template<typename _Tp, typename _Compare> constexpr pair<const _Tp&, const _Tp&> minmax(const _Tp&, const _Tp&, _Compare); template<typename _FIter> constexpr pair<_FIter, _FIter> minmax_element(_FIter, _FIter); template<typename _FIter, typename _Compare> constexpr pair<_FIter, _FIter> minmax_element(_FIter, _FIter, _Compare); template<typename _Tp> constexpr _Tp min(initializer_list<_Tp>); template<typename _Tp, typename _Compare> constexpr _Tp min(initializer_list<_Tp>, _Compare); template<typename _Tp> constexpr _Tp max(initializer_list<_Tp>); template<typename _Tp, typename _Compare> constexpr _Tp max(initializer_list<_Tp>, _Compare); template<typename _Tp> constexpr pair<_Tp, _Tp> minmax(initializer_list<_Tp>); template<typename _Tp, typename _Compare> constexpr pair<_Tp, _Tp> minmax(initializer_list<_Tp>, _Compare); template<typename _BIter> bool next_permutation(_BIter, _BIter); template<typename _BIter, typename _Compare> bool next_permutation(_BIter, _BIter, _Compare); template<typename _IIter, typename _Predicate> bool none_of(_IIter, _IIter, _Predicate); template<typename _IIter, typename _RAIter> _RAIter partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); template<typename _IIter, typename _RAIter, typename _Compare> _RAIter partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); template<typename _IIter, typename _OIter1, typename _OIter2, typename _Predicate> pair<_OIter1, _OIter2> partition_copy(_IIter, _IIter, _OIter1, _OIter2, _Predicate); template<typename _FIter, typename _Predicate> _FIter partition_point(_FIter, _FIter, _Predicate); template<typename _RAIter> void pop_heap(_RAIter, _RAIter); template<typename _RAIter, typename _Compare> void pop_heap(_RAIter, _RAIter, _Compare); template<typename _BIter> bool prev_permutation(_BIter, _BIter); template<typename _BIter, typename _Compare> bool prev_permutation(_BIter, _BIter, _Compare); template<typename _RAIter> void push_heap(_RAIter, _RAIter); template<typename _RAIter, typename _Compare> void push_heap(_RAIter, _RAIter, _Compare); template<typename _FIter, typename _Tp> _FIter remove(_FIter, _FIter, const _Tp&); template<typename _FIter, typename _Predicate> _FIter remove_if(_FIter, _FIter, _Predicate); template<typename _IIter, typename _OIter, typename _Tp> _OIter remove_copy(_IIter, _IIter, _OIter, const _Tp&); template<typename _IIter, typename _OIter, typename _Predicate> _OIter remove_copy_if(_IIter, _IIter, _OIter, _Predicate); template<typename _IIter, typename _OIter, typename _Tp> _OIter replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); template<typename _Iter, typename _OIter, typename _Predicate, typename _Tp> _OIter replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); template<typename _BIter> void reverse(_BIter, _BIter); template<typename _BIter, typename _OIter> _OIter reverse_copy(_BIter, _BIter, _OIter); inline namespace _V2 { template<typename _FIter> _FIter rotate(_FIter, _FIter, _FIter); } template<typename _FIter, typename _OIter> _OIter rotate_copy(_FIter, _FIter, _FIter, _OIter); # 565 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/algorithmfwd.h" 3 template<typename _RAIter, typename _UGenerator> void shuffle(_RAIter, _RAIter, _UGenerator&&); template<typename _RAIter> void sort_heap(_RAIter, _RAIter); template<typename _RAIter, typename _Compare> void sort_heap(_RAIter, _RAIter, _Compare); template<typename _BIter, typename _Predicate> _BIter stable_partition(_BIter, _BIter, _Predicate); # 594 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/algorithmfwd.h" 3 template<typename _FIter1, typename _FIter2> _FIter2 swap_ranges(_FIter1, _FIter1, _FIter2); template<typename _FIter> _FIter unique(_FIter, _FIter); template<typename _FIter, typename _BinaryPredicate> _FIter unique(_FIter, _FIter, _BinaryPredicate); template<typename _FIter, typename _Tp> _FIter upper_bound(_FIter, _FIter, const _Tp&); template<typename _FIter, typename _Tp, typename _Compare> _FIter upper_bound(_FIter, _FIter, const _Tp&, _Compare); template<typename _FIter> _FIter adjacent_find(_FIter, _FIter); template<typename _FIter, typename _BinaryPredicate> _FIter adjacent_find(_FIter, _FIter, _BinaryPredicate); template<typename _IIter, typename _Tp> typename iterator_traits<_IIter>::difference_type count(_IIter, _IIter, const _Tp&); template<typename _IIter, typename _Predicate> typename iterator_traits<_IIter>::difference_type count_if(_IIter, _IIter, _Predicate); template<typename _IIter1, typename _IIter2> bool equal(_IIter1, _IIter1, _IIter2); template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> bool equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); template<typename _IIter, typename _Tp> _IIter find(_IIter, _IIter, const _Tp&); template<typename _FIter1, typename _FIter2> _FIter1 find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); template<typename _FIter1, typename _FIter2, typename _BinaryPredicate> _FIter1 find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); template<typename _IIter, typename _Predicate> _IIter find_if(_IIter, _IIter, _Predicate); template<typename _IIter, typename _Funct> _Funct for_each(_IIter, _IIter, _Funct); template<typename _FIter, typename _Generator> void generate(_FIter, _FIter, _Generator); template<typename _OIter, typename _Size, typename _Generator> _OIter generate_n(_OIter, _Size, _Generator); template<typename _IIter1, typename _IIter2> bool lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); template<typename _IIter1, typename _IIter2, typename _Compare> bool lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); template<typename _FIter> constexpr _FIter max_element(_FIter, _FIter); template<typename _FIter, typename _Compare> constexpr _FIter max_element(_FIter, _FIter, _Compare); template<typename _IIter1, typename _IIter2, typename _OIter> _OIter merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template<typename _IIter1, typename _IIter2, typename _OIter, typename _Compare> _OIter merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template<typename _FIter> constexpr _FIter min_element(_FIter, _FIter); template<typename _FIter, typename _Compare> constexpr _FIter min_element(_FIter, _FIter, _Compare); template<typename _IIter1, typename _IIter2> pair<_IIter1, _IIter2> mismatch(_IIter1, _IIter1, _IIter2); template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> pair<_IIter1, _IIter2> mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); template<typename _RAIter> void nth_element(_RAIter, _RAIter, _RAIter); template<typename _RAIter, typename _Compare> void nth_element(_RAIter, _RAIter, _RAIter, _Compare); template<typename _RAIter> void partial_sort(_RAIter, _RAIter, _RAIter); template<typename _RAIter, typename _Compare> void partial_sort(_RAIter, _RAIter, _RAIter, _Compare); template<typename _BIter, typename _Predicate> _BIter partition(_BIter, _BIter, _Predicate); template<typename _RAIter> void random_shuffle(_RAIter, _RAIter); template<typename _RAIter, typename _Generator> void random_shuffle(_RAIter, _RAIter, _Generator&&); template<typename _FIter, typename _Tp> void replace(_FIter, _FIter, const _Tp&, const _Tp&); template<typename _FIter, typename _Predicate, typename _Tp> void replace_if(_FIter, _FIter, _Predicate, const _Tp&); template<typename _FIter1, typename _FIter2> _FIter1 search(_FIter1, _FIter1, _FIter2, _FIter2); template<typename _FIter1, typename _FIter2, typename _BinaryPredicate> _FIter1 search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); template<typename _FIter, typename _Size, typename _Tp> _FIter search_n(_FIter, _FIter, _Size, const _Tp&); template<typename _FIter, typename _Size, typename _Tp, typename _BinaryPredicate> _FIter search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); template<typename _IIter1, typename _IIter2, typename _OIter> _OIter set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template<typename _IIter1, typename _IIter2, typename _OIter, typename _Compare> _OIter set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template<typename _IIter1, typename _IIter2, typename _OIter> _OIter set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template<typename _IIter1, typename _IIter2, typename _OIter, typename _Compare> _OIter set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template<typename _IIter1, typename _IIter2, typename _OIter> _OIter set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template<typename _IIter1, typename _IIter2, typename _OIter, typename _Compare> _OIter set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template<typename _IIter1, typename _IIter2, typename _OIter> _OIter set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template<typename _IIter1, typename _IIter2, typename _OIter, typename _Compare> _OIter set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template<typename _RAIter> void sort(_RAIter, _RAIter); template<typename _RAIter, typename _Compare> void sort(_RAIter, _RAIter, _Compare); template<typename _RAIter> void stable_sort(_RAIter, _RAIter); template<typename _RAIter, typename _Compare> void stable_sort(_RAIter, _RAIter, _Compare); template<typename _IIter, typename _OIter, typename _UnaryOperation> _OIter transform(_IIter, _IIter, _OIter, _UnaryOperation); template<typename _IIter1, typename _IIter2, typename _OIter, typename _BinaryOperation> _OIter transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); template<typename _IIter, typename _OIter> _OIter unique_copy(_IIter, _IIter, _OIter); template<typename _IIter, typename _OIter, typename _BinaryPredicate> _OIter unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); } # 61 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_heap.h" 1 3 # 62 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_heap.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _RandomAccessIterator, typename _Distance, typename _Compare> _Distance __is_heap_until(_RandomAccessIterator __first, _Distance __n, _Compare& __comp) { _Distance __parent = 0; for (_Distance __child = 1; __child < __n; ++__child) { if (__comp(__first + __parent, __first + __child)) return __child; if ((__child & 1) == 0) ++__parent; } return __n; } template<typename _RandomAccessIterator, typename _Distance> inline bool __is_heap(_RandomAccessIterator __first, _Distance __n) { __gnu_cxx::__ops::_Iter_less_iter __comp; return std::__is_heap_until(__first, __n, __comp) == __n; } template<typename _RandomAccessIterator, typename _Compare, typename _Distance> inline bool __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) { typedef __decltype(__comp) _Cmp; __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); return std::__is_heap_until(__first, __n, __cmp) == __n; } template<typename _RandomAccessIterator> inline bool __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { return std::__is_heap(__first, std::distance(__first, __last)); } template<typename _RandomAccessIterator, typename _Compare> inline bool __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { return std::__is_heap(__first, std::move(__comp), std::distance(__first, __last)); } template<typename _RandomAccessIterator, typename _Distance, typename _Tp, typename _Compare> void __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __topIndex, _Tp __value, _Compare& __comp) { _Distance __parent = (__holeIndex - 1) / 2; while (__holeIndex > __topIndex && __comp(__first + __parent, __value)) { *(__first + __holeIndex) = std::move(*(__first + __parent)); __holeIndex = __parent; __parent = (__holeIndex - 1) / 2; } *(__first + __holeIndex) = std::move(__value); } # 152 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_heap.h" 3 template<typename _RandomAccessIterator> inline void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; ; ; __gnu_cxx::__ops::_Iter_less_val __comp; _ValueType __value = std::move(*(__last - 1)); std::__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0), std::move(__value), __comp); } # 187 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_heap.h" 3 template<typename _RandomAccessIterator, typename _Compare> inline void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; ; ; __decltype(__gnu_cxx::__ops::__iter_comp_val(std::move(__comp))) __cmp(std::move(__comp)); _ValueType __value = std::move(*(__last - 1)); std::__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0), std::move(__value), __cmp); } template<typename _RandomAccessIterator, typename _Distance, typename _Tp, typename _Compare> void __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __len, _Tp __value, _Compare __comp) { const _Distance __topIndex = __holeIndex; _Distance __secondChild = __holeIndex; while (__secondChild < (__len - 1) / 2) { __secondChild = 2 * (__secondChild + 1); if (__comp(__first + __secondChild, __first + (__secondChild - 1))) __secondChild--; *(__first + __holeIndex) = std::move(*(__first + __secondChild)); __holeIndex = __secondChild; } if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) { __secondChild = 2 * (__secondChild + 1); *(__first + __holeIndex) = std::move(*(__first + (__secondChild - 1))); __holeIndex = __secondChild - 1; } __decltype(__gnu_cxx::__ops::__iter_comp_val(std::move(__comp))) __cmp(std::move(__comp)); std::__push_heap(__first, __holeIndex, __topIndex, std::move(__value), __cmp); } template<typename _RandomAccessIterator, typename _Compare> inline void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomAccessIterator __result, _Compare& __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; _ValueType __value = std::move(*__result); *__result = std::move(*__first); std::__adjust_heap(__first, _DistanceType(0), _DistanceType(__last - __first), std::move(__value), __comp); } # 269 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_heap.h" 3 template<typename _RandomAccessIterator> inline void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { ; ; ; ; if (__last - __first > 1) { --__last; __gnu_cxx::__ops::_Iter_less_iter __comp; std::__pop_heap(__first, __last, __last, __comp); } } # 302 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_heap.h" 3 template<typename _RandomAccessIterator, typename _Compare> inline void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { ; ; ; ; if (__last - __first > 1) { typedef __decltype(__comp) _Cmp; __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); --__last; std::__pop_heap(__first, __last, __last, __cmp); } } template<typename _RandomAccessIterator, typename _Compare> void __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; if (__last - __first < 2) return; const _DistanceType __len = __last - __first; _DistanceType __parent = (__len - 2) / 2; while (true) { _ValueType __value = std::move(*(__first + __parent)); std::__adjust_heap(__first, __parent, __len, std::move(__value), __comp); if (__parent == 0) return; __parent--; } } # 358 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_heap.h" 3 template<typename _RandomAccessIterator> inline void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { ; ; __gnu_cxx::__ops::_Iter_less_iter __comp; std::__make_heap(__first, __last, __comp); } # 384 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_heap.h" 3 template<typename _RandomAccessIterator, typename _Compare> inline void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { ; ; typedef __decltype(__comp) _Cmp; __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); std::__make_heap(__first, __last, __cmp); } template<typename _RandomAccessIterator, typename _Compare> void __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp) { while (__last - __first > 1) { --__last; std::__pop_heap(__first, __last, __last, __comp); } } # 420 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_heap.h" 3 template<typename _RandomAccessIterator> inline void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { ; ; ; __gnu_cxx::__ops::_Iter_less_iter __comp; std::__sort_heap(__first, __last, __comp); } # 447 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_heap.h" 3 template<typename _RandomAccessIterator, typename _Compare> inline void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { ; ; ; typedef __decltype(__comp) _Cmp; __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); std::__sort_heap(__first, __last, __cmp); } # 475 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_heap.h" 3 template<typename _RandomAccessIterator> inline _RandomAccessIterator is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last) { ; ; __gnu_cxx::__ops::_Iter_less_iter __comp; return __first + std::__is_heap_until(__first, std::distance(__first, __last), __comp); } # 503 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_heap.h" 3 template<typename _RandomAccessIterator, typename _Compare> inline _RandomAccessIterator is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { ; ; typedef __decltype(__comp) _Cmp; __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); return __first + std::__is_heap_until(__first, std::distance(__first, __last), __cmp); } # 527 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_heap.h" 3 template<typename _RandomAccessIterator> inline bool is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { return std::is_heap_until(__first, __last) == __last; } # 540 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_heap.h" 3 template<typename _RandomAccessIterator, typename _Compare> inline bool is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { ; ; const auto __dist = std::distance(__first, __last); typedef __decltype(__comp) _Cmp; __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); return std::__is_heap_until(__first, __dist, __cmp) == __dist; } } # 62 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tempbuf.h" 1 3 # 60 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tempbuf.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_construct.h" 1 3 # 63 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_construct.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _T1, typename... _Args> inline void _Construct(_T1* __p, _Args&&... __args) { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); } # 87 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_construct.h" 3 template<typename _T1> inline void _Construct_novalue(_T1* __p) { ::new(static_cast<void*>(__p)) _T1; } template<typename _Tp> inline void _Destroy(_Tp* __pointer) { __pointer->~_Tp(); } template<bool> struct _Destroy_aux { template<typename _ForwardIterator> static void __destroy(_ForwardIterator __first, _ForwardIterator __last) { for (; __first != __last; ++__first) std::_Destroy(std::__addressof(*__first)); } }; template<> struct _Destroy_aux<true> { template<typename _ForwardIterator> static void __destroy(_ForwardIterator, _ForwardIterator) { } }; template<typename _ForwardIterator> inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type _Value_type; static_assert(is_destructible<_Value_type>::value, "value type is destructible"); std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: __destroy(__first, __last); } template<bool> struct _Destroy_n_aux { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __destroy_n(_ForwardIterator __first, _Size __count) { for (; __count > 0; (void)++__first, --__count) std::_Destroy(std::__addressof(*__first)); return __first; } }; template<> struct _Destroy_n_aux<true> { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __destroy_n(_ForwardIterator __first, _Size __count) { std::advance(__first, __count); return __first; } }; template<typename _ForwardIterator, typename _Size> inline _ForwardIterator _Destroy_n(_ForwardIterator __first, _Size __count) { typedef typename iterator_traits<_ForwardIterator>::value_type _Value_type; static_assert(is_destructible<_Value_type>::value, "value type is destructible"); return std::_Destroy_n_aux<__has_trivial_destructor(_Value_type)>:: __destroy_n(__first, __count); } template<typename _ForwardIterator, typename _Allocator> void _Destroy(_ForwardIterator __first, _ForwardIterator __last, _Allocator& __alloc) { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __first != __last; ++__first) __traits::destroy(__alloc, std::__addressof(*__first)); } template<typename _ForwardIterator, typename _Tp> inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last, allocator<_Tp>&) { _Destroy(__first, __last); } # 233 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_construct.h" 3 } # 61 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tempbuf.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 83 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tempbuf.h" 3 template<typename _Tp> pair<_Tp*, ptrdiff_t> get_temporary_buffer(ptrdiff_t __len) noexcept { const ptrdiff_t __max = __gnu_cxx::__numeric_traits<ptrdiff_t>::__max / sizeof(_Tp); if (__len > __max) __len = __max; while (__len > 0) { _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), std::nothrow)); if (__tmp != 0) return std::pair<_Tp*, ptrdiff_t>(__tmp, __len); __len /= 2; } return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); } # 110 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tempbuf.h" 3 template<typename _Tp> inline void return_temporary_buffer(_Tp* __p) { ::operator delete(__p, std::nothrow); } template<typename _ForwardIterator, typename _Tp> class _Temporary_buffer { public: typedef _Tp value_type; typedef value_type* pointer; typedef pointer iterator; typedef ptrdiff_t size_type; protected: size_type _M_original_len; size_type _M_len; pointer _M_buffer; public: size_type size() const { return _M_len; } size_type requested_size() const { return _M_original_len; } iterator begin() { return _M_buffer; } iterator end() { return _M_buffer + _M_len; } _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last); ~_Temporary_buffer() { std::_Destroy(_M_buffer, _M_buffer + _M_len); std::return_temporary_buffer(_M_buffer); } private: _Temporary_buffer(const _Temporary_buffer&); void operator=(const _Temporary_buffer&); }; template<bool> struct __uninitialized_construct_buf_dispatch { template<typename _Pointer, typename _ForwardIterator> static void __ucr(_Pointer __first, _Pointer __last, _ForwardIterator __seed) { if(__first == __last) return; _Pointer __cur = __first; if (true) { std::_Construct(std::__addressof(*__first), std::move(*__seed)); _Pointer __prev = __cur; ++__cur; for(; __cur != __last; ++__cur, ++__prev) std::_Construct(std::__addressof(*__cur), std::move(*__prev)); *__seed = std::move(*__prev); } if (false) { std::_Destroy(__first, __cur); ; } } }; template<> struct __uninitialized_construct_buf_dispatch<true> { template<typename _Pointer, typename _ForwardIterator> static void __ucr(_Pointer, _Pointer, _ForwardIterator) { } }; # 229 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tempbuf.h" 3 template<typename _Pointer, typename _ForwardIterator> inline void __uninitialized_construct_buf(_Pointer __first, _Pointer __last, _ForwardIterator __seed) { typedef typename std::iterator_traits<_Pointer>::value_type _ValueType; std::__uninitialized_construct_buf_dispatch< __has_trivial_constructor(_ValueType)>:: __ucr(__first, __last, __seed); } template<typename _ForwardIterator, typename _Tp> _Temporary_buffer<_ForwardIterator, _Tp>:: _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) : _M_original_len(std::distance(__first, __last)), _M_len(0), _M_buffer(0) { if (true) { std::pair<pointer, size_type> __p(std::get_temporary_buffer< value_type>(_M_original_len)); _M_buffer = __p.first; _M_len = __p.second; if (_M_buffer) std::__uninitialized_construct_buf(_M_buffer, _M_buffer + _M_len, __first); } if (false) { std::return_temporary_buffer(_M_buffer); _M_buffer = 0; _M_len = 0; ; } } } # 63 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/uniform_int_dist.h" 1 3 # 35 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/uniform_int_dist.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/limits" 1 3 # 41 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/limits" 3 # 158 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/limits" 3 namespace std __attribute__ ((__visibility__ ("default"))) { enum float_round_style { round_indeterminate = -1, round_toward_zero = 0, round_to_nearest = 1, round_toward_infinity = 2, round_toward_neg_infinity = 3 }; enum float_denorm_style { denorm_indeterminate = -1, denorm_absent = 0, denorm_present = 1 }; # 202 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/limits" 3 struct __numeric_limits_base { static constexpr bool is_specialized = false; static constexpr int digits = 0; static constexpr int digits10 = 0; static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = false; static constexpr bool is_exact = false; static constexpr int radix = 0; static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr bool is_iec559 = false; static constexpr bool is_bounded = false; # 288 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/limits" 3 static constexpr bool is_modulo = false; static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; # 311 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/limits" 3 template<typename _Tp> struct numeric_limits : public __numeric_limits_base { static constexpr _Tp min() noexcept { return _Tp(); } static constexpr _Tp max() noexcept { return _Tp(); } static constexpr _Tp lowest() noexcept { return _Tp(); } static constexpr _Tp epsilon() noexcept { return _Tp(); } static constexpr _Tp round_error() noexcept { return _Tp(); } static constexpr _Tp infinity() noexcept { return _Tp(); } static constexpr _Tp quiet_NaN() noexcept { return _Tp(); } static constexpr _Tp signaling_NaN() noexcept { return _Tp(); } static constexpr _Tp denorm_min() noexcept { return _Tp(); } }; template<typename _Tp> struct numeric_limits<const _Tp> : public numeric_limits<_Tp> { }; template<typename _Tp> struct numeric_limits<volatile _Tp> : public numeric_limits<_Tp> { }; template<typename _Tp> struct numeric_limits<const volatile _Tp> : public numeric_limits<_Tp> { }; # 382 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/limits" 3 template<> struct numeric_limits<bool> { static constexpr bool is_specialized = true; static constexpr bool min() noexcept { return false; } static constexpr bool max() noexcept { return true; } static constexpr bool lowest() noexcept { return min(); } static constexpr int digits = 1; static constexpr int digits10 = 0; static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr bool epsilon() noexcept { return false; } static constexpr bool round_error() noexcept { return false; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr bool infinity() noexcept { return false; } static constexpr bool quiet_NaN() noexcept { return false; } static constexpr bool signaling_NaN() noexcept { return false; } static constexpr bool denorm_min() noexcept { return false; } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<char> { static constexpr bool is_specialized = true; static constexpr char min() noexcept { return (((char)(-1) < 0) ? -(((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0) - 1 : (char)0); } static constexpr char max() noexcept { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } static constexpr char lowest() noexcept { return min(); } static constexpr int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); static constexpr int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = ((char)(-1) < 0); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr char epsilon() noexcept { return 0; } static constexpr char round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr char infinity() noexcept { return char(); } static constexpr char quiet_NaN() noexcept { return char(); } static constexpr char signaling_NaN() noexcept { return char(); } static constexpr char denorm_min() noexcept { return static_cast<char>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = !is_signed; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<signed char> { static constexpr bool is_specialized = true; static constexpr signed char min() noexcept { return -127 - 1; } static constexpr signed char max() noexcept { return 127; } static constexpr signed char lowest() noexcept { return min(); } static constexpr int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); static constexpr int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr signed char epsilon() noexcept { return 0; } static constexpr signed char round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr signed char infinity() noexcept { return static_cast<signed char>(0); } static constexpr signed char quiet_NaN() noexcept { return static_cast<signed char>(0); } static constexpr signed char signaling_NaN() noexcept { return static_cast<signed char>(0); } static constexpr signed char denorm_min() noexcept { return static_cast<signed char>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<unsigned char> { static constexpr bool is_specialized = true; static constexpr unsigned char min() noexcept { return 0; } static constexpr unsigned char max() noexcept { return 127 * 2U + 1; } static constexpr unsigned char lowest() noexcept { return min(); } static constexpr int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned char epsilon() noexcept { return 0; } static constexpr unsigned char round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned char infinity() noexcept { return static_cast<unsigned char>(0); } static constexpr unsigned char quiet_NaN() noexcept { return static_cast<unsigned char>(0); } static constexpr unsigned char signaling_NaN() noexcept { return static_cast<unsigned char>(0); } static constexpr unsigned char denorm_min() noexcept { return static_cast<unsigned char>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<wchar_t> { static constexpr bool is_specialized = true; static constexpr wchar_t min() noexcept { return (((wchar_t)(-1) < 0) ? -(((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0) - 1 : (wchar_t)0); } static constexpr wchar_t max() noexcept { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } static constexpr wchar_t lowest() noexcept { return min(); } static constexpr int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); static constexpr int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = ((wchar_t)(-1) < 0); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr wchar_t epsilon() noexcept { return 0; } static constexpr wchar_t round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr wchar_t infinity() noexcept { return wchar_t(); } static constexpr wchar_t quiet_NaN() noexcept { return wchar_t(); } static constexpr wchar_t signaling_NaN() noexcept { return wchar_t(); } static constexpr wchar_t denorm_min() noexcept { return wchar_t(); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = !is_signed; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<char16_t> { static constexpr bool is_specialized = true; static constexpr char16_t min() noexcept { return (((char16_t)(-1) < 0) ? -(((char16_t)(-1) < 0) ? (((((char16_t)1 << ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char16_t)0) - 1 : (char16_t)0); } static constexpr char16_t max() noexcept { return (((char16_t)(-1) < 0) ? (((((char16_t)1 << ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char16_t)0); } static constexpr char16_t lowest() noexcept { return min(); } static constexpr int digits = (sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)); static constexpr int digits10 = ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = ((char16_t)(-1) < 0); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr char16_t epsilon() noexcept { return 0; } static constexpr char16_t round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr char16_t infinity() noexcept { return char16_t(); } static constexpr char16_t quiet_NaN() noexcept { return char16_t(); } static constexpr char16_t signaling_NaN() noexcept { return char16_t(); } static constexpr char16_t denorm_min() noexcept { return char16_t(); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = !is_signed; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<char32_t> { static constexpr bool is_specialized = true; static constexpr char32_t min() noexcept { return (((char32_t)(-1) < 0) ? -(((char32_t)(-1) < 0) ? (((((char32_t)1 << ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char32_t)0) - 1 : (char32_t)0); } static constexpr char32_t max() noexcept { return (((char32_t)(-1) < 0) ? (((((char32_t)1 << ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char32_t)0); } static constexpr char32_t lowest() noexcept { return min(); } static constexpr int digits = (sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)); static constexpr int digits10 = ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = ((char32_t)(-1) < 0); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr char32_t epsilon() noexcept { return 0; } static constexpr char32_t round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr char32_t infinity() noexcept { return char32_t(); } static constexpr char32_t quiet_NaN() noexcept { return char32_t(); } static constexpr char32_t signaling_NaN() noexcept { return char32_t(); } static constexpr char32_t denorm_min() noexcept { return char32_t(); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = !is_signed; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<short> { static constexpr bool is_specialized = true; static constexpr short min() noexcept { return -32767 - 1; } static constexpr short max() noexcept { return 32767; } static constexpr short lowest() noexcept { return min(); } static constexpr int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); static constexpr int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr short epsilon() noexcept { return 0; } static constexpr short round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr short infinity() noexcept { return short(); } static constexpr short quiet_NaN() noexcept { return short(); } static constexpr short signaling_NaN() noexcept { return short(); } static constexpr short denorm_min() noexcept { return short(); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<unsigned short> { static constexpr bool is_specialized = true; static constexpr unsigned short min() noexcept { return 0; } static constexpr unsigned short max() noexcept { return 32767 * 2U + 1; } static constexpr unsigned short lowest() noexcept { return min(); } static constexpr int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned short epsilon() noexcept { return 0; } static constexpr unsigned short round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned short infinity() noexcept { return static_cast<unsigned short>(0); } static constexpr unsigned short quiet_NaN() noexcept { return static_cast<unsigned short>(0); } static constexpr unsigned short signaling_NaN() noexcept { return static_cast<unsigned short>(0); } static constexpr unsigned short denorm_min() noexcept { return static_cast<unsigned short>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<int> { static constexpr bool is_specialized = true; static constexpr int min() noexcept { return -2147483647 - 1; } static constexpr int max() noexcept { return 2147483647; } static constexpr int lowest() noexcept { return min(); } static constexpr int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); static constexpr int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr int epsilon() noexcept { return 0; } static constexpr int round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr int infinity() noexcept { return static_cast<int>(0); } static constexpr int quiet_NaN() noexcept { return static_cast<int>(0); } static constexpr int signaling_NaN() noexcept { return static_cast<int>(0); } static constexpr int denorm_min() noexcept { return static_cast<int>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<unsigned int> { static constexpr bool is_specialized = true; static constexpr unsigned int min() noexcept { return 0; } static constexpr unsigned int max() noexcept { return 2147483647 * 2U + 1; } static constexpr unsigned int lowest() noexcept { return min(); } static constexpr int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned int epsilon() noexcept { return 0; } static constexpr unsigned int round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned int infinity() noexcept { return static_cast<unsigned int>(0); } static constexpr unsigned int quiet_NaN() noexcept { return static_cast<unsigned int>(0); } static constexpr unsigned int signaling_NaN() noexcept { return static_cast<unsigned int>(0); } static constexpr unsigned int denorm_min() noexcept { return static_cast<unsigned int>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<long> { static constexpr bool is_specialized = true; static constexpr long min() noexcept { return -9223372036854775807L - 1; } static constexpr long max() noexcept { return 9223372036854775807L; } static constexpr long lowest() noexcept { return min(); } static constexpr int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); static constexpr int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr long epsilon() noexcept { return 0; } static constexpr long round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr long infinity() noexcept { return static_cast<long>(0); } static constexpr long quiet_NaN() noexcept { return static_cast<long>(0); } static constexpr long signaling_NaN() noexcept { return static_cast<long>(0); } static constexpr long denorm_min() noexcept { return static_cast<long>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<unsigned long> { static constexpr bool is_specialized = true; static constexpr unsigned long min() noexcept { return 0; } static constexpr unsigned long max() noexcept { return 9223372036854775807L * 2UL + 1; } static constexpr unsigned long lowest() noexcept { return min(); } static constexpr int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned long epsilon() noexcept { return 0; } static constexpr unsigned long round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned long infinity() noexcept { return static_cast<unsigned long>(0); } static constexpr unsigned long quiet_NaN() noexcept { return static_cast<unsigned long>(0); } static constexpr unsigned long signaling_NaN() noexcept { return static_cast<unsigned long>(0); } static constexpr unsigned long denorm_min() noexcept { return static_cast<unsigned long>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<long long> { static constexpr bool is_specialized = true; static constexpr long long min() noexcept { return -9223372036854775807LL - 1; } static constexpr long long max() noexcept { return 9223372036854775807LL; } static constexpr long long lowest() noexcept { return min(); } static constexpr int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0)); static constexpr int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr long long epsilon() noexcept { return 0; } static constexpr long long round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr long long infinity() noexcept { return static_cast<long long>(0); } static constexpr long long quiet_NaN() noexcept { return static_cast<long long>(0); } static constexpr long long signaling_NaN() noexcept { return static_cast<long long>(0); } static constexpr long long denorm_min() noexcept { return static_cast<long long>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<unsigned long long> { static constexpr bool is_specialized = true; static constexpr unsigned long long min() noexcept { return 0; } static constexpr unsigned long long max() noexcept { return 9223372036854775807LL * 2ULL + 1; } static constexpr unsigned long long lowest() noexcept { return min(); } static constexpr int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned long long epsilon() noexcept { return 0; } static constexpr unsigned long long round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned long long infinity() noexcept { return static_cast<unsigned long long>(0); } static constexpr unsigned long long quiet_NaN() noexcept { return static_cast<unsigned long long>(0); } static constexpr unsigned long long signaling_NaN() noexcept { return static_cast<unsigned long long>(0); } static constexpr unsigned long long denorm_min() noexcept { return static_cast<unsigned long long>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; # 1593 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/limits" 3 template<> struct numeric_limits<float> { static constexpr bool is_specialized = true; static constexpr float min() noexcept { return 1.17549435e-38F; } static constexpr float max() noexcept { return 3.40282347e+38F; } static constexpr float lowest() noexcept { return -3.40282347e+38F; } static constexpr int digits = 24; static constexpr int digits10 = 6; static constexpr int max_digits10 = (2 + (24) * 643L / 2136); static constexpr bool is_signed = true; static constexpr bool is_integer = false; static constexpr bool is_exact = false; static constexpr int radix = 2; static constexpr float epsilon() noexcept { return 1.19209290e-7F; } static constexpr float round_error() noexcept { return 0.5F; } static constexpr int min_exponent = (-125); static constexpr int min_exponent10 = (-37); static constexpr int max_exponent = 128; static constexpr int max_exponent10 = 38; static constexpr bool has_infinity = 1; static constexpr bool has_quiet_NaN = 1; static constexpr bool has_signaling_NaN = has_quiet_NaN; static constexpr float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr float infinity() noexcept { return __builtin_huge_valf(); } static constexpr float quiet_NaN() noexcept { return __builtin_nanf(""); } static constexpr float signaling_NaN() noexcept { return __builtin_nansf(""); } static constexpr float denorm_min() noexcept { return 1.40129846e-45F; } static constexpr bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_to_nearest; }; template<> struct numeric_limits<double> { static constexpr bool is_specialized = true; static constexpr double min() noexcept { return 2.2250738585072014e-308; } static constexpr double max() noexcept { return 1.7976931348623157e+308; } static constexpr double lowest() noexcept { return -1.7976931348623157e+308; } static constexpr int digits = 53; static constexpr int digits10 = 15; static constexpr int max_digits10 = (2 + (53) * 643L / 2136); static constexpr bool is_signed = true; static constexpr bool is_integer = false; static constexpr bool is_exact = false; static constexpr int radix = 2; static constexpr double epsilon() noexcept { return 2.2204460492503131e-16; } static constexpr double round_error() noexcept { return 0.5; } static constexpr int min_exponent = (-1021); static constexpr int min_exponent10 = (-307); static constexpr int max_exponent = 1024; static constexpr int max_exponent10 = 308; static constexpr bool has_infinity = 1; static constexpr bool has_quiet_NaN = 1; static constexpr bool has_signaling_NaN = has_quiet_NaN; static constexpr float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr double infinity() noexcept { return __builtin_huge_val(); } static constexpr double quiet_NaN() noexcept { return __builtin_nan(""); } static constexpr double signaling_NaN() noexcept { return __builtin_nans(""); } static constexpr double denorm_min() noexcept { return 4.9406564584124654e-324; } static constexpr bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_to_nearest; }; template<> struct numeric_limits<long double> { static constexpr bool is_specialized = true; static constexpr long double min() noexcept { return 3.36210314311209350626e-4932L; } static constexpr long double max() noexcept { return 1.18973149535723176502e+4932L; } static constexpr long double lowest() noexcept { return -1.18973149535723176502e+4932L; } static constexpr int digits = 64; static constexpr int digits10 = 18; static constexpr int max_digits10 = (2 + (64) * 643L / 2136); static constexpr bool is_signed = true; static constexpr bool is_integer = false; static constexpr bool is_exact = false; static constexpr int radix = 2; static constexpr long double epsilon() noexcept { return 1.08420217248550443401e-19L; } static constexpr long double round_error() noexcept { return 0.5L; } static constexpr int min_exponent = (-16381); static constexpr int min_exponent10 = (-4931); static constexpr int max_exponent = 16384; static constexpr int max_exponent10 = 4932; static constexpr bool has_infinity = 1; static constexpr bool has_quiet_NaN = 1; static constexpr bool has_signaling_NaN = has_quiet_NaN; static constexpr float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr long double infinity() noexcept { return __builtin_huge_vall(); } static constexpr long double quiet_NaN() noexcept { return __builtin_nanl(""); } static constexpr long double signaling_NaN() noexcept { return __builtin_nansl(""); } static constexpr long double denorm_min() noexcept { return 3.64519953188247460253e-4951L; } static constexpr bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_to_nearest; }; } # 36 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/uniform_int_dist.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { template<typename _Tp> inline bool _Power_of_2(_Tp __x) { return ((__x - 1) & __x) == 0; } } template<typename _IntType = int> class uniform_int_distribution { static_assert(std::is_integral<_IntType>::value, "template argument must be an integral type"); public: typedef _IntType result_type; struct param_type { typedef uniform_int_distribution<_IntType> distribution_type; explicit param_type(_IntType __a = 0, _IntType __b = std::numeric_limits<_IntType>::max()) : _M_a(__a), _M_b(__b) { ; } result_type a() const { return _M_a; } result_type b() const { return _M_b; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } friend bool operator!=(const param_type& __p1, const param_type& __p2) { return !(__p1 == __p2); } private: _IntType _M_a; _IntType _M_b; }; public: explicit uniform_int_distribution(_IntType __a = 0, _IntType __b = std::numeric_limits<_IntType>::max()) : _M_param(__a, __b) { } explicit uniform_int_distribution(const param_type& __p) : _M_param(__p) { } void reset() { } result_type a() const { return _M_param.a(); } result_type b() const { return _M_param.b(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return this->a(); } result_type max() const { return this->b(); } template<typename _UniformRandomNumberGenerator> result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, _M_param); } template<typename _UniformRandomNumberGenerator> result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p); template<typename _ForwardIterator, typename _UniformRandomNumberGenerator> void __generate(_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator& __urng) { this->__generate(__f, __t, __urng, _M_param); } template<typename _ForwardIterator, typename _UniformRandomNumberGenerator> void __generate(_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator& __urng, const param_type& __p) { this->__generate_impl(__f, __t, __urng, __p); } template<typename _UniformRandomNumberGenerator> void __generate(result_type* __f, result_type* __t, _UniformRandomNumberGenerator& __urng, const param_type& __p) { this->__generate_impl(__f, __t, __urng, __p); } friend bool operator==(const uniform_int_distribution& __d1, const uniform_int_distribution& __d2) { return __d1._M_param == __d2._M_param; } private: template<typename _ForwardIterator, typename _UniformRandomNumberGenerator> void __generate_impl(_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator& __urng, const param_type& __p); param_type _M_param; }; template<typename _IntType> template<typename _UniformRandomNumberGenerator> typename uniform_int_distribution<_IntType>::result_type uniform_int_distribution<_IntType>:: operator()(_UniformRandomNumberGenerator& __urng, const param_type& __param) { typedef typename _UniformRandomNumberGenerator::result_type _Gresult_type; typedef typename std::make_unsigned<result_type>::type __utype; typedef typename std::common_type<_Gresult_type, __utype>::type __uctype; const __uctype __urngmin = __urng.min(); const __uctype __urngmax = __urng.max(); const __uctype __urngrange = __urngmax - __urngmin; const __uctype __urange = __uctype(__param.b()) - __uctype(__param.a()); __uctype __ret; if (__urngrange > __urange) { const __uctype __uerange = __urange + 1; const __uctype __scaling = __urngrange / __uerange; const __uctype __past = __uerange * __scaling; do __ret = __uctype(__urng()) - __urngmin; while (__ret >= __past); __ret /= __scaling; } else if (__urngrange < __urange) { # 264 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/uniform_int_dist.h" 3 __uctype __tmp; do { const __uctype __uerngrange = __urngrange + 1; __tmp = (__uerngrange * operator() (__urng, param_type(0, __urange / __uerngrange))); __ret = __tmp + (__uctype(__urng()) - __urngmin); } while (__ret > __urange || __ret < __tmp); } else __ret = __uctype(__urng()) - __urngmin; return __ret + __param.a(); } template<typename _IntType> template<typename _ForwardIterator, typename _UniformRandomNumberGenerator> void uniform_int_distribution<_IntType>:: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator& __urng, const param_type& __param) { typedef typename _UniformRandomNumberGenerator::result_type _Gresult_type; typedef typename std::make_unsigned<result_type>::type __utype; typedef typename std::common_type<_Gresult_type, __utype>::type __uctype; const __uctype __urngmin = __urng.min(); const __uctype __urngmax = __urng.max(); const __uctype __urngrange = __urngmax - __urngmin; const __uctype __urange = __uctype(__param.b()) - __uctype(__param.a()); __uctype __ret; if (__urngrange > __urange) { if (__detail::_Power_of_2(__urngrange + 1) && __detail::_Power_of_2(__urange + 1)) { while (__f != __t) { __ret = __uctype(__urng()) - __urngmin; *__f++ = (__ret & __urange) + __param.a(); } } else { const __uctype __uerange = __urange + 1; const __uctype __scaling = __urngrange / __uerange; const __uctype __past = __uerange * __scaling; while (__f != __t) { do __ret = __uctype(__urng()) - __urngmin; while (__ret >= __past); *__f++ = __ret / __scaling + __param.a(); } } } else if (__urngrange < __urange) { # 348 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/uniform_int_dist.h" 3 __uctype __tmp; while (__f != __t) { do { const __uctype __uerngrange = __urngrange + 1; __tmp = (__uerngrange * operator() (__urng, param_type(0, __urange / __uerngrange))); __ret = __tmp + (__uctype(__urng()) - __urngmin); } while (__ret > __urange || __ret < __tmp); *__f++ = __ret; } } else while (__f != __t) *__f++ = __uctype(__urng()) - __urngmin + __param.a(); } } # 67 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Iterator, typename _Compare> void __move_median_to_first(_Iterator __result,_Iterator __a, _Iterator __b, _Iterator __c, _Compare __comp) { if (__comp(__a, __b)) { if (__comp(__b, __c)) std::iter_swap(__result, __b); else if (__comp(__a, __c)) std::iter_swap(__result, __c); else std::iter_swap(__result, __a); } else if (__comp(__a, __c)) std::iter_swap(__result, __a); else if (__comp(__b, __c)) std::iter_swap(__result, __c); else std::iter_swap(__result, __b); } template<typename _InputIterator, typename _Predicate> inline _InputIterator __find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred, input_iterator_tag) { while (__first != __last && !__pred(__first)) ++__first; return __first; } template<typename _RandomAccessIterator, typename _Predicate> _RandomAccessIterator __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, _Predicate __pred, random_access_iterator_tag) { typename iterator_traits<_RandomAccessIterator>::difference_type __trip_count = (__last - __first) >> 2; for (; __trip_count > 0; --__trip_count) { if (__pred(__first)) return __first; ++__first; if (__pred(__first)) return __first; ++__first; if (__pred(__first)) return __first; ++__first; if (__pred(__first)) return __first; ++__first; } switch (__last - __first) { case 3: if (__pred(__first)) return __first; ++__first; case 2: if (__pred(__first)) return __first; ++__first; case 1: if (__pred(__first)) return __first; ++__first; case 0: default: return __last; } } template<typename _Iterator, typename _Predicate> inline _Iterator __find_if(_Iterator __first, _Iterator __last, _Predicate __pred) { return __find_if(__first, __last, __pred, std::__iterator_category(__first)); } template<typename _InputIterator, typename _Predicate> inline _InputIterator __find_if_not(_InputIterator __first, _InputIterator __last, _Predicate __pred) { return std::__find_if(__first, __last, __gnu_cxx::__ops::__negate(__pred), std::__iterator_category(__first)); } template<typename _InputIterator, typename _Predicate, typename _Distance> _InputIterator __find_if_not_n(_InputIterator __first, _Distance& __len, _Predicate __pred) { for (; __len; --__len, (void) ++__first) if (!__pred(__first)) break; return __first; } # 202 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator1, typename _ForwardIterator2, typename _BinaryPredicate> _ForwardIterator1 __search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __predicate) { if (__first1 == __last1 || __first2 == __last2) return __first1; _ForwardIterator2 __p1(__first2); if (++__p1 == __last2) return std::__find_if(__first1, __last1, __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); _ForwardIterator2 __p; _ForwardIterator1 __current = __first1; for (;;) { __first1 = std::__find_if(__first1, __last1, __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); if (__first1 == __last1) return __last1; __p = __p1; __current = __first1; if (++__current == __last1) return __last1; while (__predicate(__current, __p)) { if (++__p == __last2) return __first1; if (++__current == __last1) return __last1; } ++__first1; } return __first1; } template<typename _ForwardIterator, typename _Integer, typename _UnaryPredicate> _ForwardIterator __search_n_aux(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, _UnaryPredicate __unary_pred, std::forward_iterator_tag) { __first = std::__find_if(__first, __last, __unary_pred); while (__first != __last) { typename iterator_traits<_ForwardIterator>::difference_type __n = __count; _ForwardIterator __i = __first; ++__i; while (__i != __last && __n != 1 && __unary_pred(__i)) { ++__i; --__n; } if (__n == 1) return __first; if (__i == __last) return __last; __first = std::__find_if(++__i, __last, __unary_pred); } return __last; } template<typename _RandomAccessIter, typename _Integer, typename _UnaryPredicate> _RandomAccessIter __search_n_aux(_RandomAccessIter __first, _RandomAccessIter __last, _Integer __count, _UnaryPredicate __unary_pred, std::random_access_iterator_tag) { typedef typename std::iterator_traits<_RandomAccessIter>::difference_type _DistanceType; _DistanceType __tailSize = __last - __first; _DistanceType __remainder = __count; while (__remainder <= __tailSize) { __first += __remainder; __tailSize -= __remainder; _RandomAccessIter __backTrack = __first; while (__unary_pred(--__backTrack)) { if (--__remainder == 0) return (__first - __count); } __remainder = __count + 1 - (__first - __backTrack); } return __last; } template<typename _ForwardIterator, typename _Integer, typename _UnaryPredicate> _ForwardIterator __search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, _UnaryPredicate __unary_pred) { if (__count <= 0) return __first; if (__count == 1) return std::__find_if(__first, __last, __unary_pred); return std::__search_n_aux(__first, __last, __count, __unary_pred, std::__iterator_category(__first)); } template<typename _ForwardIterator1, typename _ForwardIterator2, typename _BinaryPredicate> _ForwardIterator1 __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, forward_iterator_tag, forward_iterator_tag, _BinaryPredicate __comp) { if (__first2 == __last2) return __last1; _ForwardIterator1 __result = __last1; while (1) { _ForwardIterator1 __new_result = std::__search(__first1, __last1, __first2, __last2, __comp); if (__new_result == __last1) return __result; else { __result = __new_result; __first1 = __new_result; ++__first1; } } } template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, typename _BinaryPredicate> _BidirectionalIterator1 __find_end(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, bidirectional_iterator_tag, bidirectional_iterator_tag, _BinaryPredicate __comp) { typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; _RevIterator1 __rlast1(__first1); _RevIterator2 __rlast2(__first2); _RevIterator1 __rresult = std::__search(_RevIterator1(__last1), __rlast1, _RevIterator2(__last2), __rlast2, __comp); if (__rresult == __rlast1) return __last1; else { _BidirectionalIterator1 __result = __rresult.base(); std::advance(__result, -std::distance(__first2, __last2)); return __result; } } # 423 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator1, typename _ForwardIterator2> inline _ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) { ; ; return std::__find_end(__first1, __last1, __first2, __last2, std::__iterator_category(__first1), std::__iterator_category(__first2), __gnu_cxx::__ops::__iter_equal_to_iter()); } # 471 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator1, typename _ForwardIterator2, typename _BinaryPredicate> inline _ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __comp) { ; ; return std::__find_end(__first1, __last1, __first2, __last2, std::__iterator_category(__first1), std::__iterator_category(__first2), __gnu_cxx::__ops::__iter_comp_iter(__comp)); } # 506 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _Predicate> inline bool all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) { return __last == std::find_if_not(__first, __last, __pred); } # 523 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _Predicate> inline bool none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) { return __last == std::find_if(__first, __last, __pred); } # 541 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _Predicate> inline bool any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) { return !std::none_of(__first, __last, __pred); } # 556 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _Predicate> inline _InputIterator find_if_not(_InputIterator __first, _InputIterator __last, _Predicate __pred) { ; return std::__find_if_not(__first, __last, __gnu_cxx::__ops::__pred_iter(__pred)); } # 580 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _Predicate> inline bool is_partitioned(_InputIterator __first, _InputIterator __last, _Predicate __pred) { __first = std::find_if_not(__first, __last, __pred); if (__first == __last) return true; ++__first; return std::none_of(__first, __last, __pred); } # 601 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Predicate> _ForwardIterator partition_point(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { ; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; _DistanceType __len = std::distance(__first, __last); _DistanceType __half; _ForwardIterator __middle; while (__len > 0) { __half = __len >> 1; __middle = __first; std::advance(__middle, __half); if (__pred(*__middle)) { __first = __middle; ++__first; __len = __len - __half - 1; } else __len = __half; } return __first; } template<typename _InputIterator, typename _OutputIterator, typename _Predicate> _OutputIterator __remove_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred) { for (; __first != __last; ++__first) if (!__pred(__first)) { *__result = *__first; ++__result; } return __result; } # 668 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _OutputIterator, typename _Tp> inline _OutputIterator remove_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __value) { ; return std::__remove_copy_if(__first, __last, __result, __gnu_cxx::__ops::__iter_equals_val(__value)); } # 700 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _OutputIterator, typename _Predicate> inline _OutputIterator remove_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred) { ; return std::__remove_copy_if(__first, __last, __result, __gnu_cxx::__ops::__pred_iter(__pred)); } # 734 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _OutputIterator, typename _Predicate> _OutputIterator copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred) { ; for (; __first != __last; ++__first) if (__pred(*__first)) { *__result = *__first; ++__result; } return __result; } template<typename _InputIterator, typename _Size, typename _OutputIterator> _OutputIterator __copy_n(_InputIterator __first, _Size __n, _OutputIterator __result, input_iterator_tag) { if (__n > 0) { while (true) { *__result = *__first; ++__result; if (--__n > 0) ++__first; else break; } } return __result; } template<typename _RandomAccessIterator, typename _Size, typename _OutputIterator> inline _OutputIterator __copy_n(_RandomAccessIterator __first, _Size __n, _OutputIterator __result, random_access_iterator_tag) { return std::copy(__first, __first + __n, __result); } # 797 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _Size, typename _OutputIterator> inline _OutputIterator copy_n(_InputIterator __first, _Size __n, _OutputIterator __result) { return std::__copy_n(__first, __n, __result, std::__iterator_category(__first)); } # 825 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _OutputIterator1, typename _OutputIterator2, typename _Predicate> pair<_OutputIterator1, _OutputIterator2> partition_copy(_InputIterator __first, _InputIterator __last, _OutputIterator1 __out_true, _OutputIterator2 __out_false, _Predicate __pred) { # 840 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; for (; __first != __last; ++__first) if (__pred(*__first)) { *__out_true = *__first; ++__out_true; } else { *__out_false = *__first; ++__out_false; } return pair<_OutputIterator1, _OutputIterator2>(__out_true, __out_false); } template<typename _ForwardIterator, typename _Predicate> _ForwardIterator __remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { __first = std::__find_if(__first, __last, __pred); if (__first == __last) return __first; _ForwardIterator __result = __first; ++__first; for (; __first != __last; ++__first) if (!__pred(__first)) { *__result = std::move(*__first); ++__result; } return __result; } # 894 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Tp> inline _ForwardIterator remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { ; return std::__remove_if(__first, __last, __gnu_cxx::__ops::__iter_equals_val(__value)); } # 927 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Predicate> inline _ForwardIterator remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { ; return std::__remove_if(__first, __last, __gnu_cxx::__ops::__pred_iter(__pred)); } template<typename _ForwardIterator, typename _BinaryPredicate> _ForwardIterator __adjacent_find(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __binary_pred) { if (__first == __last) return __last; _ForwardIterator __next = __first; while (++__next != __last) { if (__binary_pred(__first, __next)) return __first; __first = __next; } return __last; } template<typename _ForwardIterator, typename _BinaryPredicate> _ForwardIterator __unique(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __binary_pred) { __first = std::__adjacent_find(__first, __last, __binary_pred); if (__first == __last) return __last; _ForwardIterator __dest = __first; ++__first; while (++__first != __last) if (!__binary_pred(__dest, __first)) *++__dest = std::move(*__first); return ++__dest; } # 993 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator> inline _ForwardIterator unique(_ForwardIterator __first, _ForwardIterator __last) { ; return std::__unique(__first, __last, __gnu_cxx::__ops::__iter_equal_to_iter()); } # 1023 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _BinaryPredicate> inline _ForwardIterator unique(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __binary_pred) { ; return std::__unique(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); } template<typename _ForwardIterator, typename _OutputIterator, typename _BinaryPredicate> _OutputIterator __unique_copy(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result, _BinaryPredicate __binary_pred, forward_iterator_tag, output_iterator_tag) { _ForwardIterator __next = __first; *__result = *__first; while (++__next != __last) if (!__binary_pred(__first, __next)) { __first = __next; *++__result = *__first; } return ++__result; } template<typename _InputIterator, typename _OutputIterator, typename _BinaryPredicate> _OutputIterator __unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __binary_pred, input_iterator_tag, output_iterator_tag) { typename iterator_traits<_InputIterator>::value_type __value = *__first; __decltype(__gnu_cxx::__ops::__iter_comp_val(__binary_pred)) __rebound_pred = __gnu_cxx::__ops::__iter_comp_val(__binary_pred); *__result = __value; while (++__first != __last) if (!__rebound_pred(__first, __value)) { __value = *__first; *++__result = __value; } return ++__result; } template<typename _InputIterator, typename _ForwardIterator, typename _BinaryPredicate> _ForwardIterator __unique_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _BinaryPredicate __binary_pred, input_iterator_tag, forward_iterator_tag) { *__result = *__first; while (++__first != __last) if (!__binary_pred(__result, __first)) *++__result = *__first; return ++__result; } template<typename _BidirectionalIterator> void __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, bidirectional_iterator_tag) { while (true) if (__first == __last || __first == --__last) return; else { std::iter_swap(__first, __last); ++__first; } } template<typename _RandomAccessIterator> void __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag) { if (__first == __last) return; --__last; while (__first < __last) { std::iter_swap(__first, __last); ++__first; --__last; } } # 1178 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _BidirectionalIterator> inline void reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) { ; std::__reverse(__first, __last, std::__iterator_category(__first)); } # 1205 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _BidirectionalIterator, typename _OutputIterator> _OutputIterator reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result) { ; while (__first != __last) { --__last; *__result = *__last; ++__result; } return __result; } template<typename _EuclideanRingElement> _EuclideanRingElement __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) { while (__n != 0) { _EuclideanRingElement __t = __m % __n; __m = __n; __n = __t; } return __m; } inline namespace _V2 { template<typename _ForwardIterator> _ForwardIterator __rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, forward_iterator_tag) { if (__first == __middle) return __last; else if (__last == __middle) return __first; _ForwardIterator __first2 = __middle; do { std::iter_swap(__first, __first2); ++__first; ++__first2; if (__first == __middle) __middle = __first2; } while (__first2 != __last); _ForwardIterator __ret = __first; __first2 = __middle; while (__first2 != __last) { std::iter_swap(__first, __first2); ++__first; ++__first2; if (__first == __middle) __middle = __first2; else if (__first2 == __last) __first2 = __middle; } return __ret; } template<typename _BidirectionalIterator> _BidirectionalIterator __rotate(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, bidirectional_iterator_tag) { if (__first == __middle) return __last; else if (__last == __middle) return __first; std::__reverse(__first, __middle, bidirectional_iterator_tag()); std::__reverse(__middle, __last, bidirectional_iterator_tag()); while (__first != __middle && __middle != __last) { std::iter_swap(__first, --__last); ++__first; } if (__first == __middle) { std::__reverse(__middle, __last, bidirectional_iterator_tag()); return __last; } else { std::__reverse(__first, __middle, bidirectional_iterator_tag()); return __first; } } template<typename _RandomAccessIterator> _RandomAccessIterator __rotate(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, random_access_iterator_tag) { if (__first == __middle) return __last; else if (__last == __middle) return __first; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance; typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; _Distance __n = __last - __first; _Distance __k = __middle - __first; if (__k == __n - __k) { std::swap_ranges(__first, __middle, __middle); return __middle; } _RandomAccessIterator __p = __first; _RandomAccessIterator __ret = __first + (__last - __middle); for (;;) { if (__k < __n - __k) { if (__is_pod(_ValueType) && __k == 1) { _ValueType __t = std::move(*__p); std::move(__p + 1, __p + __n, __p); *(__p + __n - 1) = std::move(__t); return __ret; } _RandomAccessIterator __q = __p + __k; for (_Distance __i = 0; __i < __n - __k; ++ __i) { std::iter_swap(__p, __q); ++__p; ++__q; } __n %= __k; if (__n == 0) return __ret; std::swap(__n, __k); __k = __n - __k; } else { __k = __n - __k; if (__is_pod(_ValueType) && __k == 1) { _ValueType __t = std::move(*(__p + __n - 1)); std::move_backward(__p, __p + __n - 1, __p + __n); *__p = std::move(__t); return __ret; } _RandomAccessIterator __q = __p + __n; __p = __q - __k; for (_Distance __i = 0; __i < __n - __k; ++ __i) { --__p; --__q; std::iter_swap(__p, __q); } __n %= __k; if (__n == 0) return __ret; std::swap(__n, __k); } } } # 1432 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator> inline _ForwardIterator rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last) { ; ; return std::__rotate(__first, __middle, __last, std::__iterator_category(__first)); } } # 1469 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _OutputIterator> inline _OutputIterator rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result) { ; ; return std::copy(__first, __middle, std::copy(__middle, __last, __result)); } template<typename _ForwardIterator, typename _Predicate> _ForwardIterator __partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, forward_iterator_tag) { if (__first == __last) return __first; while (__pred(*__first)) if (++__first == __last) return __first; _ForwardIterator __next = __first; while (++__next != __last) if (__pred(*__next)) { std::iter_swap(__first, __next); ++__first; } return __first; } template<typename _BidirectionalIterator, typename _Predicate> _BidirectionalIterator __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, _Predicate __pred, bidirectional_iterator_tag) { while (true) { while (true) if (__first == __last) return __first; else if (__pred(*__first)) ++__first; else break; --__last; while (true) if (__first == __last) return __first; else if (!bool(__pred(*__last))) --__last; else break; std::iter_swap(__first, __last); ++__first; } } # 1546 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Pointer, typename _Predicate, typename _Distance> _ForwardIterator __stable_partition_adaptive(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, _Distance __len, _Pointer __buffer, _Distance __buffer_size) { if (__len == 1) return __first; if (__len <= __buffer_size) { _ForwardIterator __result1 = __first; _Pointer __result2 = __buffer; *__result2 = std::move(*__first); ++__result2; ++__first; for (; __first != __last; ++__first) if (__pred(__first)) { *__result1 = std::move(*__first); ++__result1; } else { *__result2 = std::move(*__first); ++__result2; } std::move(__buffer, __result2, __result1); return __result1; } _ForwardIterator __middle = __first; std::advance(__middle, __len / 2); _ForwardIterator __left_split = std::__stable_partition_adaptive(__first, __middle, __pred, __len / 2, __buffer, __buffer_size); _Distance __right_len = __len - __len / 2; _ForwardIterator __right_split = std::__find_if_not_n(__middle, __right_len, __pred); if (__right_len) __right_split = std::__stable_partition_adaptive(__right_split, __last, __pred, __right_len, __buffer, __buffer_size); std::rotate(__left_split, __middle, __right_split); std::advance(__left_split, std::distance(__middle, __right_split)); return __left_split; } template<typename _ForwardIterator, typename _Predicate> _ForwardIterator __stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { __first = std::__find_if_not(__first, __last, __pred); if (__first == __last) return __first; typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, __last); return std::__stable_partition_adaptive(__first, __last, __pred, _DistanceType(__buf.requested_size()), __buf.begin(), _DistanceType(__buf.size())); } # 1649 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Predicate> inline _ForwardIterator stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { ; return std::__stable_partition(__first, __last, __gnu_cxx::__ops::__pred_iter(__pred)); } template<typename _RandomAccessIterator, typename _Compare> void __heap_select(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, _Compare __comp) { std::__make_heap(__first, __middle, __comp); for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) if (__comp(__i, __first)) std::__pop_heap(__first, __middle, __i, __comp); } template<typename _InputIterator, typename _RandomAccessIterator, typename _Compare> _RandomAccessIterator __partial_sort_copy(_InputIterator __first, _InputIterator __last, _RandomAccessIterator __result_first, _RandomAccessIterator __result_last, _Compare __comp) { typedef typename iterator_traits<_InputIterator>::value_type _InputValueType; typedef iterator_traits<_RandomAccessIterator> _RItTraits; typedef typename _RItTraits::difference_type _DistanceType; if (__result_first == __result_last) return __result_last; _RandomAccessIterator __result_real_last = __result_first; while (__first != __last && __result_real_last != __result_last) { *__result_real_last = *__first; ++__result_real_last; ++__first; } std::__make_heap(__result_first, __result_real_last, __comp); while (__first != __last) { if (__comp(__first, __result_first)) std::__adjust_heap(__result_first, _DistanceType(0), _DistanceType(__result_real_last - __result_first), _InputValueType(*__first), __comp); ++__first; } std::__sort_heap(__result_first, __result_real_last, __comp); return __result_real_last; } # 1735 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _RandomAccessIterator> inline _RandomAccessIterator partial_sort_copy(_InputIterator __first, _InputIterator __last, _RandomAccessIterator __result_first, _RandomAccessIterator __result_last) { # 1755 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; ; ; return std::__partial_sort_copy(__first, __last, __result_first, __result_last, __gnu_cxx::__ops::__iter_less_iter()); } # 1784 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _RandomAccessIterator, typename _Compare> inline _RandomAccessIterator partial_sort_copy(_InputIterator __first, _InputIterator __last, _RandomAccessIterator __result_first, _RandomAccessIterator __result_last, _Compare __comp) { # 1809 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; ; ; return std::__partial_sort_copy(__first, __last, __result_first, __result_last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _RandomAccessIterator, typename _Compare> void __unguarded_linear_insert(_RandomAccessIterator __last, _Compare __comp) { typename iterator_traits<_RandomAccessIterator>::value_type __val = std::move(*__last); _RandomAccessIterator __next = __last; --__next; while (__comp(__val, __next)) { *__last = std::move(*__next); __last = __next; --__next; } *__last = std::move(__val); } template<typename _RandomAccessIterator, typename _Compare> void __insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { if (__first == __last) return; for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) { if (__comp(__i, __first)) { typename iterator_traits<_RandomAccessIterator>::value_type __val = std::move(*__i); std::move_backward(__first, __i, __i + 1); *__first = std::move(__val); } else std::__unguarded_linear_insert(__i, __gnu_cxx::__ops::__val_comp_iter(__comp)); } } template<typename _RandomAccessIterator, typename _Compare> inline void __unguarded_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { for (_RandomAccessIterator __i = __first; __i != __last; ++__i) std::__unguarded_linear_insert(__i, __gnu_cxx::__ops::__val_comp_iter(__comp)); } enum { _S_threshold = 16 }; template<typename _RandomAccessIterator, typename _Compare> void __final_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { if (__last - __first > int(_S_threshold)) { std::__insertion_sort(__first, __first + int(_S_threshold), __comp); std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, __comp); } else std::__insertion_sort(__first, __last, __comp); } template<typename _RandomAccessIterator, typename _Compare> _RandomAccessIterator __unguarded_partition(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomAccessIterator __pivot, _Compare __comp) { while (true) { while (__comp(__first, __pivot)) ++__first; --__last; while (__comp(__pivot, __last)) --__last; if (!(__first < __last)) return __first; std::iter_swap(__first, __last); ++__first; } } template<typename _RandomAccessIterator, typename _Compare> inline _RandomAccessIterator __unguarded_partition_pivot(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { _RandomAccessIterator __mid = __first + (__last - __first) / 2; std::__move_median_to_first(__first, __first + 1, __mid, __last - 1, __comp); return std::__unguarded_partition(__first + 1, __last, __first, __comp); } template<typename _RandomAccessIterator, typename _Compare> inline void __partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, _Compare __comp) { std::__heap_select(__first, __middle, __last, __comp); std::__sort_heap(__first, __middle, __comp); } template<typename _RandomAccessIterator, typename _Size, typename _Compare> void __introsort_loop(_RandomAccessIterator __first, _RandomAccessIterator __last, _Size __depth_limit, _Compare __comp) { while (__last - __first > int(_S_threshold)) { if (__depth_limit == 0) { std::__partial_sort(__first, __last, __last, __comp); return; } --__depth_limit; _RandomAccessIterator __cut = std::__unguarded_partition_pivot(__first, __last, __comp); std::__introsort_loop(__cut, __last, __depth_limit, __comp); __last = __cut; } } template<typename _RandomAccessIterator, typename _Compare> inline void __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { if (__first != __last) { std::__introsort_loop(__first, __last, std::__lg(__last - __first) * 2, __comp); std::__final_insertion_sort(__first, __last, __comp); } } template<typename _RandomAccessIterator, typename _Size, typename _Compare> void __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Size __depth_limit, _Compare __comp) { while (__last - __first > 3) { if (__depth_limit == 0) { std::__heap_select(__first, __nth + 1, __last, __comp); std::iter_swap(__first, __nth); return; } --__depth_limit; _RandomAccessIterator __cut = std::__unguarded_partition_pivot(__first, __last, __comp); if (__cut <= __nth) __first = __cut; else __last = __cut; } std::__insertion_sort(__first, __last, __comp); } # 2021 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Tp, typename _Compare> inline _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { ; return std::__lower_bound(__first, __last, __val, __gnu_cxx::__ops::__iter_comp_val(__comp)); } template<typename _ForwardIterator, typename _Tp, typename _Compare> _ForwardIterator __upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; _DistanceType __len = std::distance(__first, __last); while (__len > 0) { _DistanceType __half = __len >> 1; _ForwardIterator __middle = __first; std::advance(__middle, __half); if (__comp(__val, __middle)) __len = __half; else { __first = __middle; ++__first; __len = __len - __half - 1; } } return __first; } # 2075 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Tp> inline _ForwardIterator upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { ; return std::__upper_bound(__first, __last, __val, __gnu_cxx::__ops::__val_less_iter()); } # 2105 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Tp, typename _Compare> inline _ForwardIterator upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { ; return std::__upper_bound(__first, __last, __val, __gnu_cxx::__ops::__val_comp_iter(__comp)); } template<typename _ForwardIterator, typename _Tp, typename _CompareItTp, typename _CompareTpIt> pair<_ForwardIterator, _ForwardIterator> __equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _CompareItTp __comp_it_val, _CompareTpIt __comp_val_it) { typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; _DistanceType __len = std::distance(__first, __last); while (__len > 0) { _DistanceType __half = __len >> 1; _ForwardIterator __middle = __first; std::advance(__middle, __half); if (__comp_it_val(__middle, __val)) { __first = __middle; ++__first; __len = __len - __half - 1; } else if (__comp_val_it(__val, __middle)) __len = __half; else { _ForwardIterator __left = std::__lower_bound(__first, __middle, __val, __comp_it_val); std::advance(__first, __len); _ForwardIterator __right = std::__upper_bound(++__middle, __first, __val, __comp_val_it); return pair<_ForwardIterator, _ForwardIterator>(__left, __right); } } return pair<_ForwardIterator, _ForwardIterator>(__first, __first); } # 2176 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Tp> inline pair<_ForwardIterator, _ForwardIterator> equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { ; ; return std::__equal_range(__first, __last, __val, __gnu_cxx::__ops::__iter_less_val(), __gnu_cxx::__ops::__val_less_iter()); } # 2212 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Tp, typename _Compare> inline pair<_ForwardIterator, _ForwardIterator> equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { ; ; return std::__equal_range(__first, __last, __val, __gnu_cxx::__ops::__iter_comp_val(__comp), __gnu_cxx::__ops::__val_comp_iter(__comp)); } # 2245 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Tp> bool binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { ; ; _ForwardIterator __i = std::__lower_bound(__first, __last, __val, __gnu_cxx::__ops::__iter_less_val()); return __i != __last && !(__val < *__i); } # 2278 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Tp, typename _Compare> bool binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { ; ; _ForwardIterator __i = std::__lower_bound(__first, __last, __val, __gnu_cxx::__ops::__iter_comp_val(__comp)); return __i != __last && !bool(__comp(__val, *__i)); } template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> void __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) { if (__comp(__first2, __first1)) { *__result = std::move(*__first2); ++__first2; } else { *__result = std::move(*__first1); ++__first1; } ++__result; } if (__first1 != __last1) std::move(__first1, __last1, __result); } template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, typename _BidirectionalIterator3, typename _Compare> void __move_merge_adaptive_backward(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, _BidirectionalIterator3 __result, _Compare __comp) { if (__first1 == __last1) { std::move_backward(__first2, __last2, __result); return; } else if (__first2 == __last2) return; --__last1; --__last2; while (true) { if (__comp(__last2, __last1)) { *--__result = std::move(*__last1); if (__first1 == __last1) { std::move_backward(__first2, ++__last2, __result); return; } --__last1; } else { *--__result = std::move(*__last2); if (__first2 == __last2) return; --__last2; } } } template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, typename _Distance> _BidirectionalIterator1 __rotate_adaptive(_BidirectionalIterator1 __first, _BidirectionalIterator1 __middle, _BidirectionalIterator1 __last, _Distance __len1, _Distance __len2, _BidirectionalIterator2 __buffer, _Distance __buffer_size) { _BidirectionalIterator2 __buffer_end; if (__len1 > __len2 && __len2 <= __buffer_size) { if (__len2) { __buffer_end = std::move(__middle, __last, __buffer); std::move_backward(__first, __middle, __last); return std::move(__buffer, __buffer_end, __first); } else return __first; } else if (__len1 <= __buffer_size) { if (__len1) { __buffer_end = std::move(__first, __middle, __buffer); std::move(__middle, __last, __first); return std::move_backward(__buffer, __buffer_end, __last); } else return __last; } else { std::rotate(__first, __middle, __last); std::advance(__first, std::distance(__middle, __last)); return __first; } } template<typename _BidirectionalIterator, typename _Distance, typename _Pointer, typename _Compare> void __merge_adaptive(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Pointer __buffer, _Distance __buffer_size, _Compare __comp) { if (__len1 <= __len2 && __len1 <= __buffer_size) { _Pointer __buffer_end = std::move(__first, __middle, __buffer); std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, __first, __comp); } else if (__len2 <= __buffer_size) { _Pointer __buffer_end = std::move(__middle, __last, __buffer); std::__move_merge_adaptive_backward(__first, __middle, __buffer, __buffer_end, __last, __comp); } else { _BidirectionalIterator __first_cut = __first; _BidirectionalIterator __second_cut = __middle; _Distance __len11 = 0; _Distance __len22 = 0; if (__len1 > __len2) { __len11 = __len1 / 2; std::advance(__first_cut, __len11); __second_cut = std::__lower_bound(__middle, __last, *__first_cut, __gnu_cxx::__ops::__iter_comp_val(__comp)); __len22 = std::distance(__middle, __second_cut); } else { __len22 = __len2 / 2; std::advance(__second_cut, __len22); __first_cut = std::__upper_bound(__first, __middle, *__second_cut, __gnu_cxx::__ops::__val_comp_iter(__comp)); __len11 = std::distance(__first, __first_cut); } _BidirectionalIterator __new_middle = std::__rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11, __len22, __buffer, __buffer_size); std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, __len22, __buffer, __buffer_size, __comp); std::__merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22, __buffer, __buffer_size, __comp); } } template<typename _BidirectionalIterator, typename _Distance, typename _Compare> void __merge_without_buffer(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Compare __comp) { if (__len1 == 0 || __len2 == 0) return; if (__len1 + __len2 == 2) { if (__comp(__middle, __first)) std::iter_swap(__first, __middle); return; } _BidirectionalIterator __first_cut = __first; _BidirectionalIterator __second_cut = __middle; _Distance __len11 = 0; _Distance __len22 = 0; if (__len1 > __len2) { __len11 = __len1 / 2; std::advance(__first_cut, __len11); __second_cut = std::__lower_bound(__middle, __last, *__first_cut, __gnu_cxx::__ops::__iter_comp_val(__comp)); __len22 = std::distance(__middle, __second_cut); } else { __len22 = __len2 / 2; std::advance(__second_cut, __len22); __first_cut = std::__upper_bound(__first, __middle, *__second_cut, __gnu_cxx::__ops::__val_comp_iter(__comp)); __len11 = std::distance(__first, __first_cut); } std::rotate(__first_cut, __middle, __second_cut); _BidirectionalIterator __new_middle = __first_cut; std::advance(__new_middle, std::distance(__middle, __second_cut)); std::__merge_without_buffer(__first, __first_cut, __new_middle, __len11, __len22, __comp); std::__merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22, __comp); } template<typename _BidirectionalIterator, typename _Compare> void __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Compare __comp) { typedef typename iterator_traits<_BidirectionalIterator>::value_type _ValueType; typedef typename iterator_traits<_BidirectionalIterator>::difference_type _DistanceType; if (__first == __middle || __middle == __last) return; const _DistanceType __len1 = std::distance(__first, __middle); const _DistanceType __len2 = std::distance(__middle, __last); typedef _Temporary_buffer<_BidirectionalIterator, _ValueType> _TmpBuf; _TmpBuf __buf(__first, __last); if (__buf.begin() == 0) std::__merge_without_buffer (__first, __middle, __last, __len1, __len2, __comp); else std::__merge_adaptive (__first, __middle, __last, __len1, __len2, __buf.begin(), _DistanceType(__buf.size()), __comp); } # 2572 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _BidirectionalIterator> inline void inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last) { ; ; ; std::__inplace_merge(__first, __middle, __last, __gnu_cxx::__ops::__iter_less_iter()); } # 2613 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _BidirectionalIterator, typename _Compare> inline void inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Compare __comp) { ; ; ; std::__inplace_merge(__first, __middle, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _InputIterator, typename _OutputIterator, typename _Compare> _OutputIterator __move_merge(_InputIterator __first1, _InputIterator __last1, _InputIterator __first2, _InputIterator __last2, _OutputIterator __result, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) { if (__comp(__first2, __first1)) { *__result = std::move(*__first2); ++__first2; } else { *__result = std::move(*__first1); ++__first1; } ++__result; } return std::move(__first2, __last2, std::move(__first1, __last1, __result)); } template<typename _RandomAccessIterator1, typename _RandomAccessIterator2, typename _Distance, typename _Compare> void __merge_sort_loop(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _RandomAccessIterator2 __result, _Distance __step_size, _Compare __comp) { const _Distance __two_step = 2 * __step_size; while (__last - __first >= __two_step) { __result = std::__move_merge(__first, __first + __step_size, __first + __step_size, __first + __two_step, __result, __comp); __first += __two_step; } __step_size = std::min(_Distance(__last - __first), __step_size); std::__move_merge(__first, __first + __step_size, __first + __step_size, __last, __result, __comp); } template<typename _RandomAccessIterator, typename _Distance, typename _Compare> void __chunk_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Distance __chunk_size, _Compare __comp) { while (__last - __first >= __chunk_size) { std::__insertion_sort(__first, __first + __chunk_size, __comp); __first += __chunk_size; } std::__insertion_sort(__first, __last, __comp); } enum { _S_chunk_size = 7 }; template<typename _RandomAccessIterator, typename _Pointer, typename _Compare> void __merge_sort_with_buffer(_RandomAccessIterator __first, _RandomAccessIterator __last, _Pointer __buffer, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance; const _Distance __len = __last - __first; const _Pointer __buffer_last = __buffer + __len; _Distance __step_size = _S_chunk_size; std::__chunk_insertion_sort(__first, __last, __step_size, __comp); while (__step_size < __len) { std::__merge_sort_loop(__first, __last, __buffer, __step_size, __comp); __step_size *= 2; std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size, __comp); __step_size *= 2; } } template<typename _RandomAccessIterator, typename _Pointer, typename _Distance, typename _Compare> void __stable_sort_adaptive(_RandomAccessIterator __first, _RandomAccessIterator __last, _Pointer __buffer, _Distance __buffer_size, _Compare __comp) { const _Distance __len = (__last - __first + 1) / 2; const _RandomAccessIterator __middle = __first + __len; if (__len > __buffer_size) { std::__stable_sort_adaptive(__first, __middle, __buffer, __buffer_size, __comp); std::__stable_sort_adaptive(__middle, __last, __buffer, __buffer_size, __comp); } else { std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); } std::__merge_adaptive(__first, __middle, __last, _Distance(__middle - __first), _Distance(__last - __middle), __buffer, __buffer_size, __comp); } template<typename _RandomAccessIterator, typename _Compare> void __inplace_stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { if (__last - __first < 15) { std::__insertion_sort(__first, __last, __comp); return; } _RandomAccessIterator __middle = __first + (__last - __first) / 2; std::__inplace_stable_sort(__first, __middle, __comp); std::__inplace_stable_sort(__middle, __last, __comp); std::__merge_without_buffer(__first, __middle, __last, __middle - __first, __last - __middle, __comp); } # 2785 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _Compare> bool __includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) if (__comp(__first2, __first1)) return false; else if (__comp(__first1, __first2)) ++__first1; else { ++__first1; ++__first2; } return __first2 == __last2; } # 2824 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator1, typename _InputIterator2> inline bool includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) { # 2838 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; ; ; ; return std::__includes(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_less_iter()); } # 2868 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _Compare> inline bool includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp) { # 2884 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; ; ; ; return std::__includes(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } # 2903 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _BidirectionalIterator, typename _Compare> bool __next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) { if (__first == __last) return false; _BidirectionalIterator __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIterator __ii = __i; --__i; if (__comp(__i, __ii)) { _BidirectionalIterator __j = __last; while (!__comp(__i, --__j)) {} std::iter_swap(__i, __j); std::__reverse(__ii, __last, std::__iterator_category(__first)); return true; } if (__i == __first) { std::__reverse(__first, __last, std::__iterator_category(__first)); return false; } } } # 2952 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _BidirectionalIterator> inline bool next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) { ; ; return std::__next_permutation (__first, __last, __gnu_cxx::__ops::__iter_less_iter()); } # 2984 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _BidirectionalIterator, typename _Compare> inline bool next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) { ; ; return std::__next_permutation (__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _BidirectionalIterator, typename _Compare> bool __prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) { if (__first == __last) return false; _BidirectionalIterator __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIterator __ii = __i; --__i; if (__comp(__ii, __i)) { _BidirectionalIterator __j = __last; while (!__comp(--__j, __i)) {} std::iter_swap(__i, __j); std::__reverse(__ii, __last, std::__iterator_category(__first)); return true; } if (__i == __first) { std::__reverse(__first, __last, std::__iterator_category(__first)); return false; } } } # 3052 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _BidirectionalIterator> inline bool prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) { ; ; return std::__prev_permutation(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); } # 3084 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _BidirectionalIterator, typename _Compare> inline bool prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) { ; ; return std::__prev_permutation(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _InputIterator, typename _OutputIterator, typename _Predicate, typename _Tp> _OutputIterator __replace_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred, const _Tp& __new_value) { for (; __first != __last; ++__first, (void)++__result) if (__pred(__first)) *__result = __new_value; else *__result = *__first; return __result; } # 3134 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _OutputIterator, typename _Tp> inline _OutputIterator replace_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __old_value, const _Tp& __new_value) { ; return std::__replace_copy_if(__first, __last, __result, __gnu_cxx::__ops::__iter_equals_val(__old_value), __new_value); } # 3168 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _OutputIterator, typename _Predicate, typename _Tp> inline _OutputIterator replace_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred, const _Tp& __new_value) { ; return std::__replace_copy_if(__first, __last, __result, __gnu_cxx::__ops::__pred_iter(__pred), __new_value); } template<typename _InputIterator, typename _Predicate> typename iterator_traits<_InputIterator>::difference_type __count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) { typename iterator_traits<_InputIterator>::difference_type __n = 0; for (; __first != __last; ++__first) if (__pred(__first)) ++__n; return __n; } # 3207 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator> inline bool is_sorted(_ForwardIterator __first, _ForwardIterator __last) { return std::is_sorted_until(__first, __last) == __last; } # 3221 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Compare> inline bool is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { return std::is_sorted_until(__first, __last, __comp) == __last; } template<typename _ForwardIterator, typename _Compare> _ForwardIterator __is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { if (__first == __last) return __last; _ForwardIterator __next = __first; for (++__next; __next != __last; __first = __next, (void)++__next) if (__comp(__next, __first)) return __next; return __next; } # 3250 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator> inline _ForwardIterator is_sorted_until(_ForwardIterator __first, _ForwardIterator __last) { ; ; return std::__is_sorted_until(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); } # 3274 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Compare> inline _ForwardIterator is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { ; ; return std::__is_sorted_until(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } # 3299 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _Tp> constexpr inline pair<const _Tp&, const _Tp&> minmax(const _Tp& __a, const _Tp& __b) { return __b < __a ? pair<const _Tp&, const _Tp&>(__b, __a) : pair<const _Tp&, const _Tp&>(__a, __b); } # 3320 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _Tp, typename _Compare> constexpr inline pair<const _Tp&, const _Tp&> minmax(const _Tp& __a, const _Tp& __b, _Compare __comp) { return __comp(__b, __a) ? pair<const _Tp&, const _Tp&>(__b, __a) : pair<const _Tp&, const _Tp&>(__a, __b); } template<typename _ForwardIterator, typename _Compare> constexpr pair<_ForwardIterator, _ForwardIterator> __minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { _ForwardIterator __next = __first; if (__first == __last || ++__next == __last) return std::make_pair(__first, __first); _ForwardIterator __min{}, __max{}; if (__comp(__next, __first)) { __min = __next; __max = __first; } else { __min = __first; __max = __next; } __first = __next; ++__first; while (__first != __last) { __next = __first; if (++__next == __last) { if (__comp(__first, __min)) __min = __first; else if (!__comp(__first, __max)) __max = __first; break; } if (__comp(__next, __first)) { if (__comp(__next, __min)) __min = __next; if (!__comp(__first, __max)) __max = __first; } else { if (__comp(__first, __min)) __min = __first; if (!__comp(__next, __max)) __max = __next; } __first = __next; ++__first; } return std::make_pair(__min, __max); } # 3400 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator> constexpr inline pair<_ForwardIterator, _ForwardIterator> minmax_element(_ForwardIterator __first, _ForwardIterator __last) { ; ; return std::__minmax_element(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); } # 3428 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Compare> constexpr inline pair<_ForwardIterator, _ForwardIterator> minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { ; ; return std::__minmax_element(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _Tp> constexpr inline _Tp min(initializer_list<_Tp> __l) { return *std::min_element(__l.begin(), __l.end()); } template<typename _Tp, typename _Compare> constexpr inline _Tp min(initializer_list<_Tp> __l, _Compare __comp) { return *std::min_element(__l.begin(), __l.end(), __comp); } template<typename _Tp> constexpr inline _Tp max(initializer_list<_Tp> __l) { return *std::max_element(__l.begin(), __l.end()); } template<typename _Tp, typename _Compare> constexpr inline _Tp max(initializer_list<_Tp> __l, _Compare __comp) { return *std::max_element(__l.begin(), __l.end(), __comp); } template<typename _Tp> constexpr inline pair<_Tp, _Tp> minmax(initializer_list<_Tp> __l) { pair<const _Tp*, const _Tp*> __p = std::minmax_element(__l.begin(), __l.end()); return std::make_pair(*__p.first, *__p.second); } template<typename _Tp, typename _Compare> constexpr inline pair<_Tp, _Tp> minmax(initializer_list<_Tp> __l, _Compare __comp) { pair<const _Tp*, const _Tp*> __p = std::minmax_element(__l.begin(), __l.end(), __comp); return std::make_pair(*__p.first, *__p.second); } template<typename _ForwardIterator1, typename _ForwardIterator2, typename _BinaryPredicate> bool __is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _BinaryPredicate __pred) { for (; __first1 != __last1; ++__first1, (void)++__first2) if (!__pred(__first1, __first2)) break; if (__first1 == __last1) return true; _ForwardIterator2 __last2 = __first2; std::advance(__last2, std::distance(__first1, __last1)); for (_ForwardIterator1 __scan = __first1; __scan != __last1; ++__scan) { if (__scan != std::__find_if(__first1, __scan, __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan))) continue; auto __matches = std::__count_if(__first2, __last2, __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)); if (0 == __matches || std::__count_if(__scan, __last1, __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)) != __matches) return false; } return true; } # 3540 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator1, typename _ForwardIterator2> inline bool is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) { ; return std::__is_permutation(__first1, __last1, __first2, __gnu_cxx::__ops::__iter_equal_to_iter()); } # 3571 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator1, typename _ForwardIterator2, typename _BinaryPredicate> inline bool is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _BinaryPredicate __pred) { ; return std::__is_permutation(__first1, __last1, __first2, __gnu_cxx::__ops::__iter_comp_iter(__pred)); } template<typename _ForwardIterator1, typename _ForwardIterator2, typename _BinaryPredicate> bool __is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred) { using _Cat1 = typename iterator_traits<_ForwardIterator1>::iterator_category; using _Cat2 = typename iterator_traits<_ForwardIterator2>::iterator_category; using _It1_is_RA = is_same<_Cat1, random_access_iterator_tag>; using _It2_is_RA = is_same<_Cat2, random_access_iterator_tag>; constexpr bool __ra_iters = _It1_is_RA() && _It2_is_RA(); if (__ra_iters) { auto __d1 = std::distance(__first1, __last1); auto __d2 = std::distance(__first2, __last2); if (__d1 != __d2) return false; } for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void)++__first2) if (!__pred(__first1, __first2)) break; if (__ra_iters) { if (__first1 == __last1) return true; } else { auto __d1 = std::distance(__first1, __last1); auto __d2 = std::distance(__first2, __last2); if (__d1 == 0 && __d2 == 0) return true; if (__d1 != __d2) return false; } for (_ForwardIterator1 __scan = __first1; __scan != __last1; ++__scan) { if (__scan != std::__find_if(__first1, __scan, __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan))) continue; auto __matches = std::__count_if(__first2, __last2, __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)); if (0 == __matches || std::__count_if(__scan, __last1, __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)) != __matches) return false; } return true; } # 3664 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator1, typename _ForwardIterator2> inline bool is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) { ; ; return std::__is_permutation(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_equal_to_iter()); } # 3691 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator1, typename _ForwardIterator2, typename _BinaryPredicate> inline bool is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred) { ; ; return std::__is_permutation(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_comp_iter(__pred)); } # 3767 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _IntType, typename _UniformRandomBitGenerator> pair<_IntType, _IntType> __gen_two_uniform_ints(_IntType __b0, _IntType __b1, _UniformRandomBitGenerator&& __g) { _IntType __x = uniform_int_distribution<_IntType>{0, (__b0 * __b1) - 1}(__g); return std::make_pair(__x / __b1, __x % __b1); } # 3789 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _RandomAccessIterator, typename _UniformRandomNumberGenerator> void shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, _UniformRandomNumberGenerator&& __g) { ; if (__first == __last) return; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; typedef typename std::make_unsigned<_DistanceType>::type __ud_type; typedef typename std::uniform_int_distribution<__ud_type> __distr_type; typedef typename __distr_type::param_type __p_type; typedef typename remove_reference<_UniformRandomNumberGenerator>::type _Gen; typedef typename common_type<typename _Gen::result_type, __ud_type>::type __uc_type; const __uc_type __urngrange = __g.max() - __g.min(); const __uc_type __urange = __uc_type(__last - __first); if (__urngrange / __urange >= __urange) { _RandomAccessIterator __i = __first + 1; if ((__urange % 2) == 0) { __distr_type __d{0, 1}; std::iter_swap(__i++, __first + __d(__g)); } while (__i != __last) { const __uc_type __swap_range = __uc_type(__i - __first) + 1; const pair<__uc_type, __uc_type> __pospos = __gen_two_uniform_ints(__swap_range, __swap_range + 1, __g); std::iter_swap(__i++, __first + __pospos.first); std::iter_swap(__i++, __first + __pospos.second); } return; } __distr_type __d; for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) std::iter_swap(__i, __first + __d(__g, __p_type(0, __i - __first))); } # 3874 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _Function> _Function for_each(_InputIterator __first, _InputIterator __last, _Function __f) { ; for (; __first != __last; ++__first) __f(*__first); return __f; } # 3895 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _Tp> inline _InputIterator find(_InputIterator __first, _InputIterator __last, const _Tp& __val) { ; return std::__find_if(__first, __last, __gnu_cxx::__ops::__iter_equals_val(__val)); } # 3919 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _Predicate> inline _InputIterator find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) { ; return std::__find_if(__first, __last, __gnu_cxx::__ops::__pred_iter(__pred)); } # 3950 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _ForwardIterator> _InputIterator find_first_of(_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2) { ; ; for (; __first1 != __last1; ++__first1) for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) if (*__first1 == *__iter) return __first1; return __last1; } # 3990 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _ForwardIterator, typename _BinaryPredicate> _InputIterator find_first_of(_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2, _BinaryPredicate __comp) { ; ; for (; __first1 != __last1; ++__first1) for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) if (__comp(*__first1, *__iter)) return __first1; return __last1; } # 4022 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator> inline _ForwardIterator adjacent_find(_ForwardIterator __first, _ForwardIterator __last) { ; return std::__adjacent_find(__first, __last, __gnu_cxx::__ops::__iter_equal_to_iter()); } # 4047 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _BinaryPredicate> inline _ForwardIterator adjacent_find(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __binary_pred) { ; return std::__adjacent_find(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); } # 4072 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _Tp> inline typename iterator_traits<_InputIterator>::difference_type count(_InputIterator __first, _InputIterator __last, const _Tp& __value) { ; return std::__count_if(__first, __last, __gnu_cxx::__ops::__iter_equals_val(__value)); } # 4095 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _Predicate> inline typename iterator_traits<_InputIterator>::difference_type count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) { ; return std::__count_if(__first, __last, __gnu_cxx::__ops::__pred_iter(__pred)); } # 4135 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator1, typename _ForwardIterator2> inline _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) { ; ; return std::__search(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_equal_to_iter()); } # 4174 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator1, typename _ForwardIterator2, typename _BinaryPredicate> inline _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __predicate) { ; ; return std::__search(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_comp_iter(__predicate)); } # 4209 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Integer, typename _Tp> inline _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val) { ; return std::__search_n(__first, __last, __count, __gnu_cxx::__ops::__iter_equals_val(__val)); } # 4242 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Integer, typename _Tp, typename _BinaryPredicate> inline _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val, _BinaryPredicate __binary_pred) { ; return std::__search_n(__first, __last, __count, __gnu_cxx::__ops::__iter_comp_val(__binary_pred, __val)); } # 4290 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _OutputIterator, typename _UnaryOperation> _OutputIterator transform(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _UnaryOperation __unary_op) { ; for (; __first != __last; ++__first, (void)++__result) *__result = __unary_op(*__first); return __result; } # 4327 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _BinaryOperation> _OutputIterator transform(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _OutputIterator __result, _BinaryOperation __binary_op) { ; for (; __first1 != __last1; ++__first1, (void)++__first2, ++__result) *__result = __binary_op(*__first1, *__first2); return __result; } # 4360 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Tp> void replace(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value, const _Tp& __new_value) { ; for (; __first != __last; ++__first) if (*__first == __old_value) *__first = __new_value; } # 4392 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Predicate, typename _Tp> void replace_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, const _Tp& __new_value) { ; for (; __first != __last; ++__first) if (__pred(*__first)) *__first = __new_value; } # 4424 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Generator> void generate(_ForwardIterator __first, _ForwardIterator __last, _Generator __gen) { ; for (; __first != __last; ++__first) *__first = __gen(); } # 4455 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _OutputIterator, typename _Size, typename _Generator> _OutputIterator generate_n(_OutputIterator __first, _Size __n, _Generator __gen) { for (__decltype(__n + 0) __niter = __n; __niter > 0; --__niter, (void) ++__first) *__first = __gen(); return __first; } # 4491 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _OutputIterator> inline _OutputIterator unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { ; if (__first == __last) return __result; return std::__unique_copy(__first, __last, __result, __gnu_cxx::__ops::__iter_equal_to_iter(), std::__iterator_category(__first), std::__iterator_category(__result)); } # 4531 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator, typename _OutputIterator, typename _BinaryPredicate> inline _OutputIterator unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __binary_pred) { ; if (__first == __last) return __result; return std::__unique_copy(__first, __last, __result, __gnu_cxx::__ops::__iter_comp_iter(__binary_pred), std::__iterator_category(__first), std::__iterator_category(__result)); } # 4564 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _RandomAccessIterator> inline void random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) { ; if (__first != __last) for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) { _RandomAccessIterator __j = __first + std::rand() % ((__i - __first) + 1); if (__i != __j) std::iter_swap(__i, __j); } } # 4599 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _RandomAccessIterator, typename _RandomNumberGenerator> void random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomNumberGenerator&& __rand) { ; if (__first == __last) return; for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) { _RandomAccessIterator __j = __first + __rand((__i - __first) + 1); if (__i != __j) std::iter_swap(__i, __j); } } # 4639 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Predicate> inline _ForwardIterator partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { ; return std::__partition(__first, __last, __pred, std::__iterator_category(__first)); } # 4672 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _RandomAccessIterator> inline void partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last) { ; ; ; std::__partial_sort(__first, __middle, __last, __gnu_cxx::__ops::__iter_less_iter()); } # 4710 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _RandomAccessIterator, typename _Compare> inline void partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, _Compare __comp) { ; ; ; std::__partial_sort(__first, __middle, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } # 4746 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _RandomAccessIterator> inline void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last) { ; ; ; if (__first == __last || __nth == __last) return; std::__introselect(__first, __nth, __last, std::__lg(__last - __first) * 2, __gnu_cxx::__ops::__iter_less_iter()); } # 4785 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _RandomAccessIterator, typename _Compare> inline void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp) { ; ; ; if (__first == __last || __nth == __last) return; std::__introselect(__first, __nth, __last, std::__lg(__last - __first) * 2, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } # 4822 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _RandomAccessIterator> inline void sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { ; ; std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); } # 4852 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _RandomAccessIterator, typename _Compare> inline void sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { ; ; std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> _OutputIterator __merge(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) { if (__comp(__first2, __first1)) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; } ++__result; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 4913 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator> inline _OutputIterator merge(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { # 4930 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; ; ; ; return std::__merge(__first1, __last1, __first2, __last2, __result, __gnu_cxx::__ops::__iter_less_iter()); } # 4963 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> inline _OutputIterator merge(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { # 4980 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; ; ; ; return std::__merge(__first1, __last1, __first2, __last2, __result, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _RandomAccessIterator, typename _Compare> inline void __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; typedef _Temporary_buffer<_RandomAccessIterator, _ValueType> _TmpBuf; _TmpBuf __buf(__first, __last); if (__buf.begin() == 0) std::__inplace_stable_sort(__first, __last, __comp); else std::__stable_sort_adaptive(__first, __last, __buf.begin(), _DistanceType(__buf.size()), __comp); } # 5027 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _RandomAccessIterator> inline void stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { ; ; std::__stable_sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); } # 5061 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _RandomAccessIterator, typename _Compare> inline void stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { ; ; std::__stable_sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> _OutputIterator __set_union(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) { if (__comp(__first1, __first2)) { *__result = *__first1; ++__first1; } else if (__comp(__first2, __first1)) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; ++__first2; } ++__result; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 5130 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator> inline _OutputIterator set_union(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { # 5150 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; ; ; ; return std::__set_union(__first1, __last1, __first2, __last2, __result, __gnu_cxx::__ops::__iter_less_iter()); } # 5180 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> inline _OutputIterator set_union(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { # 5200 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; ; ; ; return std::__set_union(__first1, __last1, __first2, __last2, __result, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> _OutputIterator __set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) if (__comp(__first1, __first2)) ++__first1; else if (__comp(__first2, __first1)) ++__first2; else { *__result = *__first1; ++__first1; ++__first2; ++__result; } return __result; } # 5251 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator> inline _OutputIterator set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { # 5269 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; ; ; ; return std::__set_intersection(__first1, __last1, __first2, __last2, __result, __gnu_cxx::__ops::__iter_less_iter()); } # 5300 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> inline _OutputIterator set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { # 5318 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; ; ; ; return std::__set_intersection(__first1, __last1, __first2, __last2, __result, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> _OutputIterator __set_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) if (__comp(__first1, __first2)) { *__result = *__first1; ++__first1; ++__result; } else if (__comp(__first2, __first1)) ++__first2; else { ++__first1; ++__first2; } return std::copy(__first1, __last1, __result); } # 5373 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator> inline _OutputIterator set_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { # 5391 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; ; ; ; return std::__set_difference(__first1, __last1, __first2, __last2, __result, __gnu_cxx::__ops::__iter_less_iter()); } # 5424 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> inline _OutputIterator set_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { # 5442 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; ; ; ; return std::__set_difference(__first1, __last1, __first2, __last2, __result, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> _OutputIterator __set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) if (__comp(__first1, __first2)) { *__result = *__first1; ++__first1; ++__result; } else if (__comp(__first2, __first1)) { *__result = *__first2; ++__first2; ++__result; } else { ++__first1; ++__first2; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 5503 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator> inline _OutputIterator set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { # 5523 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; ; ; ; return std::__set_symmetric_difference(__first1, __last1, __first2, __last2, __result, __gnu_cxx::__ops::__iter_less_iter()); } # 5554 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> inline _OutputIterator set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { # 5575 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 ; ; ; ; return std::__set_symmetric_difference(__first1, __last1, __first2, __last2, __result, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _ForwardIterator, typename _Compare> constexpr _ForwardIterator __min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { if (__first == __last) return __first; _ForwardIterator __result = __first; while (++__first != __last) if (__comp(__first, __result)) __result = __first; return __result; } # 5607 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator> constexpr _ForwardIterator inline min_element(_ForwardIterator __first, _ForwardIterator __last) { ; ; return std::__min_element(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); } # 5632 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Compare> constexpr inline _ForwardIterator min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { ; ; return std::__min_element(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _ForwardIterator, typename _Compare> constexpr _ForwardIterator __max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { if (__first == __last) return __first; _ForwardIterator __result = __first; while (++__first != __last) if (__comp(__result, __first)) __result = __first; return __result; } # 5671 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator> constexpr inline _ForwardIterator max_element(_ForwardIterator __first, _ForwardIterator __last) { ; ; return std::__max_element(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); } # 5696 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 template<typename _ForwardIterator, typename _Compare> constexpr inline _ForwardIterator max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { ; ; return std::__max_element(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _InputIterator, typename _RandomAccessIterator, typename _Size, typename _UniformRandomBitGenerator> _RandomAccessIterator __sample(_InputIterator __first, _InputIterator __last, input_iterator_tag, _RandomAccessIterator __out, random_access_iterator_tag, _Size __n, _UniformRandomBitGenerator&& __g) { using __distrib_type = uniform_int_distribution<_Size>; using __param_type = typename __distrib_type::param_type; __distrib_type __d{}; _Size __sample_sz = 0; while (__first != __last && __sample_sz != __n) { __out[__sample_sz++] = *__first; ++__first; } for (auto __pop_sz = __sample_sz; __first != __last; ++__first, (void) ++__pop_sz) { const auto __k = __d(__g, __param_type{0, __pop_sz}); if (__k < __n) __out[__k] = *__first; } return __out + __sample_sz; } template<typename _ForwardIterator, typename _OutputIterator, typename _Cat, typename _Size, typename _UniformRandomBitGenerator> _OutputIterator __sample(_ForwardIterator __first, _ForwardIterator __last, forward_iterator_tag, _OutputIterator __out, _Cat, _Size __n, _UniformRandomBitGenerator&& __g) { using __distrib_type = uniform_int_distribution<_Size>; using __param_type = typename __distrib_type::param_type; using _USize = make_unsigned_t<_Size>; using _Gen = remove_reference_t<_UniformRandomBitGenerator>; using __uc_type = common_type_t<typename _Gen::result_type, _USize>; __distrib_type __d{}; _Size __unsampled_sz = std::distance(__first, __last); __n = std::min(__n, __unsampled_sz); const __uc_type __urngrange = __g.max() - __g.min(); if (__urngrange / __uc_type(__unsampled_sz) >= __uc_type(__unsampled_sz)) { while (__n != 0 && __unsampled_sz >= 2) { const pair<_Size, _Size> __p = __gen_two_uniform_ints(__unsampled_sz, __unsampled_sz - 1, __g); --__unsampled_sz; if (__p.first < __n) { *__out++ = *__first; --__n; } ++__first; if (__n == 0) break; --__unsampled_sz; if (__p.second < __n) { *__out++ = *__first; --__n; } ++__first; } } for (; __n != 0; ++__first) if (__d(__g, __param_type{0, --__unsampled_sz}) < __n) { *__out++ = *__first; --__n; } return __out; } # 5841 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h" 3 } # 63 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/algorithm" 2 3 # 52 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 53 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 3 # 1 "/usr/include/string.h" 1 3 4 # 26 "/usr/include/string.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 # 27 "/usr/include/string.h" 2 3 4 extern "C" { # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 1 3 4 # 34 "/usr/include/string.h" 2 3 4 extern void *memcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, const void *__src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, const void *__restrict __src, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int memcmp (const void *__s1, const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 90 "/usr/include/string.h" 3 4 extern void *memchr (const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 103 "/usr/include/string.h" 3 4 extern void *rawmemchr (const void *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 114 "/usr/include/string.h" 3 4 extern void *memrchr (const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strcpy (char *__restrict __dest, const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (const char *__s1, const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (const char *__s1, const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (const char *__s1, const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (2))); extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); extern char *strdup (const char *__s) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strndup (const char *__string, size_t __n) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); # 225 "/usr/include/string.h" 3 4 extern char *strchr (const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 252 "/usr/include/string.h" 3 4 extern char *strrchr (const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 265 "/usr/include/string.h" 3 4 extern char *strchrnul (const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strcspn (const char *__s, const char *__reject) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (const char *__s, const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 302 "/usr/include/string.h" 3 4 extern char *strpbrk (const char *__s, const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 329 "/usr/include/string.h" 3 4 extern char *strstr (const char *__haystack, const char *__needle) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strtok (char *__restrict __s, const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); # 359 "/usr/include/string.h" 3 4 extern char *strcasestr (const char *__haystack, const char *__needle) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmem (const void *__haystack, size_t __haystacklen, const void *__needle, size_t __needlelen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); extern void *__mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern size_t strlen (const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strnlen (const char *__string, size_t __maxlen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strerror (int __errnum) throw (); # 420 "/usr/include/string.h" 3 4 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))) ; extern char *strerror_l (int __errnum, locale_t __l) throw (); # 1 "/usr/include/strings.h" 1 3 4 # 23 "/usr/include/strings.h" 3 4 # 1 "/usr/local/bin/../lib/clang/3.9.1/include/stddef.h" 1 3 4 # 24 "/usr/include/strings.h" 2 3 4 extern "C" { extern int bcmp (const void *__s1, const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void bcopy (const void *__src, void *__dest, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); # 68 "/usr/include/strings.h" 3 4 extern char *index (const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 96 "/usr/include/strings.h" 3 4 extern char *rindex (const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern int ffs (int __i) throw () __attribute__ ((__const__)); extern int ffsl (long int __l) throw () __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) throw () __attribute__ ((__const__)); extern int strcasecmp (const char *__s1, const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int strncasecmp_l (const char *__s1, const char *__s2, size_t __n, locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); } # 432 "/usr/include/string.h" 2 3 4 extern void explicit_bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern char *strsep (char **__restrict __stringp, const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strsignal (int __sig) throw (); extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *__stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strverscmp (const char *__s1, const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); # 486 "/usr/include/string.h" 3 4 extern char *basename (const char *__filename) throw () __attribute__ ((__nonnull__ (1))); # 498 "/usr/include/string.h" 3 4 } # 43 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 2 3 # 71 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::memchr; using ::memcmp; using ::memcpy; using ::memmove; using ::memset; using ::strcat; using ::strcmp; using ::strcoll; using ::strcpy; using ::strcspn; using ::strerror; using ::strlen; using ::strncat; using ::strncmp; using ::strncpy; using ::strspn; using ::strtok; using ::strxfrm; using ::strchr; using ::strpbrk; using ::strrchr; using ::strstr; inline void* memchr(void* __s, int __c, size_t __n) { return __builtin_memchr(__s, __c, __n); } inline char* strchr(char* __s, int __n) { return __builtin_strchr(__s, __n); } inline char* strpbrk(char* __s1, const char* __s2) { return __builtin_strpbrk(__s1, __s2); } inline char* strrchr(char* __s, int __n) { return __builtin_strrchr(__s, __n); } inline char* strstr(char* __s1, const char* __s2) { return __builtin_strstr(__s1, __s2); } } # 54 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" 2 namespace llvm { # 71 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" class hash_code { size_t value; public: hash_code() = default; hash_code(size_t value) : value(value) {} operator size_t() const { return value; } friend bool operator==(const hash_code &lhs, const hash_code &rhs) { return lhs.value == rhs.value; } friend bool operator!=(const hash_code &lhs, const hash_code &rhs) { return lhs.value != rhs.value; } friend size_t hash_value(const hash_code &code) { return code.value; } }; # 103 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" template <typename T> std::enable_if_t<is_integral_or_enum<T>::value, hash_code> hash_value(T value); template <typename T> hash_code hash_value(const T *ptr); template <typename T, typename U> hash_code hash_value(const std::pair<T, U> &arg); template <typename T> hash_code hash_value(const std::basic_string<T> &arg); # 134 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" void set_fixed_execution_hash_seed(uint64_t fixed_value); namespace hashing { namespace detail { inline uint64_t fetch64(const char *p) { uint64_t result; memcpy(&result, p, sizeof(result)); if (sys::IsBigEndianHost) sys::swapByteOrder(result); return result; } inline uint32_t fetch32(const char *p) { uint32_t result; memcpy(&result, p, sizeof(result)); if (sys::IsBigEndianHost) sys::swapByteOrder(result); return result; } static constexpr uint64_t k0 = 0xc3a5c85c97cb3127ULL; static constexpr uint64_t k1 = 0xb492b66fbe98f273ULL; static constexpr uint64_t k2 = 0x9ae16a3b2f90404fULL; static constexpr uint64_t k3 = 0xc949d7c7509e6557ULL; inline uint64_t rotate(uint64_t val, size_t shift) { return shift == 0 ? val : ((val >> shift) | (val << (64 - shift))); } inline uint64_t shift_mix(uint64_t val) { return val ^ (val >> 47); } inline uint64_t hash_16_bytes(uint64_t low, uint64_t high) { const uint64_t kMul = 0x9ddfea08eb382d69ULL; uint64_t a = (low ^ high) * kMul; a ^= (a >> 47); uint64_t b = (high ^ a) * kMul; b ^= (b >> 47); b *= kMul; return b; } inline uint64_t hash_1to3_bytes(const char *s, size_t len, uint64_t seed) { uint8_t a = s[0]; uint8_t b = s[len >> 1]; uint8_t c = s[len - 1]; uint32_t y = static_cast<uint32_t>(a) + (static_cast<uint32_t>(b) << 8); uint32_t z = static_cast<uint32_t>(len) + (static_cast<uint32_t>(c) << 2); return shift_mix(y * k2 ^ z * k3 ^ seed) * k2; } inline uint64_t hash_4to8_bytes(const char *s, size_t len, uint64_t seed) { uint64_t a = fetch32(s); return hash_16_bytes(len + (a << 3), seed ^ fetch32(s + len - 4)); } inline uint64_t hash_9to16_bytes(const char *s, size_t len, uint64_t seed) { uint64_t a = fetch64(s); uint64_t b = fetch64(s + len - 8); return hash_16_bytes(seed ^ a, rotate(b + len, len)) ^ b; } inline uint64_t hash_17to32_bytes(const char *s, size_t len, uint64_t seed) { uint64_t a = fetch64(s) * k1; uint64_t b = fetch64(s + 8); uint64_t c = fetch64(s + len - 8) * k2; uint64_t d = fetch64(s + len - 16) * k0; return hash_16_bytes(rotate(a - b, 43) + rotate(c ^ seed, 30) + d, a + rotate(b ^ k3, 20) - c + len + seed); } inline uint64_t hash_33to64_bytes(const char *s, size_t len, uint64_t seed) { uint64_t z = fetch64(s + 24); uint64_t a = fetch64(s) + (len + fetch64(s + len - 16)) * k0; uint64_t b = rotate(a + z, 52); uint64_t c = rotate(a, 37); a += fetch64(s + 8); c += rotate(a, 7); a += fetch64(s + 16); uint64_t vf = a + z; uint64_t vs = b + rotate(a, 31) + c; a = fetch64(s + 16) + fetch64(s + len - 32); z = fetch64(s + len - 8); b = rotate(a + z, 52); c = rotate(a, 37); a += fetch64(s + len - 24); c += rotate(a, 7); a += fetch64(s + len - 16); uint64_t wf = a + z; uint64_t ws = b + rotate(a, 31) + c; uint64_t r = shift_mix((vf + ws) * k2 + (wf + vs) * k0); return shift_mix((seed ^ (r * k0)) + vs) * k2; } inline uint64_t hash_short(const char *s, size_t length, uint64_t seed) { if (length >= 4 && length <= 8) return hash_4to8_bytes(s, length, seed); if (length > 8 && length <= 16) return hash_9to16_bytes(s, length, seed); if (length > 16 && length <= 32) return hash_17to32_bytes(s, length, seed); if (length > 32) return hash_33to64_bytes(s, length, seed); if (length != 0) return hash_1to3_bytes(s, length, seed); return k2 ^ seed; } struct hash_state { uint64_t h0 = 0, h1 = 0, h2 = 0, h3 = 0, h4 = 0, h5 = 0, h6 = 0; static hash_state create(const char *s, uint64_t seed) { hash_state state = { 0, seed, hash_16_bytes(seed, k1), rotate(seed ^ k1, 49), seed * k1, shift_mix(seed), 0 }; state.h6 = hash_16_bytes(state.h4, state.h5); state.mix(s); return state; } static void mix_32_bytes(const char *s, uint64_t &a, uint64_t &b) { a += fetch64(s); uint64_t c = fetch64(s + 24); b = rotate(b + a + c, 21); uint64_t d = a; a += fetch64(s + 8) + fetch64(s + 16); b += rotate(a, 44) + d; a += c; } void mix(const char *s) { h0 = rotate(h0 + h1 + h3 + fetch64(s + 8), 37) * k1; h1 = rotate(h1 + h4 + fetch64(s + 48), 42) * k1; h0 ^= h6; h1 += h3 + fetch64(s + 40); h2 = rotate(h2 + h5, 33) * k1; h3 = h4 * k1; h4 = h0 + h5; mix_32_bytes(s, h3, h4); h5 = h2 + h6; h6 = h1 + fetch64(s + 16); mix_32_bytes(s + 32, h5, h6); std::swap(h2, h0); } uint64_t finalize(size_t length) { return hash_16_bytes(hash_16_bytes(h3, h5) + shift_mix(h1) * k1 + h2, hash_16_bytes(h4, h6) + shift_mix(length) * k1 + h0); } }; extern uint64_t fixed_seed_override; inline uint64_t get_execution_seed() { const uint64_t seed_prime = 0xff51afd7ed558ccdULL; static uint64_t seed = fixed_seed_override ? fixed_seed_override : seed_prime; return seed; } # 344 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" template <typename T> struct is_hashable_data : std::integral_constant<bool, ((is_integral_or_enum<T>::value || std::is_pointer<T>::value) && 64 % sizeof(T) == 0)> {}; template <typename T, typename U> struct is_hashable_data<std::pair<T, U> > : std::integral_constant<bool, (is_hashable_data<T>::value && is_hashable_data<U>::value && (sizeof(T) + sizeof(U)) == sizeof(std::pair<T, U>))> {}; template <typename T> std::enable_if_t<is_hashable_data<T>::value, T> get_hashable_data(const T &value) { return value; } template <typename T> std::enable_if_t<!is_hashable_data<T>::value, size_t> get_hashable_data(const T &value) { using ::llvm::hash_value; return hash_value(value); } # 383 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" template <typename T> bool store_and_advance(char *&buffer_ptr, char *buffer_end, const T& value, size_t offset = 0) { size_t store_size = sizeof(value) - offset; if (buffer_ptr + store_size > buffer_end) return false; const char *value_data = reinterpret_cast<const char *>(&value); memcpy(buffer_ptr, value_data + offset, store_size); buffer_ptr += store_size; return true; } template <typename InputIteratorT> hash_code hash_combine_range_impl(InputIteratorT first, InputIteratorT last) { const uint64_t seed = get_execution_seed(); char buffer[64], *buffer_ptr = buffer; char *const buffer_end = std::end(buffer); while (first != last && store_and_advance(buffer_ptr, buffer_end, get_hashable_data(*first))) ++first; if (first == last) return hash_short(buffer, buffer_ptr - buffer, seed); (static_cast<void> (0)); hash_state state = state.create(buffer, seed); size_t length = 64; while (first != last) { buffer_ptr = buffer; while (first != last && store_and_advance(buffer_ptr, buffer_end, get_hashable_data(*first))) ++first; std::rotate(buffer, buffer_ptr, buffer_end); state.mix(buffer); length += buffer_ptr - buffer; }; return state.finalize(length); } # 443 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" template <typename ValueT> std::enable_if_t<is_hashable_data<ValueT>::value, hash_code> hash_combine_range_impl(ValueT *first, ValueT *last) { const uint64_t seed = get_execution_seed(); const char *s_begin = reinterpret_cast<const char *>(first); const char *s_end = reinterpret_cast<const char *>(last); const size_t length = std::distance(s_begin, s_end); if (length <= 64) return hash_short(s_begin, length, seed); const char *s_aligned_end = s_begin + (length & ~63); hash_state state = state.create(s_begin, seed); s_begin += 64; while (s_begin != s_aligned_end) { state.mix(s_begin); s_begin += 64; } if (length & 63) state.mix(s_end - 64); return state.finalize(length); } } } # 476 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" template <typename InputIteratorT> hash_code hash_combine_range(InputIteratorT first, InputIteratorT last) { return ::llvm::hashing::detail::hash_combine_range_impl(first, last); } namespace hashing { namespace detail { # 493 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" struct hash_combine_recursive_helper { char buffer[64] = {}; hash_state state; const uint64_t seed; public: hash_combine_recursive_helper() : seed(get_execution_seed()) {} template <typename T> char *combine_data(size_t &length, char *buffer_ptr, char *buffer_end, T data) { if (!store_and_advance(buffer_ptr, buffer_end, data)) { size_t partial_store_size = buffer_end - buffer_ptr; memcpy(buffer_ptr, &data, partial_store_size); if (length == 0) { state = state.create(buffer, seed); length = 64; } else { state.mix(buffer); length += 64; } buffer_ptr = buffer; if (!store_and_advance(buffer_ptr, buffer_end, data, partial_store_size)) __builtin_unreachable(); } return buffer_ptr; } template <typename T, typename ...Ts> hash_code combine(size_t length, char *buffer_ptr, char *buffer_end, const T &arg, const Ts &...args) { buffer_ptr = combine_data(length, buffer_ptr, buffer_end, get_hashable_data(arg)); return combine(length, buffer_ptr, buffer_end, args...); } hash_code combine(size_t length, char *buffer_ptr, char *buffer_end) { if (length == 0) return hash_short(buffer, buffer_ptr - buffer, seed); std::rotate(buffer, buffer_ptr, buffer_end); state.mix(buffer); length += buffer_ptr - buffer; return state.finalize(length); } }; } } # 599 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Hashing.h" template <typename ...Ts> hash_code hash_combine(const Ts &...args) { ::llvm::hashing::detail::hash_combine_recursive_helper helper; return helper.combine(0, helper.buffer, helper.buffer + 64, args...); } namespace hashing { namespace detail { inline hash_code hash_integer_value(uint64_t value) { const uint64_t seed = get_execution_seed(); const char *s = reinterpret_cast<const char *>(&value); const uint64_t a = fetch32(s); return hash_16_bytes(seed + (a << 3), fetch32(s + 4)); } } } template <typename T> std::enable_if_t<is_integral_or_enum<T>::value, hash_code> hash_value(T value) { return ::llvm::hashing::detail::hash_integer_value( static_cast<uint64_t>(value)); } template <typename T> hash_code hash_value(const T *ptr) { return ::llvm::hashing::detail::hash_integer_value( reinterpret_cast<uintptr_t>(ptr)); } template <typename T, typename U> hash_code hash_value(const std::pair<T, U> &arg) { return hash_combine(arg.first, arg.second); } template <typename T> hash_code hash_value(const std::basic_string<T> &arg) { return hash_combine_range(arg.begin(), arg.end()); } } # 13 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ArrayRef.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/None.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/None.h" namespace llvm { enum class NoneType { None = 1 }; const NoneType None = NoneType::None; } # 14 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ArrayRef.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallVector.h" 1 # 16 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallVector.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/iterator_range.h" 1 # 21 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/iterator_range.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/iterator" 1 3 # 59 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/iterator" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 1 3 # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ios" 1 3 # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ios" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 1 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 1 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 62 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 class locale { public: typedef int category; class facet; class id; class _Impl; friend class facet; friend class _Impl; template<typename _Facet> friend bool has_facet(const locale&) throw(); template<typename _Facet> friend const _Facet& use_facet(const locale&); template<typename _Cache> friend struct __use_cache; # 98 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 static const category none = 0; static const category ctype = 1L << 0; static const category numeric = 1L << 1; static const category collate = 1L << 2; static const category time = 1L << 3; static const category monetary = 1L << 4; static const category messages = 1L << 5; static const category all = (ctype | numeric | collate | time | monetary | messages); # 117 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 locale() throw(); # 126 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 locale(const locale& __other) throw(); # 136 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 explicit locale(const char* __s); # 151 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 locale(const locale& __base, const char* __s, category __cat); # 162 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 explicit locale(const std::string& __s) : locale(__s.c_str()) { } # 177 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 locale(const locale& __base, const std::string& __s, category __cat) : locale(__base, __s.c_str(), __cat) { } # 192 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 locale(const locale& __base, const locale& __add, category __cat); # 205 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 template<typename _Facet> locale(const locale& __other, _Facet* __f); ~locale() throw(); # 219 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 const locale& operator=(const locale& __other) throw(); # 234 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 template<typename _Facet> locale combine(const locale& __other) const; __attribute ((__abi_tag__ ("cxx11"))) string name() const; # 254 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 bool operator==(const locale& __other) const throw(); bool operator!=(const locale& __other) const throw() { return !(this->operator==(__other)); } # 282 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 template<typename _Char, typename _Traits, typename _Alloc> bool operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, const basic_string<_Char, _Traits, _Alloc>& __s2) const; # 298 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 static locale global(const locale& __loc); static const locale& classic(); private: _Impl* _M_impl; static _Impl* _S_classic; static _Impl* _S_global; static const char* const* const _S_categories; # 333 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 enum { _S_categories_size = 6 + 6 }; static __gthread_once_t _S_once; explicit locale(_Impl*) throw(); static void _S_initialize(); static void _S_initialize_once() throw(); static category _S_normalize_category(category); void _M_coalesce(const locale& __base, const locale& __add, category __cat); static const id* const _S_twinned_facets[]; }; # 371 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 class locale::facet { private: friend class locale; friend class locale::_Impl; mutable _Atomic_word _M_refcount; static __c_locale _S_c_locale; static const char _S_c_name[2]; static __gthread_once_t _S_once; static void _S_initialize_once(); protected: # 402 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 explicit facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) { } virtual ~facet(); static void _S_create_c_locale(__c_locale& __cloc, const char* __s, __c_locale __old = 0); static __c_locale _S_clone_c_locale(__c_locale& __cloc) throw(); static void _S_destroy_c_locale(__c_locale& __cloc); static __c_locale _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s); static __c_locale _S_get_c_locale(); __attribute__ ((__const__)) static const char* _S_get_c_name() throw(); # 438 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 facet(const facet&) = delete; facet& operator=(const facet&) = delete; private: void _M_add_reference() const throw() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } void _M_remove_reference() const throw() { ; if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) { ; if (true) { delete this; } if (false) { } } } const facet* _M_sso_shim(const id*) const; const facet* _M_cow_shim(const id*) const; protected: class __shim; }; # 483 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 class locale::id { private: friend class locale; friend class locale::_Impl; template<typename _Facet> friend const _Facet& use_facet(const locale&); template<typename _Facet> friend bool has_facet(const locale&) throw(); mutable size_t _M_index; static _Atomic_word _S_refcount; void operator=(const id&); id(const id&); public: id() { } size_t _M_id() const throw(); }; class locale::_Impl { public: friend class locale; friend class locale::facet; template<typename _Facet> friend bool has_facet(const locale&) throw(); template<typename _Facet> friend const _Facet& use_facet(const locale&); template<typename _Cache> friend struct __use_cache; private: _Atomic_word _M_refcount; const facet** _M_facets; size_t _M_facets_size; const facet** _M_caches; char** _M_names; static const locale::id* const _S_id_ctype[]; static const locale::id* const _S_id_numeric[]; static const locale::id* const _S_id_collate[]; static const locale::id* const _S_id_time[]; static const locale::id* const _S_id_monetary[]; static const locale::id* const _S_id_messages[]; static const locale::id* const* const _S_facet_categories[]; void _M_add_reference() throw() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } void _M_remove_reference() throw() { ; if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) { ; if (true) { delete this; } if (false) { } } } _Impl(const _Impl&, size_t); _Impl(const char*, size_t); _Impl(size_t) throw(); ~_Impl() throw(); _Impl(const _Impl&); void operator=(const _Impl&); bool _M_check_same_name() { bool __ret = true; if (_M_names[1]) for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; return __ret; } void _M_replace_categories(const _Impl*, category); void _M_replace_category(const _Impl*, const locale::id* const*); void _M_replace_facet(const _Impl*, const locale::id*); void _M_install_facet(const locale::id*, const facet*); template<typename _Facet> void _M_init_facet(_Facet* __facet) { _M_install_facet(&_Facet::id, __facet); } template<typename _Facet> void _M_init_facet_unchecked(_Facet* __facet) { __facet->_M_add_reference(); _M_facets[_Facet::id._M_id()] = __facet; } void _M_install_cache(const facet*, size_t); void _M_init_extra(facet**); void _M_init_extra(void*, void*, const char*, const char*); }; # 641 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 template<typename _CharT> class __cxx11:: collate : public locale::facet { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; protected: __c_locale _M_c_locale_collate; public: static locale::id id; # 668 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 explicit collate(size_t __refs = 0) : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) { } # 682 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 explicit collate(__c_locale __cloc, size_t __refs = 0) : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) { } # 699 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 int compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } # 718 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 string_type transform(const _CharT* __lo, const _CharT* __hi) const { return this->do_transform(__lo, __hi); } # 732 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 long hash(const _CharT* __lo, const _CharT* __hi) const { return this->do_hash(__lo, __hi); } int _M_compare(const _CharT*, const _CharT*) const throw(); size_t _M_transform(_CharT*, const _CharT*, size_t) const throw(); protected: virtual ~collate() { _S_destroy_c_locale(_M_c_locale_collate); } # 761 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 virtual int do_compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const; # 775 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 virtual string_type do_transform(const _CharT* __lo, const _CharT* __hi) const; # 788 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 3 virtual long do_hash(const _CharT* __lo, const _CharT* __hi) const; }; template<typename _CharT> locale::id collate<_CharT>::id; template<> int collate<char>::_M_compare(const char*, const char*) const throw(); template<> size_t collate<char>::_M_transform(char*, const char*, size_t) const throw(); template<> int collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const throw(); template<> size_t collate<wchar_t>::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); template<typename _CharT> class __cxx11:: collate_byname : public collate<_CharT> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; explicit collate_byname(const char* __s, size_t __refs = 0) : collate<_CharT>(__refs) { if (__builtin_strcmp(__s, "C") != 0 && __builtin_strcmp(__s, "POSIX") != 0) { this->_S_destroy_c_locale(this->_M_c_locale_collate); this->_S_create_c_locale(this->_M_c_locale_collate, __s); } } explicit collate_byname(const string& __s, size_t __refs = 0) : collate_byname(__s.c_str(), __refs) { } protected: virtual ~collate_byname() { } }; } # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.tcc" 1 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Facet> locale:: locale(const locale& __other, _Facet* __f) { _M_impl = new _Impl(*__other._M_impl, 1); if (true) { _M_impl->_M_install_facet(&_Facet::id, __f); } if (false) { _M_impl->_M_remove_reference(); ; } delete [] _M_impl->_M_names[0]; _M_impl->_M_names[0] = 0; } template<typename _Facet> locale locale:: combine(const locale& __other) const { _Impl* __tmp = new _Impl(*_M_impl, 1); if (true) { __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); } if (false) { __tmp->_M_remove_reference(); ; } return locale(__tmp); } template<typename _CharT, typename _Traits, typename _Alloc> bool locale:: operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, const basic_string<_CharT, _Traits, _Alloc>& __s2) const { typedef std::collate<_CharT> __collate_type; const __collate_type& __collate = use_facet<__collate_type>(*this); return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), __s2.data(), __s2.data() + __s2.length()) < 0); } # 102 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.tcc" 3 template<typename _Facet> bool has_facet(const locale& __loc) throw() { const size_t __i = _Facet::id._M_id(); const locale::facet** __facets = __loc._M_impl->_M_facets; return (__i < __loc._M_impl->_M_facets_size && static_cast<const _Facet*>(__facets[__i])); } # 130 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.tcc" 3 template<typename _Facet> const _Facet& use_facet(const locale& __loc) { const size_t __i = _Facet::id._M_id(); const locale::facet** __facets = __loc._M_impl->_M_facets; if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) __throw_bad_cast(); return static_cast<const _Facet&>(*__facets[__i]); } template<typename _CharT> int collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () { return 0; } template<typename _CharT> size_t collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () { return 0; } template<typename _CharT> int collate<_CharT>:: do_compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const { const string_type __one(__lo1, __hi1); const string_type __two(__lo2, __hi2); const _CharT* __p = __one.c_str(); const _CharT* __pend = __one.data() + __one.length(); const _CharT* __q = __two.c_str(); const _CharT* __qend = __two.data() + __two.length(); for (;;) { const int __res = _M_compare(__p, __q); if (__res) return __res; __p += char_traits<_CharT>::length(__p); __q += char_traits<_CharT>::length(__q); if (__p == __pend && __q == __qend) return 0; else if (__p == __pend) return -1; else if (__q == __qend) return 1; __p++; __q++; } } template<typename _CharT> typename collate<_CharT>::string_type collate<_CharT>:: do_transform(const _CharT* __lo, const _CharT* __hi) const { string_type __ret; const string_type __str(__lo, __hi); const _CharT* __p = __str.c_str(); const _CharT* __pend = __str.data() + __str.length(); size_t __len = (__hi - __lo) * 2; _CharT* __c = new _CharT[__len]; if (true) { for (;;) { size_t __res = _M_transform(__c, __p, __len); if (__res >= __len) { __len = __res + 1; delete [] __c, __c = 0; __c = new _CharT[__len]; __res = _M_transform(__c, __p, __len); } __ret.append(__c, __res); __p += char_traits<_CharT>::length(__p); if (__p == __pend) break; __p++; __ret.push_back(_CharT()); } } if (false) { delete [] __c; ; } delete [] __c; return __ret; } template<typename _CharT> long collate<_CharT>:: do_hash(const _CharT* __lo, const _CharT* __hi) const { unsigned long __val = 0; for (; __lo < __hi; ++__lo) __val = *__lo + ((__val << 7) | (__val >> (__gnu_cxx::__numeric_traits<unsigned long>:: __digits - 7))); return static_cast<long>(__val); } extern template class collate<char>; extern template class collate_byname<char>; extern template const collate<char>& use_facet<collate<char> >(const locale&); extern template bool has_facet<collate<char> >(const locale&); extern template class collate<wchar_t>; extern template class collate_byname<wchar_t>; extern template const collate<wchar_t>& use_facet<collate<wchar_t> >(const locale&); extern template bool has_facet<collate<wchar_t> >(const locale&); } # 852 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_classes.h" 2 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/system_error" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/system_error" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/error_constants.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/error_constants.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cerrno" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cerrno" 3 # 35 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/error_constants.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { enum class errc { address_family_not_supported = 97, address_in_use = 98, address_not_available = 99, already_connected = 106, argument_list_too_long = 7, argument_out_of_domain = 33, bad_address = 14, bad_file_descriptor = 9, bad_message = 74, broken_pipe = 32, connection_aborted = 103, connection_already_in_progress = 114, connection_refused = 111, connection_reset = 104, cross_device_link = 18, destination_address_required = 89, device_or_resource_busy = 16, directory_not_empty = 39, executable_format_error = 8, file_exists = 17, file_too_large = 27, filename_too_long = 36, function_not_supported = 38, host_unreachable = 113, identifier_removed = 43, illegal_byte_sequence = 84, inappropriate_io_control_operation = 25, interrupted = 4, invalid_argument = 22, invalid_seek = 29, io_error = 5, is_a_directory = 21, message_size = 90, network_down = 100, network_reset = 102, network_unreachable = 101, no_buffer_space = 105, no_child_process = 10, no_link = 67, no_lock_available = 37, no_message_available = 61, no_message = 42, no_protocol_option = 92, no_space_on_device = 28, no_stream_resources = 63, no_such_device_or_address = 6, no_such_device = 19, no_such_file_or_directory = 2, no_such_process = 3, not_a_directory = 20, not_a_socket = 88, not_a_stream = 60, not_connected = 107, not_enough_memory = 12, not_supported = 95, operation_canceled = 125, operation_in_progress = 115, operation_not_permitted = 1, operation_not_supported = 95, operation_would_block = 11, owner_dead = 130, permission_denied = 13, protocol_error = 71, protocol_not_supported = 93, read_only_file_system = 30, resource_deadlock_would_occur = 35, resource_unavailable_try_again = 11, result_out_of_range = 34, state_not_recoverable = 131, stream_timeout = 62, text_file_busy = 26, timed_out = 110, too_many_files_open_in_system = 23, too_many_files_open = 24, too_many_links = 31, too_many_symbolic_link_levels = 40, value_too_large = 75, wrong_protocol_type = 91 }; } # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/system_error" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/stdexcept" 1 3 # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/stdexcept" 3 namespace std __attribute__ ((__visibility__ ("default"))) { struct __cow_string { union { const char* _M_p; char _M_bytes[sizeof(const char*)]; }; __cow_string(); __cow_string(const std::string&); __cow_string(const char*, size_t); __cow_string(const __cow_string&) noexcept; __cow_string& operator=(const __cow_string&) noexcept; ~__cow_string(); __cow_string(__cow_string&&) noexcept; __cow_string& operator=(__cow_string&&) noexcept; }; typedef basic_string<char> __sso_string; # 113 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/stdexcept" 3 class logic_error : public exception { __cow_string _M_msg; public: explicit logic_error(const string& __arg) ; explicit logic_error(const char*) ; logic_error(const logic_error&) noexcept; logic_error& operator=(const logic_error&) noexcept; virtual ~logic_error() noexcept; virtual const char* what() const noexcept; }; class domain_error : public logic_error { public: explicit domain_error(const string& __arg) ; explicit domain_error(const char*) ; virtual ~domain_error() noexcept; }; class invalid_argument : public logic_error { public: explicit invalid_argument(const string& __arg) ; explicit invalid_argument(const char*) ; virtual ~invalid_argument() noexcept; }; class length_error : public logic_error { public: explicit length_error(const string& __arg) ; explicit length_error(const char*) ; virtual ~length_error() noexcept; }; class out_of_range : public logic_error { public: explicit out_of_range(const string& __arg) ; explicit out_of_range(const char*) ; virtual ~out_of_range() noexcept; }; class runtime_error : public exception { __cow_string _M_msg; public: explicit runtime_error(const string& __arg) ; explicit runtime_error(const char*) ; runtime_error(const runtime_error&) noexcept; runtime_error& operator=(const runtime_error&) noexcept; virtual ~runtime_error() noexcept; virtual const char* what() const noexcept; }; class range_error : public runtime_error { public: explicit range_error(const string& __arg) ; explicit range_error(const char*) ; virtual ~range_error() noexcept; }; class overflow_error : public runtime_error { public: explicit overflow_error(const string& __arg) ; explicit overflow_error(const char*) ; virtual ~overflow_error() noexcept; }; class underflow_error : public runtime_error { public: explicit underflow_error(const string& __arg) ; explicit underflow_error(const char*) ; virtual ~underflow_error() noexcept; }; } # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/system_error" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { class error_code; class error_condition; class system_error; template<typename _Tp> struct is_error_code_enum : public false_type { }; template<typename _Tp> struct is_error_condition_enum : public false_type { }; template<> struct is_error_condition_enum<errc> : public true_type { }; # 71 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/system_error" 3 inline namespace _V2 { class error_category { public: constexpr error_category() noexcept = default; virtual ~error_category(); error_category(const error_category&) = delete; error_category& operator=(const error_category&) = delete; virtual const char* name() const noexcept = 0; private: __attribute ((__abi_tag__ ("cxx11"))) virtual __cow_string _M_message(int) const; public: __attribute ((__abi_tag__ ("cxx11"))) virtual string message(int) const = 0; # 110 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/system_error" 3 public: virtual error_condition default_error_condition(int __i) const noexcept; virtual bool equivalent(int __i, const error_condition& __cond) const noexcept; virtual bool equivalent(const error_code& __code, int __i) const noexcept; bool operator<(const error_category& __other) const noexcept { return less<const error_category*>()(this, &__other); } bool operator==(const error_category& __other) const noexcept { return this == &__other; } bool operator!=(const error_category& __other) const noexcept { return this != &__other; } }; __attribute__ ((__const__)) const error_category& system_category() noexcept; __attribute__ ((__const__)) const error_category& generic_category() noexcept; } error_code make_error_code(errc) noexcept; template<typename _Tp> struct hash; struct error_code { error_code() noexcept : _M_value(0), _M_cat(&system_category()) { } error_code(int __v, const error_category& __cat) noexcept : _M_value(__v), _M_cat(&__cat) { } template<typename _ErrorCodeEnum, typename = typename enable_if<is_error_code_enum<_ErrorCodeEnum>::value>::type> error_code(_ErrorCodeEnum __e) noexcept { *this = make_error_code(__e); } void assign(int __v, const error_category& __cat) noexcept { _M_value = __v; _M_cat = &__cat; } void clear() noexcept { assign(0, system_category()); } template<typename _ErrorCodeEnum> typename enable_if<is_error_code_enum<_ErrorCodeEnum>::value, error_code&>::type operator=(_ErrorCodeEnum __e) noexcept { return *this = make_error_code(__e); } int value() const noexcept { return _M_value; } const error_category& category() const noexcept { return *_M_cat; } error_condition default_error_condition() const noexcept; __attribute ((__abi_tag__ ("cxx11"))) string message() const { return category().message(value()); } explicit operator bool() const noexcept { return _M_value != 0; } private: friend class hash<error_code>; int _M_value; const error_category* _M_cat; }; inline error_code make_error_code(errc __e) noexcept { return error_code(static_cast<int>(__e), generic_category()); } inline bool operator<(const error_code& __lhs, const error_code& __rhs) noexcept { return (__lhs.category() < __rhs.category() || (__lhs.category() == __rhs.category() && __lhs.value() < __rhs.value())); } template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) { return (__os << __e.category().name() << ':' << __e.value()); } error_condition make_error_condition(errc) noexcept; struct error_condition { error_condition() noexcept : _M_value(0), _M_cat(&generic_category()) { } error_condition(int __v, const error_category& __cat) noexcept : _M_value(__v), _M_cat(&__cat) { } template<typename _ErrorConditionEnum, typename = typename enable_if<is_error_condition_enum<_ErrorConditionEnum>::value>::type> error_condition(_ErrorConditionEnum __e) noexcept { *this = make_error_condition(__e); } void assign(int __v, const error_category& __cat) noexcept { _M_value = __v; _M_cat = &__cat; } template<typename _ErrorConditionEnum> typename enable_if<is_error_condition_enum <_ErrorConditionEnum>::value, error_condition&>::type operator=(_ErrorConditionEnum __e) noexcept { return *this = make_error_condition(__e); } void clear() noexcept { assign(0, generic_category()); } int value() const noexcept { return _M_value; } const error_category& category() const noexcept { return *_M_cat; } __attribute ((__abi_tag__ ("cxx11"))) string message() const { return category().message(value()); } explicit operator bool() const noexcept { return _M_value != 0; } private: int _M_value; const error_category* _M_cat; }; inline error_condition make_error_condition(errc __e) noexcept { return error_condition(static_cast<int>(__e), generic_category()); } inline bool operator<(const error_condition& __lhs, const error_condition& __rhs) noexcept { return (__lhs.category() < __rhs.category() || (__lhs.category() == __rhs.category() && __lhs.value() < __rhs.value())); } inline bool operator==(const error_code& __lhs, const error_code& __rhs) noexcept { return (__lhs.category() == __rhs.category() && __lhs.value() == __rhs.value()); } inline bool operator==(const error_code& __lhs, const error_condition& __rhs) noexcept { return (__lhs.category().equivalent(__lhs.value(), __rhs) || __rhs.category().equivalent(__lhs, __rhs.value())); } inline bool operator==(const error_condition& __lhs, const error_code& __rhs) noexcept { return (__rhs.category().equivalent(__rhs.value(), __lhs) || __lhs.category().equivalent(__rhs, __lhs.value())); } inline bool operator==(const error_condition& __lhs, const error_condition& __rhs) noexcept { return (__lhs.category() == __rhs.category() && __lhs.value() == __rhs.value()); } inline bool operator!=(const error_code& __lhs, const error_code& __rhs) noexcept { return !(__lhs == __rhs); } inline bool operator!=(const error_code& __lhs, const error_condition& __rhs) noexcept { return !(__lhs == __rhs); } inline bool operator!=(const error_condition& __lhs, const error_code& __rhs) noexcept { return !(__lhs == __rhs); } inline bool operator!=(const error_condition& __lhs, const error_condition& __rhs) noexcept { return !(__lhs == __rhs); } class system_error : public std::runtime_error { private: error_code _M_code; public: system_error(error_code __ec = error_code()) : runtime_error(__ec.message()), _M_code(__ec) { } system_error(error_code __ec, const string& __what) : runtime_error(__what + ": " + __ec.message()), _M_code(__ec) { } system_error(error_code __ec, const char* __what) : runtime_error(__what + (": " + __ec.message())), _M_code(__ec) { } system_error(int __v, const error_category& __ecat, const char* __what) : system_error(error_code(__v, __ecat), __what) { } system_error(int __v, const error_category& __ecat) : runtime_error(error_code(__v, __ecat).message()), _M_code(__v, __ecat) { } system_error(int __v, const error_category& __ecat, const string& __what) : runtime_error(__what + ": " + error_code(__v, __ecat).message()), _M_code(__v, __ecat) { } virtual ~system_error() noexcept; const error_code& code() const noexcept { return _M_code; } }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<> struct hash<error_code> : public __hash_base<size_t, error_code> { size_t operator()(const error_code& __e) const noexcept { const size_t __tmp = std::_Hash_impl::hash(__e._M_value); return std::_Hash_impl::__hash_combine(__e._M_cat, __tmp); } }; # 415 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/system_error" 3 } # 47 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { enum _Ios_Fmtflags { _S_boolalpha = 1L << 0, _S_dec = 1L << 1, _S_fixed = 1L << 2, _S_hex = 1L << 3, _S_internal = 1L << 4, _S_left = 1L << 5, _S_oct = 1L << 6, _S_right = 1L << 7, _S_scientific = 1L << 8, _S_showbase = 1L << 9, _S_showpoint = 1L << 10, _S_showpos = 1L << 11, _S_skipws = 1L << 12, _S_unitbuf = 1L << 13, _S_uppercase = 1L << 14, _S_adjustfield = _S_left | _S_right | _S_internal, _S_basefield = _S_dec | _S_oct | _S_hex, _S_floatfield = _S_scientific | _S_fixed, _S_ios_fmtflags_end = 1L << 16, _S_ios_fmtflags_max = 2147483647, _S_ios_fmtflags_min = ~2147483647 }; inline constexpr _Ios_Fmtflags operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast<int>(__a) & static_cast<int>(__b)); } inline constexpr _Ios_Fmtflags operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast<int>(__a) | static_cast<int>(__b)); } inline constexpr _Ios_Fmtflags operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast<int>(__a) ^ static_cast<int>(__b)); } inline constexpr _Ios_Fmtflags operator~(_Ios_Fmtflags __a) { return _Ios_Fmtflags(~static_cast<int>(__a)); } inline const _Ios_Fmtflags& operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a | __b; } inline const _Ios_Fmtflags& operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a & __b; } inline const _Ios_Fmtflags& operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a ^ __b; } enum _Ios_Openmode { _S_app = 1L << 0, _S_ate = 1L << 1, _S_bin = 1L << 2, _S_in = 1L << 3, _S_out = 1L << 4, _S_trunc = 1L << 5, _S_ios_openmode_end = 1L << 16, _S_ios_openmode_max = 2147483647, _S_ios_openmode_min = ~2147483647 }; inline constexpr _Ios_Openmode operator&(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); } inline constexpr _Ios_Openmode operator|(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); } inline constexpr _Ios_Openmode operator^(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); } inline constexpr _Ios_Openmode operator~(_Ios_Openmode __a) { return _Ios_Openmode(~static_cast<int>(__a)); } inline const _Ios_Openmode& operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a | __b; } inline const _Ios_Openmode& operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a & __b; } inline const _Ios_Openmode& operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a ^ __b; } enum _Ios_Iostate { _S_goodbit = 0, _S_badbit = 1L << 0, _S_eofbit = 1L << 1, _S_failbit = 1L << 2, _S_ios_iostate_end = 1L << 16, _S_ios_iostate_max = 2147483647, _S_ios_iostate_min = ~2147483647 }; inline constexpr _Ios_Iostate operator&(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast<int>(__a) & static_cast<int>(__b)); } inline constexpr _Ios_Iostate operator|(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast<int>(__a) | static_cast<int>(__b)); } inline constexpr _Ios_Iostate operator^(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); } inline constexpr _Ios_Iostate operator~(_Ios_Iostate __a) { return _Ios_Iostate(~static_cast<int>(__a)); } inline const _Ios_Iostate& operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a | __b; } inline const _Ios_Iostate& operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a & __b; } inline const _Ios_Iostate& operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a ^ __b; } enum _Ios_Seekdir { _S_beg = 0, _S_cur = 1, _S_end = 2, _S_ios_seekdir_end = 1L << 16 }; enum class io_errc { stream = 1 }; template <> struct is_error_code_enum<io_errc> : public true_type { }; const error_category& iostream_category() noexcept; inline error_code make_error_code(io_errc __e) noexcept { return error_code(static_cast<int>(__e), iostream_category()); } inline error_condition make_error_condition(io_errc __e) noexcept { return error_condition(static_cast<int>(__e), iostream_category()); } # 228 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 class ios_base { # 246 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 public: # 255 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 class __attribute ((__abi_tag__ ("cxx11"))) failure : public system_error { public: explicit failure(const string& __str); explicit failure(const string&, const error_code&); explicit failure(const char*, const error_code& = io_errc::stream); virtual ~failure() throw(); virtual const char* what() const throw(); }; # 323 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 typedef _Ios_Fmtflags fmtflags; static const fmtflags boolalpha = _S_boolalpha; static const fmtflags dec = _S_dec; static const fmtflags fixed = _S_fixed; static const fmtflags hex = _S_hex; static const fmtflags internal = _S_internal; static const fmtflags left = _S_left; static const fmtflags oct = _S_oct; static const fmtflags right = _S_right; static const fmtflags scientific = _S_scientific; static const fmtflags showbase = _S_showbase; static const fmtflags showpoint = _S_showpoint; static const fmtflags showpos = _S_showpos; static const fmtflags skipws = _S_skipws; static const fmtflags unitbuf = _S_unitbuf; static const fmtflags uppercase = _S_uppercase; static const fmtflags adjustfield = _S_adjustfield; static const fmtflags basefield = _S_basefield; static const fmtflags floatfield = _S_floatfield; # 398 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 typedef _Ios_Iostate iostate; static const iostate badbit = _S_badbit; static const iostate eofbit = _S_eofbit; static const iostate failbit = _S_failbit; static const iostate goodbit = _S_goodbit; # 429 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 typedef _Ios_Openmode openmode; static const openmode app = _S_app; static const openmode ate = _S_ate; static const openmode binary = _S_bin; static const openmode in = _S_in; static const openmode out = _S_out; static const openmode trunc = _S_trunc; # 461 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 typedef _Ios_Seekdir seekdir; static const seekdir beg = _S_beg; static const seekdir cur = _S_cur; static const seekdir end = _S_end; typedef int io_state; typedef int open_mode; typedef int seek_dir; typedef std::streampos streampos; typedef std::streamoff streamoff; # 489 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 enum event { erase_event, imbue_event, copyfmt_event }; # 506 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 typedef void (*event_callback) (event __e, ios_base& __b, int __i); # 518 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 void register_callback(event_callback __fn, int __index); protected: streamsize _M_precision; streamsize _M_width; fmtflags _M_flags; iostate _M_exception; iostate _M_streambuf_state; struct _Callback_list { _Callback_list* _M_next; ios_base::event_callback _M_fn; int _M_index; _Atomic_word _M_refcount; _Callback_list(ios_base::event_callback __fn, int __index, _Callback_list* __cb) : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } void _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } int _M_remove_reference() { ; int __res = __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); if (__res == 0) { ; } return __res; } }; _Callback_list* _M_callbacks; void _M_call_callbacks(event __ev) throw(); void _M_dispose_callbacks(void) throw(); struct _Words { void* _M_pword; long _M_iword; _Words() : _M_pword(0), _M_iword(0) { } }; _Words _M_word_zero; enum { _S_local_word_size = 8 }; _Words _M_local_word[_S_local_word_size]; int _M_word_size; _Words* _M_word; _Words& _M_grow_words(int __index, bool __iword); locale _M_ios_locale; void _M_init() throw(); public: class Init { friend class ios_base; public: Init(); ~Init(); private: static _Atomic_word _S_refcount; static bool _S_synced_with_stdio; }; fmtflags flags() const { return _M_flags; } # 631 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 fmtflags flags(fmtflags __fmtfl) { fmtflags __old = _M_flags; _M_flags = __fmtfl; return __old; } # 647 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 fmtflags setf(fmtflags __fmtfl) { fmtflags __old = _M_flags; _M_flags |= __fmtfl; return __old; } # 664 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 fmtflags setf(fmtflags __fmtfl, fmtflags __mask) { fmtflags __old = _M_flags; _M_flags &= ~__mask; _M_flags |= (__fmtfl & __mask); return __old; } void unsetf(fmtflags __mask) { _M_flags &= ~__mask; } # 690 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 streamsize precision() const { return _M_precision; } streamsize precision(streamsize __prec) { streamsize __old = _M_precision; _M_precision = __prec; return __old; } streamsize width() const { return _M_width; } streamsize width(streamsize __wide) { streamsize __old = _M_width; _M_width = __wide; return __old; } # 741 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 static bool sync_with_stdio(bool __sync = true); # 753 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 locale imbue(const locale& __loc) throw(); # 764 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 locale getloc() const { return _M_ios_locale; } # 775 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 const locale& _M_getloc() const { return _M_ios_locale; } # 794 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 static int xalloc() throw(); # 810 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 long& iword(int __ix) { _Words& __word = (__ix < _M_word_size) ? _M_word[__ix] : _M_grow_words(__ix, true); return __word._M_iword; } # 831 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 void*& pword(int __ix) { _Words& __word = (__ix < _M_word_size) ? _M_word[__ix] : _M_grow_words(__ix, false); return __word._M_pword; } # 848 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 virtual ~ios_base(); protected: ios_base() throw (); # 862 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ios_base.h" 3 public: ios_base(const ios_base&) = delete; ios_base& operator=(const ios_base&) = delete; protected: void _M_move(ios_base&) noexcept; void _M_swap(ios_base& __rhs) noexcept; }; inline ios_base& boolalpha(ios_base& __base) { __base.setf(ios_base::boolalpha); return __base; } inline ios_base& noboolalpha(ios_base& __base) { __base.unsetf(ios_base::boolalpha); return __base; } inline ios_base& showbase(ios_base& __base) { __base.setf(ios_base::showbase); return __base; } inline ios_base& noshowbase(ios_base& __base) { __base.unsetf(ios_base::showbase); return __base; } inline ios_base& showpoint(ios_base& __base) { __base.setf(ios_base::showpoint); return __base; } inline ios_base& noshowpoint(ios_base& __base) { __base.unsetf(ios_base::showpoint); return __base; } inline ios_base& showpos(ios_base& __base) { __base.setf(ios_base::showpos); return __base; } inline ios_base& noshowpos(ios_base& __base) { __base.unsetf(ios_base::showpos); return __base; } inline ios_base& skipws(ios_base& __base) { __base.setf(ios_base::skipws); return __base; } inline ios_base& noskipws(ios_base& __base) { __base.unsetf(ios_base::skipws); return __base; } inline ios_base& uppercase(ios_base& __base) { __base.setf(ios_base::uppercase); return __base; } inline ios_base& nouppercase(ios_base& __base) { __base.unsetf(ios_base::uppercase); return __base; } inline ios_base& unitbuf(ios_base& __base) { __base.setf(ios_base::unitbuf); return __base; } inline ios_base& nounitbuf(ios_base& __base) { __base.unsetf(ios_base::unitbuf); return __base; } inline ios_base& internal(ios_base& __base) { __base.setf(ios_base::internal, ios_base::adjustfield); return __base; } inline ios_base& left(ios_base& __base) { __base.setf(ios_base::left, ios_base::adjustfield); return __base; } inline ios_base& right(ios_base& __base) { __base.setf(ios_base::right, ios_base::adjustfield); return __base; } inline ios_base& dec(ios_base& __base) { __base.setf(ios_base::dec, ios_base::basefield); return __base; } inline ios_base& hex(ios_base& __base) { __base.setf(ios_base::hex, ios_base::basefield); return __base; } inline ios_base& oct(ios_base& __base) { __base.setf(ios_base::oct, ios_base::basefield); return __base; } inline ios_base& fixed(ios_base& __base) { __base.setf(ios_base::fixed, ios_base::floatfield); return __base; } inline ios_base& scientific(ios_base& __base) { __base.setf(ios_base::scientific, ios_base::floatfield); return __base; } inline ios_base& hexfloat(ios_base& __base) { __base.setf(ios_base::fixed | ios_base::scientific, ios_base::floatfield); return __base; } inline ios_base& defaultfloat(ios_base& __base) { __base.unsetf(ios_base::floatfield); return __base; } } # 43 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ios" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 1 3 # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, typename _Traits> streamsize __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, basic_streambuf<_CharT, _Traits>*, bool&); # 121 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 template<typename _CharT, typename _Traits> class basic_streambuf { public: typedef _CharT char_type; typedef _Traits traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_streambuf<char_type, traits_type> __streambuf_type; friend class basic_ios<char_type, traits_type>; friend class basic_istream<char_type, traits_type>; friend class basic_ostream<char_type, traits_type>; friend class istreambuf_iterator<char_type, traits_type>; friend class ostreambuf_iterator<char_type, traits_type>; friend streamsize __copy_streambufs_eof<>(basic_streambuf*, basic_streambuf*, bool&); template<bool _IsMove, typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, _CharT2*>::__type __copy_move_a2(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, _CharT2*); template<typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, istreambuf_iterator<_CharT2> >::__type find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, const _CharT2&); template<typename _CharT2, typename _Distance> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, void>::__type advance(istreambuf_iterator<_CharT2>&, _Distance); template<typename _CharT2, typename _Traits2> friend basic_istream<_CharT2, _Traits2>& operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); template<typename _CharT2, typename _Traits2, typename _Alloc> friend basic_istream<_CharT2, _Traits2>& operator>>(basic_istream<_CharT2, _Traits2>&, basic_string<_CharT2, _Traits2, _Alloc>&); template<typename _CharT2, typename _Traits2, typename _Alloc> friend basic_istream<_CharT2, _Traits2>& getline(basic_istream<_CharT2, _Traits2>&, basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); protected: char_type* _M_in_beg; char_type* _M_in_cur; char_type* _M_in_end; char_type* _M_out_beg; char_type* _M_out_cur; char_type* _M_out_end; locale _M_buf_locale; public: virtual ~basic_streambuf() { } # 215 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 locale pubimbue(const locale& __loc) { locale __tmp(this->getloc()); this->imbue(__loc); _M_buf_locale = __loc; return __tmp; } # 232 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 locale getloc() const { return _M_buf_locale; } # 245 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 basic_streambuf* pubsetbuf(char_type* __s, streamsize __n) { return this->setbuf(__s, __n); } # 257 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 pos_type pubseekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode = ios_base::in | ios_base::out) { return this->seekoff(__off, __way, __mode); } # 269 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 pos_type pubseekpos(pos_type __sp, ios_base::openmode __mode = ios_base::in | ios_base::out) { return this->seekpos(__sp, __mode); } int pubsync() { return this->sync(); } # 290 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 streamsize in_avail() { const streamsize __ret = this->egptr() - this->gptr(); return __ret ? __ret : this->showmanyc(); } # 304 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 int_type snextc() { int_type __ret = traits_type::eof(); if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), __ret), true)) __ret = this->sgetc(); return __ret; } # 322 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 int_type sbumpc() { int_type __ret; if (__builtin_expect(this->gptr() < this->egptr(), true)) { __ret = traits_type::to_int_type(*this->gptr()); this->gbump(1); } else __ret = this->uflow(); return __ret; } # 344 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 int_type sgetc() { int_type __ret; if (__builtin_expect(this->gptr() < this->egptr(), true)) __ret = traits_type::to_int_type(*this->gptr()); else __ret = this->underflow(); return __ret; } # 363 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 streamsize sgetn(char_type* __s, streamsize __n) { return this->xsgetn(__s, __n); } # 378 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 int_type sputbackc(char_type __c) { int_type __ret; const bool __testpos = this->eback() < this->gptr(); if (__builtin_expect(!__testpos || !traits_type::eq(__c, this->gptr()[-1]), false)) __ret = this->pbackfail(traits_type::to_int_type(__c)); else { this->gbump(-1); __ret = traits_type::to_int_type(*this->gptr()); } return __ret; } # 403 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 int_type sungetc() { int_type __ret; if (__builtin_expect(this->eback() < this->gptr(), true)) { this->gbump(-1); __ret = traits_type::to_int_type(*this->gptr()); } else __ret = this->pbackfail(); return __ret; } # 430 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 int_type sputc(char_type __c) { int_type __ret; if (__builtin_expect(this->pptr() < this->epptr(), true)) { *this->pptr() = __c; this->pbump(1); __ret = traits_type::to_int_type(__c); } else __ret = this->overflow(traits_type::to_int_type(__c)); return __ret; } # 456 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 streamsize sputn(const char_type* __s, streamsize __n) { return this->xsputn(__s, __n); } protected: # 470 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 basic_streambuf() : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), _M_out_beg(0), _M_out_cur(0), _M_out_end(0), _M_buf_locale(locale()) { } # 488 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 char_type* eback() const { return _M_in_beg; } char_type* gptr() const { return _M_in_cur; } char_type* egptr() const { return _M_in_end; } # 504 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 void gbump(int __n) { _M_in_cur += __n; } # 515 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 void setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) { _M_in_beg = __gbeg; _M_in_cur = __gnext; _M_in_end = __gend; } # 535 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 char_type* pbase() const { return _M_out_beg; } char_type* pptr() const { return _M_out_cur; } char_type* epptr() const { return _M_out_end; } # 551 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 void pbump(int __n) { _M_out_cur += __n; } # 561 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 void setp(char_type* __pbeg, char_type* __pend) { _M_out_beg = _M_out_cur = __pbeg; _M_out_end = __pend; } # 582 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 virtual void imbue(const locale& __loc __attribute__ ((__unused__))) { } # 597 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 virtual basic_streambuf<char_type,_Traits>* setbuf(char_type*, streamsize) { return this; } # 608 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 virtual pos_type seekoff(off_type, ios_base::seekdir, ios_base::openmode = ios_base::in | ios_base::out) { return pos_type(off_type(-1)); } # 620 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 virtual pos_type seekpos(pos_type, ios_base::openmode = ios_base::in | ios_base::out) { return pos_type(off_type(-1)); } # 633 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 virtual int sync() { return 0; } # 655 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 virtual streamsize showmanyc() { return 0; } # 671 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 virtual streamsize xsgetn(char_type* __s, streamsize __n); # 693 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 virtual int_type underflow() { return traits_type::eof(); } # 706 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 virtual int_type uflow() { int_type __ret = traits_type::eof(); const bool __testeof = traits_type::eq_int_type(this->underflow(), __ret); if (!__testeof) { __ret = traits_type::to_int_type(*this->gptr()); this->gbump(1); } return __ret; } # 730 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 virtual int_type pbackfail(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) { return traits_type::eof(); } # 748 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 virtual streamsize xsputn(const char_type* __s, streamsize __n); # 774 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 virtual int_type overflow(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) { return traits_type::eof(); } public: # 790 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 3 [[__deprecated__("stossc is deprecated, use sbumpc instead")]] void stossc() { if (this->gptr() < this->egptr()) this->gbump(1); else this->uflow(); } void __safe_gbump(streamsize __n) { _M_in_cur += __n; } void __safe_pbump(streamsize __n) { _M_out_cur += __n; } protected: basic_streambuf(const basic_streambuf&); basic_streambuf& operator=(const basic_streambuf&); void swap(basic_streambuf& __sb) { std::swap(_M_in_beg, __sb._M_in_beg); std::swap(_M_in_cur, __sb._M_in_cur); std::swap(_M_in_end, __sb._M_in_end); std::swap(_M_out_beg, __sb._M_out_beg); std::swap(_M_out_cur, __sb._M_out_cur); std::swap(_M_out_end, __sb._M_out_end); std::swap(_M_buf_locale, __sb._M_buf_locale); } }; template<typename _CharT, typename _Traits> std::basic_streambuf<_CharT, _Traits>:: basic_streambuf(const basic_streambuf&) = default; template<typename _CharT, typename _Traits> std::basic_streambuf<_CharT, _Traits>& std::basic_streambuf<_CharT, _Traits>:: operator=(const basic_streambuf&) = default; template<> streamsize __copy_streambufs_eof(basic_streambuf<char>* __sbin, basic_streambuf<char>* __sbout, bool& __ineof); template<> streamsize __copy_streambufs_eof(basic_streambuf<wchar_t>* __sbin, basic_streambuf<wchar_t>* __sbout, bool& __ineof); } # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/streambuf.tcc" 1 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/streambuf.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, typename _Traits> streamsize basic_streambuf<_CharT, _Traits>:: xsgetn(char_type* __s, streamsize __n) { streamsize __ret = 0; while (__ret < __n) { const streamsize __buf_len = this->egptr() - this->gptr(); if (__buf_len) { const streamsize __remaining = __n - __ret; const streamsize __len = std::min(__buf_len, __remaining); traits_type::copy(__s, this->gptr(), __len); __ret += __len; __s += __len; this->__safe_gbump(__len); } if (__ret < __n) { const int_type __c = this->uflow(); if (!traits_type::eq_int_type(__c, traits_type::eof())) { traits_type::assign(*__s++, traits_type::to_char_type(__c)); ++__ret; } else break; } } return __ret; } template<typename _CharT, typename _Traits> streamsize basic_streambuf<_CharT, _Traits>:: xsputn(const char_type* __s, streamsize __n) { streamsize __ret = 0; while (__ret < __n) { const streamsize __buf_len = this->epptr() - this->pptr(); if (__buf_len) { const streamsize __remaining = __n - __ret; const streamsize __len = std::min(__buf_len, __remaining); traits_type::copy(this->pptr(), __s, __len); __ret += __len; __s += __len; this->__safe_pbump(__len); } if (__ret < __n) { int_type __c = this->overflow(traits_type::to_int_type(*__s)); if (!traits_type::eq_int_type(__c, traits_type::eof())) { ++__ret; ++__s; } else break; } } return __ret; } template<typename _CharT, typename _Traits> streamsize __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, basic_streambuf<_CharT, _Traits>* __sbout, bool& __ineof) { streamsize __ret = 0; __ineof = true; typename _Traits::int_type __c = __sbin->sgetc(); while (!_Traits::eq_int_type(__c, _Traits::eof())) { __c = __sbout->sputc(_Traits::to_char_type(__c)); if (_Traits::eq_int_type(__c, _Traits::eof())) { __ineof = false; break; } ++__ret; __c = __sbin->snextc(); } return __ret; } template<typename _CharT, typename _Traits> inline streamsize __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, basic_streambuf<_CharT, _Traits>* __sbout) { bool __ineof; return __copy_streambufs_eof(__sbin, __sbout, __ineof); } extern template class basic_streambuf<char>; extern template streamsize __copy_streambufs(basic_streambuf<char>*, basic_streambuf<char>*); extern template streamsize __copy_streambufs_eof(basic_streambuf<char>*, basic_streambuf<char>*, bool&); extern template class basic_streambuf<wchar_t>; extern template streamsize __copy_streambufs(basic_streambuf<wchar_t>*, basic_streambuf<wchar_t>*); extern template streamsize __copy_streambufs_eof(basic_streambuf<wchar_t>*, basic_streambuf<wchar_t>*, bool&); } # 863 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf" 2 3 # 44 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ios" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 1 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwctype" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwctype" 3 # 50 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwctype" 3 # 1 "/usr/include/wctype.h" 1 3 4 # 38 "/usr/include/wctype.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wctype-wchar.h" 1 3 4 # 38 "/usr/include/x86_64-linux-gnu/bits/wctype-wchar.h" 3 4 typedef unsigned long int wctype_t; # 56 "/usr/include/x86_64-linux-gnu/bits/wctype-wchar.h" 3 4 enum { __ISwupper = 0, __ISwlower = 1, __ISwalpha = 2, __ISwdigit = 3, __ISwxdigit = 4, __ISwspace = 5, __ISwprint = 6, __ISwgraph = 7, __ISwblank = 8, __ISwcntrl = 9, __ISwpunct = 10, __ISwalnum = 11, _ISwupper = ((__ISwupper) < 8 ? (int) ((1UL << (__ISwupper)) << 24) : ((__ISwupper) < 16 ? (int) ((1UL << (__ISwupper)) << 8) : ((__ISwupper) < 24 ? (int) ((1UL << (__ISwupper)) >> 8) : (int) ((1UL << (__ISwupper)) >> 24)))), _ISwlower = ((__ISwlower) < 8 ? (int) ((1UL << (__ISwlower)) << 24) : ((__ISwlower) < 16 ? (int) ((1UL << (__ISwlower)) << 8) : ((__ISwlower) < 24 ? (int) ((1UL << (__ISwlower)) >> 8) : (int) ((1UL << (__ISwlower)) >> 24)))), _ISwalpha = ((__ISwalpha) < 8 ? (int) ((1UL << (__ISwalpha)) << 24) : ((__ISwalpha) < 16 ? (int) ((1UL << (__ISwalpha)) << 8) : ((__ISwalpha) < 24 ? (int) ((1UL << (__ISwalpha)) >> 8) : (int) ((1UL << (__ISwalpha)) >> 24)))), _ISwdigit = ((__ISwdigit) < 8 ? (int) ((1UL << (__ISwdigit)) << 24) : ((__ISwdigit) < 16 ? (int) ((1UL << (__ISwdigit)) << 8) : ((__ISwdigit) < 24 ? (int) ((1UL << (__ISwdigit)) >> 8) : (int) ((1UL << (__ISwdigit)) >> 24)))), _ISwxdigit = ((__ISwxdigit) < 8 ? (int) ((1UL << (__ISwxdigit)) << 24) : ((__ISwxdigit) < 16 ? (int) ((1UL << (__ISwxdigit)) << 8) : ((__ISwxdigit) < 24 ? (int) ((1UL << (__ISwxdigit)) >> 8) : (int) ((1UL << (__ISwxdigit)) >> 24)))), _ISwspace = ((__ISwspace) < 8 ? (int) ((1UL << (__ISwspace)) << 24) : ((__ISwspace) < 16 ? (int) ((1UL << (__ISwspace)) << 8) : ((__ISwspace) < 24 ? (int) ((1UL << (__ISwspace)) >> 8) : (int) ((1UL << (__ISwspace)) >> 24)))), _ISwprint = ((__ISwprint) < 8 ? (int) ((1UL << (__ISwprint)) << 24) : ((__ISwprint) < 16 ? (int) ((1UL << (__ISwprint)) << 8) : ((__ISwprint) < 24 ? (int) ((1UL << (__ISwprint)) >> 8) : (int) ((1UL << (__ISwprint)) >> 24)))), _ISwgraph = ((__ISwgraph) < 8 ? (int) ((1UL << (__ISwgraph)) << 24) : ((__ISwgraph) < 16 ? (int) ((1UL << (__ISwgraph)) << 8) : ((__ISwgraph) < 24 ? (int) ((1UL << (__ISwgraph)) >> 8) : (int) ((1UL << (__ISwgraph)) >> 24)))), _ISwblank = ((__ISwblank) < 8 ? (int) ((1UL << (__ISwblank)) << 24) : ((__ISwblank) < 16 ? (int) ((1UL << (__ISwblank)) << 8) : ((__ISwblank) < 24 ? (int) ((1UL << (__ISwblank)) >> 8) : (int) ((1UL << (__ISwblank)) >> 24)))), _ISwcntrl = ((__ISwcntrl) < 8 ? (int) ((1UL << (__ISwcntrl)) << 24) : ((__ISwcntrl) < 16 ? (int) ((1UL << (__ISwcntrl)) << 8) : ((__ISwcntrl) < 24 ? (int) ((1UL << (__ISwcntrl)) >> 8) : (int) ((1UL << (__ISwcntrl)) >> 24)))), _ISwpunct = ((__ISwpunct) < 8 ? (int) ((1UL << (__ISwpunct)) << 24) : ((__ISwpunct) < 16 ? (int) ((1UL << (__ISwpunct)) << 8) : ((__ISwpunct) < 24 ? (int) ((1UL << (__ISwpunct)) >> 8) : (int) ((1UL << (__ISwpunct)) >> 24)))), _ISwalnum = ((__ISwalnum) < 8 ? (int) ((1UL << (__ISwalnum)) << 24) : ((__ISwalnum) < 16 ? (int) ((1UL << (__ISwalnum)) << 8) : ((__ISwalnum) < 24 ? (int) ((1UL << (__ISwalnum)) >> 8) : (int) ((1UL << (__ISwalnum)) >> 24)))) }; extern "C" { extern int iswalnum (wint_t __wc) throw (); extern int iswalpha (wint_t __wc) throw (); extern int iswcntrl (wint_t __wc) throw (); extern int iswdigit (wint_t __wc) throw (); extern int iswgraph (wint_t __wc) throw (); extern int iswlower (wint_t __wc) throw (); extern int iswprint (wint_t __wc) throw (); extern int iswpunct (wint_t __wc) throw (); extern int iswspace (wint_t __wc) throw (); extern int iswupper (wint_t __wc) throw (); extern int iswxdigit (wint_t __wc) throw (); extern int iswblank (wint_t __wc) throw (); # 155 "/usr/include/x86_64-linux-gnu/bits/wctype-wchar.h" 3 4 extern wctype_t wctype (const char *__property) throw (); extern int iswctype (wint_t __wc, wctype_t __desc) throw (); extern wint_t towlower (wint_t __wc) throw (); extern wint_t towupper (wint_t __wc) throw (); } # 39 "/usr/include/wctype.h" 2 3 4 extern "C" { typedef const __int32_t *wctrans_t; extern wctrans_t wctrans (const char *__property) throw (); extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); extern int iswalnum_l (wint_t __wc, locale_t __locale) throw (); extern int iswalpha_l (wint_t __wc, locale_t __locale) throw (); extern int iswcntrl_l (wint_t __wc, locale_t __locale) throw (); extern int iswdigit_l (wint_t __wc, locale_t __locale) throw (); extern int iswgraph_l (wint_t __wc, locale_t __locale) throw (); extern int iswlower_l (wint_t __wc, locale_t __locale) throw (); extern int iswprint_l (wint_t __wc, locale_t __locale) throw (); extern int iswpunct_l (wint_t __wc, locale_t __locale) throw (); extern int iswspace_l (wint_t __wc, locale_t __locale) throw (); extern int iswupper_l (wint_t __wc, locale_t __locale) throw (); extern int iswxdigit_l (wint_t __wc, locale_t __locale) throw (); extern int iswblank_l (wint_t __wc, locale_t __locale) throw (); extern wctype_t wctype_l (const char *__property, locale_t __locale) throw (); extern int iswctype_l (wint_t __wc, wctype_t __desc, locale_t __locale) throw (); extern wint_t towlower_l (wint_t __wc, locale_t __locale) throw (); extern wint_t towupper_l (wint_t __wc, locale_t __locale) throw (); extern wctrans_t wctrans_l (const char *__property, locale_t __locale) throw (); extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, locale_t __locale) throw (); } # 51 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwctype" 2 3 # 80 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cwctype" 3 namespace std { using ::wctrans_t; using ::wctype_t; using ::wint_t; using ::iswalnum; using ::iswalpha; using ::iswblank; using ::iswcntrl; using ::iswctype; using ::iswdigit; using ::iswgraph; using ::iswlower; using ::iswprint; using ::iswpunct; using ::iswspace; using ::iswupper; using ::iswxdigit; using ::towctrans; using ::towlower; using ::towupper; using ::wctrans; using ::wctype; } # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cctype" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cctype" 3 # 41 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/ctype_base.h" 1 3 # 36 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/ctype_base.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { struct ctype_base { typedef const int* __to_type; typedef unsigned short mask; static const mask upper = _ISupper; static const mask lower = _ISlower; static const mask alpha = _ISalpha; static const mask digit = _ISdigit; static const mask xdigit = _ISxdigit; static const mask space = _ISspace; static const mask print = _ISprint; static const mask graph = _ISalpha | _ISdigit | _ISpunct; static const mask cntrl = _IScntrl; static const mask punct = _ISpunct; static const mask alnum = _ISalpha | _ISdigit; static const mask blank = _ISblank; }; } # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/streambuf_iterator.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/streambuf_iterator.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 49 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/streambuf_iterator.h" 3 template<typename _CharT, typename _Traits> class istreambuf_iterator : public iterator<input_iterator_tag, _CharT, typename _Traits::off_type, _CharT*, _CharT> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef typename _Traits::int_type int_type; typedef basic_streambuf<_CharT, _Traits> streambuf_type; typedef basic_istream<_CharT, _Traits> istream_type; template<typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, ostreambuf_iterator<_CharT2> >::__type copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, ostreambuf_iterator<_CharT2>); template<bool _IsMove, typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, _CharT2*>::__type __copy_move_a2(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, _CharT2*); template<typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, istreambuf_iterator<_CharT2> >::__type find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, const _CharT2&); template<typename _CharT2, typename _Distance> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, void>::__type advance(istreambuf_iterator<_CharT2>&, _Distance); private: mutable streambuf_type* _M_sbuf; int_type _M_c; public: constexpr istreambuf_iterator() noexcept : _M_sbuf(0), _M_c(traits_type::eof()) { } istreambuf_iterator(const istreambuf_iterator&) noexcept = default; ~istreambuf_iterator() = default; istreambuf_iterator(istream_type& __s) noexcept : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } istreambuf_iterator(streambuf_type* __s) noexcept : _M_sbuf(__s), _M_c(traits_type::eof()) { } char_type operator*() const { int_type __c = _M_get(); # 139 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/streambuf_iterator.h" 3 return traits_type::to_char_type(__c); } istreambuf_iterator& operator++() { ; _M_sbuf->sbumpc(); _M_c = traits_type::eof(); return *this; } istreambuf_iterator operator++(int) { ; istreambuf_iterator __old = *this; __old._M_c = _M_sbuf->sbumpc(); _M_c = traits_type::eof(); return __old; } bool equal(const istreambuf_iterator& __b) const { return _M_at_eof() == __b._M_at_eof(); } private: int_type _M_get() const { int_type __ret = _M_c; if (_M_sbuf && _S_is_eof(__ret) && _S_is_eof(__ret = _M_sbuf->sgetc())) _M_sbuf = 0; return __ret; } bool _M_at_eof() const { return _S_is_eof(_M_get()); } static bool _S_is_eof(int_type __c) { const int_type __eof = traits_type::eof(); return traits_type::eq_int_type(__c, __eof); } }; template<typename _CharT, typename _Traits> inline bool operator==(const istreambuf_iterator<_CharT, _Traits>& __a, const istreambuf_iterator<_CharT, _Traits>& __b) { return __a.equal(__b); } template<typename _CharT, typename _Traits> inline bool operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, const istreambuf_iterator<_CharT, _Traits>& __b) { return !__a.equal(__b); } template<typename _CharT, typename _Traits> class ostreambuf_iterator : public iterator<output_iterator_tag, void, void, void, void> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> streambuf_type; typedef basic_ostream<_CharT, _Traits> ostream_type; template<typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, ostreambuf_iterator<_CharT2> >::__type copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, ostreambuf_iterator<_CharT2>); private: streambuf_type* _M_sbuf; bool _M_failed; public: ostreambuf_iterator(ostream_type& __s) noexcept : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } ostreambuf_iterator(streambuf_type* __s) noexcept : _M_sbuf(__s), _M_failed(!_M_sbuf) { } ostreambuf_iterator& operator=(_CharT __c) { if (!_M_failed && _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) _M_failed = true; return *this; } ostreambuf_iterator& operator*() { return *this; } ostreambuf_iterator& operator++(int) { return *this; } ostreambuf_iterator& operator++() { return *this; } bool failed() const noexcept { return _M_failed; } ostreambuf_iterator& _M_put(const _CharT* __ws, streamsize __len) { if (__builtin_expect(!_M_failed, true) && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, false)) _M_failed = true; return *this; } }; template<typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type copy(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, ostreambuf_iterator<_CharT> __result) { if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) { bool __ineof; __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); if (!__ineof) __result._M_failed = true; } return __result; } template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type __copy_move_a2(_CharT* __first, _CharT* __last, ostreambuf_iterator<_CharT> __result) { const streamsize __num = __last - __first; if (__num > 0) __result._M_put(__first, __num); return __result; } template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type __copy_move_a2(const _CharT* __first, const _CharT* __last, ostreambuf_iterator<_CharT> __result) { const streamsize __num = __last - __first; if (__num > 0) __result._M_put(__first, __num); return __result; } template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, _CharT*>::__type __copy_move_a2(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, _CharT* __result) { typedef istreambuf_iterator<_CharT> __is_iterator_type; typedef typename __is_iterator_type::traits_type traits_type; typedef typename __is_iterator_type::streambuf_type streambuf_type; typedef typename traits_type::int_type int_type; if (__first._M_sbuf && !__last._M_sbuf) { streambuf_type* __sb = __first._M_sbuf; int_type __c = __sb->sgetc(); while (!traits_type::eq_int_type(__c, traits_type::eof())) { const streamsize __n = __sb->egptr() - __sb->gptr(); if (__n > 1) { traits_type::copy(__result, __sb->gptr(), __n); __sb->__safe_gbump(__n); __result += __n; __c = __sb->underflow(); } else { *__result++ = traits_type::to_char_type(__c); __c = __sb->snextc(); } } } return __result; } template<typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, istreambuf_iterator<_CharT> >::__type find(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, const _CharT& __val) { typedef istreambuf_iterator<_CharT> __is_iterator_type; typedef typename __is_iterator_type::traits_type traits_type; typedef typename __is_iterator_type::streambuf_type streambuf_type; typedef typename traits_type::int_type int_type; const int_type __eof = traits_type::eof(); if (__first._M_sbuf && !__last._M_sbuf) { const int_type __ival = traits_type::to_int_type(__val); streambuf_type* __sb = __first._M_sbuf; int_type __c = __sb->sgetc(); while (!traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __ival)) { streamsize __n = __sb->egptr() - __sb->gptr(); if (__n > 1) { const _CharT* __p = traits_type::find(__sb->gptr(), __n, __val); if (__p) __n = __p - __sb->gptr(); __sb->__safe_gbump(__n); __c = __sb->sgetc(); } else __c = __sb->snextc(); } __first._M_c = __eof; } return __first; } template<typename _CharT, typename _Distance> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, void>::__type advance(istreambuf_iterator<_CharT>& __i, _Distance __n) { if (__n == 0) return; ; ; typedef istreambuf_iterator<_CharT> __is_iterator_type; typedef typename __is_iterator_type::traits_type traits_type; typedef typename __is_iterator_type::streambuf_type streambuf_type; typedef typename traits_type::int_type int_type; const int_type __eof = traits_type::eof(); streambuf_type* __sb = __i._M_sbuf; while (__n > 0) { streamsize __size = __sb->egptr() - __sb->gptr(); if (__size > __n) { __sb->__safe_gbump(__n); break; } __sb->__safe_gbump(__size); __n -= __size; if (traits_type::eq_int_type(__sb->underflow(), __eof)) { ; break; } } __i._M_c = __eof; } } # 49 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 71 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 template<typename _Tp> void __convert_to_v(const char*, _Tp&, ios_base::iostate&, const __c_locale&) throw(); template<> void __convert_to_v(const char*, float&, ios_base::iostate&, const __c_locale&) throw(); template<> void __convert_to_v(const char*, double&, ios_base::iostate&, const __c_locale&) throw(); template<> void __convert_to_v(const char*, long double&, ios_base::iostate&, const __c_locale&) throw(); template<typename _CharT, typename _Traits> struct __pad { static void _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, const _CharT* __olds, streamsize __newlen, streamsize __oldlen); }; template<typename _CharT> _CharT* __add_grouping(_CharT* __s, _CharT __sep, const char* __gbeg, size_t __gsize, const _CharT* __first, const _CharT* __last); template<typename _CharT> inline ostreambuf_iterator<_CharT> __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) { __s._M_put(__ws, __len); return __s; } template<typename _CharT, typename _OutIter> inline _OutIter __write(_OutIter __s, const _CharT* __ws, int __len) { for (int __j = 0; __j < __len; __j++, ++__s) *__s = __ws[__j]; return __s; } # 149 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 template<typename _CharT> class __ctype_abstract_base : public locale::facet, public ctype_base { public: typedef _CharT char_type; # 168 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 bool is(mask __m, char_type __c) const { return this->do_is(__m, __c); } # 185 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 const char_type* is(const char_type *__lo, const char_type *__hi, mask *__vec) const { return this->do_is(__lo, __hi, __vec); } # 201 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 const char_type* scan_is(mask __m, const char_type* __lo, const char_type* __hi) const { return this->do_scan_is(__m, __lo, __hi); } # 217 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 const char_type* scan_not(mask __m, const char_type* __lo, const char_type* __hi) const { return this->do_scan_not(__m, __lo, __hi); } # 231 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 char_type toupper(char_type __c) const { return this->do_toupper(__c); } # 246 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 const char_type* toupper(char_type *__lo, const char_type* __hi) const { return this->do_toupper(__lo, __hi); } # 260 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 char_type tolower(char_type __c) const { return this->do_tolower(__c); } # 275 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 const char_type* tolower(char_type* __lo, const char_type* __hi) const { return this->do_tolower(__lo, __hi); } # 292 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 char_type widen(char __c) const { return this->do_widen(__c); } # 311 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 const char* widen(const char* __lo, const char* __hi, char_type* __to) const { return this->do_widen(__lo, __hi, __to); } # 330 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 char narrow(char_type __c, char __dfault) const { return this->do_narrow(__c, __dfault); } # 352 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 const char_type* narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const { return this->do_narrow(__lo, __hi, __dfault, __to); } protected: explicit __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } virtual ~__ctype_abstract_base() { } # 377 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual bool do_is(mask __m, char_type __c) const = 0; # 396 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const = 0; # 415 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const = 0; # 434 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const = 0; # 452 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual char_type do_toupper(char_type __c) const = 0; # 469 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const = 0; # 485 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual char_type do_tolower(char_type __c) const = 0; # 502 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const = 0; # 521 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual char_type do_widen(char __c) const = 0; # 542 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __to) const = 0; # 563 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual char do_narrow(char_type __c, char __dfault) const = 0; # 588 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const = 0; }; # 611 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 template<typename _CharT> class ctype : public __ctype_abstract_base<_CharT> { public: typedef _CharT char_type; typedef typename __ctype_abstract_base<_CharT>::mask mask; static locale::id id; explicit ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } protected: virtual ~ctype(); virtual bool do_is(mask __m, char_type __c) const; virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const; virtual char_type do_toupper(char_type __c) const; virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; virtual char_type do_tolower(char_type __c) const; virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; virtual char_type do_widen(char __c) const; virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __dest) const; virtual char do_narrow(char_type, char __dfault) const; virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const; }; template<typename _CharT> locale::id ctype<_CharT>::id; # 680 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 template<> class ctype<char> : public locale::facet, public ctype_base { public: typedef char char_type; protected: __c_locale _M_c_locale_ctype; bool _M_del; __to_type _M_toupper; __to_type _M_tolower; const mask* _M_table; mutable char _M_widen_ok; mutable char _M_widen[1 + static_cast<unsigned char>(-1)]; mutable char _M_narrow[1 + static_cast<unsigned char>(-1)]; mutable char _M_narrow_ok; public: static locale::id id; static const size_t table_size = 1 + static_cast<unsigned char>(-1); # 717 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 explicit ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); # 730 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 explicit ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, size_t __refs = 0); # 743 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 inline bool is(mask __m, char __c) const; # 758 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 inline const char* is(const char* __lo, const char* __hi, mask* __vec) const; # 772 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 inline const char* scan_is(mask __m, const char* __lo, const char* __hi) const; # 786 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 inline const char* scan_not(mask __m, const char* __lo, const char* __hi) const; # 801 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 char_type toupper(char_type __c) const { return this->do_toupper(__c); } # 818 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 const char_type* toupper(char_type *__lo, const char_type* __hi) const { return this->do_toupper(__lo, __hi); } # 834 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 char_type tolower(char_type __c) const { return this->do_tolower(__c); } # 851 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 const char_type* tolower(char_type* __lo, const char_type* __hi) const { return this->do_tolower(__lo, __hi); } # 871 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 char_type widen(char __c) const { if (_M_widen_ok) return _M_widen[static_cast<unsigned char>(__c)]; this->_M_widen_init(); return this->do_widen(__c); } # 898 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 const char* widen(const char* __lo, const char* __hi, char_type* __to) const { if (_M_widen_ok == 1) { if (__builtin_expect(__hi != __lo, true)) __builtin_memcpy(__to, __lo, __hi - __lo); return __hi; } if (!_M_widen_ok) _M_widen_init(); return this->do_widen(__lo, __hi, __to); } # 930 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 char narrow(char_type __c, char __dfault) const { if (_M_narrow[static_cast<unsigned char>(__c)]) return _M_narrow[static_cast<unsigned char>(__c)]; const char __t = do_narrow(__c, __dfault); if (__t != __dfault) _M_narrow[static_cast<unsigned char>(__c)] = __t; return __t; } # 963 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 const char_type* narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const { if (__builtin_expect(_M_narrow_ok == 1, true)) { if (__builtin_expect(__hi != __lo, true)) __builtin_memcpy(__to, __lo, __hi - __lo); return __hi; } if (!_M_narrow_ok) _M_narrow_init(); return this->do_narrow(__lo, __hi, __dfault, __to); } const mask* table() const throw() { return _M_table; } static const mask* classic_table() throw(); protected: virtual ~ctype(); # 1013 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual char_type do_toupper(char_type __c) const; # 1030 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; # 1046 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual char_type do_tolower(char_type __c) const; # 1063 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; # 1083 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual char_type do_widen(char __c) const { return __c; } # 1106 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __to) const { if (__builtin_expect(__hi != __lo, true)) __builtin_memcpy(__to, __lo, __hi - __lo); return __hi; } # 1133 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual char do_narrow(char_type __c, char __dfault __attribute__((__unused__))) const { return __c; } # 1159 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault __attribute__((__unused__)), char* __to) const { if (__builtin_expect(__hi != __lo, true)) __builtin_memcpy(__to, __lo, __hi - __lo); return __hi; } private: void _M_narrow_init() const; void _M_widen_init() const; }; # 1185 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 template<> class ctype<wchar_t> : public __ctype_abstract_base<wchar_t> { public: typedef wchar_t char_type; typedef wctype_t __wmask_type; protected: __c_locale _M_c_locale_ctype; bool _M_narrow_ok; char _M_narrow[128]; wint_t _M_widen[1 + static_cast<unsigned char>(-1)]; mask _M_bit[16]; __wmask_type _M_wmask[16]; public: static locale::id id; # 1218 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 explicit ctype(size_t __refs = 0); # 1229 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 explicit ctype(__c_locale __cloc, size_t __refs = 0); protected: __wmask_type _M_convert_to_wmask(const mask __m) const throw(); virtual ~ctype(); # 1253 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual bool do_is(mask __m, char_type __c) const; # 1272 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; # 1290 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; # 1308 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const; # 1325 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual char_type do_toupper(char_type __c) const; # 1342 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; # 1358 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual char_type do_tolower(char_type __c) const; # 1375 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; # 1395 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual char_type do_widen(char __c) const; # 1417 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __to) const; # 1440 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual char do_narrow(char_type __c, char __dfault) const; # 1466 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const; void _M_initialize_ctype() throw(); }; template<typename _CharT> class ctype_byname : public ctype<_CharT> { public: typedef typename ctype<_CharT>::mask mask; explicit ctype_byname(const char* __s, size_t __refs = 0); explicit ctype_byname(const string& __s, size_t __refs = 0) : ctype_byname(__s.c_str(), __refs) { } protected: virtual ~ctype_byname() { } }; template<> class ctype_byname<char> : public ctype<char> { public: explicit ctype_byname(const char* __s, size_t __refs = 0); explicit ctype_byname(const string& __s, size_t __refs = 0); protected: virtual ~ctype_byname(); }; template<> class ctype_byname<wchar_t> : public ctype<wchar_t> { public: explicit ctype_byname(const char* __s, size_t __refs = 0); explicit ctype_byname(const string& __s, size_t __refs = 0); protected: virtual ~ctype_byname(); }; } # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/ctype_inline.h" 1 3 # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/ctype_inline.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { bool ctype<char>:: is(mask __m, char __c) const { return _M_table[static_cast<unsigned char>(__c)] & __m; } const char* ctype<char>:: is(const char* __low, const char* __high, mask* __vec) const { while (__low < __high) *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; return __high; } const char* ctype<char>:: scan_is(mask __m, const char* __low, const char* __high) const { while (__low < __high && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) ++__low; return __low; } const char* ctype<char>:: scan_not(mask __m, const char* __low, const char* __high) const { while (__low < __high && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) ++__low; return __low; } } # 1539 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { class __num_base { public: enum { _S_ominus, _S_oplus, _S_ox, _S_oX, _S_odigits, _S_odigits_end = _S_odigits + 16, _S_oudigits = _S_odigits_end, _S_oudigits_end = _S_oudigits + 16, _S_oe = _S_odigits + 14, _S_oE = _S_oudigits + 14, _S_oend = _S_oudigits_end }; static const char* _S_atoms_out; static const char* _S_atoms_in; enum { _S_iminus, _S_iplus, _S_ix, _S_iX, _S_izero, _S_ie = _S_izero + 14, _S_iE = _S_izero + 20, _S_iend = 26 }; static void _S_format_float(const ios_base& __io, char* __fptr, char __mod) throw(); }; template<typename _CharT> struct __numpunct_cache : public locale::facet { const char* _M_grouping; size_t _M_grouping_size; bool _M_use_grouping; const _CharT* _M_truename; size_t _M_truename_size; const _CharT* _M_falsename; size_t _M_falsename_size; _CharT _M_decimal_point; _CharT _M_thousands_sep; _CharT _M_atoms_out[__num_base::_S_oend]; _CharT _M_atoms_in[__num_base::_S_iend]; bool _M_allocated; __numpunct_cache(size_t __refs = 0) : facet(__refs), _M_grouping(0), _M_grouping_size(0), _M_use_grouping(false), _M_truename(0), _M_truename_size(0), _M_falsename(0), _M_falsename_size(0), _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), _M_allocated(false) { } ~__numpunct_cache(); void _M_cache(const locale& __loc); private: __numpunct_cache& operator=(const __numpunct_cache&); explicit __numpunct_cache(const __numpunct_cache&); }; template<typename _CharT> __numpunct_cache<_CharT>::~__numpunct_cache() { if (_M_allocated) { delete [] _M_grouping; delete [] _M_truename; delete [] _M_falsename; } } namespace __cxx11 { # 1669 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 template<typename _CharT> class numpunct : public locale::facet { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; typedef __numpunct_cache<_CharT> __cache_type; protected: __cache_type* _M_data; public: static locale::id id; explicit numpunct(size_t __refs = 0) : facet(__refs), _M_data(0) { _M_initialize_numpunct(); } # 1707 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 explicit numpunct(__cache_type* __cache, size_t __refs = 0) : facet(__refs), _M_data(__cache) { _M_initialize_numpunct(); } # 1721 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 explicit numpunct(__c_locale __cloc, size_t __refs = 0) : facet(__refs), _M_data(0) { _M_initialize_numpunct(__cloc); } # 1735 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 char_type decimal_point() const { return this->do_decimal_point(); } # 1748 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 char_type thousands_sep() const { return this->do_thousands_sep(); } # 1779 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 string grouping() const { return this->do_grouping(); } # 1792 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 string_type truename() const { return this->do_truename(); } # 1805 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 string_type falsename() const { return this->do_falsename(); } protected: virtual ~numpunct(); # 1822 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual char_type do_decimal_point() const { return _M_data->_M_decimal_point; } # 1834 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual char_type do_thousands_sep() const { return _M_data->_M_thousands_sep; } # 1847 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual string do_grouping() const { return _M_data->_M_grouping; } # 1860 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual string_type do_truename() const { return _M_data->_M_truename; } # 1873 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual string_type do_falsename() const { return _M_data->_M_falsename; } void _M_initialize_numpunct(__c_locale __cloc = 0); }; template<typename _CharT> locale::id numpunct<_CharT>::id; template<> numpunct<char>::~numpunct(); template<> void numpunct<char>::_M_initialize_numpunct(__c_locale __cloc); template<> numpunct<wchar_t>::~numpunct(); template<> void numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc); template<typename _CharT> class numpunct_byname : public numpunct<_CharT> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; explicit numpunct_byname(const char* __s, size_t __refs = 0) : numpunct<_CharT>(__refs) { if (__builtin_strcmp(__s, "C") != 0 && __builtin_strcmp(__s, "POSIX") != 0) { __c_locale __tmp; this->_S_create_c_locale(__tmp, __s); this->_M_initialize_numpunct(__tmp); this->_S_destroy_c_locale(__tmp); } } explicit numpunct_byname(const string& __s, size_t __refs = 0) : numpunct_byname(__s.c_str(), __refs) { } protected: virtual ~numpunct_byname() { } }; } # 1951 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 template<typename _CharT, typename _InIter> class num_get : public locale::facet { public: typedef _CharT char_type; typedef _InIter iter_type; static locale::id id; # 1972 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 explicit num_get(size_t __refs = 0) : facet(__refs) { } # 1998 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, bool& __v) const { return this->do_get(__in, __end, __io, __err, __v); } # 2035 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned short& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned int& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, long long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } # 2095 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, float& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, double& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, long double& __v) const { return this->do_get(__in, __end, __io, __err, __v); } # 2138 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, void*& __v) const { return this->do_get(__in, __end, __io, __err, __v); } protected: virtual ~num_get() { } __attribute ((__abi_tag__ ("cxx11"))) iter_type _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, string&) const; template<typename _ValueT> __attribute ((__abi_tag__ ("cxx11"))) iter_type _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, _ValueT&) const; template<typename _CharT2> typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type _M_find(const _CharT2*, size_t __len, _CharT2 __c) const { int __ret = -1; if (__len <= 10) { if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len)) __ret = __c - _CharT2('0'); } else { if (__c >= _CharT2('0') && __c <= _CharT2('9')) __ret = __c - _CharT2('0'); else if (__c >= _CharT2('a') && __c <= _CharT2('f')) __ret = 10 + (__c - _CharT2('a')); else if (__c >= _CharT2('A') && __c <= _CharT2('F')) __ret = 10 + (__c - _CharT2('A')); } return __ret; } template<typename _CharT2> typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value, int>::__type _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const { int __ret = -1; const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c); if (__q) { __ret = __q - __zero; if (__ret > 15) __ret -= 6; } return __ret; } # 2211 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned short& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned int& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, long long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, float&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, double&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, long double&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, void*&) const; # 2274 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 }; template<typename _CharT, typename _InIter> locale::id num_get<_CharT, _InIter>::id; # 2292 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 template<typename _CharT, typename _OutIter> class num_put : public locale::facet { public: typedef _CharT char_type; typedef _OutIter iter_type; static locale::id id; # 2313 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 explicit num_put(size_t __refs = 0) : facet(__refs) { } # 2331 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const { return this->do_put(__s, __io, __fill, __v); } # 2373 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __io, char_type __fill, long __v) const { return this->do_put(__s, __io, __fill, __v); } iter_type put(iter_type __s, ios_base& __io, char_type __fill, unsigned long __v) const { return this->do_put(__s, __io, __fill, __v); } iter_type put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const { return this->do_put(__s, __io, __fill, __v); } iter_type put(iter_type __s, ios_base& __io, char_type __fill, unsigned long long __v) const { return this->do_put(__s, __io, __fill, __v); } # 2436 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __io, char_type __fill, double __v) const { return this->do_put(__s, __io, __fill, __v); } iter_type put(iter_type __s, ios_base& __io, char_type __fill, long double __v) const { return this->do_put(__s, __io, __fill, __v); } # 2461 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __io, char_type __fill, const void* __v) const { return this->do_put(__s, __io, __fill, __v); } protected: template<typename _ValueT> iter_type _M_insert_float(iter_type, ios_base& __io, char_type __fill, char __mod, _ValueT __v) const; void _M_group_float(const char* __grouping, size_t __grouping_size, char_type __sep, const char_type* __p, char_type* __new, char_type* __cs, int& __len) const; template<typename _ValueT> iter_type _M_insert_int(iter_type, ios_base& __io, char_type __fill, _ValueT __v) const; void _M_group_int(const char* __grouping, size_t __grouping_size, char_type __sep, ios_base& __io, char_type* __new, char_type* __cs, int& __len) const; void _M_pad(char_type __fill, streamsize __w, ios_base& __io, char_type* __new, const char_type* __cs, int& __len) const; virtual ~num_put() { } # 2509 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const; virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const { return _M_insert_int(__s, __io, __fill, __v); } virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, unsigned long __v) const { return _M_insert_int(__s, __io, __fill, __v); } virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const { return _M_insert_int(__s, __io, __fill, __v); } virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, unsigned long long __v) const { return _M_insert_int(__s, __io, __fill, __v); } virtual iter_type do_put(iter_type, ios_base&, char_type, double) const; virtual iter_type do_put(iter_type, ios_base&, char_type, long double) const; virtual iter_type do_put(iter_type, ios_base&, char_type, const void*) const; }; template <typename _CharT, typename _OutIter> locale::id num_put<_CharT, _OutIter>::id; # 2567 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 3 template<typename _CharT> inline bool isspace(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); } template<typename _CharT> inline bool isprint(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); } template<typename _CharT> inline bool iscntrl(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); } template<typename _CharT> inline bool isupper(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); } template<typename _CharT> inline bool islower(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); } template<typename _CharT> inline bool isalpha(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); } template<typename _CharT> inline bool isdigit(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); } template<typename _CharT> inline bool ispunct(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); } template<typename _CharT> inline bool isxdigit(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); } template<typename _CharT> inline bool isalnum(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); } template<typename _CharT> inline bool isgraph(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); } template<typename _CharT> inline bool isblank(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::blank, __c); } template<typename _CharT> inline _CharT toupper(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).toupper(__c); } template<typename _CharT> inline _CharT tolower(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).tolower(__c); } } # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.tcc" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Facet> struct __use_cache { const _Facet* operator() (const locale& __loc) const; }; template<typename _CharT> struct __use_cache<__numpunct_cache<_CharT> > { const __numpunct_cache<_CharT>* operator() (const locale& __loc) const { const size_t __i = numpunct<_CharT>::id._M_id(); const locale::facet** __caches = __loc._M_impl->_M_caches; if (!__caches[__i]) { __numpunct_cache<_CharT>* __tmp = 0; if (true) { __tmp = new __numpunct_cache<_CharT>; __tmp->_M_cache(__loc); } if (false) { delete __tmp; ; } __loc._M_impl->_M_install_cache(__tmp, __i); } return static_cast<const __numpunct_cache<_CharT>*>(__caches[__i]); } }; template<typename _CharT> void __numpunct_cache<_CharT>::_M_cache(const locale& __loc) { const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc); char* __grouping = 0; _CharT* __truename = 0; _CharT* __falsename = 0; if (true) { const string& __g = __np.grouping(); _M_grouping_size = __g.size(); __grouping = new char[_M_grouping_size]; __g.copy(__grouping, _M_grouping_size); _M_use_grouping = (_M_grouping_size && static_cast<signed char>(__grouping[0]) > 0 && (__grouping[0] != __gnu_cxx::__numeric_traits<char>::__max)); const basic_string<_CharT>& __tn = __np.truename(); _M_truename_size = __tn.size(); __truename = new _CharT[_M_truename_size]; __tn.copy(__truename, _M_truename_size); const basic_string<_CharT>& __fn = __np.falsename(); _M_falsename_size = __fn.size(); __falsename = new _CharT[_M_falsename_size]; __fn.copy(__falsename, _M_falsename_size); _M_decimal_point = __np.decimal_point(); _M_thousands_sep = __np.thousands_sep(); const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc); __ct.widen(__num_base::_S_atoms_out, __num_base::_S_atoms_out + __num_base::_S_oend, _M_atoms_out); __ct.widen(__num_base::_S_atoms_in, __num_base::_S_atoms_in + __num_base::_S_iend, _M_atoms_in); _M_grouping = __grouping; _M_truename = __truename; _M_falsename = __falsename; _M_allocated = true; } if (false) { delete [] __grouping; delete [] __truename; delete [] __falsename; ; } } # 139 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.tcc" 3 __attribute__ ((__pure__)) bool __verify_grouping(const char* __grouping, size_t __grouping_size, const string& __grouping_tmp) throw (); template<typename _CharT, typename _InIter> __attribute ((__abi_tag__ ("cxx11"))) _InIter num_get<_CharT, _InIter>:: _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, ios_base::iostate& __err, string& __xtrc) const { typedef char_traits<_CharT> __traits_type; typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __lit = __lc->_M_atoms_in; char_type __c = char_type(); bool __testeof = __beg == __end; if (!__testeof) { __c = *__beg; const bool __plus = __c == __lit[__num_base::_S_iplus]; if ((__plus || __c == __lit[__num_base::_S_iminus]) && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) && !(__c == __lc->_M_decimal_point)) { __xtrc += __plus ? '+' : '-'; if (++__beg != __end) __c = *__beg; else __testeof = true; } } bool __found_mantissa = false; int __sep_pos = 0; while (!__testeof) { if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) || __c == __lc->_M_decimal_point) break; else if (__c == __lit[__num_base::_S_izero]) { if (!__found_mantissa) { __xtrc += '0'; __found_mantissa = true; } ++__sep_pos; if (++__beg != __end) __c = *__beg; else __testeof = true; } else break; } bool __found_dec = false; bool __found_sci = false; string __found_grouping; if (__lc->_M_use_grouping) __found_grouping.reserve(32); const char_type* __lit_zero = __lit + __num_base::_S_izero; if (!__lc->_M_allocated) while (!__testeof) { const int __digit = _M_find(__lit_zero, 10, __c); if (__digit != -1) { __xtrc += '0' + __digit; __found_mantissa = true; } else if (__c == __lc->_M_decimal_point && !__found_dec && !__found_sci) { __xtrc += '.'; __found_dec = true; } else if ((__c == __lit[__num_base::_S_ie] || __c == __lit[__num_base::_S_iE]) && !__found_sci && __found_mantissa) { __xtrc += 'e'; __found_sci = true; if (++__beg != __end) { __c = *__beg; const bool __plus = __c == __lit[__num_base::_S_iplus]; if (__plus || __c == __lit[__num_base::_S_iminus]) __xtrc += __plus ? '+' : '-'; else continue; } else { __testeof = true; break; } } else break; if (++__beg != __end) __c = *__beg; else __testeof = true; } else while (!__testeof) { if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) { if (!__found_dec && !__found_sci) { if (__sep_pos) { __found_grouping += static_cast<char>(__sep_pos); __sep_pos = 0; } else { __xtrc.clear(); break; } } else break; } else if (__c == __lc->_M_decimal_point) { if (!__found_dec && !__found_sci) { if (__found_grouping.size()) __found_grouping += static_cast<char>(__sep_pos); __xtrc += '.'; __found_dec = true; } else break; } else { const char_type* __q = __traits_type::find(__lit_zero, 10, __c); if (__q) { __xtrc += '0' + (__q - __lit_zero); __found_mantissa = true; ++__sep_pos; } else if ((__c == __lit[__num_base::_S_ie] || __c == __lit[__num_base::_S_iE]) && !__found_sci && __found_mantissa) { if (__found_grouping.size() && !__found_dec) __found_grouping += static_cast<char>(__sep_pos); __xtrc += 'e'; __found_sci = true; if (++__beg != __end) { __c = *__beg; const bool __plus = __c == __lit[__num_base::_S_iplus]; if ((__plus || __c == __lit[__num_base::_S_iminus]) && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) && !(__c == __lc->_M_decimal_point)) __xtrc += __plus ? '+' : '-'; else continue; } else { __testeof = true; break; } } else break; } if (++__beg != __end) __c = *__beg; else __testeof = true; } if (__found_grouping.size()) { if (!__found_dec && !__found_sci) __found_grouping += static_cast<char>(__sep_pos); if (!std::__verify_grouping(__lc->_M_grouping, __lc->_M_grouping_size, __found_grouping)) __err = ios_base::failbit; } return __beg; } template<typename _CharT, typename _InIter> template<typename _ValueT> __attribute ((__abi_tag__ ("cxx11"))) _InIter num_get<_CharT, _InIter>:: _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, ios_base::iostate& __err, _ValueT& __v) const { typedef char_traits<_CharT> __traits_type; using __gnu_cxx::__add_unsigned; typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __lit = __lc->_M_atoms_in; char_type __c = char_type(); const ios_base::fmtflags __basefield = __io.flags() & ios_base::basefield; const bool __oct = __basefield == ios_base::oct; int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); bool __testeof = __beg == __end; bool __negative = false; if (!__testeof) { __c = *__beg; __negative = __c == __lit[__num_base::_S_iminus]; if ((__negative || __c == __lit[__num_base::_S_iplus]) && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) && !(__c == __lc->_M_decimal_point)) { if (++__beg != __end) __c = *__beg; else __testeof = true; } } bool __found_zero = false; int __sep_pos = 0; while (!__testeof) { if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) || __c == __lc->_M_decimal_point) break; else if (__c == __lit[__num_base::_S_izero] && (!__found_zero || __base == 10)) { __found_zero = true; ++__sep_pos; if (__basefield == 0) __base = 8; if (__base == 8) __sep_pos = 0; } else if (__found_zero && (__c == __lit[__num_base::_S_ix] || __c == __lit[__num_base::_S_iX])) { if (__basefield == 0) __base = 16; if (__base == 16) { __found_zero = false; __sep_pos = 0; } else break; } else break; if (++__beg != __end) { __c = *__beg; if (!__found_zero) break; } else __testeof = true; } const size_t __len = (__base == 16 ? __num_base::_S_iend - __num_base::_S_izero : __base); typedef __gnu_cxx::__numeric_traits<_ValueT> __num_traits; string __found_grouping; if (__lc->_M_use_grouping) __found_grouping.reserve(32); bool __testfail = false; bool __testoverflow = false; const __unsigned_type __max = (__negative && __num_traits::__is_signed) ? -static_cast<__unsigned_type>(__num_traits::__min) : __num_traits::__max; const __unsigned_type __smax = __max / __base; __unsigned_type __result = 0; int __digit = 0; const char_type* __lit_zero = __lit + __num_base::_S_izero; if (!__lc->_M_allocated) while (!__testeof) { __digit = _M_find(__lit_zero, __len, __c); if (__digit == -1) break; if (__result > __smax) __testoverflow = true; else { __result *= __base; __testoverflow |= __result > __max - __digit; __result += __digit; ++__sep_pos; } if (++__beg != __end) __c = *__beg; else __testeof = true; } else while (!__testeof) { if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) { if (__sep_pos) { __found_grouping += static_cast<char>(__sep_pos); __sep_pos = 0; } else { __testfail = true; break; } } else if (__c == __lc->_M_decimal_point) break; else { const char_type* __q = __traits_type::find(__lit_zero, __len, __c); if (!__q) break; __digit = __q - __lit_zero; if (__digit > 15) __digit -= 6; if (__result > __smax) __testoverflow = true; else { __result *= __base; __testoverflow |= __result > __max - __digit; __result += __digit; ++__sep_pos; } } if (++__beg != __end) __c = *__beg; else __testeof = true; } if (__found_grouping.size()) { __found_grouping += static_cast<char>(__sep_pos); if (!std::__verify_grouping(__lc->_M_grouping, __lc->_M_grouping_size, __found_grouping)) __err = ios_base::failbit; } if ((!__sep_pos && !__found_zero && !__found_grouping.size()) || __testfail) { __v = 0; __err = ios_base::failbit; } else if (__testoverflow) { if (__negative && __num_traits::__is_signed) __v = __num_traits::__min; else __v = __num_traits::__max; __err = ios_base::failbit; } else __v = __negative ? -__result : __result; if (__testeof) __err |= ios_base::eofbit; return __beg; } template<typename _CharT, typename _InIter> _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, bool& __v) const { if (!(__io.flags() & ios_base::boolalpha)) { long __l = -1; __beg = _M_extract_int(__beg, __end, __io, __err, __l); if (__l == 0 || __l == 1) __v = bool(__l); else { __v = true; __err = ios_base::failbit; if (__beg == __end) __err |= ios_base::eofbit; } } else { typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); bool __testf = true; bool __testt = true; bool __donef = __lc->_M_falsename_size == 0; bool __donet = __lc->_M_truename_size == 0; bool __testeof = false; size_t __n = 0; while (!__donef || !__donet) { if (__beg == __end) { __testeof = true; break; } const char_type __c = *__beg; if (!__donef) __testf = __c == __lc->_M_falsename[__n]; if (!__testf && __donet) break; if (!__donet) __testt = __c == __lc->_M_truename[__n]; if (!__testt && __donef) break; if (!__testt && !__testf) break; ++__n; ++__beg; __donef = !__testf || __n >= __lc->_M_falsename_size; __donet = !__testt || __n >= __lc->_M_truename_size; } if (__testf && __n == __lc->_M_falsename_size && __n) { __v = false; if (__testt && __n == __lc->_M_truename_size) __err = ios_base::failbit; else __err = __testeof ? ios_base::eofbit : ios_base::goodbit; } else if (__testt && __n == __lc->_M_truename_size && __n) { __v = true; __err = __testeof ? ios_base::eofbit : ios_base::goodbit; } else { __v = false; __err = ios_base::failbit; if (__testeof) __err |= ios_base::eofbit; } } return __beg; } template<typename _CharT, typename _InIter> _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, float& __v) const { string __xtrc; __xtrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template<typename _CharT, typename _InIter> _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, double& __v) const { string __xtrc; __xtrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } # 735 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.tcc" 3 template<typename _CharT, typename _InIter> _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, long double& __v) const { string __xtrc; __xtrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template<typename _CharT, typename _InIter> _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, void*& __v) const { typedef ios_base::fmtflags fmtflags; const fmtflags __fmt = __io.flags(); __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex); typedef __gnu_cxx::__conditional_type<(sizeof(void*) <= sizeof(unsigned long)), unsigned long, unsigned long long>::__type _UIntPtrType; _UIntPtrType __ul; __beg = _M_extract_int(__beg, __end, __io, __err, __ul); __io.flags(__fmt); __v = reinterpret_cast<void*>(__ul); return __beg; } template<typename _CharT, typename _OutIter> void num_put<_CharT, _OutIter>:: _M_pad(_CharT __fill, streamsize __w, ios_base& __io, _CharT* __new, const _CharT* __cs, int& __len) const { __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, __cs, __w, __len); __len = static_cast<int>(__w); } template<typename _CharT, typename _ValueT> int __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, ios_base::fmtflags __flags, bool __dec) { _CharT* __buf = __bufend; if (__builtin_expect(__dec, true)) { do { *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; __v /= 10; } while (__v != 0); } else if ((__flags & ios_base::basefield) == ios_base::oct) { do { *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; __v >>= 3; } while (__v != 0); } else { const bool __uppercase = __flags & ios_base::uppercase; const int __case_offset = __uppercase ? __num_base::_S_oudigits : __num_base::_S_odigits; do { *--__buf = __lit[(__v & 0xf) + __case_offset]; __v >>= 4; } while (__v != 0); } return __bufend - __buf; } template<typename _CharT, typename _OutIter> void num_put<_CharT, _OutIter>:: _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, ios_base&, _CharT* __new, _CharT* __cs, int& __len) const { _CharT* __p = std::__add_grouping(__new, __sep, __grouping, __grouping_size, __cs, __cs + __len); __len = __p - __new; } template<typename _CharT, typename _OutIter> template<typename _ValueT> _OutIter num_put<_CharT, _OutIter>:: _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, _ValueT __v) const { using __gnu_cxx::__add_unsigned; typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __lit = __lc->_M_atoms_out; const ios_base::fmtflags __flags = __io.flags(); const int __ilen = 5 * sizeof(_ValueT); _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __ilen)); const ios_base::fmtflags __basefield = __flags & ios_base::basefield; const bool __dec = (__basefield != ios_base::oct && __basefield != ios_base::hex); const __unsigned_type __u = ((__v > 0 || !__dec) ? __unsigned_type(__v) : -__unsigned_type(__v)); int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec); __cs += __ilen - __len; if (__lc->_M_use_grouping) { _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * (__len + 1) * 2)); _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); __cs = __cs2 + 2; } if (__builtin_expect(__dec, true)) { if (__v >= 0) { if (bool(__flags & ios_base::showpos) && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) *--__cs = __lit[__num_base::_S_oplus], ++__len; } else *--__cs = __lit[__num_base::_S_ominus], ++__len; } else if (bool(__flags & ios_base::showbase) && __v) { if (__basefield == ios_base::oct) *--__cs = __lit[__num_base::_S_odigits], ++__len; else { const bool __uppercase = __flags & ios_base::uppercase; *--__cs = __lit[__num_base::_S_ox + __uppercase]; *--__cs = __lit[__num_base::_S_odigits]; __len += 2; } } const streamsize __w = __io.width(); if (__w > static_cast<streamsize>(__len)) { _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w)); _M_pad(__fill, __w, __io, __cs3, __cs, __len); __cs = __cs3; } __io.width(0); return std::__write(__s, __cs, __len); } template<typename _CharT, typename _OutIter> void num_put<_CharT, _OutIter>:: _M_group_float(const char* __grouping, size_t __grouping_size, _CharT __sep, const _CharT* __p, _CharT* __new, _CharT* __cs, int& __len) const { const int __declen = __p ? __p - __cs : __len; _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, __grouping_size, __cs, __cs + __declen); int __newlen = __p2 - __new; if (__p) { char_traits<_CharT>::copy(__p2, __p, __len - __declen); __newlen += __len - __declen; } __len = __newlen; } # 971 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.tcc" 3 template<typename _CharT, typename _OutIter> template<typename _ValueT> _OutIter num_put<_CharT, _OutIter>:: _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, _ValueT __v) const { typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision(); const int __max_digits = __gnu_cxx::__numeric_traits<_ValueT>::__digits10; int __len; char __fbuf[16]; __num_base::_S_format_float(__io, __fbuf, __mod); const bool __use_prec = (__io.flags() & ios_base::floatfield) != ios_base::floatfield; int __cs_size = __max_digits * 3; char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); if (__use_prec) __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, __prec, __v); else __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, __v); if (__len >= __cs_size) { __cs_size = __len + 1; __cs = static_cast<char*>(__builtin_alloca(__cs_size)); if (__use_prec) __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, __prec, __v); else __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, __v); } # 1044 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.tcc" 3 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __len)); __ctype.widen(__cs, __cs + __len, __ws); _CharT* __wp = 0; const char* __p = char_traits<char>::find(__cs, __len, '.'); if (__p) { __wp = __ws + (__p - __cs); *__wp = __lc->_M_decimal_point; } if (__lc->_M_use_grouping && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' && __cs[1] >= '0' && __cs[2] >= '0'))) { _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __len * 2)); streamsize __off = 0; if (__cs[0] == '-' || __cs[0] == '+') { __off = 1; __ws2[0] = __ws[0]; __len -= 1; } _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, __lc->_M_thousands_sep, __wp, __ws2 + __off, __ws + __off, __len); __len += __off; __ws = __ws2; } const streamsize __w = __io.width(); if (__w > static_cast<streamsize>(__len)) { _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w)); _M_pad(__fill, __w, __io, __ws3, __ws, __len); __ws = __ws3; } __io.width(0); return std::__write(__s, __ws, __len); } template<typename _CharT, typename _OutIter> _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const { const ios_base::fmtflags __flags = __io.flags(); if ((__flags & ios_base::boolalpha) == 0) { const long __l = __v; __s = _M_insert_int(__s, __io, __fill, __l); } else { typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __name = __v ? __lc->_M_truename : __lc->_M_falsename; int __len = __v ? __lc->_M_truename_size : __lc->_M_falsename_size; const streamsize __w = __io.width(); if (__w > static_cast<streamsize>(__len)) { const streamsize __plen = __w - __len; _CharT* __ps = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __plen)); char_traits<_CharT>::assign(__ps, __plen, __fill); __io.width(0); if ((__flags & ios_base::adjustfield) == ios_base::left) { __s = std::__write(__s, __name, __len); __s = std::__write(__s, __ps, __plen); } else { __s = std::__write(__s, __ps, __plen); __s = std::__write(__s, __name, __len); } return __s; } __io.width(0); __s = std::__write(__s, __name, __len); } return __s; } template<typename _CharT, typename _OutIter> _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const { return _M_insert_float(__s, __io, __fill, char(), __v); } # 1169 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.tcc" 3 template<typename _CharT, typename _OutIter> _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, long double __v) const { return _M_insert_float(__s, __io, __fill, 'L', __v); } template<typename _CharT, typename _OutIter> _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, const void* __v) const { const ios_base::fmtflags __flags = __io.flags(); const ios_base::fmtflags __fmt = ~(ios_base::basefield | ios_base::uppercase); __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase)); typedef __gnu_cxx::__conditional_type<(sizeof(const void*) <= sizeof(unsigned long)), unsigned long, unsigned long long>::__type _UIntPtrType; __s = _M_insert_int(__s, __io, __fill, reinterpret_cast<_UIntPtrType>(__v)); __io.flags(__flags); return __s; } # 1206 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.tcc" 3 template<typename _CharT, typename _Traits> void __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, _CharT* __news, const _CharT* __olds, streamsize __newlen, streamsize __oldlen) { const size_t __plen = static_cast<size_t>(__newlen - __oldlen); const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; if (__adjust == ios_base::left) { _Traits::copy(__news, __olds, __oldlen); _Traits::assign(__news + __oldlen, __plen, __fill); return; } size_t __mod = 0; if (__adjust == ios_base::internal) { const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); if (__ctype.widen('-') == __olds[0] || __ctype.widen('+') == __olds[0]) { __news[0] = __olds[0]; __mod = 1; ++__news; } else if (__ctype.widen('0') == __olds[0] && __oldlen > 1 && (__ctype.widen('x') == __olds[1] || __ctype.widen('X') == __olds[1])) { __news[0] = __olds[0]; __news[1] = __olds[1]; __mod = 2; __news += 2; } } _Traits::assign(__news, __plen, __fill); _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod); } template<typename _CharT> _CharT* __add_grouping(_CharT* __s, _CharT __sep, const char* __gbeg, size_t __gsize, const _CharT* __first, const _CharT* __last) { size_t __idx = 0; size_t __ctr = 0; while (__last - __first > __gbeg[__idx] && static_cast<signed char>(__gbeg[__idx]) > 0 && __gbeg[__idx] != __gnu_cxx::__numeric_traits<char>::__max) { __last -= __gbeg[__idx]; __idx < __gsize - 1 ? ++__idx : ++__ctr; } while (__first != __last) *__s++ = *__first++; while (__ctr--) { *__s++ = __sep; for (char __i = __gbeg[__idx]; __i > 0; --__i) *__s++ = *__first++; } while (__idx--) { *__s++ = __sep; for (char __i = __gbeg[__idx]; __i > 0; --__i) *__s++ = *__first++; } return __s; } extern template class __cxx11:: numpunct<char>; extern template class __cxx11:: numpunct_byname<char>; extern template class num_get<char>; extern template class num_put<char>; extern template class ctype_byname<char>; extern template const ctype<char>& use_facet<ctype<char> >(const locale&); extern template const numpunct<char>& use_facet<numpunct<char> >(const locale&); extern template const num_put<char>& use_facet<num_put<char> >(const locale&); extern template const num_get<char>& use_facet<num_get<char> >(const locale&); extern template bool has_facet<ctype<char> >(const locale&); extern template bool has_facet<numpunct<char> >(const locale&); extern template bool has_facet<num_put<char> >(const locale&); extern template bool has_facet<num_get<char> >(const locale&); extern template class __cxx11:: numpunct<wchar_t>; extern template class __cxx11:: numpunct_byname<wchar_t>; extern template class num_get<wchar_t>; extern template class num_put<wchar_t>; extern template class ctype_byname<wchar_t>; extern template const ctype<wchar_t>& use_facet<ctype<wchar_t> >(const locale&); extern template const numpunct<wchar_t>& use_facet<numpunct<wchar_t> >(const locale&); extern template const num_put<wchar_t>& use_facet<num_put<wchar_t> >(const locale&); extern template const num_get<wchar_t>& use_facet<num_get<wchar_t> >(const locale&); extern template bool has_facet<ctype<wchar_t> >(const locale&); extern template bool has_facet<numpunct<wchar_t> >(const locale&); extern template bool has_facet<num_put<wchar_t> >(const locale&); extern template bool has_facet<num_get<wchar_t> >(const locale&); } # 2656 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/locale_facets.h" 2 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Facet> inline const _Facet& __check_facet(const _Facet* __f) { if (!__f) __throw_bad_cast(); return *__f; } # 66 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 template<typename _CharT, typename _Traits> class basic_ios : public ios_base { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef ctype<_CharT> __ctype_type; typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > __num_put_type; typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > __num_get_type; protected: basic_ostream<_CharT, _Traits>* _M_tie; mutable char_type _M_fill; mutable bool _M_fill_init; basic_streambuf<_CharT, _Traits>* _M_streambuf; const __ctype_type* _M_ctype; const __num_put_type* _M_num_put; const __num_get_type* _M_num_get; public: # 117 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 explicit operator bool() const { return !this->fail(); } bool operator!() const { return this->fail(); } # 136 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 iostate rdstate() const { return _M_streambuf_state; } # 147 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 void clear(iostate __state = goodbit); void setstate(iostate __state) { this->clear(this->rdstate() | __state); } void _M_setstate(iostate __state) { _M_streambuf_state |= __state; if (this->exceptions() & __state) ; } bool good() const { return this->rdstate() == 0; } bool eof() const { return (this->rdstate() & eofbit) != 0; } # 200 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 bool fail() const { return (this->rdstate() & (badbit | failbit)) != 0; } bool bad() const { return (this->rdstate() & badbit) != 0; } # 221 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 iostate exceptions() const { return _M_exception; } # 256 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 void exceptions(iostate __except) { _M_exception = __except; this->clear(_M_streambuf_state); } explicit basic_ios(basic_streambuf<_CharT, _Traits>* __sb) : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) { this->init(__sb); } virtual ~basic_ios() { } # 294 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 basic_ostream<_CharT, _Traits>* tie() const { return _M_tie; } # 306 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 basic_ostream<_CharT, _Traits>* tie(basic_ostream<_CharT, _Traits>* __tiestr) { basic_ostream<_CharT, _Traits>* __old = _M_tie; _M_tie = __tiestr; return __old; } basic_streambuf<_CharT, _Traits>* rdbuf() const { return _M_streambuf; } # 346 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 basic_streambuf<_CharT, _Traits>* rdbuf(basic_streambuf<_CharT, _Traits>* __sb); # 360 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 basic_ios& copyfmt(const basic_ios& __rhs); char_type fill() const { if (!_M_fill_init) { _M_fill = this->widen(' '); _M_fill_init = true; } return _M_fill; } # 389 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 char_type fill(char_type __ch) { char_type __old = this->fill(); _M_fill = __ch; return __old; } # 409 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 locale imbue(const locale& __loc); # 429 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 char narrow(char_type __c, char __dfault) const { return __check_facet(_M_ctype).narrow(__c, __dfault); } # 448 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 3 char_type widen(char __c) const { return __check_facet(_M_ctype).widen(__c); } protected: basic_ios() : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) { } void init(basic_streambuf<_CharT, _Traits>* __sb); basic_ios(const basic_ios&) = delete; basic_ios& operator=(const basic_ios&) = delete; void move(basic_ios& __rhs) { ios_base::_M_move(__rhs); _M_cache_locale(_M_ios_locale); this->tie(__rhs.tie(nullptr)); _M_fill = __rhs._M_fill; _M_fill_init = __rhs._M_fill_init; _M_streambuf = nullptr; } void move(basic_ios&& __rhs) { this->move(__rhs); } void swap(basic_ios& __rhs) noexcept { ios_base::_M_swap(__rhs); _M_cache_locale(_M_ios_locale); __rhs._M_cache_locale(__rhs._M_ios_locale); std::swap(_M_tie, __rhs._M_tie); std::swap(_M_fill, __rhs._M_fill); std::swap(_M_fill_init, __rhs._M_fill_init); } void set_rdbuf(basic_streambuf<_CharT, _Traits>* __sb) { _M_streambuf = __sb; } void _M_cache_locale(const locale& __loc); }; } # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.tcc" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, typename _Traits> void basic_ios<_CharT, _Traits>::clear(iostate __state) { if (this->rdbuf()) _M_streambuf_state = __state; else _M_streambuf_state = __state | badbit; if (this->exceptions() & this->rdstate()) __throw_ios_failure(("basic_ios::clear")); } template<typename _CharT, typename _Traits> basic_streambuf<_CharT, _Traits>* basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) { basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; _M_streambuf = __sb; this->clear(); return __old; } template<typename _CharT, typename _Traits> basic_ios<_CharT, _Traits>& basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) { if (this != &__rhs) { _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? _M_local_word : new _Words[__rhs._M_word_size]; _Callback_list* __cb = __rhs._M_callbacks; if (__cb) __cb->_M_add_reference(); _M_call_callbacks(erase_event); if (_M_word != _M_local_word) { delete [] _M_word; _M_word = 0; } _M_dispose_callbacks(); _M_callbacks = __cb; for (int __i = 0; __i < __rhs._M_word_size; ++__i) __words[__i] = __rhs._M_word[__i]; _M_word = __words; _M_word_size = __rhs._M_word_size; this->flags(__rhs.flags()); this->width(__rhs.width()); this->precision(__rhs.precision()); this->tie(__rhs.tie()); this->fill(__rhs.fill()); _M_ios_locale = __rhs.getloc(); _M_cache_locale(_M_ios_locale); _M_call_callbacks(copyfmt_event); this->exceptions(__rhs.exceptions()); } return *this; } template<typename _CharT, typename _Traits> locale basic_ios<_CharT, _Traits>::imbue(const locale& __loc) { locale __old(this->getloc()); ios_base::imbue(__loc); _M_cache_locale(__loc); if (this->rdbuf() != 0) this->rdbuf()->pubimbue(__loc); return __old; } template<typename _CharT, typename _Traits> void basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) { ios_base::_M_init(); _M_cache_locale(_M_ios_locale); # 146 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.tcc" 3 _M_fill = _CharT(); _M_fill_init = false; _M_tie = 0; _M_exception = goodbit; _M_streambuf = __sb; _M_streambuf_state = __sb ? goodbit : badbit; } template<typename _CharT, typename _Traits> void basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) { if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) _M_ctype = std::__addressof(use_facet<__ctype_type>(__loc)); else _M_ctype = 0; if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) _M_num_put = std::__addressof(use_facet<__num_put_type>(__loc)); else _M_num_put = 0; if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) _M_num_get = std::__addressof(use_facet<__num_get_type>(__loc)); else _M_num_get = 0; } extern template class basic_ios<char>; extern template class basic_ios<wchar_t>; } # 517 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_ios.h" 2 3 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ios" 2 3 # 39 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 57 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 template<typename _CharT, typename _Traits> class basic_ostream : virtual public basic_ios<_CharT, _Traits> { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_ios<_CharT, _Traits> __ios_type; typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > __num_put_type; typedef ctype<_CharT> __ctype_type; # 83 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 explicit basic_ostream(__streambuf_type* __sb) { this->init(__sb); } virtual ~basic_ostream() { } class sentry; friend class sentry; # 107 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 __ostream_type& operator<<(__ostream_type& (*__pf)(__ostream_type&)) { return __pf(*this); } __ostream_type& operator<<(__ios_type& (*__pf)(__ios_type&)) { __pf(*this); return *this; } __ostream_type& operator<<(ios_base& (*__pf) (ios_base&)) { __pf(*this); return *this; } # 165 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 __ostream_type& operator<<(long __n) { return _M_insert(__n); } __ostream_type& operator<<(unsigned long __n) { return _M_insert(__n); } __ostream_type& operator<<(bool __n) { return _M_insert(__n); } __ostream_type& operator<<(short __n); __ostream_type& operator<<(unsigned short __n) { return _M_insert(static_cast<unsigned long>(__n)); } __ostream_type& operator<<(int __n); __ostream_type& operator<<(unsigned int __n) { return _M_insert(static_cast<unsigned long>(__n)); } __ostream_type& operator<<(long long __n) { return _M_insert(__n); } __ostream_type& operator<<(unsigned long long __n) { return _M_insert(__n); } # 219 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 __ostream_type& operator<<(double __f) { return _M_insert(__f); } __ostream_type& operator<<(float __f) { return _M_insert(static_cast<double>(__f)); } __ostream_type& operator<<(long double __f) { return _M_insert(__f); } # 244 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 __ostream_type& operator<<(const void* __p) { return _M_insert(__p); } # 269 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 __ostream_type& operator<<(__streambuf_type* __sb); # 302 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 __ostream_type& put(char_type __c); void _M_write(const char_type* __s, streamsize __n) { const streamsize __put = this->rdbuf()->sputn(__s, __n); if (__put != __n) this->setstate(ios_base::badbit); } # 334 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 __ostream_type& write(const char_type* __s, streamsize __n); # 347 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 __ostream_type& flush(); # 357 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 pos_type tellp(); # 368 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 __ostream_type& seekp(pos_type); # 380 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 __ostream_type& seekp(off_type, ios_base::seekdir); protected: basic_ostream() { this->init(0); } basic_ostream(basic_iostream<_CharT, _Traits>&) { } basic_ostream(const basic_ostream&) = delete; basic_ostream(basic_ostream&& __rhs) : __ios_type() { __ios_type::move(__rhs); } basic_ostream& operator=(const basic_ostream&) = delete; basic_ostream& operator=(basic_ostream&& __rhs) { swap(__rhs); return *this; } void swap(basic_ostream& __rhs) { __ios_type::swap(__rhs); } template<typename _ValueT> __ostream_type& _M_insert(_ValueT __v); }; # 425 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 template <typename _CharT, typename _Traits> class basic_ostream<_CharT, _Traits>::sentry { bool _M_ok; basic_ostream<_CharT, _Traits>& _M_os; public: # 444 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 explicit sentry(basic_ostream<_CharT, _Traits>& __os); # 454 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 ~sentry() { if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception()) { if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) _M_os.setstate(ios_base::badbit); } } # 473 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 explicit operator bool() const { return _M_ok; } }; # 495 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 template<typename _CharT, typename _Traits> inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) { return __ostream_insert(__out, &__c, 1); } template<typename _CharT, typename _Traits> inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) { return (__out << __out.widen(__c)); } template <class _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, char __c) { return __ostream_insert(__out, &__c, 1); } template<class _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, signed char __c) { return (__out << static_cast<char>(__c)); } template<class _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) { return (__out << static_cast<char>(__c)); } # 537 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 template<typename _CharT, typename _Traits> inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) { if (!__s) __out.setstate(ios_base::badbit); else __ostream_insert(__out, __s, static_cast<streamsize>(_Traits::length(__s))); return __out; } template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits> & operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); template<class _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, const char* __s) { if (!__s) __out.setstate(ios_base::badbit); else __ostream_insert(__out, __s, static_cast<streamsize>(_Traits::length(__s))); return __out; } template<class _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) { return (__out << reinterpret_cast<const char*>(__s)); } template<class _Traits> inline basic_ostream<char, _Traits> & operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) { return (__out << reinterpret_cast<const char*>(__s)); } # 588 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 template<typename _CharT, typename _Traits> inline basic_ostream<_CharT, _Traits>& endl(basic_ostream<_CharT, _Traits>& __os) { return flush(__os.put(__os.widen('\n'))); } # 600 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 template<typename _CharT, typename _Traits> inline basic_ostream<_CharT, _Traits>& ends(basic_ostream<_CharT, _Traits>& __os) { return __os.put(_CharT()); } template<typename _CharT, typename _Traits> inline basic_ostream<_CharT, _Traits>& flush(basic_ostream<_CharT, _Traits>& __os) { return __os.flush(); } template<typename _Ch, typename _Up> basic_ostream<_Ch, _Up>& __is_convertible_to_basic_ostream_test(basic_ostream<_Ch, _Up>*); template<typename _Tp, typename = void> struct __is_convertible_to_basic_ostream_impl { using __ostream_type = void; }; template<typename _Tp> using __do_is_convertible_to_basic_ostream_impl = decltype(__is_convertible_to_basic_ostream_test (declval<typename remove_reference<_Tp>::type*>())); template<typename _Tp> struct __is_convertible_to_basic_ostream_impl <_Tp, __void_t<__do_is_convertible_to_basic_ostream_impl<_Tp>>> { using __ostream_type = __do_is_convertible_to_basic_ostream_impl<_Tp>; }; template<typename _Tp> struct __is_convertible_to_basic_ostream : __is_convertible_to_basic_ostream_impl<_Tp> { public: using type = __not_<is_void< typename __is_convertible_to_basic_ostream_impl<_Tp>::__ostream_type>>; constexpr static bool value = type::value; }; template<typename _Ostream, typename _Tp, typename = void> struct __is_insertable : false_type {}; template<typename _Ostream, typename _Tp> struct __is_insertable<_Ostream, _Tp, __void_t<decltype(declval<_Ostream&>() << declval<const _Tp&>())>> : true_type {}; template<typename _Ostream> using __rvalue_ostream_type = typename __is_convertible_to_basic_ostream< _Ostream>::__ostream_type; # 674 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 3 template<typename _Ostream, typename _Tp> inline typename enable_if<__and_<__not_<is_lvalue_reference<_Ostream>>, __is_convertible_to_basic_ostream<_Ostream>, __is_insertable< __rvalue_ostream_type<_Ostream>, const _Tp&>>::value, __rvalue_ostream_type<_Ostream>>::type operator<<(_Ostream&& __os, const _Tp& __x) { __rvalue_ostream_type<_Ostream> __ret_os = __os; __ret_os << __x; return __ret_os; } } # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ostream.tcc" 1 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ostream.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>::sentry:: sentry(basic_ostream<_CharT, _Traits>& __os) : _M_ok(false), _M_os(__os) { if (__os.tie() && __os.good()) __os.tie()->flush(); if (__os.good()) _M_ok = true; else __os.setstate(ios_base::failbit); } template<typename _CharT, typename _Traits> template<typename _ValueT> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: _M_insert(_ValueT __v) { sentry __cerb(*this); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const __num_put_type& __np = __check_facet(this->_M_num_put); if (__np.put(*this, *this, this->fill(), __v).failed()) __err |= ios_base::badbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: operator<<(short __n) { const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; if (__fmt == ios_base::oct || __fmt == ios_base::hex) return _M_insert(static_cast<long>(static_cast<unsigned short>(__n))); else return _M_insert(static_cast<long>(__n)); } template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: operator<<(int __n) { const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; if (__fmt == ios_base::oct || __fmt == ios_base::hex) return _M_insert(static_cast<long>(static_cast<unsigned int>(__n))); else return _M_insert(static_cast<long>(__n)); } template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: operator<<(__streambuf_type* __sbin) { ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this); if (__cerb && __sbin) { if (true) { if (!__copy_streambufs(__sbin, this->rdbuf())) __err |= ios_base::failbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::failbit); } } else if (!__sbin) __err |= ios_base::badbit; if (__err) this->setstate(__err); return *this; } template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: put(char_type __c) { sentry __cerb(*this); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const int_type __put = this->rdbuf()->sputc(__c); if (traits_type::eq_int_type(__put, traits_type::eof())) __err |= ios_base::badbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: write(const _CharT* __s, streamsize __n) { sentry __cerb(*this); if (__cerb) { if (true) { _M_write(__s, __n); } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } } return *this; } template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: flush() { ios_base::iostate __err = ios_base::goodbit; if (true) { if (this->rdbuf() && this->rdbuf()->pubsync() == -1) __err |= ios_base::badbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); return *this; } template<typename _CharT, typename _Traits> typename basic_ostream<_CharT, _Traits>::pos_type basic_ostream<_CharT, _Traits>:: tellp() { pos_type __ret = pos_type(-1); if (true) { if (!this->fail()) __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } return __ret; } template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: seekp(pos_type __pos) { ios_base::iostate __err = ios_base::goodbit; if (true) { if (!this->fail()) { const pos_type __p = this->rdbuf()->pubseekpos(__pos, ios_base::out); if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); return *this; } template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: seekp(off_type __off, ios_base::seekdir __dir) { ios_base::iostate __err = ios_base::goodbit; if (true) { if (!this->fail()) { const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, ios_base::out); if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); return *this; } template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) { if (!__s) __out.setstate(ios_base::badbit); else { const size_t __clen = char_traits<char>::length(__s); if (true) { struct __ptr_guard { _CharT *__p; __ptr_guard (_CharT *__ip): __p(__ip) { } ~__ptr_guard() { delete[] __p; } _CharT* __get() { return __p; } } __pg (new _CharT[__clen]); _CharT *__ws = __pg.__get(); for (size_t __i = 0; __i < __clen; ++__i) __ws[__i] = __out.widen(__s[__i]); __ostream_insert(__out, __ws, __clen); } if (false) { __out._M_setstate(ios_base::badbit); ; } if (false) { __out._M_setstate(ios_base::badbit); } } return __out; } extern template class basic_ostream<char>; extern template ostream& endl(ostream&); extern template ostream& ends(ostream&); extern template ostream& flush(ostream&); extern template ostream& operator<<(ostream&, char); extern template ostream& operator<<(ostream&, unsigned char); extern template ostream& operator<<(ostream&, signed char); extern template ostream& operator<<(ostream&, const char*); extern template ostream& operator<<(ostream&, const unsigned char*); extern template ostream& operator<<(ostream&, const signed char*); extern template ostream& ostream::_M_insert(long); extern template ostream& ostream::_M_insert(unsigned long); extern template ostream& ostream::_M_insert(bool); extern template ostream& ostream::_M_insert(long long); extern template ostream& ostream::_M_insert(unsigned long long); extern template ostream& ostream::_M_insert(double); extern template ostream& ostream::_M_insert(long double); extern template ostream& ostream::_M_insert(const void*); extern template class basic_ostream<wchar_t>; extern template wostream& endl(wostream&); extern template wostream& ends(wostream&); extern template wostream& flush(wostream&); extern template wostream& operator<<(wostream&, wchar_t); extern template wostream& operator<<(wostream&, char); extern template wostream& operator<<(wostream&, const wchar_t*); extern template wostream& operator<<(wostream&, const char*); extern template wostream& wostream::_M_insert(long); extern template wostream& wostream::_M_insert(unsigned long); extern template wostream& wostream::_M_insert(bool); extern template wostream& wostream::_M_insert(long long); extern template wostream& wostream::_M_insert(unsigned long long); extern template wostream& wostream::_M_insert(double); extern template wostream& wostream::_M_insert(long double); extern template wostream& wostream::_M_insert(const void*); } # 694 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream" 2 3 # 65 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/iterator" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 1 3 # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 57 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 template<typename _CharT, typename _Traits> class basic_istream : virtual public basic_ios<_CharT, _Traits> { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_ios<_CharT, _Traits> __ios_type; typedef basic_istream<_CharT, _Traits> __istream_type; typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > __num_get_type; typedef ctype<_CharT> __ctype_type; protected: streamsize _M_gcount; public: explicit basic_istream(__streambuf_type* __sb) : _M_gcount(streamsize(0)) { this->init(__sb); } virtual ~basic_istream() { _M_gcount = streamsize(0); } class sentry; friend class sentry; # 119 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& operator>>(__istream_type& (*__pf)(__istream_type&)) { return __pf(*this); } __istream_type& operator>>(__ios_type& (*__pf)(__ios_type&)) { __pf(*this); return *this; } __istream_type& operator>>(ios_base& (*__pf)(ios_base&)) { __pf(*this); return *this; } # 167 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& operator>>(bool& __n) { return _M_extract(__n); } __istream_type& operator>>(short& __n); __istream_type& operator>>(unsigned short& __n) { return _M_extract(__n); } __istream_type& operator>>(int& __n); __istream_type& operator>>(unsigned int& __n) { return _M_extract(__n); } __istream_type& operator>>(long& __n) { return _M_extract(__n); } __istream_type& operator>>(unsigned long& __n) { return _M_extract(__n); } __istream_type& operator>>(long long& __n) { return _M_extract(__n); } __istream_type& operator>>(unsigned long long& __n) { return _M_extract(__n); } # 213 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& operator>>(float& __f) { return _M_extract(__f); } __istream_type& operator>>(double& __f) { return _M_extract(__f); } __istream_type& operator>>(long double& __f) { return _M_extract(__f); } # 234 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& operator>>(void*& __p) { return _M_extract(__p); } # 258 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& operator>>(__streambuf_type* __sb); # 268 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 streamsize gcount() const { return _M_gcount; } # 301 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 int_type get(); # 315 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& get(char_type& __c); # 342 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& get(char_type* __s, streamsize __n, char_type __delim); # 353 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& get(char_type* __s, streamsize __n) { return this->get(__s, __n, this->widen('\n')); } # 376 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& get(__streambuf_type& __sb, char_type __delim); # 386 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& get(__streambuf_type& __sb) { return this->get(__sb, this->widen('\n')); } # 415 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& getline(char_type* __s, streamsize __n, char_type __delim); # 426 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& getline(char_type* __s, streamsize __n) { return this->getline(__s, __n, this->widen('\n')); } # 450 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& ignore(streamsize __n, int_type __delim); __istream_type& ignore(streamsize __n); __istream_type& ignore(); # 467 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 int_type peek(); # 485 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& read(char_type* __s, streamsize __n); # 504 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 streamsize readsome(char_type* __s, streamsize __n); # 521 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& putback(char_type __c); # 537 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& unget(); # 555 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 int sync(); # 570 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 pos_type tellg(); # 585 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& seekg(pos_type); # 601 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 __istream_type& seekg(off_type, ios_base::seekdir); protected: basic_istream() : _M_gcount(streamsize(0)) { this->init(0); } basic_istream(const basic_istream&) = delete; basic_istream(basic_istream&& __rhs) : __ios_type(), _M_gcount(__rhs._M_gcount) { __ios_type::move(__rhs); __rhs._M_gcount = 0; } basic_istream& operator=(const basic_istream&) = delete; basic_istream& operator=(basic_istream&& __rhs) { swap(__rhs); return *this; } void swap(basic_istream& __rhs) { __ios_type::swap(__rhs); std::swap(_M_gcount, __rhs._M_gcount); } template<typename _ValueT> __istream_type& _M_extract(_ValueT& __v); }; template<> basic_istream<char>& basic_istream<char>:: getline(char_type* __s, streamsize __n, char_type __delim); template<> basic_istream<char>& basic_istream<char>:: ignore(streamsize __n); template<> basic_istream<char>& basic_istream<char>:: ignore(streamsize __n, int_type __delim); template<> basic_istream<wchar_t>& basic_istream<wchar_t>:: getline(char_type* __s, streamsize __n, char_type __delim); template<> basic_istream<wchar_t>& basic_istream<wchar_t>:: ignore(streamsize __n); template<> basic_istream<wchar_t>& basic_istream<wchar_t>:: ignore(streamsize __n, int_type __delim); # 685 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 template<typename _CharT, typename _Traits> class basic_istream<_CharT, _Traits>::sentry { bool _M_ok; public: typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::__ctype_type __ctype_type; typedef typename _Traits::int_type __int_type; # 721 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 explicit sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); # 732 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 explicit operator bool() const { return _M_ok; } }; # 750 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); template<class _Traits> inline basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) { return (__in >> reinterpret_cast<char&>(__c)); } template<class _Traits> inline basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __in, signed char& __c) { return (__in >> reinterpret_cast<char&>(__c)); } # 792 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); template<> basic_istream<char>& operator>>(basic_istream<char>& __in, char* __s); template<class _Traits> inline basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) { return (__in >> reinterpret_cast<char*>(__s)); } template<class _Traits> inline basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __in, signed char* __s) { return (__in >> reinterpret_cast<char*>(__s)); } # 823 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 template<typename _CharT, typename _Traits> class basic_iostream : public basic_istream<_CharT, _Traits>, public basic_ostream<_CharT, _Traits> { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_ostream<_CharT, _Traits> __ostream_type; explicit basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) : __istream_type(__sb), __ostream_type(__sb) { } virtual ~basic_iostream() { } protected: basic_iostream() : __istream_type(), __ostream_type() { } basic_iostream(const basic_iostream&) = delete; basic_iostream(basic_iostream&& __rhs) : __istream_type(std::move(__rhs)), __ostream_type(*this) { } basic_iostream& operator=(const basic_iostream&) = delete; basic_iostream& operator=(basic_iostream&& __rhs) { swap(__rhs); return *this; } void swap(basic_iostream& __rhs) { __istream_type::swap(__rhs); } }; # 906 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& ws(basic_istream<_CharT, _Traits>& __is); template<typename _Ch, typename _Up> basic_istream<_Ch, _Up>& __is_convertible_to_basic_istream_test(basic_istream<_Ch, _Up>*); template<typename _Tp, typename = void> struct __is_convertible_to_basic_istream_impl { using __istream_type = void; }; template<typename _Tp> using __do_is_convertible_to_basic_istream_impl = decltype(__is_convertible_to_basic_istream_test (declval<typename remove_reference<_Tp>::type*>())); template<typename _Tp> struct __is_convertible_to_basic_istream_impl <_Tp, __void_t<__do_is_convertible_to_basic_istream_impl<_Tp>>> { using __istream_type = __do_is_convertible_to_basic_istream_impl<_Tp>; }; template<typename _Tp> struct __is_convertible_to_basic_istream : __is_convertible_to_basic_istream_impl<_Tp> { public: using type = __not_<is_void< typename __is_convertible_to_basic_istream_impl<_Tp>::__istream_type>>; constexpr static bool value = type::value; }; template<typename _Istream, typename _Tp, typename = void> struct __is_extractable : false_type {}; template<typename _Istream, typename _Tp> struct __is_extractable<_Istream, _Tp, __void_t<decltype(declval<_Istream&>() >> declval<_Tp>())>> : true_type {}; template<typename _Istream> using __rvalue_istream_type = typename __is_convertible_to_basic_istream< _Istream>::__istream_type; # 972 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 3 template<typename _Istream, typename _Tp> inline typename enable_if<__and_<__not_<is_lvalue_reference<_Istream>>, __is_convertible_to_basic_istream<_Istream>, __is_extractable< __rvalue_istream_type<_Istream>, _Tp&&>>::value, __rvalue_istream_type<_Istream>>::type operator>>(_Istream&& __is, _Tp&& __x) { __rvalue_istream_type<_Istream> __ret_is = __is; __ret_is >> std::forward<_Tp>(__x); return __ret_is; } } # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/istream.tcc" 1 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/istream.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>::sentry:: sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) { ios_base::iostate __err = ios_base::goodbit; if (__in.good()) if (true) { if (__in.tie()) __in.tie()->flush(); if (!__noskip && bool(__in.flags() & ios_base::skipws)) { const __int_type __eof = traits_type::eof(); __streambuf_type* __sb = __in.rdbuf(); __int_type __c = __sb->sgetc(); const __ctype_type& __ct = __check_facet(__in._M_ctype); while (!traits_type::eq_int_type(__c, __eof) && __ct.is(ctype_base::space, traits_type::to_char_type(__c))) __c = __sb->snextc(); if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } } if (false) { __in._M_setstate(ios_base::badbit); ; } if (false) { __in._M_setstate(ios_base::badbit); } if (__in.good() && __err == ios_base::goodbit) _M_ok = true; else { __err |= ios_base::failbit; __in.setstate(__err); } } template<typename _CharT, typename _Traits> template<typename _ValueT> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: _M_extract(_ValueT& __v) { sentry __cerb(*this, false); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const __num_get_type& __ng = __check_facet(this->_M_num_get); __ng.get(*this, 0, *this, __err, __v); } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: operator>>(short& __n) { sentry __cerb(*this, false); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { long __l; const __num_get_type& __ng = __check_facet(this->_M_num_get); __ng.get(*this, 0, *this, __err, __l); if (__l < __gnu_cxx::__numeric_traits<short>::__min) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits<short>::__min; } else if (__l > __gnu_cxx::__numeric_traits<short>::__max) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits<short>::__max; } else __n = short(__l); } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: operator>>(int& __n) { sentry __cerb(*this, false); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { long __l; const __num_get_type& __ng = __check_facet(this->_M_num_get); __ng.get(*this, 0, *this, __err, __l); if (__l < __gnu_cxx::__numeric_traits<int>::__min) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits<int>::__min; } else if (__l > __gnu_cxx::__numeric_traits<int>::__max) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits<int>::__max; } else __n = int(__l); } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: operator>>(__streambuf_type* __sbout) { ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, false); if (__cerb && __sbout) { if (true) { bool __ineof; if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) __err |= ios_base::failbit; if (__ineof) __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::failbit); ; } if (false) { this->_M_setstate(ios_base::failbit); } } else if (!__sbout) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template<typename _CharT, typename _Traits> typename basic_istream<_CharT, _Traits>::int_type basic_istream<_CharT, _Traits>:: get(void) { const int_type __eof = traits_type::eof(); int_type __c = __eof; _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { if (true) { __c = this->rdbuf()->sbumpc(); if (!traits_type::eq_int_type(__c, __eof)) _M_gcount = 1; else __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return __c; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: get(char_type& __c) { _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { if (true) { const int_type __cb = this->rdbuf()->sbumpc(); if (!traits_type::eq_int_type(__cb, traits_type::eof())) { _M_gcount = 1; __c = traits_type::to_char_type(__cb); } else __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: get(char_type* __s, streamsize __n, char_type __delim) { _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { if (true) { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); while (_M_gcount + 1 < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim)) { *__s++ = traits_type::to_char_type(__c); ++_M_gcount; __c = __sb->snextc(); } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } } if (__n > 0) *__s = char_type(); if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: get(__streambuf_type& __sb, char_type __delim) { _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { if (true) { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); __streambuf_type* __this_sb = this->rdbuf(); int_type __c = __this_sb->sgetc(); char_type __c2 = traits_type::to_char_type(__c); while (!traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim) && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) { ++_M_gcount; __c = __this_sb->snextc(); __c2 = traits_type::to_char_type(__c); } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: getline(char_type* __s, streamsize __n, char_type __delim) { _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { if (true) { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); while (_M_gcount + 1 < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim)) { *__s++ = traits_type::to_char_type(__c); __c = __sb->snextc(); ++_M_gcount; } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; else { if (traits_type::eq_int_type(__c, __idelim)) { __sb->sbumpc(); ++_M_gcount; } else __err |= ios_base::failbit; } } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } } if (__n > 0) *__s = char_type(); if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: ignore(void) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) __err |= ios_base::eofbit; else _M_gcount = 1; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: ignore(streamsize __n) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::goodbit; if (true) { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); # 521 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/istream.tcc" 3 bool __large_ignore = false; while (true) { while (_M_gcount < __n && !traits_type::eq_int_type(__c, __eof)) { ++_M_gcount; __c = __sb->snextc(); } if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max && !traits_type::eq_int_type(__c, __eof)) { _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__min; __large_ignore = true; } else break; } if (__large_ignore) _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max; if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: ignore(streamsize __n, int_type __delim) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::goodbit; if (true) { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); bool __large_ignore = false; while (true) { while (_M_gcount < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __delim)) { ++_M_gcount; __c = __sb->snextc(); } if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __delim)) { _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__min; __large_ignore = true; } else break; } if (__large_ignore) _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max; if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; else if (traits_type::eq_int_type(__c, __delim)) { if (_M_gcount < __gnu_cxx::__numeric_traits<streamsize>::__max) ++_M_gcount; __sb->sbumpc(); } } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template<typename _CharT, typename _Traits> typename basic_istream<_CharT, _Traits>::int_type basic_istream<_CharT, _Traits>:: peek(void) { int_type __c = traits_type::eof(); _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { __c = this->rdbuf()->sgetc(); if (traits_type::eq_int_type(__c, traits_type::eof())) __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return __c; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: read(char_type* __s, streamsize __n) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { _M_gcount = this->rdbuf()->sgetn(__s, __n); if (_M_gcount != __n) __err |= (ios_base::eofbit | ios_base::failbit); } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template<typename _CharT, typename _Traits> streamsize basic_istream<_CharT, _Traits>:: readsome(char_type* __s, streamsize __n) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const streamsize __num = this->rdbuf()->in_avail(); if (__num > 0) _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); else if (__num == -1) __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return _M_gcount; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: putback(char_type __c) { _M_gcount = 0; this->clear(this->rdstate() & ~ios_base::eofbit); sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); if (!__sb || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) __err |= ios_base::badbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: unget(void) { _M_gcount = 0; this->clear(this->rdstate() & ~ios_base::eofbit); sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); if (!__sb || traits_type::eq_int_type(__sb->sungetc(), __eof)) __err |= ios_base::badbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template<typename _CharT, typename _Traits> int basic_istream<_CharT, _Traits>:: sync(void) { int __ret = -1; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { __streambuf_type* __sb = this->rdbuf(); if (__sb) { if (__sb->pubsync() == -1) __err |= ios_base::badbit; else __ret = 0; } } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return __ret; } template<typename _CharT, typename _Traits> typename basic_istream<_CharT, _Traits>::pos_type basic_istream<_CharT, _Traits>:: tellg(void) { pos_type __ret = pos_type(-1); sentry __cerb(*this, true); if (__cerb) { if (true) { if (!this->fail()) __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in); } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } } return __ret; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: seekg(pos_type __pos) { this->clear(this->rdstate() & ~ios_base::eofbit); sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { if (!this->fail()) { const pos_type __p = this->rdbuf()->pubseekpos(__pos, ios_base::in); if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: seekg(off_type __off, ios_base::seekdir __dir) { this->clear(this->rdstate() & ~ios_base::eofbit); sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { if (!this->fail()) { const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, ios_base::in); if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::int_type __int_type; typename __istream_type::sentry __cerb(__in, false); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const __int_type __cb = __in.rdbuf()->sbumpc(); if (!_Traits::eq_int_type(__cb, _Traits::eof())) __c = _Traits::to_char_type(__cb); else __err |= (ios_base::eofbit | ios_base::failbit); } if (false) { __in._M_setstate(ios_base::badbit); ; } if (false) { __in._M_setstate(ios_base::badbit); } if (__err) __in.setstate(__err); } return __in; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef typename _Traits::int_type int_type; typedef _CharT char_type; typedef ctype<_CharT> __ctype_type; streamsize __extracted = 0; ios_base::iostate __err = ios_base::goodbit; typename __istream_type::sentry __cerb(__in, false); if (__cerb) { if (true) { streamsize __num = __in.width(); if (__num <= 0) __num = __gnu_cxx::__numeric_traits<streamsize>::__max; const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); const int_type __eof = _Traits::eof(); __streambuf_type* __sb = __in.rdbuf(); int_type __c = __sb->sgetc(); while (__extracted < __num - 1 && !_Traits::eq_int_type(__c, __eof) && !__ct.is(ctype_base::space, _Traits::to_char_type(__c))) { *__s++ = _Traits::to_char_type(__c); ++__extracted; __c = __sb->snextc(); } if (_Traits::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; *__s = char_type(); __in.width(0); } if (false) { __in._M_setstate(ios_base::badbit); ; } if (false) { __in._M_setstate(ios_base::badbit); } } if (!__extracted) __err |= ios_base::failbit; if (__err) __in.setstate(__err); return __in; } template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& ws(basic_istream<_CharT, _Traits>& __in) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef typename __istream_type::int_type __int_type; typedef ctype<_CharT> __ctype_type; const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); const __int_type __eof = _Traits::eof(); __streambuf_type* __sb = __in.rdbuf(); __int_type __c = __sb->sgetc(); while (!_Traits::eq_int_type(__c, __eof) && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) __c = __sb->snextc(); if (_Traits::eq_int_type(__c, __eof)) __in.setstate(ios_base::eofbit); return __in; } extern template class basic_istream<char>; extern template istream& ws(istream&); extern template istream& operator>>(istream&, char&); extern template istream& operator>>(istream&, char*); extern template istream& operator>>(istream&, unsigned char&); extern template istream& operator>>(istream&, signed char&); extern template istream& operator>>(istream&, unsigned char*); extern template istream& operator>>(istream&, signed char*); extern template istream& istream::_M_extract(unsigned short&); extern template istream& istream::_M_extract(unsigned int&); extern template istream& istream::_M_extract(long&); extern template istream& istream::_M_extract(unsigned long&); extern template istream& istream::_M_extract(bool&); extern template istream& istream::_M_extract(long long&); extern template istream& istream::_M_extract(unsigned long long&); extern template istream& istream::_M_extract(float&); extern template istream& istream::_M_extract(double&); extern template istream& istream::_M_extract(long double&); extern template istream& istream::_M_extract(void*&); extern template class basic_iostream<char>; extern template class basic_istream<wchar_t>; extern template wistream& ws(wistream&); extern template wistream& operator>>(wistream&, wchar_t&); extern template wistream& operator>>(wistream&, wchar_t*); extern template wistream& wistream::_M_extract(unsigned short&); extern template wistream& wistream::_M_extract(unsigned int&); extern template wistream& wistream::_M_extract(long&); extern template wistream& wistream::_M_extract(unsigned long&); extern template wistream& wistream::_M_extract(bool&); extern template wistream& wistream::_M_extract(long long&); extern template wistream& wistream::_M_extract(unsigned long long&); extern template wistream& wistream::_M_extract(float&); extern template wistream& wistream::_M_extract(double&); extern template wistream& wistream::_M_extract(long double&); extern template wistream& wistream::_M_extract(void*&); extern template class basic_iostream<wchar_t>; } # 992 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream" 2 3 # 66 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/iterator" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stream_iterator.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stream_iterator.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 47 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stream_iterator.h" 3 template<typename _Tp, typename _CharT = char, typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t> class istream_iterator : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef basic_istream<_CharT, _Traits> istream_type; private: istream_type* _M_stream; _Tp _M_value; bool _M_ok; public: constexpr istream_iterator() : _M_stream(0), _M_value(), _M_ok(false) {} istream_iterator(istream_type& __s) : _M_stream(std::__addressof(__s)) { _M_read(); } istream_iterator(const istream_iterator& __obj) : _M_stream(__obj._M_stream), _M_value(__obj._M_value), _M_ok(__obj._M_ok) { } const _Tp& operator*() const { ; return _M_value; } const _Tp* operator->() const { return std::__addressof((operator*())); } istream_iterator& operator++() { ; _M_read(); return *this; } istream_iterator operator++(int) { ; istream_iterator __tmp = *this; _M_read(); return __tmp; } bool _M_equal(const istream_iterator& __x) const { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } private: void _M_read() { _M_ok = (_M_stream && *_M_stream) ? true : false; if (_M_ok) { *_M_stream >> _M_value; _M_ok = *_M_stream ? true : false; } } }; template<typename _Tp, typename _CharT, typename _Traits, typename _Dist> inline bool operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) { return __x._M_equal(__y); } template <class _Tp, class _CharT, class _Traits, class _Dist> inline bool operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) { return !__x._M_equal(__y); } # 152 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stream_iterator.h" 3 template<typename _Tp, typename _CharT = char, typename _Traits = char_traits<_CharT> > class ostream_iterator : public iterator<output_iterator_tag, void, void, void, void> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef basic_ostream<_CharT, _Traits> ostream_type; private: ostream_type* _M_stream; const _CharT* _M_string; public: ostream_iterator(ostream_type& __s) : _M_stream(std::__addressof(__s)), _M_string(0) {} # 184 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stream_iterator.h" 3 ostream_iterator(ostream_type& __s, const _CharT* __c) : _M_stream(&__s), _M_string(__c) { } ostream_iterator(const ostream_iterator& __obj) : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } ostream_iterator& operator=(const _Tp& __value) { ; *_M_stream << __value; if (_M_string) *_M_stream << _M_string; return *this; } ostream_iterator& operator*() { return *this; } ostream_iterator& operator++() { return *this; } ostream_iterator& operator++(int) { return *this; } }; } # 67 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/iterator" 2 3 # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/iterator_range.h" 2 namespace llvm { template <typename IteratorT> class iterator_range { IteratorT begin_iterator, end_iterator; public: template <typename Container> iterator_range(Container &&c) : begin_iterator(c.begin()), end_iterator(c.end()) {} iterator_range(IteratorT begin_iterator, IteratorT end_iterator) : begin_iterator(std::move(begin_iterator)), end_iterator(std::move(end_iterator)) {} IteratorT begin() const { return begin_iterator; } IteratorT end() const { return end_iterator; } bool empty() const { return begin_iterator == end_iterator; } }; template <class T> iterator_range<T> make_range(T x, T y) { return iterator_range<T>(std::move(x), std::move(y)); } template <typename T> iterator_range<T> make_range(std::pair<T, T> p) { return iterator_range<T>(std::move(p.first), std::move(p.second)); } } # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallVector.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/AlignOf.h" 1 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/AlignOf.h" namespace llvm { namespace detail { template <typename T, typename... Ts> class AlignerImpl { T t; AlignerImpl<Ts...> rest; AlignerImpl() = delete; }; template <typename T> class AlignerImpl<T> { T t; AlignerImpl() = delete; }; template <typename T, typename... Ts> union SizerImpl { char arr[sizeof(T)]; SizerImpl<Ts...> rest; }; template <typename T> union SizerImpl<T> { char arr[sizeof(T)]; }; } template <typename T, typename... Ts> struct AlignedCharArrayUnion { alignas(::llvm::detail::AlignerImpl<T, Ts...>) char buffer[sizeof( llvm::detail::SizerImpl<T, Ts...>)]; }; } # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallVector.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/climits" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/climits" 3 # 1 "/usr/local/bin/../lib/clang/3.9.1/include/limits.h" 1 3 # 37 "/usr/local/bin/../lib/clang/3.9.1/include/limits.h" 3 # 1 "/usr/include/limits.h" 1 3 4 # 26 "/usr/include/limits.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 # 27 "/usr/include/limits.h" 2 3 4 # 183 "/usr/include/limits.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4 # 161 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 1 3 4 # 38 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 3 4 # 1 "/usr/include/linux/limits.h" 1 3 4 # 39 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 2 3 4 # 162 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4 # 184 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/posix2_lim.h" 1 3 4 # 188 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 1 3 4 # 64 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/uio_lim.h" 1 3 4 # 65 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 2 3 4 # 192 "/usr/include/limits.h" 2 3 4 # 38 "/usr/local/bin/../lib/clang/3.9.1/include/limits.h" 2 3 # 43 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/climits" 2 3 # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cmath" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cmath" 3 # 1 "/usr/include/math.h" 1 3 4 # 27 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 # 28 "/usr/include/math.h" 2 3 4 extern "C" { # 1 "/usr/include/x86_64-linux-gnu/bits/math-vector.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/bits/math-vector.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/math-vector.h" 2 3 4 # 41 "/usr/include/math.h" 2 3 4 # 138 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/flt-eval-method.h" 1 3 4 # 139 "/usr/include/math.h" 2 3 4 # 149 "/usr/include/math.h" 3 4 typedef float float_t; typedef double double_t; # 190 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/fp-logb.h" 1 3 4 # 191 "/usr/include/math.h" 2 3 4 # 233 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/fp-fast.h" 1 3 4 # 234 "/usr/include/math.h" 2 3 4 enum { FP_INT_UPWARD = 0, FP_INT_DOWNWARD = 1, FP_INT_TOWARDZERO = 2, FP_INT_TONEARESTFROMZERO = 3, FP_INT_TONEAREST = 4, }; # 289 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h" 1 3 4 # 21 "/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h" 3 4 extern int __fpclassify (double __value) throw () __attribute__ ((__const__)); extern int __signbit (double __value) throw () __attribute__ ((__const__)); extern int __isinf (double __value) throw () __attribute__ ((__const__)); extern int __finite (double __value) throw () __attribute__ ((__const__)); extern int __isnan (double __value) throw () __attribute__ ((__const__)); extern int __iseqsig (double __x, double __y) throw (); extern int __issignaling (double __value) throw () __attribute__ ((__const__)); # 290 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern double acos (double __x) throw (); extern double __acos (double __x) throw (); extern double asin (double __x) throw (); extern double __asin (double __x) throw (); extern double atan (double __x) throw (); extern double __atan (double __x) throw (); extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); extern double cos (double __x) throw (); extern double __cos (double __x) throw (); extern double sin (double __x) throw (); extern double __sin (double __x) throw (); extern double tan (double __x) throw (); extern double __tan (double __x) throw (); extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw (); extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); extern double exp (double __x) throw (); extern double __exp (double __x) throw (); extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); extern double log (double __x) throw (); extern double __log (double __x) throw (); extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw () __attribute__ ((__nonnull__ (2))); extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); extern double logb (double __x) throw (); extern double __logb (double __x) throw (); extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); # 182 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern int finite (double __value) throw () __attribute__ ((__const__)); extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); extern double significand (double __x) throw (); extern double __significand (double __x) throw (); extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double nan (const char *__tagb) throw (); extern double __nan (const char *__tagb) throw (); # 217 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern double j0 (double) throw (); extern double __j0 (double) throw (); extern double j1 (double) throw (); extern double __j1 (double) throw (); extern double jn (int, double) throw (); extern double __jn (int, double) throw (); extern double y0 (double) throw (); extern double __y0 (double) throw (); extern double y1 (double) throw (); extern double __y1 (double) throw (); extern double yn (int, double) throw (); extern double __yn (int, double) throw (); extern double erf (double) throw (); extern double __erf (double) throw (); extern double erfc (double) throw (); extern double __erfc (double) throw (); extern double lgamma (double) throw (); extern double __lgamma (double) throw (); extern double tgamma (double) throw (); extern double __tgamma (double) throw (); extern double gamma (double) throw (); extern double __gamma (double) throw (); extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); extern double rint (double __x) throw (); extern double __rint (double __x) throw (); extern double nextafter (double __x, double __y) throw (); extern double __nextafter (double __x, double __y) throw (); extern double nexttoward (double __x, long double __y) throw (); extern double __nexttoward (double __x, long double __y) throw (); extern double nextdown (double __x) throw (); extern double __nextdown (double __x) throw (); extern double nextup (double __x) throw (); extern double __nextup (double __x) throw (); extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); extern long int llogb (double __x) throw (); extern long int __llogb (double __x) throw (); extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); __extension__ extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); __extension__ extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); extern double fmax (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmax (double __x, double __y) throw () __attribute__ ((__const__)); extern double fmin (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmin (double __x, double __y) throw () __attribute__ ((__const__)); extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); extern double roundeven (double __x) throw () __attribute__ ((__const__)); extern double __roundeven (double __x) throw () __attribute__ ((__const__)); extern __intmax_t fromfp (double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfp (double __x, int __round, unsigned int __width) throw (); extern __uintmax_t ufromfp (double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfp (double __x, int __round, unsigned int __width) throw (); extern __intmax_t fromfpx (double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpx (double __x, int __round, unsigned int __width) throw (); extern __uintmax_t ufromfpx (double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpx (double __x, int __round, unsigned int __width) throw (); extern double fmaxmag (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmaxmag (double __x, double __y) throw () __attribute__ ((__const__)); extern double fminmag (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fminmag (double __x, double __y) throw () __attribute__ ((__const__)); extern int totalorder (double __x, double __y) throw () __attribute__ ((__const__)); extern int totalordermag (double __x, double __y) throw () __attribute__ ((__const__)); extern int canonicalize (double *__cx, const double *__x) throw (); extern double getpayload (const double *__x) throw (); extern double __getpayload (const double *__x) throw (); extern int setpayload (double *__x, double __payload) throw (); extern int setpayloadsig (double *__x, double __payload) throw (); extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); # 291 "/usr/include/math.h" 2 3 4 # 306 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h" 1 3 4 # 21 "/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h" 3 4 extern int __fpclassifyf (float __value) throw () __attribute__ ((__const__)); extern int __signbitf (float __value) throw () __attribute__ ((__const__)); extern int __isinff (float __value) throw () __attribute__ ((__const__)); extern int __finitef (float __value) throw () __attribute__ ((__const__)); extern int __isnanf (float __value) throw () __attribute__ ((__const__)); extern int __iseqsigf (float __x, float __y) throw (); extern int __issignalingf (float __value) throw () __attribute__ ((__const__)); # 307 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw (); extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); extern float expf (float __x) throw (); extern float __expf (float __x) throw (); extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); extern float logf (float __x) throw (); extern float __logf (float __x) throw (); extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw () __attribute__ ((__nonnull__ (2))); extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); # 177 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern int isinff (float __value) throw () __attribute__ ((__const__)); extern int finitef (float __value) throw () __attribute__ ((__const__)); extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float nanf (const char *__tagb) throw (); extern float __nanf (const char *__tagb) throw (); # 211 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern int isnanf (float __value) throw () __attribute__ ((__const__)); extern float j0f (float) throw (); extern float __j0f (float) throw (); extern float j1f (float) throw (); extern float __j1f (float) throw (); extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); extern float y0f (float) throw (); extern float __y0f (float) throw (); extern float y1f (float) throw (); extern float __y1f (float) throw (); extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); extern float erff (float) throw (); extern float __erff (float) throw (); extern float erfcf (float) throw (); extern float __erfcf (float) throw (); extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); extern float gammaf (float) throw (); extern float __gammaf (float) throw (); extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); extern float nextafterf (float __x, float __y) throw (); extern float __nextafterf (float __x, float __y) throw (); extern float nexttowardf (float __x, long double __y) throw (); extern float __nexttowardf (float __x, long double __y) throw (); extern float nextdownf (float __x) throw (); extern float __nextdownf (float __x) throw (); extern float nextupf (float __x) throw (); extern float __nextupf (float __x) throw (); extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); extern long int llogbf (float __x) throw (); extern long int __llogbf (float __x) throw (); extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); __extension__ extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); __extension__ extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); extern float fmaxf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) throw () __attribute__ ((__const__)); extern float fminf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fminf (float __x, float __y) throw () __attribute__ ((__const__)); extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); extern float roundevenf (float __x) throw () __attribute__ ((__const__)); extern float __roundevenf (float __x) throw () __attribute__ ((__const__)); extern __intmax_t fromfpf (float __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf (float __x, int __round, unsigned int __width) throw (); extern __uintmax_t ufromfpf (float __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf (float __x, int __round, unsigned int __width) throw (); extern __intmax_t fromfpxf (float __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf (float __x, int __round, unsigned int __width) throw (); extern __uintmax_t ufromfpxf (float __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf (float __x, int __round, unsigned int __width) throw (); extern float fmaxmagf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fmaxmagf (float __x, float __y) throw () __attribute__ ((__const__)); extern float fminmagf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fminmagf (float __x, float __y) throw () __attribute__ ((__const__)); extern int totalorderf (float __x, float __y) throw () __attribute__ ((__const__)); extern int totalordermagf (float __x, float __y) throw () __attribute__ ((__const__)); extern int canonicalizef (float *__cx, const float *__x) throw (); extern float getpayloadf (const float *__x) throw (); extern float __getpayloadf (const float *__x) throw (); extern int setpayloadf (float *__x, float __payload) throw (); extern int setpayloadsigf (float *__x, float __payload) throw (); extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); # 308 "/usr/include/math.h" 2 3 4 # 349 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h" 1 3 4 # 21 "/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h" 3 4 extern int __fpclassifyl (long double __value) throw () __attribute__ ((__const__)); extern int __signbitl (long double __value) throw () __attribute__ ((__const__)); extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); extern int __finitel (long double __value) throw () __attribute__ ((__const__)); extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); extern int __iseqsigl (long double __x, long double __y) throw (); extern int __issignalingl (long double __value) throw () __attribute__ ((__const__)); # 350 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); extern void sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw () __attribute__ ((__nonnull__ (2))); extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); # 177 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern int isinfl (long double __value) throw () __attribute__ ((__const__)); extern int finitel (long double __value) throw () __attribute__ ((__const__)); extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double nanl (const char *__tagb) throw (); extern long double __nanl (const char *__tagb) throw (); # 211 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern int isnanl (long double __value) throw () __attribute__ ((__const__)); extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); extern long double nextafterl (long double __x, long double __y) throw (); extern long double __nextafterl (long double __x, long double __y) throw (); extern long double nexttowardl (long double __x, long double __y) throw (); extern long double __nexttowardl (long double __x, long double __y) throw (); extern long double nextdownl (long double __x) throw (); extern long double __nextdownl (long double __x) throw (); extern long double nextupl (long double __x) throw (); extern long double __nextupl (long double __x) throw (); extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); extern long int llogbl (long double __x) throw (); extern long int __llogbl (long double __x) throw (); extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); __extension__ extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); __extension__ extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); extern long double fmaxl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __fmaxl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double fminl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __fminl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); extern long double roundevenl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundevenl (long double __x) throw () __attribute__ ((__const__)); extern __intmax_t fromfpl (long double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpl (long double __x, int __round, unsigned int __width) throw (); extern __uintmax_t ufromfpl (long double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpl (long double __x, int __round, unsigned int __width) throw (); extern __intmax_t fromfpxl (long double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxl (long double __x, int __round, unsigned int __width) throw (); extern __uintmax_t ufromfpxl (long double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxl (long double __x, int __round, unsigned int __width) throw (); extern long double fmaxmagl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __fmaxmagl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double fminmagl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __fminmagl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern int totalorderl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern int totalordermagl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern int canonicalizel (long double *__cx, const long double *__x) throw (); extern long double getpayloadl (const long double *__x) throw (); extern long double __getpayloadl (const long double *__x) throw (); extern int setpayloadl (long double *__x, long double __payload) throw (); extern int setpayloadsigl (long double *__x, long double __payload) throw (); extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); # 351 "/usr/include/math.h" 2 3 4 # 389 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float32 acosf32 (_Float32 __x) throw (); extern _Float32 __acosf32 (_Float32 __x) throw (); extern _Float32 asinf32 (_Float32 __x) throw (); extern _Float32 __asinf32 (_Float32 __x) throw (); extern _Float32 atanf32 (_Float32 __x) throw (); extern _Float32 __atanf32 (_Float32 __x) throw (); extern _Float32 atan2f32 (_Float32 __y, _Float32 __x) throw (); extern _Float32 __atan2f32 (_Float32 __y, _Float32 __x) throw (); extern _Float32 cosf32 (_Float32 __x) throw (); extern _Float32 __cosf32 (_Float32 __x) throw (); extern _Float32 sinf32 (_Float32 __x) throw (); extern _Float32 __sinf32 (_Float32 __x) throw (); extern _Float32 tanf32 (_Float32 __x) throw (); extern _Float32 __tanf32 (_Float32 __x) throw (); extern _Float32 coshf32 (_Float32 __x) throw (); extern _Float32 __coshf32 (_Float32 __x) throw (); extern _Float32 sinhf32 (_Float32 __x) throw (); extern _Float32 __sinhf32 (_Float32 __x) throw (); extern _Float32 tanhf32 (_Float32 __x) throw (); extern _Float32 __tanhf32 (_Float32 __x) throw (); extern void sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) throw (); extern void __sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) throw (); extern _Float32 acoshf32 (_Float32 __x) throw (); extern _Float32 __acoshf32 (_Float32 __x) throw (); extern _Float32 asinhf32 (_Float32 __x) throw (); extern _Float32 __asinhf32 (_Float32 __x) throw (); extern _Float32 atanhf32 (_Float32 __x) throw (); extern _Float32 __atanhf32 (_Float32 __x) throw (); extern _Float32 expf32 (_Float32 __x) throw (); extern _Float32 __expf32 (_Float32 __x) throw (); extern _Float32 frexpf32 (_Float32 __x, int *__exponent) throw (); extern _Float32 __frexpf32 (_Float32 __x, int *__exponent) throw (); extern _Float32 ldexpf32 (_Float32 __x, int __exponent) throw (); extern _Float32 __ldexpf32 (_Float32 __x, int __exponent) throw (); extern _Float32 logf32 (_Float32 __x) throw (); extern _Float32 __logf32 (_Float32 __x) throw (); extern _Float32 log10f32 (_Float32 __x) throw (); extern _Float32 __log10f32 (_Float32 __x) throw (); extern _Float32 modff32 (_Float32 __x, _Float32 *__iptr) throw (); extern _Float32 __modff32 (_Float32 __x, _Float32 *__iptr) throw () __attribute__ ((__nonnull__ (2))); extern _Float32 exp10f32 (_Float32 __x) throw (); extern _Float32 __exp10f32 (_Float32 __x) throw (); extern _Float32 expm1f32 (_Float32 __x) throw (); extern _Float32 __expm1f32 (_Float32 __x) throw (); extern _Float32 log1pf32 (_Float32 __x) throw (); extern _Float32 __log1pf32 (_Float32 __x) throw (); extern _Float32 logbf32 (_Float32 __x) throw (); extern _Float32 __logbf32 (_Float32 __x) throw (); extern _Float32 exp2f32 (_Float32 __x) throw (); extern _Float32 __exp2f32 (_Float32 __x) throw (); extern _Float32 log2f32 (_Float32 __x) throw (); extern _Float32 __log2f32 (_Float32 __x) throw (); extern _Float32 powf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __powf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 sqrtf32 (_Float32 __x) throw (); extern _Float32 __sqrtf32 (_Float32 __x) throw (); extern _Float32 hypotf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __hypotf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 cbrtf32 (_Float32 __x) throw (); extern _Float32 __cbrtf32 (_Float32 __x) throw (); extern _Float32 ceilf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __ceilf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 fabsf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __fabsf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 floorf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __floorf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 fmodf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __fmodf32 (_Float32 __x, _Float32 __y) throw (); # 196 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float32 copysignf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __copysignf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 nanf32 (const char *__tagb) throw (); extern _Float32 __nanf32 (const char *__tagb) throw (); # 217 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float32 j0f32 (_Float32) throw (); extern _Float32 __j0f32 (_Float32) throw (); extern _Float32 j1f32 (_Float32) throw (); extern _Float32 __j1f32 (_Float32) throw (); extern _Float32 jnf32 (int, _Float32) throw (); extern _Float32 __jnf32 (int, _Float32) throw (); extern _Float32 y0f32 (_Float32) throw (); extern _Float32 __y0f32 (_Float32) throw (); extern _Float32 y1f32 (_Float32) throw (); extern _Float32 __y1f32 (_Float32) throw (); extern _Float32 ynf32 (int, _Float32) throw (); extern _Float32 __ynf32 (int, _Float32) throw (); extern _Float32 erff32 (_Float32) throw (); extern _Float32 __erff32 (_Float32) throw (); extern _Float32 erfcf32 (_Float32) throw (); extern _Float32 __erfcf32 (_Float32) throw (); extern _Float32 lgammaf32 (_Float32) throw (); extern _Float32 __lgammaf32 (_Float32) throw (); extern _Float32 tgammaf32 (_Float32) throw (); extern _Float32 __tgammaf32 (_Float32) throw (); # 249 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float32 lgammaf32_r (_Float32, int *__signgamp) throw (); extern _Float32 __lgammaf32_r (_Float32, int *__signgamp) throw (); extern _Float32 rintf32 (_Float32 __x) throw (); extern _Float32 __rintf32 (_Float32 __x) throw (); extern _Float32 nextafterf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __nextafterf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 nextdownf32 (_Float32 __x) throw (); extern _Float32 __nextdownf32 (_Float32 __x) throw (); extern _Float32 nextupf32 (_Float32 __x) throw (); extern _Float32 __nextupf32 (_Float32 __x) throw (); extern _Float32 remainderf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __remainderf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 scalbnf32 (_Float32 __x, int __n) throw (); extern _Float32 __scalbnf32 (_Float32 __x, int __n) throw (); extern int ilogbf32 (_Float32 __x) throw (); extern int __ilogbf32 (_Float32 __x) throw (); extern long int llogbf32 (_Float32 __x) throw (); extern long int __llogbf32 (_Float32 __x) throw (); extern _Float32 scalblnf32 (_Float32 __x, long int __n) throw (); extern _Float32 __scalblnf32 (_Float32 __x, long int __n) throw (); extern _Float32 nearbyintf32 (_Float32 __x) throw (); extern _Float32 __nearbyintf32 (_Float32 __x) throw (); extern _Float32 roundf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __roundf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 truncf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __truncf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 remquof32 (_Float32 __x, _Float32 __y, int *__quo) throw (); extern _Float32 __remquof32 (_Float32 __x, _Float32 __y, int *__quo) throw (); extern long int lrintf32 (_Float32 __x) throw (); extern long int __lrintf32 (_Float32 __x) throw (); __extension__ extern long long int llrintf32 (_Float32 __x) throw (); extern long long int __llrintf32 (_Float32 __x) throw (); extern long int lroundf32 (_Float32 __x) throw (); extern long int __lroundf32 (_Float32 __x) throw (); __extension__ extern long long int llroundf32 (_Float32 __x) throw (); extern long long int __llroundf32 (_Float32 __x) throw (); extern _Float32 fdimf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __fdimf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 fmaxf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __fmaxf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 fminf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __fminf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) throw (); extern _Float32 __fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) throw (); extern _Float32 roundevenf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __roundevenf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern __intmax_t fromfpf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __uintmax_t ufromfpf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __intmax_t fromfpxf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __uintmax_t ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern _Float32 fmaxmagf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __fmaxmagf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 fminmagf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __fminmagf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern int totalorderf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern int totalordermagf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern int canonicalizef32 (_Float32 *__cx, const _Float32 *__x) throw (); extern _Float32 getpayloadf32 (const _Float32 *__x) throw (); extern _Float32 __getpayloadf32 (const _Float32 *__x) throw (); extern int setpayloadf32 (_Float32 *__x, _Float32 __payload) throw (); extern int setpayloadsigf32 (_Float32 *__x, _Float32 __payload) throw (); # 390 "/usr/include/math.h" 2 3 4 # 406 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float64 acosf64 (_Float64 __x) throw (); extern _Float64 __acosf64 (_Float64 __x) throw (); extern _Float64 asinf64 (_Float64 __x) throw (); extern _Float64 __asinf64 (_Float64 __x) throw (); extern _Float64 atanf64 (_Float64 __x) throw (); extern _Float64 __atanf64 (_Float64 __x) throw (); extern _Float64 atan2f64 (_Float64 __y, _Float64 __x) throw (); extern _Float64 __atan2f64 (_Float64 __y, _Float64 __x) throw (); extern _Float64 cosf64 (_Float64 __x) throw (); extern _Float64 __cosf64 (_Float64 __x) throw (); extern _Float64 sinf64 (_Float64 __x) throw (); extern _Float64 __sinf64 (_Float64 __x) throw (); extern _Float64 tanf64 (_Float64 __x) throw (); extern _Float64 __tanf64 (_Float64 __x) throw (); extern _Float64 coshf64 (_Float64 __x) throw (); extern _Float64 __coshf64 (_Float64 __x) throw (); extern _Float64 sinhf64 (_Float64 __x) throw (); extern _Float64 __sinhf64 (_Float64 __x) throw (); extern _Float64 tanhf64 (_Float64 __x) throw (); extern _Float64 __tanhf64 (_Float64 __x) throw (); extern void sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) throw (); extern void __sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) throw (); extern _Float64 acoshf64 (_Float64 __x) throw (); extern _Float64 __acoshf64 (_Float64 __x) throw (); extern _Float64 asinhf64 (_Float64 __x) throw (); extern _Float64 __asinhf64 (_Float64 __x) throw (); extern _Float64 atanhf64 (_Float64 __x) throw (); extern _Float64 __atanhf64 (_Float64 __x) throw (); extern _Float64 expf64 (_Float64 __x) throw (); extern _Float64 __expf64 (_Float64 __x) throw (); extern _Float64 frexpf64 (_Float64 __x, int *__exponent) throw (); extern _Float64 __frexpf64 (_Float64 __x, int *__exponent) throw (); extern _Float64 ldexpf64 (_Float64 __x, int __exponent) throw (); extern _Float64 __ldexpf64 (_Float64 __x, int __exponent) throw (); extern _Float64 logf64 (_Float64 __x) throw (); extern _Float64 __logf64 (_Float64 __x) throw (); extern _Float64 log10f64 (_Float64 __x) throw (); extern _Float64 __log10f64 (_Float64 __x) throw (); extern _Float64 modff64 (_Float64 __x, _Float64 *__iptr) throw (); extern _Float64 __modff64 (_Float64 __x, _Float64 *__iptr) throw () __attribute__ ((__nonnull__ (2))); extern _Float64 exp10f64 (_Float64 __x) throw (); extern _Float64 __exp10f64 (_Float64 __x) throw (); extern _Float64 expm1f64 (_Float64 __x) throw (); extern _Float64 __expm1f64 (_Float64 __x) throw (); extern _Float64 log1pf64 (_Float64 __x) throw (); extern _Float64 __log1pf64 (_Float64 __x) throw (); extern _Float64 logbf64 (_Float64 __x) throw (); extern _Float64 __logbf64 (_Float64 __x) throw (); extern _Float64 exp2f64 (_Float64 __x) throw (); extern _Float64 __exp2f64 (_Float64 __x) throw (); extern _Float64 log2f64 (_Float64 __x) throw (); extern _Float64 __log2f64 (_Float64 __x) throw (); extern _Float64 powf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __powf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 sqrtf64 (_Float64 __x) throw (); extern _Float64 __sqrtf64 (_Float64 __x) throw (); extern _Float64 hypotf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __hypotf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 cbrtf64 (_Float64 __x) throw (); extern _Float64 __cbrtf64 (_Float64 __x) throw (); extern _Float64 ceilf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __ceilf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 fabsf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __fabsf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 floorf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __floorf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 fmodf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __fmodf64 (_Float64 __x, _Float64 __y) throw (); # 196 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float64 copysignf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __copysignf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 nanf64 (const char *__tagb) throw (); extern _Float64 __nanf64 (const char *__tagb) throw (); # 217 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float64 j0f64 (_Float64) throw (); extern _Float64 __j0f64 (_Float64) throw (); extern _Float64 j1f64 (_Float64) throw (); extern _Float64 __j1f64 (_Float64) throw (); extern _Float64 jnf64 (int, _Float64) throw (); extern _Float64 __jnf64 (int, _Float64) throw (); extern _Float64 y0f64 (_Float64) throw (); extern _Float64 __y0f64 (_Float64) throw (); extern _Float64 y1f64 (_Float64) throw (); extern _Float64 __y1f64 (_Float64) throw (); extern _Float64 ynf64 (int, _Float64) throw (); extern _Float64 __ynf64 (int, _Float64) throw (); extern _Float64 erff64 (_Float64) throw (); extern _Float64 __erff64 (_Float64) throw (); extern _Float64 erfcf64 (_Float64) throw (); extern _Float64 __erfcf64 (_Float64) throw (); extern _Float64 lgammaf64 (_Float64) throw (); extern _Float64 __lgammaf64 (_Float64) throw (); extern _Float64 tgammaf64 (_Float64) throw (); extern _Float64 __tgammaf64 (_Float64) throw (); # 249 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float64 lgammaf64_r (_Float64, int *__signgamp) throw (); extern _Float64 __lgammaf64_r (_Float64, int *__signgamp) throw (); extern _Float64 rintf64 (_Float64 __x) throw (); extern _Float64 __rintf64 (_Float64 __x) throw (); extern _Float64 nextafterf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __nextafterf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 nextdownf64 (_Float64 __x) throw (); extern _Float64 __nextdownf64 (_Float64 __x) throw (); extern _Float64 nextupf64 (_Float64 __x) throw (); extern _Float64 __nextupf64 (_Float64 __x) throw (); extern _Float64 remainderf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __remainderf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 scalbnf64 (_Float64 __x, int __n) throw (); extern _Float64 __scalbnf64 (_Float64 __x, int __n) throw (); extern int ilogbf64 (_Float64 __x) throw (); extern int __ilogbf64 (_Float64 __x) throw (); extern long int llogbf64 (_Float64 __x) throw (); extern long int __llogbf64 (_Float64 __x) throw (); extern _Float64 scalblnf64 (_Float64 __x, long int __n) throw (); extern _Float64 __scalblnf64 (_Float64 __x, long int __n) throw (); extern _Float64 nearbyintf64 (_Float64 __x) throw (); extern _Float64 __nearbyintf64 (_Float64 __x) throw (); extern _Float64 roundf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __roundf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 truncf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __truncf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 remquof64 (_Float64 __x, _Float64 __y, int *__quo) throw (); extern _Float64 __remquof64 (_Float64 __x, _Float64 __y, int *__quo) throw (); extern long int lrintf64 (_Float64 __x) throw (); extern long int __lrintf64 (_Float64 __x) throw (); __extension__ extern long long int llrintf64 (_Float64 __x) throw (); extern long long int __llrintf64 (_Float64 __x) throw (); extern long int lroundf64 (_Float64 __x) throw (); extern long int __lroundf64 (_Float64 __x) throw (); __extension__ extern long long int llroundf64 (_Float64 __x) throw (); extern long long int __llroundf64 (_Float64 __x) throw (); extern _Float64 fdimf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __fdimf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 fmaxf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __fmaxf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 fminf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __fminf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) throw (); extern _Float64 __fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) throw (); extern _Float64 roundevenf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __roundevenf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern __intmax_t fromfpf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __uintmax_t ufromfpf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __intmax_t fromfpxf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __uintmax_t ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern _Float64 fmaxmagf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __fmaxmagf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 fminmagf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __fminmagf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern int totalorderf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern int totalordermagf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern int canonicalizef64 (_Float64 *__cx, const _Float64 *__x) throw (); extern _Float64 getpayloadf64 (const _Float64 *__x) throw (); extern _Float64 __getpayloadf64 (const _Float64 *__x) throw (); extern int setpayloadf64 (_Float64 *__x, _Float64 __payload) throw (); extern int setpayloadsigf64 (_Float64 *__x, _Float64 __payload) throw (); # 407 "/usr/include/math.h" 2 3 4 # 440 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float32x acosf32x (_Float32x __x) throw (); extern _Float32x __acosf32x (_Float32x __x) throw (); extern _Float32x asinf32x (_Float32x __x) throw (); extern _Float32x __asinf32x (_Float32x __x) throw (); extern _Float32x atanf32x (_Float32x __x) throw (); extern _Float32x __atanf32x (_Float32x __x) throw (); extern _Float32x atan2f32x (_Float32x __y, _Float32x __x) throw (); extern _Float32x __atan2f32x (_Float32x __y, _Float32x __x) throw (); extern _Float32x cosf32x (_Float32x __x) throw (); extern _Float32x __cosf32x (_Float32x __x) throw (); extern _Float32x sinf32x (_Float32x __x) throw (); extern _Float32x __sinf32x (_Float32x __x) throw (); extern _Float32x tanf32x (_Float32x __x) throw (); extern _Float32x __tanf32x (_Float32x __x) throw (); extern _Float32x coshf32x (_Float32x __x) throw (); extern _Float32x __coshf32x (_Float32x __x) throw (); extern _Float32x sinhf32x (_Float32x __x) throw (); extern _Float32x __sinhf32x (_Float32x __x) throw (); extern _Float32x tanhf32x (_Float32x __x) throw (); extern _Float32x __tanhf32x (_Float32x __x) throw (); extern void sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) throw (); extern void __sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) throw (); extern _Float32x acoshf32x (_Float32x __x) throw (); extern _Float32x __acoshf32x (_Float32x __x) throw (); extern _Float32x asinhf32x (_Float32x __x) throw (); extern _Float32x __asinhf32x (_Float32x __x) throw (); extern _Float32x atanhf32x (_Float32x __x) throw (); extern _Float32x __atanhf32x (_Float32x __x) throw (); extern _Float32x expf32x (_Float32x __x) throw (); extern _Float32x __expf32x (_Float32x __x) throw (); extern _Float32x frexpf32x (_Float32x __x, int *__exponent) throw (); extern _Float32x __frexpf32x (_Float32x __x, int *__exponent) throw (); extern _Float32x ldexpf32x (_Float32x __x, int __exponent) throw (); extern _Float32x __ldexpf32x (_Float32x __x, int __exponent) throw (); extern _Float32x logf32x (_Float32x __x) throw (); extern _Float32x __logf32x (_Float32x __x) throw (); extern _Float32x log10f32x (_Float32x __x) throw (); extern _Float32x __log10f32x (_Float32x __x) throw (); extern _Float32x modff32x (_Float32x __x, _Float32x *__iptr) throw (); extern _Float32x __modff32x (_Float32x __x, _Float32x *__iptr) throw () __attribute__ ((__nonnull__ (2))); extern _Float32x exp10f32x (_Float32x __x) throw (); extern _Float32x __exp10f32x (_Float32x __x) throw (); extern _Float32x expm1f32x (_Float32x __x) throw (); extern _Float32x __expm1f32x (_Float32x __x) throw (); extern _Float32x log1pf32x (_Float32x __x) throw (); extern _Float32x __log1pf32x (_Float32x __x) throw (); extern _Float32x logbf32x (_Float32x __x) throw (); extern _Float32x __logbf32x (_Float32x __x) throw (); extern _Float32x exp2f32x (_Float32x __x) throw (); extern _Float32x __exp2f32x (_Float32x __x) throw (); extern _Float32x log2f32x (_Float32x __x) throw (); extern _Float32x __log2f32x (_Float32x __x) throw (); extern _Float32x powf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __powf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x sqrtf32x (_Float32x __x) throw (); extern _Float32x __sqrtf32x (_Float32x __x) throw (); extern _Float32x hypotf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __hypotf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x cbrtf32x (_Float32x __x) throw (); extern _Float32x __cbrtf32x (_Float32x __x) throw (); extern _Float32x ceilf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __ceilf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x fabsf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __fabsf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x floorf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __floorf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x fmodf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __fmodf32x (_Float32x __x, _Float32x __y) throw (); # 196 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float32x copysignf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __copysignf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x nanf32x (const char *__tagb) throw (); extern _Float32x __nanf32x (const char *__tagb) throw (); # 217 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float32x j0f32x (_Float32x) throw (); extern _Float32x __j0f32x (_Float32x) throw (); extern _Float32x j1f32x (_Float32x) throw (); extern _Float32x __j1f32x (_Float32x) throw (); extern _Float32x jnf32x (int, _Float32x) throw (); extern _Float32x __jnf32x (int, _Float32x) throw (); extern _Float32x y0f32x (_Float32x) throw (); extern _Float32x __y0f32x (_Float32x) throw (); extern _Float32x y1f32x (_Float32x) throw (); extern _Float32x __y1f32x (_Float32x) throw (); extern _Float32x ynf32x (int, _Float32x) throw (); extern _Float32x __ynf32x (int, _Float32x) throw (); extern _Float32x erff32x (_Float32x) throw (); extern _Float32x __erff32x (_Float32x) throw (); extern _Float32x erfcf32x (_Float32x) throw (); extern _Float32x __erfcf32x (_Float32x) throw (); extern _Float32x lgammaf32x (_Float32x) throw (); extern _Float32x __lgammaf32x (_Float32x) throw (); extern _Float32x tgammaf32x (_Float32x) throw (); extern _Float32x __tgammaf32x (_Float32x) throw (); # 249 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float32x lgammaf32x_r (_Float32x, int *__signgamp) throw (); extern _Float32x __lgammaf32x_r (_Float32x, int *__signgamp) throw (); extern _Float32x rintf32x (_Float32x __x) throw (); extern _Float32x __rintf32x (_Float32x __x) throw (); extern _Float32x nextafterf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __nextafterf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x nextdownf32x (_Float32x __x) throw (); extern _Float32x __nextdownf32x (_Float32x __x) throw (); extern _Float32x nextupf32x (_Float32x __x) throw (); extern _Float32x __nextupf32x (_Float32x __x) throw (); extern _Float32x remainderf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __remainderf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x scalbnf32x (_Float32x __x, int __n) throw (); extern _Float32x __scalbnf32x (_Float32x __x, int __n) throw (); extern int ilogbf32x (_Float32x __x) throw (); extern int __ilogbf32x (_Float32x __x) throw (); extern long int llogbf32x (_Float32x __x) throw (); extern long int __llogbf32x (_Float32x __x) throw (); extern _Float32x scalblnf32x (_Float32x __x, long int __n) throw (); extern _Float32x __scalblnf32x (_Float32x __x, long int __n) throw (); extern _Float32x nearbyintf32x (_Float32x __x) throw (); extern _Float32x __nearbyintf32x (_Float32x __x) throw (); extern _Float32x roundf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __roundf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x truncf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __truncf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x remquof32x (_Float32x __x, _Float32x __y, int *__quo) throw (); extern _Float32x __remquof32x (_Float32x __x, _Float32x __y, int *__quo) throw (); extern long int lrintf32x (_Float32x __x) throw (); extern long int __lrintf32x (_Float32x __x) throw (); __extension__ extern long long int llrintf32x (_Float32x __x) throw (); extern long long int __llrintf32x (_Float32x __x) throw (); extern long int lroundf32x (_Float32x __x) throw (); extern long int __lroundf32x (_Float32x __x) throw (); __extension__ extern long long int llroundf32x (_Float32x __x) throw (); extern long long int __llroundf32x (_Float32x __x) throw (); extern _Float32x fdimf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __fdimf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x fmaxf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __fmaxf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x fminf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __fminf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) throw (); extern _Float32x __fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) throw (); extern _Float32x roundevenf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __roundevenf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern __intmax_t fromfpf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __uintmax_t ufromfpf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __intmax_t fromfpxf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __uintmax_t ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern _Float32x fmaxmagf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __fmaxmagf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x fminmagf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __fminmagf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern int totalorderf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern int totalordermagf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern int canonicalizef32x (_Float32x *__cx, const _Float32x *__x) throw (); extern _Float32x getpayloadf32x (const _Float32x *__x) throw (); extern _Float32x __getpayloadf32x (const _Float32x *__x) throw (); extern int setpayloadf32x (_Float32x *__x, _Float32x __payload) throw (); extern int setpayloadsigf32x (_Float32x *__x, _Float32x __payload) throw (); # 441 "/usr/include/math.h" 2 3 4 # 457 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float64x acosf64x (_Float64x __x) throw (); extern _Float64x __acosf64x (_Float64x __x) throw (); extern _Float64x asinf64x (_Float64x __x) throw (); extern _Float64x __asinf64x (_Float64x __x) throw (); extern _Float64x atanf64x (_Float64x __x) throw (); extern _Float64x __atanf64x (_Float64x __x) throw (); extern _Float64x atan2f64x (_Float64x __y, _Float64x __x) throw (); extern _Float64x __atan2f64x (_Float64x __y, _Float64x __x) throw (); extern _Float64x cosf64x (_Float64x __x) throw (); extern _Float64x __cosf64x (_Float64x __x) throw (); extern _Float64x sinf64x (_Float64x __x) throw (); extern _Float64x __sinf64x (_Float64x __x) throw (); extern _Float64x tanf64x (_Float64x __x) throw (); extern _Float64x __tanf64x (_Float64x __x) throw (); extern _Float64x coshf64x (_Float64x __x) throw (); extern _Float64x __coshf64x (_Float64x __x) throw (); extern _Float64x sinhf64x (_Float64x __x) throw (); extern _Float64x __sinhf64x (_Float64x __x) throw (); extern _Float64x tanhf64x (_Float64x __x) throw (); extern _Float64x __tanhf64x (_Float64x __x) throw (); extern void sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) throw (); extern void __sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) throw (); extern _Float64x acoshf64x (_Float64x __x) throw (); extern _Float64x __acoshf64x (_Float64x __x) throw (); extern _Float64x asinhf64x (_Float64x __x) throw (); extern _Float64x __asinhf64x (_Float64x __x) throw (); extern _Float64x atanhf64x (_Float64x __x) throw (); extern _Float64x __atanhf64x (_Float64x __x) throw (); extern _Float64x expf64x (_Float64x __x) throw (); extern _Float64x __expf64x (_Float64x __x) throw (); extern _Float64x frexpf64x (_Float64x __x, int *__exponent) throw (); extern _Float64x __frexpf64x (_Float64x __x, int *__exponent) throw (); extern _Float64x ldexpf64x (_Float64x __x, int __exponent) throw (); extern _Float64x __ldexpf64x (_Float64x __x, int __exponent) throw (); extern _Float64x logf64x (_Float64x __x) throw (); extern _Float64x __logf64x (_Float64x __x) throw (); extern _Float64x log10f64x (_Float64x __x) throw (); extern _Float64x __log10f64x (_Float64x __x) throw (); extern _Float64x modff64x (_Float64x __x, _Float64x *__iptr) throw (); extern _Float64x __modff64x (_Float64x __x, _Float64x *__iptr) throw () __attribute__ ((__nonnull__ (2))); extern _Float64x exp10f64x (_Float64x __x) throw (); extern _Float64x __exp10f64x (_Float64x __x) throw (); extern _Float64x expm1f64x (_Float64x __x) throw (); extern _Float64x __expm1f64x (_Float64x __x) throw (); extern _Float64x log1pf64x (_Float64x __x) throw (); extern _Float64x __log1pf64x (_Float64x __x) throw (); extern _Float64x logbf64x (_Float64x __x) throw (); extern _Float64x __logbf64x (_Float64x __x) throw (); extern _Float64x exp2f64x (_Float64x __x) throw (); extern _Float64x __exp2f64x (_Float64x __x) throw (); extern _Float64x log2f64x (_Float64x __x) throw (); extern _Float64x __log2f64x (_Float64x __x) throw (); extern _Float64x powf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x __powf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x sqrtf64x (_Float64x __x) throw (); extern _Float64x __sqrtf64x (_Float64x __x) throw (); extern _Float64x hypotf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x __hypotf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x cbrtf64x (_Float64x __x) throw (); extern _Float64x __cbrtf64x (_Float64x __x) throw (); extern _Float64x ceilf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x __ceilf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x fabsf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x __fabsf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x floorf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x __floorf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x fmodf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x __fmodf64x (_Float64x __x, _Float64x __y) throw (); # 196 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float64x copysignf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern _Float64x __copysignf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern _Float64x nanf64x (const char *__tagb) throw (); extern _Float64x __nanf64x (const char *__tagb) throw (); # 217 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float64x j0f64x (_Float64x) throw (); extern _Float64x __j0f64x (_Float64x) throw (); extern _Float64x j1f64x (_Float64x) throw (); extern _Float64x __j1f64x (_Float64x) throw (); extern _Float64x jnf64x (int, _Float64x) throw (); extern _Float64x __jnf64x (int, _Float64x) throw (); extern _Float64x y0f64x (_Float64x) throw (); extern _Float64x __y0f64x (_Float64x) throw (); extern _Float64x y1f64x (_Float64x) throw (); extern _Float64x __y1f64x (_Float64x) throw (); extern _Float64x ynf64x (int, _Float64x) throw (); extern _Float64x __ynf64x (int, _Float64x) throw (); extern _Float64x erff64x (_Float64x) throw (); extern _Float64x __erff64x (_Float64x) throw (); extern _Float64x erfcf64x (_Float64x) throw (); extern _Float64x __erfcf64x (_Float64x) throw (); extern _Float64x lgammaf64x (_Float64x) throw (); extern _Float64x __lgammaf64x (_Float64x) throw (); extern _Float64x tgammaf64x (_Float64x) throw (); extern _Float64x __tgammaf64x (_Float64x) throw (); # 249 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern _Float64x lgammaf64x_r (_Float64x, int *__signgamp) throw (); extern _Float64x __lgammaf64x_r (_Float64x, int *__signgamp) throw (); extern _Float64x rintf64x (_Float64x __x) throw (); extern _Float64x __rintf64x (_Float64x __x) throw (); extern _Float64x nextafterf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x __nextafterf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x nextdownf64x (_Float64x __x) throw (); extern _Float64x __nextdownf64x (_Float64x __x) throw (); extern _Float64x nextupf64x (_Float64x __x) throw (); extern _Float64x __nextupf64x (_Float64x __x) throw (); extern _Float64x remainderf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x __remainderf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x scalbnf64x (_Float64x __x, int __n) throw (); extern _Float64x __scalbnf64x (_Float64x __x, int __n) throw (); extern int ilogbf64x (_Float64x __x) throw (); extern int __ilogbf64x (_Float64x __x) throw (); extern long int llogbf64x (_Float64x __x) throw (); extern long int __llogbf64x (_Float64x __x) throw (); extern _Float64x scalblnf64x (_Float64x __x, long int __n) throw (); extern _Float64x __scalblnf64x (_Float64x __x, long int __n) throw (); extern _Float64x nearbyintf64x (_Float64x __x) throw (); extern _Float64x __nearbyintf64x (_Float64x __x) throw (); extern _Float64x roundf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x __roundf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x truncf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x __truncf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x remquof64x (_Float64x __x, _Float64x __y, int *__quo) throw (); extern _Float64x __remquof64x (_Float64x __x, _Float64x __y, int *__quo) throw (); extern long int lrintf64x (_Float64x __x) throw (); extern long int __lrintf64x (_Float64x __x) throw (); __extension__ extern long long int llrintf64x (_Float64x __x) throw (); extern long long int __llrintf64x (_Float64x __x) throw (); extern long int lroundf64x (_Float64x __x) throw (); extern long int __lroundf64x (_Float64x __x) throw (); __extension__ extern long long int llroundf64x (_Float64x __x) throw (); extern long long int __llroundf64x (_Float64x __x) throw (); extern _Float64x fdimf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x __fdimf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x fmaxf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern _Float64x __fmaxf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern _Float64x fminf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern _Float64x __fminf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern _Float64x fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) throw (); extern _Float64x __fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) throw (); extern _Float64x roundevenf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x __roundevenf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern __intmax_t fromfpf64x (_Float64x __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf64x (_Float64x __x, int __round, unsigned int __width) throw (); extern __uintmax_t ufromfpf64x (_Float64x __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf64x (_Float64x __x, int __round, unsigned int __width) throw (); extern __intmax_t fromfpxf64x (_Float64x __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf64x (_Float64x __x, int __round, unsigned int __width) throw (); extern __uintmax_t ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) throw (); extern _Float64x fmaxmagf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern _Float64x __fmaxmagf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern _Float64x fminmagf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern _Float64x __fminmagf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern int totalorderf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern int totalordermagf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern int canonicalizef64x (_Float64x *__cx, const _Float64x *__x) throw (); extern _Float64x getpayloadf64x (const _Float64x *__x) throw (); extern _Float64x __getpayloadf64x (const _Float64x *__x) throw (); extern int setpayloadf64x (_Float64x *__x, _Float64x __payload) throw (); extern int setpayloadsigf64x (_Float64x *__x, _Float64x __payload) throw (); # 458 "/usr/include/math.h" 2 3 4 # 503 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 3 4 extern float fadd (double __x, double __y) throw (); extern float fdiv (double __x, double __y) throw (); extern float fmul (double __x, double __y) throw (); extern float fsub (double __x, double __y) throw (); # 504 "/usr/include/math.h" 2 3 4 # 517 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 3 4 extern float faddl (long double __x, long double __y) throw (); extern float fdivl (long double __x, long double __y) throw (); extern float fmull (long double __x, long double __y) throw (); extern float fsubl (long double __x, long double __y) throw (); # 518 "/usr/include/math.h" 2 3 4 # 537 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 3 4 extern double daddl (long double __x, long double __y) throw (); extern double ddivl (long double __x, long double __y) throw (); extern double dmull (long double __x, long double __y) throw (); extern double dsubl (long double __x, long double __y) throw (); # 538 "/usr/include/math.h" 2 3 4 # 616 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 3 4 extern _Float32 f32addf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32 f32divf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32 f32mulf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32 f32subf32x (_Float32x __x, _Float32x __y) throw (); # 617 "/usr/include/math.h" 2 3 4 # 626 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 3 4 extern _Float32 f32addf64 (_Float64 __x, _Float64 __y) throw (); extern _Float32 f32divf64 (_Float64 __x, _Float64 __y) throw (); extern _Float32 f32mulf64 (_Float64 __x, _Float64 __y) throw (); extern _Float32 f32subf64 (_Float64 __x, _Float64 __y) throw (); # 627 "/usr/include/math.h" 2 3 4 # 636 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 3 4 extern _Float32 f32addf64x (_Float64x __x, _Float64x __y) throw (); extern _Float32 f32divf64x (_Float64x __x, _Float64x __y) throw (); extern _Float32 f32mulf64x (_Float64x __x, _Float64x __y) throw (); extern _Float32 f32subf64x (_Float64x __x, _Float64x __y) throw (); # 637 "/usr/include/math.h" 2 3 4 # 666 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 3 4 extern _Float32x f32xaddf64 (_Float64 __x, _Float64 __y) throw (); extern _Float32x f32xdivf64 (_Float64 __x, _Float64 __y) throw (); extern _Float32x f32xmulf64 (_Float64 __x, _Float64 __y) throw (); extern _Float32x f32xsubf64 (_Float64 __x, _Float64 __y) throw (); # 667 "/usr/include/math.h" 2 3 4 # 676 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 3 4 extern _Float32x f32xaddf64x (_Float64x __x, _Float64x __y) throw (); extern _Float32x f32xdivf64x (_Float64x __x, _Float64x __y) throw (); extern _Float32x f32xmulf64x (_Float64x __x, _Float64x __y) throw (); extern _Float32x f32xsubf64x (_Float64x __x, _Float64x __y) throw (); # 677 "/usr/include/math.h" 2 3 4 # 706 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h" 3 4 extern _Float64 f64addf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64 f64divf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64 f64mulf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64 f64subf64x (_Float64x __x, _Float64x __y) throw (); # 707 "/usr/include/math.h" 2 3 4 # 773 "/usr/include/math.h" 3 4 extern int signgam; # 853 "/usr/include/math.h" 3 4 enum { FP_NAN = 0, FP_INFINITE = 1, FP_ZERO = 2, FP_SUBNORMAL = 3, FP_NORMAL = 4 }; # 968 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/iscanonical.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/iscanonical.h" 3 4 extern int __iscanonicall (long double __x) throw () __attribute__ ((__const__)); # 46 "/usr/include/x86_64-linux-gnu/bits/iscanonical.h" 3 4 extern "C++" { inline int iscanonical (float __val) { return ((void) (__typeof (__val)) (__val), 1); } inline int iscanonical (double __val) { return ((void) (__typeof (__val)) (__val), 1); } inline int iscanonical (long double __val) { return __iscanonicall (__val); } } # 969 "/usr/include/math.h" 2 3 4 # 980 "/usr/include/math.h" 3 4 extern "C++" { inline int issignaling (float __val) { return __issignalingf (__val); } inline int issignaling (double __val) { return __issignaling (__val); } inline int issignaling (long double __val) { return __issignalingl (__val); } } # 1011 "/usr/include/math.h" 3 4 extern "C++" { # 1042 "/usr/include/math.h" 3 4 template <class __T> inline bool iszero (__T __val) { return __val == 0; } } # 1240 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathinline.h" 1 3 4 # 1241 "/usr/include/math.h" 2 3 4 # 1493 "/usr/include/math.h" 3 4 extern "C++" { template<typename> struct __iseqsig_type; template<> struct __iseqsig_type<float> { static int __call (float __x, float __y) throw () { return __iseqsigf (__x, __y); } }; template<> struct __iseqsig_type<double> { static int __call (double __x, double __y) throw () { return __iseqsig (__x, __y); } }; template<> struct __iseqsig_type<long double> { static int __call (long double __x, long double __y) throw () { return __iseqsigl (__x, __y); } }; # 1536 "/usr/include/math.h" 3 4 template<typename _T1, typename _T2> inline int iseqsig (_T1 __x, _T2 __y) throw () { typedef decltype (((__x) + (__y) + 0.0f)) _T3; return __iseqsig_type<_T3>::__call (__x, __y); } } } # 46 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cmath" 2 3 # 77 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cmath" 3 extern "C++" { namespace std __attribute__ ((__visibility__ ("default"))) { using ::acos; inline constexpr float acos(float __x) { return __builtin_acosf(__x); } inline constexpr long double acos(long double __x) { return __builtin_acosl(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type acos(_Tp __x) { return __builtin_acos(__x); } using ::asin; inline constexpr float asin(float __x) { return __builtin_asinf(__x); } inline constexpr long double asin(long double __x) { return __builtin_asinl(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type asin(_Tp __x) { return __builtin_asin(__x); } using ::atan; inline constexpr float atan(float __x) { return __builtin_atanf(__x); } inline constexpr long double atan(long double __x) { return __builtin_atanl(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type atan(_Tp __x) { return __builtin_atan(__x); } using ::atan2; inline constexpr float atan2(float __y, float __x) { return __builtin_atan2f(__y, __x); } inline constexpr long double atan2(long double __y, long double __x) { return __builtin_atan2l(__y, __x); } template<typename _Tp, typename _Up> inline constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type atan2(_Tp __y, _Up __x) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return atan2(__type(__y), __type(__x)); } using ::ceil; inline constexpr float ceil(float __x) { return __builtin_ceilf(__x); } inline constexpr long double ceil(long double __x) { return __builtin_ceill(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type ceil(_Tp __x) { return __builtin_ceil(__x); } using ::cos; inline constexpr float cos(float __x) { return __builtin_cosf(__x); } inline constexpr long double cos(long double __x) { return __builtin_cosl(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type cos(_Tp __x) { return __builtin_cos(__x); } using ::cosh; inline constexpr float cosh(float __x) { return __builtin_coshf(__x); } inline constexpr long double cosh(long double __x) { return __builtin_coshl(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type cosh(_Tp __x) { return __builtin_cosh(__x); } using ::exp; inline constexpr float exp(float __x) { return __builtin_expf(__x); } inline constexpr long double exp(long double __x) { return __builtin_expl(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type exp(_Tp __x) { return __builtin_exp(__x); } using ::fabs; inline constexpr float fabs(float __x) { return __builtin_fabsf(__x); } inline constexpr long double fabs(long double __x) { return __builtin_fabsl(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type fabs(_Tp __x) { return __builtin_fabs(__x); } using ::floor; inline constexpr float floor(float __x) { return __builtin_floorf(__x); } inline constexpr long double floor(long double __x) { return __builtin_floorl(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type floor(_Tp __x) { return __builtin_floor(__x); } using ::fmod; inline constexpr float fmod(float __x, float __y) { return __builtin_fmodf(__x, __y); } inline constexpr long double fmod(long double __x, long double __y) { return __builtin_fmodl(__x, __y); } template<typename _Tp, typename _Up> inline constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type fmod(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return fmod(__type(__x), __type(__y)); } using ::frexp; inline float frexp(float __x, int* __exp) { return __builtin_frexpf(__x, __exp); } inline long double frexp(long double __x, int* __exp) { return __builtin_frexpl(__x, __exp); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type frexp(_Tp __x, int* __exp) { return __builtin_frexp(__x, __exp); } using ::ldexp; inline constexpr float ldexp(float __x, int __exp) { return __builtin_ldexpf(__x, __exp); } inline constexpr long double ldexp(long double __x, int __exp) { return __builtin_ldexpl(__x, __exp); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type ldexp(_Tp __x, int __exp) { return __builtin_ldexp(__x, __exp); } using ::log; inline constexpr float log(float __x) { return __builtin_logf(__x); } inline constexpr long double log(long double __x) { return __builtin_logl(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log(_Tp __x) { return __builtin_log(__x); } using ::log10; inline constexpr float log10(float __x) { return __builtin_log10f(__x); } inline constexpr long double log10(long double __x) { return __builtin_log10l(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log10(_Tp __x) { return __builtin_log10(__x); } using ::modf; inline float modf(float __x, float* __iptr) { return __builtin_modff(__x, __iptr); } inline long double modf(long double __x, long double* __iptr) { return __builtin_modfl(__x, __iptr); } using ::pow; inline constexpr float pow(float __x, float __y) { return __builtin_powf(__x, __y); } inline constexpr long double pow(long double __x, long double __y) { return __builtin_powl(__x, __y); } # 412 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cmath" 3 template<typename _Tp, typename _Up> inline constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type pow(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return pow(__type(__x), __type(__y)); } using ::sin; inline constexpr float sin(float __x) { return __builtin_sinf(__x); } inline constexpr long double sin(long double __x) { return __builtin_sinl(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sin(_Tp __x) { return __builtin_sin(__x); } using ::sinh; inline constexpr float sinh(float __x) { return __builtin_sinhf(__x); } inline constexpr long double sinh(long double __x) { return __builtin_sinhl(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sinh(_Tp __x) { return __builtin_sinh(__x); } using ::sqrt; inline constexpr float sqrt(float __x) { return __builtin_sqrtf(__x); } inline constexpr long double sqrt(long double __x) { return __builtin_sqrtl(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sqrt(_Tp __x) { return __builtin_sqrt(__x); } using ::tan; inline constexpr float tan(float __x) { return __builtin_tanf(__x); } inline constexpr long double tan(long double __x) { return __builtin_tanl(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type tan(_Tp __x) { return __builtin_tan(__x); } using ::tanh; inline constexpr float tanh(float __x) { return __builtin_tanhf(__x); } inline constexpr long double tanh(long double __x) { return __builtin_tanhl(__x); } template<typename _Tp> inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type tanh(_Tp __x) { return __builtin_tanh(__x); } # 536 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cmath" 3 constexpr int fpclassify(float __x) { return __builtin_fpclassify(0, 1, 4, 3, 2, __x); } constexpr int fpclassify(double __x) { return __builtin_fpclassify(0, 1, 4, 3, 2, __x); } constexpr int fpclassify(long double __x) { return __builtin_fpclassify(0, 1, 4, 3, 2, __x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, int>::__type fpclassify(_Tp __x) { return __x != 0 ? 4 : 2; } constexpr bool isfinite(float __x) { return __builtin_isfinite(__x); } constexpr bool isfinite(double __x) { return __builtin_isfinite(__x); } constexpr bool isfinite(long double __x) { return __builtin_isfinite(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isfinite(_Tp __x) { return true; } constexpr bool isinf(float __x) { return __builtin_isinf(__x); } constexpr bool isinf(double __x) { return __builtin_isinf(__x); } constexpr bool isinf(long double __x) { return __builtin_isinf(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isinf(_Tp __x) { return false; } constexpr bool isnan(float __x) { return __builtin_isnan(__x); } constexpr bool isnan(double __x) { return __builtin_isnan(__x); } constexpr bool isnan(long double __x) { return __builtin_isnan(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isnan(_Tp __x) { return false; } constexpr bool isnormal(float __x) { return __builtin_isnormal(__x); } constexpr bool isnormal(double __x) { return __builtin_isnormal(__x); } constexpr bool isnormal(long double __x) { return __builtin_isnormal(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isnormal(_Tp __x) { return __x != 0 ? true : false; } constexpr bool signbit(float __x) { return __builtin_signbit(__x); } constexpr bool signbit(double __x) { return __builtin_signbit(__x); } constexpr bool signbit(long double __x) { return __builtin_signbit(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type signbit(_Tp __x) { return __x < 0 ? true : false; } constexpr bool isgreater(float __x, float __y) { return __builtin_isgreater(__x, __y); } constexpr bool isgreater(double __x, double __y) { return __builtin_isgreater(__x, __y); } constexpr bool isgreater(long double __x, long double __y) { return __builtin_isgreater(__x, __y); } template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value && __is_arithmetic<_Up>::__value), bool>::__type isgreater(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isgreater(__type(__x), __type(__y)); } constexpr bool isgreaterequal(float __x, float __y) { return __builtin_isgreaterequal(__x, __y); } constexpr bool isgreaterequal(double __x, double __y) { return __builtin_isgreaterequal(__x, __y); } constexpr bool isgreaterequal(long double __x, long double __y) { return __builtin_isgreaterequal(__x, __y); } template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value && __is_arithmetic<_Up>::__value), bool>::__type isgreaterequal(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isgreaterequal(__type(__x), __type(__y)); } constexpr bool isless(float __x, float __y) { return __builtin_isless(__x, __y); } constexpr bool isless(double __x, double __y) { return __builtin_isless(__x, __y); } constexpr bool isless(long double __x, long double __y) { return __builtin_isless(__x, __y); } template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value && __is_arithmetic<_Up>::__value), bool>::__type isless(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isless(__type(__x), __type(__y)); } constexpr bool islessequal(float __x, float __y) { return __builtin_islessequal(__x, __y); } constexpr bool islessequal(double __x, double __y) { return __builtin_islessequal(__x, __y); } constexpr bool islessequal(long double __x, long double __y) { return __builtin_islessequal(__x, __y); } template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value && __is_arithmetic<_Up>::__value), bool>::__type islessequal(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_islessequal(__type(__x), __type(__y)); } constexpr bool islessgreater(float __x, float __y) { return __builtin_islessgreater(__x, __y); } constexpr bool islessgreater(double __x, double __y) { return __builtin_islessgreater(__x, __y); } constexpr bool islessgreater(long double __x, long double __y) { return __builtin_islessgreater(__x, __y); } template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value && __is_arithmetic<_Up>::__value), bool>::__type islessgreater(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_islessgreater(__type(__x), __type(__y)); } constexpr bool isunordered(float __x, float __y) { return __builtin_isunordered(__x, __y); } constexpr bool isunordered(double __x, double __y) { return __builtin_isunordered(__x, __y); } constexpr bool isunordered(long double __x, long double __y) { return __builtin_isunordered(__x, __y); } template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value && __is_arithmetic<_Up>::__value), bool>::__type isunordered(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isunordered(__type(__x), __type(__y)); } # 1065 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cmath" 3 using ::double_t; using ::float_t; using ::acosh; using ::acoshf; using ::acoshl; using ::asinh; using ::asinhf; using ::asinhl; using ::atanh; using ::atanhf; using ::atanhl; using ::cbrt; using ::cbrtf; using ::cbrtl; using ::copysign; using ::copysignf; using ::copysignl; using ::erf; using ::erff; using ::erfl; using ::erfc; using ::erfcf; using ::erfcl; using ::exp2; using ::exp2f; using ::exp2l; using ::expm1; using ::expm1f; using ::expm1l; using ::fdim; using ::fdimf; using ::fdiml; using ::fma; using ::fmaf; using ::fmal; using ::fmax; using ::fmaxf; using ::fmaxl; using ::fmin; using ::fminf; using ::fminl; using ::hypot; using ::hypotf; using ::hypotl; using ::ilogb; using ::ilogbf; using ::ilogbl; using ::lgamma; using ::lgammaf; using ::lgammal; using ::llrint; using ::llrintf; using ::llrintl; using ::llround; using ::llroundf; using ::llroundl; using ::log1p; using ::log1pf; using ::log1pl; using ::log2; using ::log2f; using ::log2l; using ::logb; using ::logbf; using ::logbl; using ::lrint; using ::lrintf; using ::lrintl; using ::lround; using ::lroundf; using ::lroundl; using ::nan; using ::nanf; using ::nanl; using ::nearbyint; using ::nearbyintf; using ::nearbyintl; using ::nextafter; using ::nextafterf; using ::nextafterl; using ::nexttoward; using ::nexttowardf; using ::nexttowardl; using ::remainder; using ::remainderf; using ::remainderl; using ::remquo; using ::remquof; using ::remquol; using ::rint; using ::rintf; using ::rintl; using ::round; using ::roundf; using ::roundl; using ::scalbln; using ::scalblnf; using ::scalblnl; using ::scalbn; using ::scalbnf; using ::scalbnl; using ::tgamma; using ::tgammaf; using ::tgammal; using ::trunc; using ::truncf; using ::truncl; constexpr float acosh(float __x) { return __builtin_acoshf(__x); } constexpr long double acosh(long double __x) { return __builtin_acoshl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type acosh(_Tp __x) { return __builtin_acosh(__x); } constexpr float asinh(float __x) { return __builtin_asinhf(__x); } constexpr long double asinh(long double __x) { return __builtin_asinhl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type asinh(_Tp __x) { return __builtin_asinh(__x); } constexpr float atanh(float __x) { return __builtin_atanhf(__x); } constexpr long double atanh(long double __x) { return __builtin_atanhl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type atanh(_Tp __x) { return __builtin_atanh(__x); } constexpr float cbrt(float __x) { return __builtin_cbrtf(__x); } constexpr long double cbrt(long double __x) { return __builtin_cbrtl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type cbrt(_Tp __x) { return __builtin_cbrt(__x); } constexpr float copysign(float __x, float __y) { return __builtin_copysignf(__x, __y); } constexpr long double copysign(long double __x, long double __y) { return __builtin_copysignl(__x, __y); } template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type copysign(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return copysign(__type(__x), __type(__y)); } constexpr float erf(float __x) { return __builtin_erff(__x); } constexpr long double erf(long double __x) { return __builtin_erfl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type erf(_Tp __x) { return __builtin_erf(__x); } constexpr float erfc(float __x) { return __builtin_erfcf(__x); } constexpr long double erfc(long double __x) { return __builtin_erfcl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type erfc(_Tp __x) { return __builtin_erfc(__x); } constexpr float exp2(float __x) { return __builtin_exp2f(__x); } constexpr long double exp2(long double __x) { return __builtin_exp2l(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type exp2(_Tp __x) { return __builtin_exp2(__x); } constexpr float expm1(float __x) { return __builtin_expm1f(__x); } constexpr long double expm1(long double __x) { return __builtin_expm1l(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type expm1(_Tp __x) { return __builtin_expm1(__x); } constexpr float fdim(float __x, float __y) { return __builtin_fdimf(__x, __y); } constexpr long double fdim(long double __x, long double __y) { return __builtin_fdiml(__x, __y); } template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type fdim(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return fdim(__type(__x), __type(__y)); } constexpr float fma(float __x, float __y, float __z) { return __builtin_fmaf(__x, __y, __z); } constexpr long double fma(long double __x, long double __y, long double __z) { return __builtin_fmal(__x, __y, __z); } template<typename _Tp, typename _Up, typename _Vp> constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type fma(_Tp __x, _Up __y, _Vp __z) { typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type; return fma(__type(__x), __type(__y), __type(__z)); } constexpr float fmax(float __x, float __y) { return __builtin_fmaxf(__x, __y); } constexpr long double fmax(long double __x, long double __y) { return __builtin_fmaxl(__x, __y); } template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type fmax(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return fmax(__type(__x), __type(__y)); } constexpr float fmin(float __x, float __y) { return __builtin_fminf(__x, __y); } constexpr long double fmin(long double __x, long double __y) { return __builtin_fminl(__x, __y); } template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type fmin(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return fmin(__type(__x), __type(__y)); } constexpr float hypot(float __x, float __y) { return __builtin_hypotf(__x, __y); } constexpr long double hypot(long double __x, long double __y) { return __builtin_hypotl(__x, __y); } template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type hypot(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return hypot(__type(__x), __type(__y)); } constexpr int ilogb(float __x) { return __builtin_ilogbf(__x); } constexpr int ilogb(long double __x) { return __builtin_ilogbl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, int>::__type ilogb(_Tp __x) { return __builtin_ilogb(__x); } constexpr float lgamma(float __x) { return __builtin_lgammaf(__x); } constexpr long double lgamma(long double __x) { return __builtin_lgammal(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type lgamma(_Tp __x) { return __builtin_lgamma(__x); } constexpr long long llrint(float __x) { return __builtin_llrintf(__x); } constexpr long long llrint(long double __x) { return __builtin_llrintl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long long>::__type llrint(_Tp __x) { return __builtin_llrint(__x); } constexpr long long llround(float __x) { return __builtin_llroundf(__x); } constexpr long long llround(long double __x) { return __builtin_llroundl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long long>::__type llround(_Tp __x) { return __builtin_llround(__x); } constexpr float log1p(float __x) { return __builtin_log1pf(__x); } constexpr long double log1p(long double __x) { return __builtin_log1pl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log1p(_Tp __x) { return __builtin_log1p(__x); } constexpr float log2(float __x) { return __builtin_log2f(__x); } constexpr long double log2(long double __x) { return __builtin_log2l(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log2(_Tp __x) { return __builtin_log2(__x); } constexpr float logb(float __x) { return __builtin_logbf(__x); } constexpr long double logb(long double __x) { return __builtin_logbl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type logb(_Tp __x) { return __builtin_logb(__x); } constexpr long lrint(float __x) { return __builtin_lrintf(__x); } constexpr long lrint(long double __x) { return __builtin_lrintl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long>::__type lrint(_Tp __x) { return __builtin_lrint(__x); } constexpr long lround(float __x) { return __builtin_lroundf(__x); } constexpr long lround(long double __x) { return __builtin_lroundl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long>::__type lround(_Tp __x) { return __builtin_lround(__x); } constexpr float nearbyint(float __x) { return __builtin_nearbyintf(__x); } constexpr long double nearbyint(long double __x) { return __builtin_nearbyintl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type nearbyint(_Tp __x) { return __builtin_nearbyint(__x); } constexpr float nextafter(float __x, float __y) { return __builtin_nextafterf(__x, __y); } constexpr long double nextafter(long double __x, long double __y) { return __builtin_nextafterl(__x, __y); } template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type nextafter(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return nextafter(__type(__x), __type(__y)); } constexpr float nexttoward(float __x, long double __y) { return __builtin_nexttowardf(__x, __y); } constexpr long double nexttoward(long double __x, long double __y) { return __builtin_nexttowardl(__x, __y); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type nexttoward(_Tp __x, long double __y) { return __builtin_nexttoward(__x, __y); } constexpr float remainder(float __x, float __y) { return __builtin_remainderf(__x, __y); } constexpr long double remainder(long double __x, long double __y) { return __builtin_remainderl(__x, __y); } template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type remainder(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return remainder(__type(__x), __type(__y)); } inline float remquo(float __x, float __y, int* __pquo) { return __builtin_remquof(__x, __y, __pquo); } inline long double remquo(long double __x, long double __y, int* __pquo) { return __builtin_remquol(__x, __y, __pquo); } template<typename _Tp, typename _Up> inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type remquo(_Tp __x, _Up __y, int* __pquo) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return remquo(__type(__x), __type(__y), __pquo); } constexpr float rint(float __x) { return __builtin_rintf(__x); } constexpr long double rint(long double __x) { return __builtin_rintl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type rint(_Tp __x) { return __builtin_rint(__x); } constexpr float round(float __x) { return __builtin_roundf(__x); } constexpr long double round(long double __x) { return __builtin_roundl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type round(_Tp __x) { return __builtin_round(__x); } constexpr float scalbln(float __x, long __ex) { return __builtin_scalblnf(__x, __ex); } constexpr long double scalbln(long double __x, long __ex) { return __builtin_scalblnl(__x, __ex); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type scalbln(_Tp __x, long __ex) { return __builtin_scalbln(__x, __ex); } constexpr float scalbn(float __x, int __ex) { return __builtin_scalbnf(__x, __ex); } constexpr long double scalbn(long double __x, int __ex) { return __builtin_scalbnl(__x, __ex); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type scalbn(_Tp __x, int __ex) { return __builtin_scalbn(__x, __ex); } constexpr float tgamma(float __x) { return __builtin_tgammaf(__x); } constexpr long double tgamma(long double __x) { return __builtin_tgammal(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type tgamma(_Tp __x) { return __builtin_tgamma(__x); } constexpr float trunc(float __x) { return __builtin_truncf(__x); } constexpr long double trunc(long double __x) { return __builtin_truncl(__x); } template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type trunc(_Tp __x) { return __builtin_trunc(__x); } # 1889 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cmath" 3 } } # 21 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 3 # 23 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" 2 # 42 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" namespace llvm { enum ZeroBehavior { ZB_Undefined, ZB_Max, ZB_Width }; namespace numbers { constexpr double e = 2.7182818284590452354, egamma = .57721566490153286061, ln2 = .69314718055994530942, ln10 = 2.3025850929940456840, log2e = 1.4426950408889634074, log10e = .43429448190325182765, pi = 3.1415926535897932385, inv_pi = .31830988618379067154, sqrtpi = 1.7724538509055160273, inv_sqrtpi = .56418958354775628695, sqrt2 = 1.4142135623730950488, inv_sqrt2 = .70710678118654752440, sqrt3 = 1.7320508075688772935, inv_sqrt3 = .57735026918962576451, phi = 1.6180339887498948482; constexpr float ef = 2.71828183F, egammaf = .577215665F, ln2f = .693147181F, ln10f = 2.30258509F, log2ef = 1.44269504F, log10ef = .434294482F, pif = 3.14159265F, inv_pif = .318309886F, sqrtpif = 1.77245385F, inv_sqrtpif = .564189584F, sqrt2f = 1.41421356F, inv_sqrt2f = .707106781F, sqrt3f = 1.73205081F, inv_sqrt3f = .577350269F, phif = 1.61803399F; } namespace detail { template <typename T, std::size_t SizeOfT> struct TrailingZerosCounter { static unsigned count(T Val, ZeroBehavior) { if (!Val) return std::numeric_limits<T>::digits; if (Val & 0x1) return 0; unsigned ZeroBits = 0; T Shift = std::numeric_limits<T>::digits >> 1; T Mask = std::numeric_limits<T>::max() >> Shift; while (Shift) { if ((Val & Mask) == 0) { Val >>= Shift; ZeroBits |= Shift; } Shift >>= 1; Mask >>= Shift; } return ZeroBits; } }; template <typename T> struct TrailingZerosCounter<T, 4> { static unsigned count(T Val, ZeroBehavior ZB) { if (ZB != ZB_Undefined && Val == 0) return 32; return __builtin_ctz(Val); } }; template <typename T> struct TrailingZerosCounter<T, 8> { static unsigned count(T Val, ZeroBehavior ZB) { if (ZB != ZB_Undefined && Val == 0) return 64; return __builtin_ctzll(Val); } }; } # 156 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" template <typename T> unsigned countTrailingZeros(T Val, ZeroBehavior ZB = ZB_Width) { static_assert(std::numeric_limits<T>::is_integer && !std::numeric_limits<T>::is_signed, "Only unsigned integral types are allowed."); return llvm::detail::TrailingZerosCounter<T, sizeof(T)>::count(Val, ZB); } namespace detail { template <typename T, std::size_t SizeOfT> struct LeadingZerosCounter { static unsigned count(T Val, ZeroBehavior) { if (!Val) return std::numeric_limits<T>::digits; unsigned ZeroBits = 0; for (T Shift = std::numeric_limits<T>::digits >> 1; Shift; Shift >>= 1) { T Tmp = Val >> Shift; if (Tmp) Val = Tmp; else ZeroBits |= Shift; } return ZeroBits; } }; template <typename T> struct LeadingZerosCounter<T, 4> { static unsigned count(T Val, ZeroBehavior ZB) { if (ZB != ZB_Undefined && Val == 0) return 32; return __builtin_clz(Val); } }; template <typename T> struct LeadingZerosCounter<T, 8> { static unsigned count(T Val, ZeroBehavior ZB) { if (ZB != ZB_Undefined && Val == 0) return 64; return __builtin_clzll(Val); } }; } # 225 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" template <typename T> unsigned countLeadingZeros(T Val, ZeroBehavior ZB = ZB_Width) { static_assert(std::numeric_limits<T>::is_integer && !std::numeric_limits<T>::is_signed, "Only unsigned integral types are allowed."); return llvm::detail::LeadingZerosCounter<T, sizeof(T)>::count(Val, ZB); } # 240 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" template <typename T> T findFirstSet(T Val, ZeroBehavior ZB = ZB_Max) { if (ZB == ZB_Max && Val == 0) return std::numeric_limits<T>::max(); return countTrailingZeros(Val, ZB_Undefined); } template <typename T> T maskTrailingOnes(unsigned N) { static_assert(std::is_unsigned<T>::value, "Invalid type!"); const unsigned Bits = 8 * sizeof(T); (static_cast<void> (0)); return N == 0 ? 0 : (T(-1) >> (Bits - N)); } template <typename T> T maskLeadingOnes(unsigned N) { return ~maskTrailingOnes<T>(8 * sizeof(T) - N); } template <typename T> T maskTrailingZeros(unsigned N) { return maskLeadingOnes<T>(8 * sizeof(T) - N); } template <typename T> T maskLeadingZeros(unsigned N) { return maskTrailingOnes<T>(8 * sizeof(T) - N); } # 281 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" template <typename T> T findLastSet(T Val, ZeroBehavior ZB = ZB_Max) { if (ZB == ZB_Max && Val == 0) return std::numeric_limits<T>::max(); return countLeadingZeros(Val, ZB_Undefined) ^ (std::numeric_limits<T>::digits - 1); } static const unsigned char BitReverseTable256[256] = { 0, 0 + 2 * 64, 0 + 1 * 64, 0 + 3 * 64, 0 + 2 * 16, 0 + 2 * 16 + 2 * 64, 0 + 2 * 16 + 1 * 64, 0 + 2 * 16 + 3 * 64, 0 + 1 * 16, 0 + 1 * 16 + 2 * 64, 0 + 1 * 16 + 1 * 64, 0 + 1 * 16 + 3 * 64, 0 + 3 * 16, 0 + 3 * 16 + 2 * 64, 0 + 3 * 16 + 1 * 64, 0 + 3 * 16 + 3 * 64, 0 + 2 * 4, 0 + 2 * 4 + 2 * 64, 0 + 2 * 4 + 1 * 64, 0 + 2 * 4 + 3 * 64, 0 + 2 * 4 + 2 * 16, 0 + 2 * 4 + 2 * 16 + 2 * 64, 0 + 2 * 4 + 2 * 16 + 1 * 64, 0 + 2 * 4 + 2 * 16 + 3 * 64, 0 + 2 * 4 + 1 * 16, 0 + 2 * 4 + 1 * 16 + 2 * 64, 0 + 2 * 4 + 1 * 16 + 1 * 64, 0 + 2 * 4 + 1 * 16 + 3 * 64, 0 + 2 * 4 + 3 * 16, 0 + 2 * 4 + 3 * 16 + 2 * 64, 0 + 2 * 4 + 3 * 16 + 1 * 64, 0 + 2 * 4 + 3 * 16 + 3 * 64, 0 + 1 * 4, 0 + 1 * 4 + 2 * 64, 0 + 1 * 4 + 1 * 64, 0 + 1 * 4 + 3 * 64, 0 + 1 * 4 + 2 * 16, 0 + 1 * 4 + 2 * 16 + 2 * 64, 0 + 1 * 4 + 2 * 16 + 1 * 64, 0 + 1 * 4 + 2 * 16 + 3 * 64, 0 + 1 * 4 + 1 * 16, 0 + 1 * 4 + 1 * 16 + 2 * 64, 0 + 1 * 4 + 1 * 16 + 1 * 64, 0 + 1 * 4 + 1 * 16 + 3 * 64, 0 + 1 * 4 + 3 * 16, 0 + 1 * 4 + 3 * 16 + 2 * 64, 0 + 1 * 4 + 3 * 16 + 1 * 64, 0 + 1 * 4 + 3 * 16 + 3 * 64, 0 + 3 * 4, 0 + 3 * 4 + 2 * 64, 0 + 3 * 4 + 1 * 64, 0 + 3 * 4 + 3 * 64, 0 + 3 * 4 + 2 * 16, 0 + 3 * 4 + 2 * 16 + 2 * 64, 0 + 3 * 4 + 2 * 16 + 1 * 64, 0 + 3 * 4 + 2 * 16 + 3 * 64, 0 + 3 * 4 + 1 * 16, 0 + 3 * 4 + 1 * 16 + 2 * 64, 0 + 3 * 4 + 1 * 16 + 1 * 64, 0 + 3 * 4 + 1 * 16 + 3 * 64, 0 + 3 * 4 + 3 * 16, 0 + 3 * 4 + 3 * 16 + 2 * 64, 0 + 3 * 4 + 3 * 16 + 1 * 64, 0 + 3 * 4 + 3 * 16 + 3 * 64, 2, 2 + 2 * 64, 2 + 1 * 64, 2 + 3 * 64, 2 + 2 * 16, 2 + 2 * 16 + 2 * 64, 2 + 2 * 16 + 1 * 64, 2 + 2 * 16 + 3 * 64, 2 + 1 * 16, 2 + 1 * 16 + 2 * 64, 2 + 1 * 16 + 1 * 64, 2 + 1 * 16 + 3 * 64, 2 + 3 * 16, 2 + 3 * 16 + 2 * 64, 2 + 3 * 16 + 1 * 64, 2 + 3 * 16 + 3 * 64, 2 + 2 * 4, 2 + 2 * 4 + 2 * 64, 2 + 2 * 4 + 1 * 64, 2 + 2 * 4 + 3 * 64, 2 + 2 * 4 + 2 * 16, 2 + 2 * 4 + 2 * 16 + 2 * 64, 2 + 2 * 4 + 2 * 16 + 1 * 64, 2 + 2 * 4 + 2 * 16 + 3 * 64, 2 + 2 * 4 + 1 * 16, 2 + 2 * 4 + 1 * 16 + 2 * 64, 2 + 2 * 4 + 1 * 16 + 1 * 64, 2 + 2 * 4 + 1 * 16 + 3 * 64, 2 + 2 * 4 + 3 * 16, 2 + 2 * 4 + 3 * 16 + 2 * 64, 2 + 2 * 4 + 3 * 16 + 1 * 64, 2 + 2 * 4 + 3 * 16 + 3 * 64, 2 + 1 * 4, 2 + 1 * 4 + 2 * 64, 2 + 1 * 4 + 1 * 64, 2 + 1 * 4 + 3 * 64, 2 + 1 * 4 + 2 * 16, 2 + 1 * 4 + 2 * 16 + 2 * 64, 2 + 1 * 4 + 2 * 16 + 1 * 64, 2 + 1 * 4 + 2 * 16 + 3 * 64, 2 + 1 * 4 + 1 * 16, 2 + 1 * 4 + 1 * 16 + 2 * 64, 2 + 1 * 4 + 1 * 16 + 1 * 64, 2 + 1 * 4 + 1 * 16 + 3 * 64, 2 + 1 * 4 + 3 * 16, 2 + 1 * 4 + 3 * 16 + 2 * 64, 2 + 1 * 4 + 3 * 16 + 1 * 64, 2 + 1 * 4 + 3 * 16 + 3 * 64, 2 + 3 * 4, 2 + 3 * 4 + 2 * 64, 2 + 3 * 4 + 1 * 64, 2 + 3 * 4 + 3 * 64, 2 + 3 * 4 + 2 * 16, 2 + 3 * 4 + 2 * 16 + 2 * 64, 2 + 3 * 4 + 2 * 16 + 1 * 64, 2 + 3 * 4 + 2 * 16 + 3 * 64, 2 + 3 * 4 + 1 * 16, 2 + 3 * 4 + 1 * 16 + 2 * 64, 2 + 3 * 4 + 1 * 16 + 1 * 64, 2 + 3 * 4 + 1 * 16 + 3 * 64, 2 + 3 * 4 + 3 * 16, 2 + 3 * 4 + 3 * 16 + 2 * 64, 2 + 3 * 4 + 3 * 16 + 1 * 64, 2 + 3 * 4 + 3 * 16 + 3 * 64, 1, 1 + 2 * 64, 1 + 1 * 64, 1 + 3 * 64, 1 + 2 * 16, 1 + 2 * 16 + 2 * 64, 1 + 2 * 16 + 1 * 64, 1 + 2 * 16 + 3 * 64, 1 + 1 * 16, 1 + 1 * 16 + 2 * 64, 1 + 1 * 16 + 1 * 64, 1 + 1 * 16 + 3 * 64, 1 + 3 * 16, 1 + 3 * 16 + 2 * 64, 1 + 3 * 16 + 1 * 64, 1 + 3 * 16 + 3 * 64, 1 + 2 * 4, 1 + 2 * 4 + 2 * 64, 1 + 2 * 4 + 1 * 64, 1 + 2 * 4 + 3 * 64, 1 + 2 * 4 + 2 * 16, 1 + 2 * 4 + 2 * 16 + 2 * 64, 1 + 2 * 4 + 2 * 16 + 1 * 64, 1 + 2 * 4 + 2 * 16 + 3 * 64, 1 + 2 * 4 + 1 * 16, 1 + 2 * 4 + 1 * 16 + 2 * 64, 1 + 2 * 4 + 1 * 16 + 1 * 64, 1 + 2 * 4 + 1 * 16 + 3 * 64, 1 + 2 * 4 + 3 * 16, 1 + 2 * 4 + 3 * 16 + 2 * 64, 1 + 2 * 4 + 3 * 16 + 1 * 64, 1 + 2 * 4 + 3 * 16 + 3 * 64, 1 + 1 * 4, 1 + 1 * 4 + 2 * 64, 1 + 1 * 4 + 1 * 64, 1 + 1 * 4 + 3 * 64, 1 + 1 * 4 + 2 * 16, 1 + 1 * 4 + 2 * 16 + 2 * 64, 1 + 1 * 4 + 2 * 16 + 1 * 64, 1 + 1 * 4 + 2 * 16 + 3 * 64, 1 + 1 * 4 + 1 * 16, 1 + 1 * 4 + 1 * 16 + 2 * 64, 1 + 1 * 4 + 1 * 16 + 1 * 64, 1 + 1 * 4 + 1 * 16 + 3 * 64, 1 + 1 * 4 + 3 * 16, 1 + 1 * 4 + 3 * 16 + 2 * 64, 1 + 1 * 4 + 3 * 16 + 1 * 64, 1 + 1 * 4 + 3 * 16 + 3 * 64, 1 + 3 * 4, 1 + 3 * 4 + 2 * 64, 1 + 3 * 4 + 1 * 64, 1 + 3 * 4 + 3 * 64, 1 + 3 * 4 + 2 * 16, 1 + 3 * 4 + 2 * 16 + 2 * 64, 1 + 3 * 4 + 2 * 16 + 1 * 64, 1 + 3 * 4 + 2 * 16 + 3 * 64, 1 + 3 * 4 + 1 * 16, 1 + 3 * 4 + 1 * 16 + 2 * 64, 1 + 3 * 4 + 1 * 16 + 1 * 64, 1 + 3 * 4 + 1 * 16 + 3 * 64, 1 + 3 * 4 + 3 * 16, 1 + 3 * 4 + 3 * 16 + 2 * 64, 1 + 3 * 4 + 3 * 16 + 1 * 64, 1 + 3 * 4 + 3 * 16 + 3 * 64, 3, 3 + 2 * 64, 3 + 1 * 64, 3 + 3 * 64, 3 + 2 * 16, 3 + 2 * 16 + 2 * 64, 3 + 2 * 16 + 1 * 64, 3 + 2 * 16 + 3 * 64, 3 + 1 * 16, 3 + 1 * 16 + 2 * 64, 3 + 1 * 16 + 1 * 64, 3 + 1 * 16 + 3 * 64, 3 + 3 * 16, 3 + 3 * 16 + 2 * 64, 3 + 3 * 16 + 1 * 64, 3 + 3 * 16 + 3 * 64, 3 + 2 * 4, 3 + 2 * 4 + 2 * 64, 3 + 2 * 4 + 1 * 64, 3 + 2 * 4 + 3 * 64, 3 + 2 * 4 + 2 * 16, 3 + 2 * 4 + 2 * 16 + 2 * 64, 3 + 2 * 4 + 2 * 16 + 1 * 64, 3 + 2 * 4 + 2 * 16 + 3 * 64, 3 + 2 * 4 + 1 * 16, 3 + 2 * 4 + 1 * 16 + 2 * 64, 3 + 2 * 4 + 1 * 16 + 1 * 64, 3 + 2 * 4 + 1 * 16 + 3 * 64, 3 + 2 * 4 + 3 * 16, 3 + 2 * 4 + 3 * 16 + 2 * 64, 3 + 2 * 4 + 3 * 16 + 1 * 64, 3 + 2 * 4 + 3 * 16 + 3 * 64, 3 + 1 * 4, 3 + 1 * 4 + 2 * 64, 3 + 1 * 4 + 1 * 64, 3 + 1 * 4 + 3 * 64, 3 + 1 * 4 + 2 * 16, 3 + 1 * 4 + 2 * 16 + 2 * 64, 3 + 1 * 4 + 2 * 16 + 1 * 64, 3 + 1 * 4 + 2 * 16 + 3 * 64, 3 + 1 * 4 + 1 * 16, 3 + 1 * 4 + 1 * 16 + 2 * 64, 3 + 1 * 4 + 1 * 16 + 1 * 64, 3 + 1 * 4 + 1 * 16 + 3 * 64, 3 + 1 * 4 + 3 * 16, 3 + 1 * 4 + 3 * 16 + 2 * 64, 3 + 1 * 4 + 3 * 16 + 1 * 64, 3 + 1 * 4 + 3 * 16 + 3 * 64, 3 + 3 * 4, 3 + 3 * 4 + 2 * 64, 3 + 3 * 4 + 1 * 64, 3 + 3 * 4 + 3 * 64, 3 + 3 * 4 + 2 * 16, 3 + 3 * 4 + 2 * 16 + 2 * 64, 3 + 3 * 4 + 2 * 16 + 1 * 64, 3 + 3 * 4 + 2 * 16 + 3 * 64, 3 + 3 * 4 + 1 * 16, 3 + 3 * 4 + 1 * 16 + 2 * 64, 3 + 3 * 4 + 1 * 16 + 1 * 64, 3 + 3 * 4 + 1 * 16 + 3 * 64, 3 + 3 * 4 + 3 * 16, 3 + 3 * 4 + 3 * 16 + 2 * 64, 3 + 3 * 4 + 3 * 16 + 1 * 64, 3 + 3 * 4 + 3 * 16 + 3 * 64 }; template <typename T> T reverseBits(T Val) { unsigned char in[sizeof(Val)]; unsigned char out[sizeof(Val)]; std::memcpy(in, &Val, sizeof(Val)); for (unsigned i = 0; i < sizeof(Val); ++i) out[(sizeof(Val) - i) - 1] = BitReverseTable256[in[i]]; std::memcpy(&Val, out, sizeof(Val)); return Val; } template<> inline uint8_t reverseBits<uint8_t>(uint8_t Val) { return __builtin_bitreverse8(Val); } template<> inline uint16_t reverseBits<uint16_t>(uint16_t Val) { return __builtin_bitreverse16(Val); } template<> inline uint32_t reverseBits<uint32_t>(uint32_t Val) { return __builtin_bitreverse32(Val); } template<> inline uint64_t reverseBits<uint64_t>(uint64_t Val) { return __builtin_bitreverse64(Val); } constexpr inline uint32_t Hi_32(uint64_t Value) { return static_cast<uint32_t>(Value >> 32); } constexpr inline uint32_t Lo_32(uint64_t Value) { return static_cast<uint32_t>(Value); } constexpr inline uint64_t Make_64(uint32_t High, uint32_t Low) { return ((uint64_t)High << 32) | (uint64_t)Low; } template <unsigned N> constexpr inline bool isInt(int64_t x) { return N >= 64 || (-(1L<<(N-1)) <= x && x < (1L<<(N-1))); } template <> constexpr inline bool isInt<8>(int64_t x) { return static_cast<int8_t>(x) == x; } template <> constexpr inline bool isInt<16>(int64_t x) { return static_cast<int16_t>(x) == x; } template <> constexpr inline bool isInt<32>(int64_t x) { return static_cast<int32_t>(x) == x; } template <unsigned N, unsigned S> constexpr inline bool isShiftedInt(int64_t x) { static_assert( N > 0, "isShiftedInt<0> doesn't make sense (refers to a 0-bit number."); static_assert(N + S <= 64, "isShiftedInt<N, S> with N + S > 64 is too wide."); return isInt<N + S>(x) && (x % (1UL << S) == 0); } # 395 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" template <unsigned N> constexpr inline std::enable_if_t<(N < 64), bool> isUInt(uint64_t X) { static_assert(N > 0, "isUInt<0> doesn't make sense"); return X < (1UL << (N)); } template <unsigned N> constexpr inline std::enable_if_t<N >= 64, bool> isUInt(uint64_t X) { return true; } template <> constexpr inline bool isUInt<8>(uint64_t x) { return static_cast<uint8_t>(x) == x; } template <> constexpr inline bool isUInt<16>(uint64_t x) { return static_cast<uint16_t>(x) == x; } template <> constexpr inline bool isUInt<32>(uint64_t x) { return static_cast<uint32_t>(x) == x; } template <unsigned N, unsigned S> constexpr inline bool isShiftedUInt(uint64_t x) { static_assert( N > 0, "isShiftedUInt<0> doesn't make sense (refers to a 0-bit number)"); static_assert(N + S <= 64, "isShiftedUInt<N, S> with N + S > 64 is too wide."); return isUInt<N + S>(x) && (x % (1UL << S) == 0); } inline uint64_t maxUIntN(uint64_t N) { (static_cast<void> (0)); return (18446744073709551615UL) >> (64 - N); } inline int64_t minIntN(int64_t N) { (static_cast<void> (0)); return -(1UL<<(N-1)); } inline int64_t maxIntN(int64_t N) { (static_cast<void> (0)); return (1UL << (N - 1)) - 1; } inline bool isUIntN(unsigned N, uint64_t x) { return N >= 64 || x <= maxUIntN(N); } inline bool isIntN(unsigned N, int64_t x) { return N >= 64 || (minIntN(N) <= x && x <= maxIntN(N)); } constexpr inline bool isMask_32(uint32_t Value) { return Value && ((Value + 1) & Value) == 0; } constexpr inline bool isMask_64(uint64_t Value) { return Value && ((Value + 1) & Value) == 0; } constexpr inline bool isShiftedMask_32(uint32_t Value) { return Value && isMask_32((Value - 1) | Value); } constexpr inline bool isShiftedMask_64(uint64_t Value) { return Value && isMask_64((Value - 1) | Value); } constexpr inline bool isPowerOf2_32(uint32_t Value) { return Value && !(Value & (Value - 1)); } constexpr inline bool isPowerOf2_64(uint64_t Value) { return Value && !(Value & (Value - 1)); } # 509 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" template <typename T> unsigned countLeadingOnes(T Value, ZeroBehavior ZB = ZB_Width) { static_assert(std::numeric_limits<T>::is_integer && !std::numeric_limits<T>::is_signed, "Only unsigned integral types are allowed."); return countLeadingZeros<T>(~Value, ZB); } # 525 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" template <typename T> unsigned countTrailingOnes(T Value, ZeroBehavior ZB = ZB_Width) { static_assert(std::numeric_limits<T>::is_integer && !std::numeric_limits<T>::is_signed, "Only unsigned integral types are allowed."); return countTrailingZeros<T>(~Value, ZB); } namespace detail { template <typename T, std::size_t SizeOfT> struct PopulationCounter { static unsigned count(T Value) { static_assert(SizeOfT <= 4, "Not implemented!"); return __builtin_popcount(Value); } }; template <typename T> struct PopulationCounter<T, 8> { static unsigned count(T Value) { return __builtin_popcountll(Value); } }; } template <typename T> inline unsigned countPopulation(T Value) { static_assert(std::numeric_limits<T>::is_integer && !std::numeric_limits<T>::is_signed, "Only unsigned integral types are allowed."); return detail::PopulationCounter<T, sizeof(T)>::count(Value); } template <size_t kValue> constexpr inline size_t CTLog2() { static_assert(kValue > 0 && llvm::isPowerOf2_64(kValue), "Value is not a valid power of 2"); return 1 + CTLog2<kValue / 2>(); } template <> constexpr inline size_t CTLog2<1>() { return 0; } inline double Log2(double Value) { return log2(Value); } inline unsigned Log2_32(uint32_t Value) { return 31 - countLeadingZeros(Value); } inline unsigned Log2_64(uint64_t Value) { return 63 - countLeadingZeros(Value); } inline unsigned Log2_32_Ceil(uint32_t Value) { return 32 - countLeadingZeros(Value - 1); } inline unsigned Log2_64_Ceil(uint64_t Value) { return 64 - countLeadingZeros(Value - 1); } template <typename T> inline T greatestCommonDivisor(T A, T B) { while (B) { T Tmp = B; B = A % B; A = Tmp; } return A; } inline uint64_t GreatestCommonDivisor64(uint64_t A, uint64_t B) { return greatestCommonDivisor<uint64_t>(A, B); } inline double BitsToDouble(uint64_t Bits) { double D; static_assert(sizeof(uint64_t) == sizeof(double), "Unexpected type sizes"); memcpy(&D, &Bits, sizeof(Bits)); return D; } inline float BitsToFloat(uint32_t Bits) { float F; static_assert(sizeof(uint32_t) == sizeof(float), "Unexpected type sizes"); memcpy(&F, &Bits, sizeof(Bits)); return F; } inline uint64_t DoubleToBits(double Double) { uint64_t Bits; static_assert(sizeof(uint64_t) == sizeof(double), "Unexpected type sizes"); memcpy(&Bits, &Double, sizeof(Double)); return Bits; } inline uint32_t FloatToBits(float Float) { uint32_t Bits; static_assert(sizeof(uint32_t) == sizeof(float), "Unexpected type sizes"); memcpy(&Bits, &Float, sizeof(Float)); return Bits; } constexpr inline uint64_t MinAlign(uint64_t A, uint64_t B) { return (A | B) & (1 + ~(A | B)); } inline uint64_t NextPowerOf2(uint64_t A) { A |= (A >> 1); A |= (A >> 2); A |= (A >> 4); A |= (A >> 8); A |= (A >> 16); A |= (A >> 32); return A + 1; } inline uint64_t PowerOf2Floor(uint64_t A) { if (!A) return 0; return 1ull << (63 - countLeadingZeros(A, ZB_Undefined)); } inline uint64_t PowerOf2Ceil(uint64_t A) { if (!A) return 0; return NextPowerOf2(A - 1); } # 729 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" inline uint64_t alignTo(uint64_t Value, uint64_t Align, uint64_t Skew = 0) { (static_cast<void> (0)); Skew %= Align; return (Value + Align - 1 - Skew) / Align * Align + Skew; } template <uint64_t Align> constexpr inline uint64_t alignTo(uint64_t Value) { static_assert(Align != 0u, "Align must be non-zero"); return (Value + Align - 1) / Align * Align; } inline uint64_t divideCeil(uint64_t Numerator, uint64_t Denominator) { return alignTo(Numerator, Denominator) / Denominator; } inline uint64_t divideNearest(uint64_t Numerator, uint64_t Denominator) { return (Numerator + (Denominator / 2)) / Denominator; } inline uint64_t alignDown(uint64_t Value, uint64_t Align, uint64_t Skew = 0) { (static_cast<void> (0)); Skew %= Align; return (Value - Skew) / Align * Align + Skew; } template <unsigned B> constexpr inline int32_t SignExtend32(uint32_t X) { static_assert(B > 0, "Bit width can't be 0."); static_assert(B <= 32, "Bit width out of range."); return int32_t(X << (32 - B)) >> (32 - B); } inline int32_t SignExtend32(uint32_t X, unsigned B) { (static_cast<void> (0)); (static_cast<void> (0)); return int32_t(X << (32 - B)) >> (32 - B); } template <unsigned B> constexpr inline int64_t SignExtend64(uint64_t x) { static_assert(B > 0, "Bit width can't be 0."); static_assert(B <= 64, "Bit width out of range."); return int64_t(x << (64 - B)) >> (64 - B); } inline int64_t SignExtend64(uint64_t X, unsigned B) { (static_cast<void> (0)); (static_cast<void> (0)); return int64_t(X << (64 - B)) >> (64 - B); } template <typename T> std::enable_if_t<std::is_unsigned<T>::value, T> AbsoluteDifference(T X, T Y) { return std::max(X, Y) - std::min(X, Y); } template <typename T> std::enable_if_t<std::is_unsigned<T>::value, T> SaturatingAdd(T X, T Y, bool *ResultOverflowed = nullptr) { bool Dummy; bool &Overflowed = ResultOverflowed ? *ResultOverflowed : Dummy; T Z = X + Y; Overflowed = (Z < X || Z < Y); if (Overflowed) return std::numeric_limits<T>::max(); else return Z; } template <typename T> std::enable_if_t<std::is_unsigned<T>::value, T> SaturatingMultiply(T X, T Y, bool *ResultOverflowed = nullptr) { bool Dummy; bool &Overflowed = ResultOverflowed ? *ResultOverflowed : Dummy; Overflowed = false; int Log2Z = Log2_64(X) + Log2_64(Y); const T Max = std::numeric_limits<T>::max(); int Log2Max = Log2_64(Max); if (Log2Z < Log2Max) { return X * Y; } if (Log2Z > Log2Max) { Overflowed = true; return Max; } T Z = (X >> 1) * Y; if (Z & ~(Max >> 1)) { Overflowed = true; return Max; } Z <<= 1; if (X & 1) return SaturatingAdd(Z, Y, ResultOverflowed); return Z; } template <typename T> std::enable_if_t<std::is_unsigned<T>::value, T> SaturatingMultiplyAdd(T X, T Y, T A, bool *ResultOverflowed = nullptr) { bool Dummy; bool &Overflowed = ResultOverflowed ? *ResultOverflowed : Dummy; T Product = SaturatingMultiply(X, Y, &Overflowed); if (Overflowed) return Product; return SaturatingAdd(A, Product, &Overflowed); } extern const float huge_valf; template <typename T> std::enable_if_t<std::is_signed<T>::value, T> AddOverflow(T X, T Y, T &Result) { return __builtin_add_overflow(X, Y, &Result); # 906 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" } template <typename T> std::enable_if_t<std::is_signed<T>::value, T> SubOverflow(T X, T Y, T &Result) { return __builtin_sub_overflow(X, Y, &Result); # 932 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MathExtras.h" } template <typename T> std::enable_if_t<std::is_signed<T>::value, T> MulOverflow(T X, T Y, T &Result) { using U = std::make_unsigned_t<T>; const U UX = X < 0 ? (0 - static_cast<U>(X)) : static_cast<U>(X); const U UY = Y < 0 ? (0 - static_cast<U>(Y)) : static_cast<U>(Y); const U UResult = UX * UY; const bool IsNegative = (X < 0) ^ (Y < 0); Result = IsNegative ? (0 - UResult) : UResult; if (UX == 0 || UY == 0) return false; if (IsNegative) return UX > (static_cast<U>(std::numeric_limits<T>::max()) + U(1)) / UY; else return UX > (static_cast<U>(std::numeric_limits<T>::max())) / UY; } } # 21 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallVector.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MemAlloc.h" 1 # 21 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MemAlloc.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 3 # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MemAlloc.h" 2 namespace llvm { __attribute__((returns_nonnull)) inline void *safe_malloc(size_t Sz) { void *Result = std::malloc(Sz); if (Result == nullptr) { if (Sz == 0) return safe_malloc(1); report_bad_alloc_error("Allocation failed"); } return Result; } __attribute__((returns_nonnull)) inline void *safe_calloc(size_t Count, size_t Sz) { void *Result = std::calloc(Count, Sz); if (Result == nullptr) { if (Count == 0 || Sz == 0) return safe_malloc(1); report_bad_alloc_error("Allocation failed"); } return Result; } __attribute__((returns_nonnull)) inline void *safe_realloc(void *Ptr, size_t Sz) { void *Result = std::realloc(Ptr, Sz); if (Result == nullptr) { if (Sz == 0) return safe_malloc(1); report_bad_alloc_error("Allocation failed"); } return Result; } # 74 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MemAlloc.h" __attribute__((returns_nonnull)) __attribute__((__malloc__)) void * allocate_buffer(size_t Size, size_t Alignment); # 84 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MemAlloc.h" void deallocate_buffer(void *Ptr, size_t Size, size_t Alignment); } # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallVector.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 25 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallVector.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 3 # 27 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallVector.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 3 # 28 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallVector.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/memory" 1 3 # 47 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/memory" 3 # 65 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/memory" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_uninitialized.h" 1 3 # 67 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_uninitialized.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<bool _TrivialValueTypes> struct __uninitialized_copy { template<typename _InputIterator, typename _ForwardIterator> static _ForwardIterator __uninit_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) { _ForwardIterator __cur = __result; if (true) { for (; __first != __last; ++__first, (void)++__cur) std::_Construct(std::__addressof(*__cur), *__first); return __cur; } if (false) { std::_Destroy(__result, __cur); ; } } }; template<> struct __uninitialized_copy<true> { template<typename _InputIterator, typename _ForwardIterator> static _ForwardIterator __uninit_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) { return std::copy(__first, __last, __result); } }; # 113 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_uninitialized.h" 3 template<typename _InputIterator, typename _ForwardIterator> inline _ForwardIterator uninitialized_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) { typedef typename iterator_traits<_InputIterator>::value_type _ValueType1; typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType2; typedef typename iterator_traits<_InputIterator>::reference _RefType1; typedef typename iterator_traits<_ForwardIterator>::reference _RefType2; const bool __assignable = is_assignable<_RefType2, _RefType1>::value; return std::__uninitialized_copy<__is_trivial(_ValueType1) && __is_trivial(_ValueType2) && __assignable>:: __uninit_copy(__first, __last, __result); } template<bool _TrivialValueType> struct __uninitialized_fill { template<typename _ForwardIterator, typename _Tp> static void __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) { _ForwardIterator __cur = __first; if (true) { for (; __cur != __last; ++__cur) std::_Construct(std::__addressof(*__cur), __x); } if (false) { std::_Destroy(__first, __cur); ; } } }; template<> struct __uninitialized_fill<true> { template<typename _ForwardIterator, typename _Tp> static void __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) { std::fill(__first, __last, __x); } }; # 179 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_uninitialized.h" 3 template<typename _ForwardIterator, typename _Tp> inline void uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; const bool __assignable = is_copy_assignable<_ValueType>::value; std::__uninitialized_fill<__is_trivial(_ValueType) && __assignable>:: __uninit_fill(__first, __last, __x); } template<bool _TrivialValueType> struct __uninitialized_fill_n { template<typename _ForwardIterator, typename _Size, typename _Tp> static _ForwardIterator __uninit_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) { _ForwardIterator __cur = __first; if (true) { for (; __n > 0; --__n, (void) ++__cur) std::_Construct(std::__addressof(*__cur), __x); return __cur; } if (false) { std::_Destroy(__first, __cur); ; } } }; template<> struct __uninitialized_fill_n<true> { template<typename _ForwardIterator, typename _Size, typename _Tp> static _ForwardIterator __uninit_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) { return std::fill_n(__first, __n, __x); } }; # 242 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_uninitialized.h" 3 template<typename _ForwardIterator, typename _Size, typename _Tp> inline _ForwardIterator uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; const bool __assignable = is_copy_assignable<_ValueType>::value; return __uninitialized_fill_n<__is_trivial(_ValueType) && __assignable>:: __uninit_fill_n(__first, __n, __x); } template<typename _InputIterator, typename _ForwardIterator, typename _Allocator> _ForwardIterator __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) { _ForwardIterator __cur = __result; if (true) { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __first != __last; ++__first, (void)++__cur) __traits::construct(__alloc, std::__addressof(*__cur), *__first); return __cur; } if (false) { std::_Destroy(__result, __cur, __alloc); ; } } template<typename _InputIterator, typename _ForwardIterator, typename _Tp> inline _ForwardIterator __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, allocator<_Tp>&) { return std::uninitialized_copy(__first, __last, __result); } template<typename _InputIterator, typename _ForwardIterator, typename _Allocator> inline _ForwardIterator __uninitialized_move_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) { return std::__uninitialized_copy_a(std::make_move_iterator(__first), std::make_move_iterator(__last), __result, __alloc); } template<typename _InputIterator, typename _ForwardIterator, typename _Allocator> inline _ForwardIterator __uninitialized_move_if_noexcept_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) { return std::__uninitialized_copy_a (std::__make_move_if_noexcept_iterator(__first), std::__make_move_if_noexcept_iterator(__last), __result, __alloc); } template<typename _ForwardIterator, typename _Tp, typename _Allocator> void __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __cur = __first; if (true) { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __cur != __last; ++__cur) __traits::construct(__alloc, std::__addressof(*__cur), __x); } if (false) { std::_Destroy(__first, __cur, __alloc); ; } } template<typename _ForwardIterator, typename _Tp, typename _Tp2> inline void __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, allocator<_Tp2>&) { std::uninitialized_fill(__first, __last, __x); } template<typename _ForwardIterator, typename _Size, typename _Tp, typename _Allocator> _ForwardIterator __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __cur = __first; if (true) { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __n > 0; --__n, (void) ++__cur) __traits::construct(__alloc, std::__addressof(*__cur), __x); return __cur; } if (false) { std::_Destroy(__first, __cur, __alloc); ; } } template<typename _ForwardIterator, typename _Size, typename _Tp, typename _Tp2> inline _ForwardIterator __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, const _Tp& __x, allocator<_Tp2>&) { return std::uninitialized_fill_n(__first, __n, __x); } # 378 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_uninitialized.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _ForwardIterator, typename _Allocator> inline _ForwardIterator __uninitialized_copy_move(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _ForwardIterator __result, _Allocator& __alloc) { _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, __result, __alloc); if (true) { return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); } if (false) { std::_Destroy(__result, __mid, __alloc); ; } } template<typename _InputIterator1, typename _InputIterator2, typename _ForwardIterator, typename _Allocator> inline _ForwardIterator __uninitialized_move_copy(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _ForwardIterator __result, _Allocator& __alloc) { _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, __result, __alloc); if (true) { return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); } if (false) { std::_Destroy(__result, __mid, __alloc); ; } } template<typename _ForwardIterator, typename _Tp, typename _InputIterator, typename _Allocator> inline _ForwardIterator __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, const _Tp& __x, _InputIterator __first, _InputIterator __last, _Allocator& __alloc) { std::__uninitialized_fill_a(__result, __mid, __x, __alloc); if (true) { return std::__uninitialized_move_a(__first, __last, __mid, __alloc); } if (false) { std::_Destroy(__result, __mid, __alloc); ; } } template<typename _InputIterator, typename _ForwardIterator, typename _Tp, typename _Allocator> inline void __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2, const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, __first2, __alloc); if (true) { std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); } if (false) { std::_Destroy(__first2, __mid2, __alloc); ; } } template<bool _TrivialValueType> struct __uninitialized_default_1 { template<typename _ForwardIterator> static void __uninit_default(_ForwardIterator __first, _ForwardIterator __last) { _ForwardIterator __cur = __first; if (true) { for (; __cur != __last; ++__cur) std::_Construct(std::__addressof(*__cur)); } if (false) { std::_Destroy(__first, __cur); ; } } }; template<> struct __uninitialized_default_1<true> { template<typename _ForwardIterator> static void __uninit_default(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; std::fill(__first, __last, _ValueType()); } }; template<bool _TrivialValueType> struct __uninitialized_default_n_1 { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __uninit_default_n(_ForwardIterator __first, _Size __n) { _ForwardIterator __cur = __first; if (true) { for (; __n > 0; --__n, (void) ++__cur) std::_Construct(std::__addressof(*__cur)); return __cur; } if (false) { std::_Destroy(__first, __cur); ; } } }; template<> struct __uninitialized_default_n_1<true> { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __uninit_default_n(_ForwardIterator __first, _Size __n) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; return std::fill_n(__first, __n, _ValueType()); } }; template<typename _ForwardIterator> inline void __uninitialized_default(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; const bool __assignable = is_copy_assignable<_ValueType>::value; std::__uninitialized_default_1<__is_trivial(_ValueType) && __assignable>:: __uninit_default(__first, __last); } template<typename _ForwardIterator, typename _Size> inline _ForwardIterator __uninitialized_default_n(_ForwardIterator __first, _Size __n) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; const bool __assignable = is_copy_assignable<_ValueType>::value; return __uninitialized_default_n_1<__is_trivial(_ValueType) && __assignable>:: __uninit_default_n(__first, __n); } template<typename _ForwardIterator, typename _Allocator> void __uninitialized_default_a(_ForwardIterator __first, _ForwardIterator __last, _Allocator& __alloc) { _ForwardIterator __cur = __first; if (true) { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __cur != __last; ++__cur) __traits::construct(__alloc, std::__addressof(*__cur)); } if (false) { std::_Destroy(__first, __cur, __alloc); ; } } template<typename _ForwardIterator, typename _Tp> inline void __uninitialized_default_a(_ForwardIterator __first, _ForwardIterator __last, allocator<_Tp>&) { std::__uninitialized_default(__first, __last); } template<typename _ForwardIterator, typename _Size, typename _Allocator> _ForwardIterator __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, _Allocator& __alloc) { _ForwardIterator __cur = __first; if (true) { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __n > 0; --__n, (void) ++__cur) __traits::construct(__alloc, std::__addressof(*__cur)); return __cur; } if (false) { std::_Destroy(__first, __cur, __alloc); ; } } template<typename _ForwardIterator, typename _Size, typename _Tp> inline _ForwardIterator __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, allocator<_Tp>&) { return std::__uninitialized_default_n(__first, __n); } template<bool _TrivialValueType> struct __uninitialized_default_novalue_1 { template<typename _ForwardIterator> static void __uninit_default_novalue(_ForwardIterator __first, _ForwardIterator __last) { _ForwardIterator __cur = __first; if (true) { for (; __cur != __last; ++__cur) std::_Construct_novalue(std::__addressof(*__cur)); } if (false) { std::_Destroy(__first, __cur); ; } } }; template<> struct __uninitialized_default_novalue_1<true> { template<typename _ForwardIterator> static void __uninit_default_novalue(_ForwardIterator __first, _ForwardIterator __last) { } }; template<bool _TrivialValueType> struct __uninitialized_default_novalue_n_1 { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) { _ForwardIterator __cur = __first; if (true) { for (; __n > 0; --__n, (void) ++__cur) std::_Construct_novalue(std::__addressof(*__cur)); return __cur; } if (false) { std::_Destroy(__first, __cur); ; } } }; template<> struct __uninitialized_default_novalue_n_1<true> { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) { return std::next(__first, __n); } }; template<typename _ForwardIterator> inline void __uninitialized_default_novalue(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; std::__uninitialized_default_novalue_1< is_trivially_default_constructible<_ValueType>::value>:: __uninit_default_novalue(__first, __last); } template<typename _ForwardIterator, typename _Size> inline _ForwardIterator __uninitialized_default_novalue_n(_ForwardIterator __first, _Size __n) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; return __uninitialized_default_novalue_n_1< is_trivially_default_constructible<_ValueType>::value>:: __uninit_default_novalue_n(__first, __n); } template<typename _InputIterator, typename _Size, typename _ForwardIterator> _ForwardIterator __uninitialized_copy_n(_InputIterator __first, _Size __n, _ForwardIterator __result, input_iterator_tag) { _ForwardIterator __cur = __result; if (true) { for (; __n > 0; --__n, (void) ++__first, ++__cur) std::_Construct(std::__addressof(*__cur), *__first); return __cur; } if (false) { std::_Destroy(__result, __cur); ; } } template<typename _RandomAccessIterator, typename _Size, typename _ForwardIterator> inline _ForwardIterator __uninitialized_copy_n(_RandomAccessIterator __first, _Size __n, _ForwardIterator __result, random_access_iterator_tag) { return std::uninitialized_copy(__first, __first + __n, __result); } template<typename _InputIterator, typename _Size, typename _ForwardIterator> pair<_InputIterator, _ForwardIterator> __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, _ForwardIterator __result, input_iterator_tag) { _ForwardIterator __cur = __result; if (true) { for (; __n > 0; --__n, (void) ++__first, ++__cur) std::_Construct(std::__addressof(*__cur), *__first); return {__first, __cur}; } if (false) { std::_Destroy(__result, __cur); ; } } template<typename _RandomAccessIterator, typename _Size, typename _ForwardIterator> inline pair<_RandomAccessIterator, _ForwardIterator> __uninitialized_copy_n_pair(_RandomAccessIterator __first, _Size __n, _ForwardIterator __result, random_access_iterator_tag) { auto __second_res = uninitialized_copy(__first, __first + __n, __result); auto __first_res = std::next(__first, __n); return {__first_res, __second_res}; } # 810 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_uninitialized.h" 3 template<typename _InputIterator, typename _Size, typename _ForwardIterator> inline _ForwardIterator uninitialized_copy_n(_InputIterator __first, _Size __n, _ForwardIterator __result) { return std::__uninitialized_copy_n(__first, __n, __result, std::__iterator_category(__first)); } template<typename _InputIterator, typename _Size, typename _ForwardIterator> inline pair<_InputIterator, _ForwardIterator> __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, _ForwardIterator __result) { return std::__uninitialized_copy_n_pair(__first, __n, __result, std::__iterator_category(__first)); } # 883 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_uninitialized.h" 3 } # 66 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/memory" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_raw_storage_iter.h" 1 3 # 59 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_raw_storage_iter.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template <class _OutputIterator, class _Tp> class raw_storage_iterator : public iterator<output_iterator_tag, void, void, void, void> { protected: _OutputIterator _M_iter; public: explicit raw_storage_iterator(_OutputIterator __x) : _M_iter(__x) {} raw_storage_iterator& operator*() { return *this; } raw_storage_iterator& operator=(const _Tp& __element) { std::_Construct(std::__addressof(*_M_iter), __element); return *this; } raw_storage_iterator& operator=(_Tp&& __element) { std::_Construct(std::__addressof(*_M_iter), std::move(__element)); return *this; } raw_storage_iterator& operator++() { ++_M_iter; return *this; } raw_storage_iterator operator++(int) { raw_storage_iterator __tmp = *this; ++_M_iter; return __tmp; } _OutputIterator base() const { return _M_iter; } }; } # 68 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/memory" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/concurrence.h" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/concurrence.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { enum _Lock_policy { _S_single, _S_mutex, _S_atomic }; static const _Lock_policy __default_lock_policy = _S_atomic; # 67 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/concurrence.h" 3 class __concurrence_lock_error : public std::exception { public: virtual char const* what() const throw() { return "__gnu_cxx::__concurrence_lock_error"; } }; class __concurrence_unlock_error : public std::exception { public: virtual char const* what() const throw() { return "__gnu_cxx::__concurrence_unlock_error"; } }; class __concurrence_broadcast_error : public std::exception { public: virtual char const* what() const throw() { return "__gnu_cxx::__concurrence_broadcast_error"; } }; class __concurrence_wait_error : public std::exception { public: virtual char const* what() const throw() { return "__gnu_cxx::__concurrence_wait_error"; } }; inline void __throw_concurrence_lock_error() { (__builtin_abort()); } inline void __throw_concurrence_unlock_error() { (__builtin_abort()); } inline void __throw_concurrence_broadcast_error() { (__builtin_abort()); } inline void __throw_concurrence_wait_error() { (__builtin_abort()); } class __mutex { private: __gthread_mutex_t _M_mutex = { { 0, 0, 0, 0, 0, 0, 0, { 0, 0 } } }; __mutex(const __mutex&); __mutex& operator=(const __mutex&); public: __mutex() { } # 147 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/concurrence.h" 3 void lock() { if (__gthread_active_p()) { if (__gthread_mutex_lock(&_M_mutex) != 0) __throw_concurrence_lock_error(); } } void unlock() { if (__gthread_active_p()) { if (__gthread_mutex_unlock(&_M_mutex) != 0) __throw_concurrence_unlock_error(); } } __gthread_mutex_t* gthread_mutex(void) { return &_M_mutex; } }; class __recursive_mutex { private: __gthread_recursive_mutex_t _M_mutex = { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, 0, { 0, 0 } } }; __recursive_mutex(const __recursive_mutex&); __recursive_mutex& operator=(const __recursive_mutex&); public: __recursive_mutex() { } # 202 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/concurrence.h" 3 void lock() { if (__gthread_active_p()) { if (__gthread_recursive_mutex_lock(&_M_mutex) != 0) __throw_concurrence_lock_error(); } } void unlock() { if (__gthread_active_p()) { if (__gthread_recursive_mutex_unlock(&_M_mutex) != 0) __throw_concurrence_unlock_error(); } } __gthread_recursive_mutex_t* gthread_recursive_mutex(void) { return &_M_mutex; } }; class __scoped_lock { public: typedef __mutex __mutex_type; private: __mutex_type& _M_device; __scoped_lock(const __scoped_lock&); __scoped_lock& operator=(const __scoped_lock&); public: explicit __scoped_lock(__mutex_type& __name) : _M_device(__name) { _M_device.lock(); } ~__scoped_lock() throw() { _M_device.unlock(); } }; class __cond { private: __gthread_cond_t _M_cond = { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }; __cond(const __cond&); __cond& operator=(const __cond&); public: __cond() { } # 280 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/concurrence.h" 3 void broadcast() { if (__gthread_active_p()) { if (__gthread_cond_broadcast(&_M_cond) != 0) __throw_concurrence_broadcast_error(); } } void wait(__mutex *mutex) { { if (__gthread_cond_wait(&_M_cond, mutex->gthread_mutex()) != 0) __throw_concurrence_wait_error(); } } void wait_recursive(__recursive_mutex *mutex) { { if (__gthread_cond_wait_recursive(&_M_cond, mutex->gthread_recursive_mutex()) != 0) __throw_concurrence_wait_error(); } } }; } # 75 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/memory" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/uses_allocator.h" 1 3 # 35 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/uses_allocator.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { struct __erased_type { }; template<typename _Alloc, typename _Tp> using __is_erased_or_convertible = __or_<is_same<_Tp, __erased_type>, is_convertible<_Alloc, _Tp>>; struct allocator_arg_t { explicit allocator_arg_t() = default; }; constexpr allocator_arg_t allocator_arg = allocator_arg_t(); template<typename _Tp, typename _Alloc, typename = __void_t<>> struct __uses_allocator_helper : false_type { }; template<typename _Tp, typename _Alloc> struct __uses_allocator_helper<_Tp, _Alloc, __void_t<typename _Tp::allocator_type>> : __is_erased_or_convertible<_Alloc, typename _Tp::allocator_type>::type { }; template<typename _Tp, typename _Alloc> struct uses_allocator : __uses_allocator_helper<_Tp, _Alloc>::type { }; struct __uses_alloc_base { }; struct __uses_alloc0 : __uses_alloc_base { struct _Sink { void operator=(const void*) { } } _M_a; }; template<typename _Alloc> struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; }; template<typename _Alloc> struct __uses_alloc2 : __uses_alloc_base { const _Alloc* _M_a; }; template<bool, typename _Tp, typename _Alloc, typename... _Args> struct __uses_alloc; template<typename _Tp, typename _Alloc, typename... _Args> struct __uses_alloc<true, _Tp, _Alloc, _Args...> : conditional< is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value, __uses_alloc1<_Alloc>, __uses_alloc2<_Alloc>>::type { static_assert(__or_< is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>, is_constructible<_Tp, _Args..., _Alloc>>::value, "construction with" " an allocator must be possible if uses_allocator is true"); }; template<typename _Tp, typename _Alloc, typename... _Args> struct __uses_alloc<false, _Tp, _Alloc, _Args...> : __uses_alloc0 { }; template<typename _Tp, typename _Alloc, typename... _Args> using __uses_alloc_t = __uses_alloc<uses_allocator<_Tp, _Alloc>::value, _Tp, _Alloc, _Args...>; template<typename _Tp, typename _Alloc, typename... _Args> inline __uses_alloc_t<_Tp, _Alloc, _Args...> __use_alloc(const _Alloc& __a) { __uses_alloc_t<_Tp, _Alloc, _Args...> __ret; __ret._M_a = std::__addressof(__a); return __ret; } template<typename _Tp, typename _Alloc, typename... _Args> void __use_alloc(const _Alloc&&) = delete; template<template<typename...> class _Predicate, typename _Tp, typename _Alloc, typename... _Args> struct __is_uses_allocator_predicate : conditional<uses_allocator<_Tp, _Alloc>::value, __or_<_Predicate<_Tp, allocator_arg_t, _Alloc, _Args...>, _Predicate<_Tp, _Args..., _Alloc>>, _Predicate<_Tp, _Args...>>::type { }; template<typename _Tp, typename _Alloc, typename... _Args> struct __is_uses_allocator_constructible : __is_uses_allocator_predicate<is_constructible, _Tp, _Alloc, _Args...> { }; template<typename _Tp, typename _Alloc, typename... _Args> constexpr bool __is_uses_allocator_constructible_v = __is_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; template<typename _Tp, typename _Alloc, typename... _Args> struct __is_nothrow_uses_allocator_constructible : __is_uses_allocator_predicate<is_nothrow_constructible, _Tp, _Alloc, _Args...> { }; template<typename _Tp, typename _Alloc, typename... _Args> constexpr bool __is_nothrow_uses_allocator_constructible_v = __is_nothrow_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; template<typename _Tp, typename... _Args> void __uses_allocator_construct_impl(__uses_alloc0 __a, _Tp* __ptr, _Args&&... __args) { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)...); } template<typename _Tp, typename _Alloc, typename... _Args> void __uses_allocator_construct_impl(__uses_alloc1<_Alloc> __a, _Tp* __ptr, _Args&&... __args) { ::new ((void*)__ptr) _Tp(allocator_arg, *__a._M_a, std::forward<_Args>(__args)...); } template<typename _Tp, typename _Alloc, typename... _Args> void __uses_allocator_construct_impl(__uses_alloc2<_Alloc> __a, _Tp* __ptr, _Args&&... __args) { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)..., *__a._M_a); } template<typename _Tp, typename _Alloc, typename... _Args> void __uses_allocator_construct(const _Alloc& __a, _Tp* __ptr, _Args&&... __args) { __uses_allocator_construct_impl(__use_alloc<_Tp, _Alloc, _Args...>(__a), __ptr, std::forward<_Args>(__args)...); } } # 78 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/memory" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/unique_ptr.h" 1 3 # 37 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/unique_ptr.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/array" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/array" 3 # 43 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/array" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp, std::size_t _Nm> struct __array_traits { typedef _Tp _Type[_Nm]; typedef __is_swappable<_Tp> _Is_swappable; typedef __is_nothrow_swappable<_Tp> _Is_nothrow_swappable; static constexpr _Tp& _S_ref(const _Type& __t, std::size_t __n) noexcept { return const_cast<_Tp&>(__t[__n]); } static constexpr _Tp* _S_ptr(const _Type& __t) noexcept { return const_cast<_Tp*>(__t); } }; template<typename _Tp> struct __array_traits<_Tp, 0> { struct _Type { }; typedef true_type _Is_swappable; typedef true_type _Is_nothrow_swappable; static constexpr _Tp& _S_ref(const _Type&, std::size_t) noexcept { return *static_cast<_Tp*>(nullptr); } static constexpr _Tp* _S_ptr(const _Type&) noexcept { return nullptr; } }; # 93 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/array" 3 template<typename _Tp, std::size_t _Nm> struct array { typedef _Tp value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef value_type* iterator; typedef const value_type* const_iterator; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; typedef std::__array_traits<_Tp, _Nm> _AT_Type; typename _AT_Type::_Type _M_elems; void fill(const value_type& __u) { std::fill_n(begin(), size(), __u); } void swap(array& __other) noexcept(_AT_Type::_Is_nothrow_swappable::value) { std::swap_ranges(begin(), end(), __other.begin()); } iterator begin() noexcept { return iterator(data()); } const_iterator begin() const noexcept { return const_iterator(data()); } iterator end() noexcept { return iterator(data() + _Nm); } const_iterator end() const noexcept { return const_iterator(data() + _Nm); } reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } reverse_iterator rend() noexcept { return reverse_iterator(begin()); } const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } const_iterator cbegin() const noexcept { return const_iterator(data()); } const_iterator cend() const noexcept { return const_iterator(data() + _Nm); } const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } constexpr size_type size() const noexcept { return _Nm; } constexpr size_type max_size() const noexcept { return _Nm; } constexpr bool empty() const noexcept { return size() == 0; } reference operator[](size_type __n) noexcept { return _AT_Type::_S_ref(_M_elems, __n); } constexpr const_reference operator[](size_type __n) const noexcept { return _AT_Type::_S_ref(_M_elems, __n); } reference at(size_type __n) { if (__n >= _Nm) std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)"), __n, _Nm); return _AT_Type::_S_ref(_M_elems, __n); } constexpr const_reference at(size_type __n) const { return __n < _Nm ? _AT_Type::_S_ref(_M_elems, __n) : (std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)"), __n, _Nm), _AT_Type::_S_ref(_M_elems, 0)); } reference front() noexcept { return *begin(); } constexpr const_reference front() const noexcept { return _AT_Type::_S_ref(_M_elems, 0); } reference back() noexcept { return _Nm ? *(end() - 1) : *end(); } constexpr const_reference back() const noexcept { return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1) : _AT_Type::_S_ref(_M_elems, 0); } pointer data() noexcept { return _AT_Type::_S_ptr(_M_elems); } const_pointer data() const noexcept { return _AT_Type::_S_ptr(_M_elems); } }; # 250 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/array" 3 template<typename _Tp, std::size_t _Nm> inline bool operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return std::equal(__one.begin(), __one.end(), __two.begin()); } template<typename _Tp, std::size_t _Nm> inline bool operator!=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return !(__one == __two); } template<typename _Tp, std::size_t _Nm> inline bool operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) { return std::lexicographical_compare(__a.begin(), __a.end(), __b.begin(), __b.end()); } template<typename _Tp, std::size_t _Nm> inline bool operator>(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return __two < __one; } template<typename _Tp, std::size_t _Nm> inline bool operator<=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return !(__one > __two); } template<typename _Tp, std::size_t _Nm> inline bool operator>=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return !(__one < __two); } template<typename _Tp, std::size_t _Nm> inline void swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) noexcept(noexcept(__one.swap(__two))) { __one.swap(__two); } # 305 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/array" 3 template<std::size_t _Int, typename _Tp, std::size_t _Nm> constexpr _Tp& get(array<_Tp, _Nm>& __arr) noexcept { static_assert(_Int < _Nm, "array index is within bounds"); return std::__array_traits<_Tp, _Nm>:: _S_ref(__arr._M_elems, _Int); } template<std::size_t _Int, typename _Tp, std::size_t _Nm> constexpr _Tp&& get(array<_Tp, _Nm>&& __arr) noexcept { static_assert(_Int < _Nm, "array index is within bounds"); return std::move(std::get<_Int>(__arr)); } template<std::size_t _Int, typename _Tp, std::size_t _Nm> constexpr const _Tp& get(const array<_Tp, _Nm>& __arr) noexcept { static_assert(_Int < _Nm, "array index is within bounds"); return std::__array_traits<_Tp, _Nm>:: _S_ref(__arr._M_elems, _Int); } template<std::size_t _Int, typename _Tp, std::size_t _Nm> constexpr const _Tp&& get(const array<_Tp, _Nm>&& __arr) noexcept { static_assert(_Int < _Nm, "array index is within bounds"); return std::move(std::get<_Int>(__arr)); } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> struct tuple_size; template<typename _Tp, std::size_t _Nm> struct tuple_size<std::array<_Tp, _Nm>> : public integral_constant<std::size_t, _Nm> { }; template<std::size_t _Int, typename _Tp> struct tuple_element; template<std::size_t _Int, typename _Tp, std::size_t _Nm> struct tuple_element<_Int, std::array<_Tp, _Nm>> { static_assert(_Int < _Nm, "index is out of bounds"); typedef _Tp type; }; template<typename _Tp, std::size_t _Nm> struct __is_tuple_like_impl<std::array<_Tp, _Nm>> : true_type { }; } # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 52 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h" 3 template<typename _Tp, typename _Up = typename __inv_unwrap<_Tp>::type> constexpr _Up&& __invfwd(typename remove_reference<_Tp>::type& __t) noexcept { return static_cast<_Up&&>(__t); } template<typename _Res, typename _Fn, typename... _Args> constexpr _Res __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args) { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } template<typename _Res, typename _MemFun, typename _Tp, typename... _Args> constexpr _Res __invoke_impl(__invoke_memfun_ref, _MemFun&& __f, _Tp&& __t, _Args&&... __args) { return (__invfwd<_Tp>(__t).*__f)(std::forward<_Args>(__args)...); } template<typename _Res, typename _MemFun, typename _Tp, typename... _Args> constexpr _Res __invoke_impl(__invoke_memfun_deref, _MemFun&& __f, _Tp&& __t, _Args&&... __args) { return ((*std::forward<_Tp>(__t)).*__f)(std::forward<_Args>(__args)...); } template<typename _Res, typename _MemPtr, typename _Tp> constexpr _Res __invoke_impl(__invoke_memobj_ref, _MemPtr&& __f, _Tp&& __t) { return __invfwd<_Tp>(__t).*__f; } template<typename _Res, typename _MemPtr, typename _Tp> constexpr _Res __invoke_impl(__invoke_memobj_deref, _MemPtr&& __f, _Tp&& __t) { return (*std::forward<_Tp>(__t)).*__f; } template<typename _Callable, typename... _Args> constexpr typename __invoke_result<_Callable, _Args...>::type __invoke(_Callable&& __fn, _Args&&... __args) noexcept(__is_nothrow_invocable<_Callable, _Args...>::value) { using __result = __invoke_result<_Callable, _Args...>; using __type = typename __result::type; using __tag = typename __result::__invoke_type; return std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), std::forward<_Args>(__args)...); } } # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename... _Elements> class tuple; template<typename _Tp> struct __is_empty_non_tuple : is_empty<_Tp> { }; template<typename _El0, typename... _El> struct __is_empty_non_tuple<tuple<_El0, _El...>> : false_type { }; template<typename _Tp> using __empty_not_final = typename conditional<__is_final(_Tp), false_type, __is_empty_non_tuple<_Tp>>::type; template<std::size_t _Idx, typename _Head, bool = __empty_not_final<_Head>::value> struct _Head_base; template<std::size_t _Idx, typename _Head> struct _Head_base<_Idx, _Head, true> : public _Head { constexpr _Head_base() : _Head() { } constexpr _Head_base(const _Head& __h) : _Head(__h) { } constexpr _Head_base(const _Head_base&) = default; constexpr _Head_base(_Head_base&&) = default; template<typename _UHead> constexpr _Head_base(_UHead&& __h) : _Head(std::forward<_UHead>(__h)) { } _Head_base(allocator_arg_t, __uses_alloc0) : _Head() { } template<typename _Alloc> _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) : _Head(allocator_arg, *__a._M_a) { } template<typename _Alloc> _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) : _Head(*__a._M_a) { } template<typename _UHead> _Head_base(__uses_alloc0, _UHead&& __uhead) : _Head(std::forward<_UHead>(__uhead)) { } template<typename _Alloc, typename _UHead> _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) : _Head(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) { } template<typename _Alloc, typename _UHead> _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) : _Head(std::forward<_UHead>(__uhead), *__a._M_a) { } static constexpr _Head& _M_head(_Head_base& __b) noexcept { return __b; } static constexpr const _Head& _M_head(const _Head_base& __b) noexcept { return __b; } }; template<std::size_t _Idx, typename _Head> struct _Head_base<_Idx, _Head, false> { constexpr _Head_base() : _M_head_impl() { } constexpr _Head_base(const _Head& __h) : _M_head_impl(__h) { } constexpr _Head_base(const _Head_base&) = default; constexpr _Head_base(_Head_base&&) = default; template<typename _UHead> constexpr _Head_base(_UHead&& __h) : _M_head_impl(std::forward<_UHead>(__h)) { } _Head_base(allocator_arg_t, __uses_alloc0) : _M_head_impl() { } template<typename _Alloc> _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) : _M_head_impl(allocator_arg, *__a._M_a) { } template<typename _Alloc> _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) : _M_head_impl(*__a._M_a) { } template<typename _UHead> _Head_base(__uses_alloc0, _UHead&& __uhead) : _M_head_impl(std::forward<_UHead>(__uhead)) { } template<typename _Alloc, typename _UHead> _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) : _M_head_impl(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) { } template<typename _Alloc, typename _UHead> _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) : _M_head_impl(std::forward<_UHead>(__uhead), *__a._M_a) { } static constexpr _Head& _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; } static constexpr const _Head& _M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; } _Head _M_head_impl; }; # 176 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple" 3 template<std::size_t _Idx, typename... _Elements> struct _Tuple_impl; template<std::size_t _Idx, typename _Head, typename... _Tail> struct _Tuple_impl<_Idx, _Head, _Tail...> : public _Tuple_impl<_Idx + 1, _Tail...>, private _Head_base<_Idx, _Head> { template<std::size_t, typename...> friend class _Tuple_impl; typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited; typedef _Head_base<_Idx, _Head> _Base; static constexpr _Head& _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } static constexpr const _Head& _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } static constexpr _Inherited& _M_tail(_Tuple_impl& __t) noexcept { return __t; } static constexpr const _Inherited& _M_tail(const _Tuple_impl& __t) noexcept { return __t; } constexpr _Tuple_impl() : _Inherited(), _Base() { } explicit constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail) : _Inherited(__tail...), _Base(__head) { } template<typename _UHead, typename... _UTail, typename = typename enable_if<sizeof...(_Tail) == sizeof...(_UTail)>::type> explicit constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail) : _Inherited(std::forward<_UTail>(__tail)...), _Base(std::forward<_UHead>(__head)) { } constexpr _Tuple_impl(const _Tuple_impl&) = default; constexpr _Tuple_impl(_Tuple_impl&& __in) noexcept(__and_<is_nothrow_move_constructible<_Head>, is_nothrow_move_constructible<_Inherited>>::value) : _Inherited(std::move(_M_tail(__in))), _Base(std::forward<_Head>(_M_head(__in))) { } template<typename... _UElements> constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in) : _Inherited(_Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), _Base(_Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { } template<typename _UHead, typename... _UTails> constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) : _Inherited(std::move (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), _Base(std::forward<_UHead> (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) : _Inherited(__tag, __a), _Base(__tag, __use_alloc<_Head>(__a)) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Head& __head, const _Tail&... __tail) : _Inherited(__tag, __a, __tail...), _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } template<typename _Alloc, typename _UHead, typename... _UTail, typename = typename enable_if<sizeof...(_Tail) == sizeof...(_UTail)>::type> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _UHead&& __head, _UTail&&... __tail) : _Inherited(__tag, __a, std::forward<_UTail>(__tail)...), _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), std::forward<_UHead>(__head)) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Tuple_impl& __in) : _Inherited(__tag, __a, _M_tail(__in)), _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _Tuple_impl&& __in) : _Inherited(__tag, __a, std::move(_M_tail(__in))), _Base(__use_alloc<_Head, _Alloc, _Head>(__a), std::forward<_Head>(_M_head(__in))) { } template<typename _Alloc, typename... _UElements> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Tuple_impl<_Idx, _UElements...>& __in) : _Inherited(__tag, __a, _Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { } template<typename _Alloc, typename _UHead, typename... _UTails> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _Tuple_impl<_Idx, _UHead, _UTails...>&& __in) : _Inherited(__tag, __a, std::move (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), std::forward<_UHead> (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } _Tuple_impl& operator=(const _Tuple_impl& __in) { _M_head(*this) = _M_head(__in); _M_tail(*this) = _M_tail(__in); return *this; } _Tuple_impl& operator=(_Tuple_impl&& __in) noexcept(__and_<is_nothrow_move_assignable<_Head>, is_nothrow_move_assignable<_Inherited>>::value) { _M_head(*this) = std::forward<_Head>(_M_head(__in)); _M_tail(*this) = std::move(_M_tail(__in)); return *this; } template<typename... _UElements> _Tuple_impl& operator=(const _Tuple_impl<_Idx, _UElements...>& __in) { _M_head(*this) = _Tuple_impl<_Idx, _UElements...>::_M_head(__in); _M_tail(*this) = _Tuple_impl<_Idx, _UElements...>::_M_tail(__in); return *this; } template<typename _UHead, typename... _UTails> _Tuple_impl& operator=(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) { _M_head(*this) = std::forward<_UHead> (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)); _M_tail(*this) = std::move (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in)); return *this; } protected: void _M_swap(_Tuple_impl& __in) noexcept(__is_nothrow_swappable<_Head>::value && noexcept(_M_tail(__in)._M_swap(_M_tail(__in)))) { using std::swap; swap(_M_head(*this), _M_head(__in)); _Inherited::_M_swap(_M_tail(__in)); } }; template<std::size_t _Idx, typename _Head> struct _Tuple_impl<_Idx, _Head> : private _Head_base<_Idx, _Head> { template<std::size_t, typename...> friend class _Tuple_impl; typedef _Head_base<_Idx, _Head> _Base; static constexpr _Head& _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } static constexpr const _Head& _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } constexpr _Tuple_impl() : _Base() { } explicit constexpr _Tuple_impl(const _Head& __head) : _Base(__head) { } template<typename _UHead> explicit constexpr _Tuple_impl(_UHead&& __head) : _Base(std::forward<_UHead>(__head)) { } constexpr _Tuple_impl(const _Tuple_impl&) = default; constexpr _Tuple_impl(_Tuple_impl&& __in) noexcept(is_nothrow_move_constructible<_Head>::value) : _Base(std::forward<_Head>(_M_head(__in))) { } template<typename _UHead> constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UHead>& __in) : _Base(_Tuple_impl<_Idx, _UHead>::_M_head(__in)) { } template<typename _UHead> constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in) : _Base(std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) : _Base(__tag, __use_alloc<_Head>(__a)) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Head& __head) : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } template<typename _Alloc, typename _UHead> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _UHead&& __head) : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), std::forward<_UHead>(__head)) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Tuple_impl& __in) : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _Tuple_impl&& __in) : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), std::forward<_Head>(_M_head(__in))) { } template<typename _Alloc, typename _UHead> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Tuple_impl<_Idx, _UHead>& __in) : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _Tuple_impl<_Idx, _UHead>::_M_head(__in)) { } template<typename _Alloc, typename _UHead> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _Tuple_impl<_Idx, _UHead>&& __in) : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) { } _Tuple_impl& operator=(const _Tuple_impl& __in) { _M_head(*this) = _M_head(__in); return *this; } _Tuple_impl& operator=(_Tuple_impl&& __in) noexcept(is_nothrow_move_assignable<_Head>::value) { _M_head(*this) = std::forward<_Head>(_M_head(__in)); return *this; } template<typename _UHead> _Tuple_impl& operator=(const _Tuple_impl<_Idx, _UHead>& __in) { _M_head(*this) = _Tuple_impl<_Idx, _UHead>::_M_head(__in); return *this; } template<typename _UHead> _Tuple_impl& operator=(_Tuple_impl<_Idx, _UHead>&& __in) { _M_head(*this) = std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)); return *this; } protected: void _M_swap(_Tuple_impl& __in) noexcept(__is_nothrow_swappable<_Head>::value) { using std::swap; swap(_M_head(*this), _M_head(__in)); } }; template<bool, typename... _Elements> struct _TC { template<typename... _UElements> static constexpr bool _ConstructibleTuple() { return __and_<is_constructible<_Elements, const _UElements&>...>::value; } template<typename... _UElements> static constexpr bool _ImplicitlyConvertibleTuple() { return __and_<is_convertible<const _UElements&, _Elements>...>::value; } template<typename... _UElements> static constexpr bool _MoveConstructibleTuple() { return __and_<is_constructible<_Elements, _UElements&&>...>::value; } template<typename... _UElements> static constexpr bool _ImplicitlyMoveConvertibleTuple() { return __and_<is_convertible<_UElements&&, _Elements>...>::value; } template<typename _SrcTuple> static constexpr bool _NonNestedTuple() { return __and_<__not_<is_same<tuple<_Elements...>, typename remove_cv< typename remove_reference<_SrcTuple>::type >::type>>, __not_<is_convertible<_SrcTuple, _Elements...>>, __not_<is_constructible<_Elements..., _SrcTuple>> >::value; } template<typename... _UElements> static constexpr bool _NotSameTuple() { return __not_<is_same<tuple<_Elements...>, typename remove_const< typename remove_reference<_UElements...>::type >::type>>::value; } }; template<typename... _Elements> struct _TC<false, _Elements...> { template<typename... _UElements> static constexpr bool _ConstructibleTuple() { return false; } template<typename... _UElements> static constexpr bool _ImplicitlyConvertibleTuple() { return false; } template<typename... _UElements> static constexpr bool _MoveConstructibleTuple() { return false; } template<typename... _UElements> static constexpr bool _ImplicitlyMoveConvertibleTuple() { return false; } template<typename... _UElements> static constexpr bool _NonNestedTuple() { return true; } template<typename... _UElements> static constexpr bool _NotSameTuple() { return true; } }; template<typename... _Elements> class tuple : public _Tuple_impl<0, _Elements...> { typedef _Tuple_impl<0, _Elements...> _Inherited; template<typename _Dummy> struct _TC2 { static constexpr bool _DefaultConstructibleTuple() { return __and_<is_default_constructible<_Elements>...>::value; } static constexpr bool _ImplicitlyDefaultConstructibleTuple() { return __and_<__is_implicitly_default_constructible<_Elements>...> ::value; } }; public: template<typename _Dummy = void, typename enable_if<_TC2<_Dummy>:: _ImplicitlyDefaultConstructibleTuple(), bool>::type = true> constexpr tuple() : _Inherited() { } template<typename _Dummy = void, typename enable_if<_TC2<_Dummy>:: _DefaultConstructibleTuple() && !_TC2<_Dummy>:: _ImplicitlyDefaultConstructibleTuple(), bool>::type = false> explicit constexpr tuple() : _Inherited() { } template<typename _Dummy> using _TCC = _TC<is_same<_Dummy, void>::value, _Elements...>; template<typename _Dummy = void, typename enable_if< _TCC<_Dummy>::template _ConstructibleTuple<_Elements...>() && _TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_Elements...>() && (sizeof...(_Elements) >= 1), bool>::type=true> constexpr tuple(const _Elements&... __elements) : _Inherited(__elements...) { } template<typename _Dummy = void, typename enable_if< _TCC<_Dummy>::template _ConstructibleTuple<_Elements...>() && !_TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_Elements...>() && (sizeof...(_Elements) >= 1), bool>::type=false> explicit constexpr tuple(const _Elements&... __elements) : _Inherited(__elements...) { } template<typename... _UElements> using _TMC = _TC<(sizeof...(_Elements) == sizeof...(_UElements)) && (_TC<(sizeof...(_UElements)==1), _Elements...>:: template _NotSameTuple<_UElements...>()), _Elements...>; template<typename... _UElements> using _TMCT = _TC<(sizeof...(_Elements) == sizeof...(_UElements)) && !is_same<tuple<_Elements...>, tuple<_UElements...>>::value, _Elements...>; template<typename... _UElements, typename enable_if< _TMC<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && _TMC<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>() && (sizeof...(_Elements) >= 1), bool>::type=true> constexpr tuple(_UElements&&... __elements) : _Inherited(std::forward<_UElements>(__elements)...) { } template<typename... _UElements, typename enable_if< _TMC<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && !_TMC<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>() && (sizeof...(_Elements) >= 1), bool>::type=false> explicit constexpr tuple(_UElements&&... __elements) : _Inherited(std::forward<_UElements>(__elements)...) { } constexpr tuple(const tuple&) = default; constexpr tuple(tuple&&) = default; template<typename _Dummy> using _TNTC = _TC<is_same<_Dummy, void>::value && sizeof...(_Elements) == 1, _Elements...>; template<typename... _UElements, typename _Dummy = void, typename enable_if<_TMCT<_UElements...>::template _ConstructibleTuple<_UElements...>() && _TMCT<_UElements...>::template _ImplicitlyConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<const tuple<_UElements...>&>(), bool>::type=true> constexpr tuple(const tuple<_UElements...>& __in) : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) { } template<typename... _UElements, typename _Dummy = void, typename enable_if<_TMCT<_UElements...>::template _ConstructibleTuple<_UElements...>() && !_TMCT<_UElements...>::template _ImplicitlyConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<const tuple<_UElements...>&>(), bool>::type=false> explicit constexpr tuple(const tuple<_UElements...>& __in) : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) { } template<typename... _UElements, typename _Dummy = void, typename enable_if<_TMCT<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && _TMCT<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<tuple<_UElements...>&&>(), bool>::type=true> constexpr tuple(tuple<_UElements...>&& __in) : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } template<typename... _UElements, typename _Dummy = void, typename enable_if<_TMCT<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && !_TMCT<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<tuple<_UElements...>&&>(), bool>::type=false> explicit constexpr tuple(tuple<_UElements...>&& __in) : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } template<typename _Alloc> tuple(allocator_arg_t __tag, const _Alloc& __a) : _Inherited(__tag, __a) { } template<typename _Alloc, typename _Dummy = void, typename enable_if< _TCC<_Dummy>::template _ConstructibleTuple<_Elements...>() && _TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_Elements...>(), bool>::type=true> tuple(allocator_arg_t __tag, const _Alloc& __a, const _Elements&... __elements) : _Inherited(__tag, __a, __elements...) { } template<typename _Alloc, typename _Dummy = void, typename enable_if< _TCC<_Dummy>::template _ConstructibleTuple<_Elements...>() && !_TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_Elements...>(), bool>::type=false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, const _Elements&... __elements) : _Inherited(__tag, __a, __elements...) { } template<typename _Alloc, typename... _UElements, typename enable_if<_TMC<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && _TMC<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>(), bool>::type=true> tuple(allocator_arg_t __tag, const _Alloc& __a, _UElements&&... __elements) : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) { } template<typename _Alloc, typename... _UElements, typename enable_if<_TMC<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && !_TMC<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>(), bool>::type=false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, _UElements&&... __elements) : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) { } template<typename _Alloc> tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) : _Inherited(__tag, __a, static_cast<const _Inherited&>(__in)) { } template<typename _Alloc> tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } template<typename _Alloc, typename _Dummy = void, typename... _UElements, typename enable_if<_TMCT<_UElements...>::template _ConstructibleTuple<_UElements...>() && _TMCT<_UElements...>::template _ImplicitlyConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<tuple<_UElements...>&&>(), bool>::type=true> tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_UElements...>& __in) : _Inherited(__tag, __a, static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) { } template<typename _Alloc, typename _Dummy = void, typename... _UElements, typename enable_if<_TMCT<_UElements...>::template _ConstructibleTuple<_UElements...>() && !_TMCT<_UElements...>::template _ImplicitlyConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<tuple<_UElements...>&&>(), bool>::type=false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_UElements...>& __in) : _Inherited(__tag, __a, static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) { } template<typename _Alloc, typename _Dummy = void, typename... _UElements, typename enable_if<_TMCT<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && _TMCT<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<tuple<_UElements...>&&>(), bool>::type=true> tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_UElements...>&& __in) : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } template<typename _Alloc, typename _Dummy = void, typename... _UElements, typename enable_if<_TMCT<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && !_TMCT<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<tuple<_UElements...>&&>(), bool>::type=false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_UElements...>&& __in) : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } tuple& operator=(const tuple& __in) { static_cast<_Inherited&>(*this) = __in; return *this; } tuple& operator=(tuple&& __in) noexcept(is_nothrow_move_assignable<_Inherited>::value) { static_cast<_Inherited&>(*this) = std::move(__in); return *this; } template<typename... _UElements> typename enable_if<sizeof...(_UElements) == sizeof...(_Elements), tuple&>::type operator=(const tuple<_UElements...>& __in) { static_cast<_Inherited&>(*this) = __in; return *this; } template<typename... _UElements> typename enable_if<sizeof...(_UElements) == sizeof...(_Elements), tuple&>::type operator=(tuple<_UElements...>&& __in) { static_cast<_Inherited&>(*this) = std::move(__in); return *this; } void swap(tuple& __in) noexcept(noexcept(__in._M_swap(__in))) { _Inherited::_M_swap(__in); } }; # 889 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple" 3 template<> class tuple<> { public: void swap(tuple&) noexcept { } tuple() = default; template<typename _Alloc> tuple(allocator_arg_t, const _Alloc&) { } template<typename _Alloc> tuple(allocator_arg_t, const _Alloc&, const tuple&) { } }; template<typename _T1, typename _T2> class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2> { typedef _Tuple_impl<0, _T1, _T2> _Inherited; public: template <typename _U1 = _T1, typename _U2 = _T2, typename enable_if<__and_< __is_implicitly_default_constructible<_U1>, __is_implicitly_default_constructible<_U2>> ::value, bool>::type = true> constexpr tuple() : _Inherited() { } template <typename _U1 = _T1, typename _U2 = _T2, typename enable_if< __and_< is_default_constructible<_U1>, is_default_constructible<_U2>, __not_< __and_<__is_implicitly_default_constructible<_U1>, __is_implicitly_default_constructible<_U2>>>> ::value, bool>::type = false> explicit constexpr tuple() : _Inherited() { } template<typename _Dummy> using _TCC = _TC<is_same<_Dummy, void>::value, _T1, _T2>; template<typename _Dummy = void, typename enable_if<_TCC<_Dummy>::template _ConstructibleTuple<_T1, _T2>() && _TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_T1, _T2>(), bool>::type = true> constexpr tuple(const _T1& __a1, const _T2& __a2) : _Inherited(__a1, __a2) { } template<typename _Dummy = void, typename enable_if<_TCC<_Dummy>::template _ConstructibleTuple<_T1, _T2>() && !_TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_T1, _T2>(), bool>::type = false> explicit constexpr tuple(const _T1& __a1, const _T2& __a2) : _Inherited(__a1, __a2) { } using _TMC = _TC<true, _T1, _T2>; template<typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>() && !is_same<typename decay<_U1>::type, allocator_arg_t>::value, bool>::type = true> constexpr tuple(_U1&& __a1, _U2&& __a2) : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>() && !is_same<typename decay<_U1>::type, allocator_arg_t>::value, bool>::type = false> explicit constexpr tuple(_U1&& __a1, _U2&& __a2) : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } constexpr tuple(const tuple&) = default; constexpr tuple(tuple&&) = default; template<typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = true> constexpr tuple(const tuple<_U1, _U2>& __in) : _Inherited(static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit constexpr tuple(const tuple<_U1, _U2>& __in) : _Inherited(static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = true> constexpr tuple(tuple<_U1, _U2>&& __in) : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit constexpr tuple(tuple<_U1, _U2>&& __in) : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = true> constexpr tuple(const pair<_U1, _U2>& __in) : _Inherited(__in.first, __in.second) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit constexpr tuple(const pair<_U1, _U2>& __in) : _Inherited(__in.first, __in.second) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = true> constexpr tuple(pair<_U1, _U2>&& __in) : _Inherited(std::forward<_U1>(__in.first), std::forward<_U2>(__in.second)) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit constexpr tuple(pair<_U1, _U2>&& __in) : _Inherited(std::forward<_U1>(__in.first), std::forward<_U2>(__in.second)) { } template<typename _Alloc> tuple(allocator_arg_t __tag, const _Alloc& __a) : _Inherited(__tag, __a) { } template<typename _Alloc, typename _Dummy = void, typename enable_if< _TCC<_Dummy>::template _ConstructibleTuple<_T1, _T2>() && _TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_T1, _T2>(), bool>::type=true> tuple(allocator_arg_t __tag, const _Alloc& __a, const _T1& __a1, const _T2& __a2) : _Inherited(__tag, __a, __a1, __a2) { } template<typename _Alloc, typename _Dummy = void, typename enable_if< _TCC<_Dummy>::template _ConstructibleTuple<_T1, _T2>() && !_TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_T1, _T2>(), bool>::type=false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, const _T1& __a1, const _T2& __a2) : _Inherited(__tag, __a, __a1, __a2) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) : _Inherited(__tag, __a, std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) : _Inherited(__tag, __a, std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } template<typename _Alloc> tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) : _Inherited(__tag, __a, static_cast<const _Inherited&>(__in)) { } template<typename _Alloc> tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_U1, _U2>& __in) : _Inherited(__tag, __a, static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_U1, _U2>& __in) : _Inherited(__tag, __a, static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, const pair<_U1, _U2>& __in) : _Inherited(__tag, __a, __in.first, __in.second) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, const pair<_U1, _U2>& __in) : _Inherited(__tag, __a, __in.first, __in.second) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) : _Inherited(__tag, __a, std::forward<_U1>(__in.first), std::forward<_U2>(__in.second)) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) : _Inherited(__tag, __a, std::forward<_U1>(__in.first), std::forward<_U2>(__in.second)) { } tuple& operator=(const tuple& __in) { static_cast<_Inherited&>(*this) = __in; return *this; } tuple& operator=(tuple&& __in) noexcept(is_nothrow_move_assignable<_Inherited>::value) { static_cast<_Inherited&>(*this) = std::move(__in); return *this; } template<typename _U1, typename _U2> tuple& operator=(const tuple<_U1, _U2>& __in) { static_cast<_Inherited&>(*this) = __in; return *this; } template<typename _U1, typename _U2> tuple& operator=(tuple<_U1, _U2>&& __in) { static_cast<_Inherited&>(*this) = std::move(__in); return *this; } template<typename _U1, typename _U2> tuple& operator=(const pair<_U1, _U2>& __in) { this->_M_head(*this) = __in.first; this->_M_tail(*this)._M_head(*this) = __in.second; return *this; } template<typename _U1, typename _U2> tuple& operator=(pair<_U1, _U2>&& __in) { this->_M_head(*this) = std::forward<_U1>(__in.first); this->_M_tail(*this)._M_head(*this) = std::forward<_U2>(__in.second); return *this; } void swap(tuple& __in) noexcept(noexcept(__in._M_swap(__in))) { _Inherited::_M_swap(__in); } }; template<typename... _Elements> struct tuple_size<tuple<_Elements...>> : public integral_constant<std::size_t, sizeof...(_Elements)> { }; # 1278 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple" 3 template<std::size_t __i, typename _Head, typename... _Tail> struct tuple_element<__i, tuple<_Head, _Tail...> > : tuple_element<__i - 1, tuple<_Tail...> > { }; template<typename _Head, typename... _Tail> struct tuple_element<0, tuple<_Head, _Tail...> > { typedef _Head type; }; template<size_t __i> struct tuple_element<__i, tuple<>> { static_assert(__i < tuple_size<tuple<>>::value, "tuple index is in range"); }; template<std::size_t __i, typename _Head, typename... _Tail> constexpr _Head& __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } template<std::size_t __i, typename _Head, typename... _Tail> constexpr const _Head& __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } template<std::size_t __i, typename... _Elements> constexpr __tuple_element_t<__i, tuple<_Elements...>>& get(tuple<_Elements...>& __t) noexcept { return std::__get_helper<__i>(__t); } template<std::size_t __i, typename... _Elements> constexpr const __tuple_element_t<__i, tuple<_Elements...>>& get(const tuple<_Elements...>& __t) noexcept { return std::__get_helper<__i>(__t); } template<std::size_t __i, typename... _Elements> constexpr __tuple_element_t<__i, tuple<_Elements...>>&& get(tuple<_Elements...>&& __t) noexcept { typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; return std::forward<__element_type&&>(std::get<__i>(__t)); } template<std::size_t __i, typename... _Elements> constexpr const __tuple_element_t<__i, tuple<_Elements...>>&& get(const tuple<_Elements...>&& __t) noexcept { typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; return std::forward<const __element_type&&>(std::get<__i>(__t)); } template<typename _Head, size_t __i, typename... _Tail> constexpr _Head& __get_helper2(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } template<typename _Head, size_t __i, typename... _Tail> constexpr const _Head& __get_helper2(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } template <typename _Tp, typename... _Types> constexpr _Tp& get(tuple<_Types...>& __t) noexcept { return std::__get_helper2<_Tp>(__t); } template <typename _Tp, typename... _Types> constexpr _Tp&& get(tuple<_Types...>&& __t) noexcept { return std::forward<_Tp&&>(std::__get_helper2<_Tp>(__t)); } template <typename _Tp, typename... _Types> constexpr const _Tp& get(const tuple<_Types...>& __t) noexcept { return std::__get_helper2<_Tp>(__t); } template <typename _Tp, typename... _Types> constexpr const _Tp&& get(const tuple<_Types...>&& __t) noexcept { return std::forward<const _Tp&&>(std::__get_helper2<_Tp>(__t)); } template<typename _Tp, typename _Up, size_t __i, size_t __size> struct __tuple_compare { static constexpr bool __eq(const _Tp& __t, const _Up& __u) { return bool(std::get<__i>(__t) == std::get<__i>(__u)) && __tuple_compare<_Tp, _Up, __i + 1, __size>::__eq(__t, __u); } static constexpr bool __less(const _Tp& __t, const _Up& __u) { return bool(std::get<__i>(__t) < std::get<__i>(__u)) || (!bool(std::get<__i>(__u) < std::get<__i>(__t)) && __tuple_compare<_Tp, _Up, __i + 1, __size>::__less(__t, __u)); } }; template<typename _Tp, typename _Up, size_t __size> struct __tuple_compare<_Tp, _Up, __size, __size> { static constexpr bool __eq(const _Tp&, const _Up&) { return true; } static constexpr bool __less(const _Tp&, const _Up&) { return false; } }; template<typename... _TElements, typename... _UElements> constexpr bool operator==(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { static_assert(sizeof...(_TElements) == sizeof...(_UElements), "tuple objects can only be compared if they have equal sizes."); using __compare = __tuple_compare<tuple<_TElements...>, tuple<_UElements...>, 0, sizeof...(_TElements)>; return __compare::__eq(__t, __u); } template<typename... _TElements, typename... _UElements> constexpr bool operator<(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { static_assert(sizeof...(_TElements) == sizeof...(_UElements), "tuple objects can only be compared if they have equal sizes."); using __compare = __tuple_compare<tuple<_TElements...>, tuple<_UElements...>, 0, sizeof...(_TElements)>; return __compare::__less(__t, __u); } template<typename... _TElements, typename... _UElements> constexpr bool operator!=(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { return !(__t == __u); } template<typename... _TElements, typename... _UElements> constexpr bool operator>(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { return __u < __t; } template<typename... _TElements, typename... _UElements> constexpr bool operator<=(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { return !(__u < __t); } template<typename... _TElements, typename... _UElements> constexpr bool operator>=(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { return !(__t < __u); } template<typename... _Elements> constexpr tuple<typename __decay_and_strip<_Elements>::__type...> make_tuple(_Elements&&... __args) { typedef tuple<typename __decay_and_strip<_Elements>::__type...> __result_type; return __result_type(std::forward<_Elements>(__args)...); } template<typename... _Elements> constexpr tuple<_Elements&&...> forward_as_tuple(_Elements&&... __args) noexcept { return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); } template<size_t, typename, typename, size_t> struct __make_tuple_impl; template<size_t _Idx, typename _Tuple, typename... _Tp, size_t _Nm> struct __make_tuple_impl<_Idx, tuple<_Tp...>, _Tuple, _Nm> : __make_tuple_impl<_Idx + 1, tuple<_Tp..., __tuple_element_t<_Idx, _Tuple>>, _Tuple, _Nm> { }; template<std::size_t _Nm, typename _Tuple, typename... _Tp> struct __make_tuple_impl<_Nm, tuple<_Tp...>, _Tuple, _Nm> { typedef tuple<_Tp...> __type; }; template<typename _Tuple> struct __do_make_tuple : __make_tuple_impl<0, tuple<>, _Tuple, std::tuple_size<_Tuple>::value> { }; template<typename _Tuple> struct __make_tuple : public __do_make_tuple<typename std::remove_cv <typename std::remove_reference<_Tuple>::type>::type> { }; template<typename...> struct __combine_tuples; template<> struct __combine_tuples<> { typedef tuple<> __type; }; template<typename... _Ts> struct __combine_tuples<tuple<_Ts...>> { typedef tuple<_Ts...> __type; }; template<typename... _T1s, typename... _T2s, typename... _Rem> struct __combine_tuples<tuple<_T1s...>, tuple<_T2s...>, _Rem...> { typedef typename __combine_tuples<tuple<_T1s..., _T2s...>, _Rem...>::__type __type; }; template<typename... _Tpls> struct __tuple_cat_result { typedef typename __combine_tuples <typename __make_tuple<_Tpls>::__type...>::__type __type; }; template<typename...> struct __make_1st_indices; template<> struct __make_1st_indices<> { typedef std::_Index_tuple<> __type; }; template<typename _Tp, typename... _Tpls> struct __make_1st_indices<_Tp, _Tpls...> { typedef typename std::_Build_index_tuple<std::tuple_size< typename std::remove_reference<_Tp>::type>::value>::__type __type; }; template<typename _Ret, typename _Indices, typename... _Tpls> struct __tuple_concater; template<typename _Ret, std::size_t... _Is, typename _Tp, typename... _Tpls> struct __tuple_concater<_Ret, std::_Index_tuple<_Is...>, _Tp, _Tpls...> { template<typename... _Us> static constexpr _Ret _S_do(_Tp&& __tp, _Tpls&&... __tps, _Us&&... __us) { typedef typename __make_1st_indices<_Tpls...>::__type __idx; typedef __tuple_concater<_Ret, __idx, _Tpls...> __next; return __next::_S_do(std::forward<_Tpls>(__tps)..., std::forward<_Us>(__us)..., std::get<_Is>(std::forward<_Tp>(__tp))...); } }; template<typename _Ret> struct __tuple_concater<_Ret, std::_Index_tuple<>> { template<typename... _Us> static constexpr _Ret _S_do(_Us&&... __us) { return _Ret(std::forward<_Us>(__us)...); } }; template<typename... _Tpls, typename = typename enable_if<__and_<__is_tuple_like<_Tpls>...>::value>::type> constexpr auto tuple_cat(_Tpls&&... __tpls) -> typename __tuple_cat_result<_Tpls...>::__type { typedef typename __tuple_cat_result<_Tpls...>::__type __ret; typedef typename __make_1st_indices<_Tpls...>::__type __idx; typedef __tuple_concater<__ret, __idx, _Tpls...> __concater; return __concater::_S_do(std::forward<_Tpls>(__tpls)...); } template<typename... _Elements> constexpr tuple<_Elements&...> tie(_Elements&... __args) noexcept { return tuple<_Elements&...>(__args...); } template<typename... _Elements> inline void swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } # 1632 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple" 3 struct _Swallow_assign { template<class _Tp> constexpr const _Swallow_assign& operator=(const _Tp&) const { return *this; } }; constexpr _Swallow_assign ignore{}; template<typename... _Types, typename _Alloc> struct uses_allocator<tuple<_Types...>, _Alloc> : true_type { }; template<class _T1, class _T2> template<typename... _Args1, typename... _Args2> inline pair<_T1, _T2>:: pair(piecewise_construct_t, tuple<_Args1...> __first, tuple<_Args2...> __second) : pair(__first, __second, typename _Build_index_tuple<sizeof...(_Args1)>::__type(), typename _Build_index_tuple<sizeof...(_Args2)>::__type()) { } template<class _T1, class _T2> template<typename... _Args1, std::size_t... _Indexes1, typename... _Args2, std::size_t... _Indexes2> inline pair<_T1, _T2>:: pair(tuple<_Args1...>& __tuple1, tuple<_Args2...>& __tuple2, _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>) : first(std::forward<_Args1>(std::get<_Indexes1>(__tuple1))...), second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...) { } # 1712 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple" 3 } # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/unique_ptr.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename> class auto_ptr; #pragma GCC diagnostic pop template<typename _Tp> struct default_delete { constexpr default_delete() noexcept = default; template<typename _Up, typename = typename enable_if<is_convertible<_Up*, _Tp*>::value>::type> default_delete(const default_delete<_Up>&) noexcept { } void operator()(_Tp* __ptr) const { static_assert(!is_void<_Tp>::value, "can't delete pointer to incomplete type"); static_assert(sizeof(_Tp)>0, "can't delete pointer to incomplete type"); delete __ptr; } }; template<typename _Tp> struct default_delete<_Tp[]> { public: constexpr default_delete() noexcept = default; # 104 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/unique_ptr.h" 3 template<typename _Up, typename = typename enable_if<is_convertible<_Up(*)[], _Tp(*)[]>::value>::type> default_delete(const default_delete<_Up[]>&) noexcept { } template<typename _Up> typename enable_if<is_convertible<_Up(*)[], _Tp(*)[]>::value>::type operator()(_Up* __ptr) const { static_assert(sizeof(_Tp)>0, "can't delete pointer to incomplete type"); delete [] __ptr; } }; template <typename _Tp, typename _Dp> class __uniq_ptr_impl { template <typename _Up, typename _Ep, typename = void> struct _Ptr { using type = _Up*; }; template <typename _Up, typename _Ep> struct _Ptr<_Up, _Ep, __void_t<typename remove_reference<_Ep>::type::pointer>> { using type = typename remove_reference<_Ep>::type::pointer; }; public: using _DeleterConstraint = enable_if< __and_<__not_<is_pointer<_Dp>>, is_default_constructible<_Dp>>::value>; using pointer = typename _Ptr<_Tp, _Dp>::type; __uniq_ptr_impl() = default; __uniq_ptr_impl(pointer __p) : _M_t() { _M_ptr() = __p; } template<typename _Del> __uniq_ptr_impl(pointer __p, _Del&& __d) : _M_t(__p, std::forward<_Del>(__d)) { } pointer& _M_ptr() { return std::get<0>(_M_t); } pointer _M_ptr() const { return std::get<0>(_M_t); } _Dp& _M_deleter() { return std::get<1>(_M_t); } const _Dp& _M_deleter() const { return std::get<1>(_M_t); } private: tuple<pointer, _Dp> _M_t; }; template <typename _Tp, typename _Dp = default_delete<_Tp>> class unique_ptr { template <class _Up> using _DeleterConstraint = typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; __uniq_ptr_impl<_Tp, _Dp> _M_t; public: using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; using element_type = _Tp; using deleter_type = _Dp; template<typename _Up, typename _Ep> using __safe_conversion_up = __and_< is_convertible<typename unique_ptr<_Up, _Ep>::pointer, pointer>, __not_<is_array<_Up>>, __or_<__and_<is_reference<deleter_type>, is_same<deleter_type, _Ep>>, __and_<__not_<is_reference<deleter_type>>, is_convertible<_Ep, deleter_type>> > >; template <typename _Up = _Dp, typename = _DeleterConstraint<_Up>> constexpr unique_ptr() noexcept : _M_t() { } template <typename _Up = _Dp, typename = _DeleterConstraint<_Up>> explicit unique_ptr(pointer __p) noexcept : _M_t(__p) { } # 215 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/unique_ptr.h" 3 unique_ptr(pointer __p, typename conditional<is_reference<deleter_type>::value, deleter_type, const deleter_type&>::type __d) noexcept : _M_t(__p, __d) { } # 227 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/unique_ptr.h" 3 unique_ptr(pointer __p, typename remove_reference<deleter_type>::type&& __d) noexcept : _M_t(std::move(__p), std::move(__d)) { static_assert(!std::is_reference<deleter_type>::value, "rvalue deleter bound to reference"); } template <typename _Up = _Dp, typename = _DeleterConstraint<_Up>> constexpr unique_ptr(nullptr_t) noexcept : _M_t() { } unique_ptr(unique_ptr&& __u) noexcept : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter())) { } template<typename _Up, typename _Ep, typename = _Require< __safe_conversion_up<_Up, _Ep>, typename conditional<is_reference<_Dp>::value, is_same<_Ep, _Dp>, is_convertible<_Ep, _Dp>>::type>> unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter())) { } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Up, typename = _Require< is_convertible<_Up*, _Tp*>, is_same<_Dp, default_delete<_Tp>>>> unique_ptr(auto_ptr<_Up>&& __u) noexcept; #pragma GCC diagnostic pop ~unique_ptr() noexcept { auto& __ptr = _M_t._M_ptr(); if (__ptr != nullptr) get_deleter()(__ptr); __ptr = pointer(); } # 286 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/unique_ptr.h" 3 unique_ptr& operator=(unique_ptr&& __u) noexcept { reset(__u.release()); get_deleter() = std::forward<deleter_type>(__u.get_deleter()); return *this; } # 301 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/unique_ptr.h" 3 template<typename _Up, typename _Ep> typename enable_if< __and_< __safe_conversion_up<_Up, _Ep>, is_assignable<deleter_type&, _Ep&&> >::value, unique_ptr&>::type operator=(unique_ptr<_Up, _Ep>&& __u) noexcept { reset(__u.release()); get_deleter() = std::forward<_Ep>(__u.get_deleter()); return *this; } unique_ptr& operator=(nullptr_t) noexcept { reset(); return *this; } typename add_lvalue_reference<element_type>::type operator*() const { ; return *get(); } pointer operator->() const noexcept { ; return get(); } pointer get() const noexcept { return _M_t._M_ptr(); } deleter_type& get_deleter() noexcept { return _M_t._M_deleter(); } const deleter_type& get_deleter() const noexcept { return _M_t._M_deleter(); } explicit operator bool() const noexcept { return get() == pointer() ? false : true; } pointer release() noexcept { pointer __p = get(); _M_t._M_ptr() = pointer(); return __p; } void reset(pointer __p = pointer()) noexcept { using std::swap; swap(_M_t._M_ptr(), __p); if (__p != pointer()) get_deleter()(__p); } void swap(unique_ptr& __u) noexcept { using std::swap; swap(_M_t, __u._M_t); } unique_ptr(const unique_ptr&) = delete; unique_ptr& operator=(const unique_ptr&) = delete; }; template<typename _Tp, typename _Dp> class unique_ptr<_Tp[], _Dp> { template <typename _Up> using _DeleterConstraint = typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; __uniq_ptr_impl<_Tp, _Dp> _M_t; template<typename _Up> using __remove_cv = typename remove_cv<_Up>::type; template<typename _Up> using __is_derived_Tp = __and_< is_base_of<_Tp, _Up>, __not_<is_same<__remove_cv<_Tp>, __remove_cv<_Up>>> >; public: using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; using element_type = _Tp; using deleter_type = _Dp; template<typename _Up, typename _Ep, typename _Up_up = unique_ptr<_Up, _Ep>, typename _Up_element_type = typename _Up_up::element_type> using __safe_conversion_up = __and_< is_array<_Up>, is_same<pointer, element_type*>, is_same<typename _Up_up::pointer, _Up_element_type*>, is_convertible<_Up_element_type(*)[], element_type(*)[]>, __or_<__and_<is_reference<deleter_type>, is_same<deleter_type, _Ep>>, __and_<__not_<is_reference<deleter_type>>, is_convertible<_Ep, deleter_type>>> >; template<typename _Up> using __safe_conversion_raw = __and_< __or_<__or_<is_same<_Up, pointer>, is_same<_Up, nullptr_t>>, __and_<is_pointer<_Up>, is_same<pointer, element_type*>, is_convertible< typename remove_pointer<_Up>::type(*)[], element_type(*)[]> > > >; template <typename _Up = _Dp, typename = _DeleterConstraint<_Up>> constexpr unique_ptr() noexcept : _M_t() { } # 470 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/unique_ptr.h" 3 template<typename _Up, typename _Vp = _Dp, typename = _DeleterConstraint<_Vp>, typename = typename enable_if< __safe_conversion_raw<_Up>::value, bool>::type> explicit unique_ptr(_Up __p) noexcept : _M_t(__p) { } # 488 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/unique_ptr.h" 3 template<typename _Up, typename = typename enable_if< __safe_conversion_raw<_Up>::value, bool>::type> unique_ptr(_Up __p, typename conditional<is_reference<deleter_type>::value, deleter_type, const deleter_type&>::type __d) noexcept : _M_t(__p, __d) { } # 504 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/unique_ptr.h" 3 template<typename _Up, typename = typename enable_if< __safe_conversion_raw<_Up>::value, bool>::type> unique_ptr(_Up __p, typename remove_reference<deleter_type>::type&& __d) noexcept : _M_t(std::move(__p), std::move(__d)) { static_assert(!is_reference<deleter_type>::value, "rvalue deleter bound to reference"); } unique_ptr(unique_ptr&& __u) noexcept : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter())) { } template <typename _Up = _Dp, typename = _DeleterConstraint<_Up>> constexpr unique_ptr(nullptr_t) noexcept : _M_t() { } template<typename _Up, typename _Ep, typename = _Require<__safe_conversion_up<_Up, _Ep>>> unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter())) { } ~unique_ptr() { auto& __ptr = _M_t._M_ptr(); if (__ptr != nullptr) get_deleter()(__ptr); __ptr = pointer(); } # 545 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/unique_ptr.h" 3 unique_ptr& operator=(unique_ptr&& __u) noexcept { reset(__u.release()); get_deleter() = std::forward<deleter_type>(__u.get_deleter()); return *this; } # 560 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/unique_ptr.h" 3 template<typename _Up, typename _Ep> typename enable_if<__and_<__safe_conversion_up<_Up, _Ep>, is_assignable<deleter_type&, _Ep&&> >::value, unique_ptr&>::type operator=(unique_ptr<_Up, _Ep>&& __u) noexcept { reset(__u.release()); get_deleter() = std::forward<_Ep>(__u.get_deleter()); return *this; } unique_ptr& operator=(nullptr_t) noexcept { reset(); return *this; } typename std::add_lvalue_reference<element_type>::type operator[](size_t __i) const { ; return get()[__i]; } pointer get() const noexcept { return _M_t._M_ptr(); } deleter_type& get_deleter() noexcept { return _M_t._M_deleter(); } const deleter_type& get_deleter() const noexcept { return _M_t._M_deleter(); } explicit operator bool() const noexcept { return get() == pointer() ? false : true; } pointer release() noexcept { pointer __p = get(); _M_t._M_ptr() = pointer(); return __p; } template <typename _Up, typename = _Require< __or_<is_same<_Up, pointer>, __and_<is_same<pointer, element_type*>, is_pointer<_Up>, is_convertible< typename remove_pointer<_Up>::type(*)[], element_type(*)[] > > > >> void reset(_Up __p) noexcept { pointer __ptr = __p; using std::swap; swap(_M_t._M_ptr(), __ptr); if (__ptr != nullptr) get_deleter()(__ptr); } void reset(nullptr_t = nullptr) noexcept { reset(pointer()); } void swap(unique_ptr& __u) noexcept { using std::swap; swap(_M_t, __u._M_t); } unique_ptr(const unique_ptr&) = delete; unique_ptr& operator=(const unique_ptr&) = delete; }; template<typename _Tp, typename _Dp> inline void swap(unique_ptr<_Tp, _Dp>& __x, unique_ptr<_Tp, _Dp>& __y) noexcept { __x.swap(__y); } # 686 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/unique_ptr.h" 3 template<typename _Tp, typename _Dp, typename _Up, typename _Ep> inline bool operator==(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) { return __x.get() == __y.get(); } template<typename _Tp, typename _Dp> inline bool operator==(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept { return !__x; } template<typename _Tp, typename _Dp> inline bool operator==(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept { return !__x; } template<typename _Tp, typename _Dp, typename _Up, typename _Ep> inline bool operator!=(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) { return __x.get() != __y.get(); } template<typename _Tp, typename _Dp> inline bool operator!=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept { return (bool)__x; } template<typename _Tp, typename _Dp> inline bool operator!=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept { return (bool)__x; } template<typename _Tp, typename _Dp, typename _Up, typename _Ep> inline bool operator<(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) { typedef typename std::common_type<typename unique_ptr<_Tp, _Dp>::pointer, typename unique_ptr<_Up, _Ep>::pointer>::type _CT; return std::less<_CT>()(__x.get(), __y.get()); } template<typename _Tp, typename _Dp> inline bool operator<(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) { return std::less<typename unique_ptr<_Tp, _Dp>::pointer>()(__x.get(), nullptr); } template<typename _Tp, typename _Dp> inline bool operator<(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) { return std::less<typename unique_ptr<_Tp, _Dp>::pointer>()(nullptr, __x.get()); } template<typename _Tp, typename _Dp, typename _Up, typename _Ep> inline bool operator<=(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) { return !(__y < __x); } template<typename _Tp, typename _Dp> inline bool operator<=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) { return !(nullptr < __x); } template<typename _Tp, typename _Dp> inline bool operator<=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) { return !(__x < nullptr); } template<typename _Tp, typename _Dp, typename _Up, typename _Ep> inline bool operator>(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) { return (__y < __x); } template<typename _Tp, typename _Dp> inline bool operator>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) { return std::less<typename unique_ptr<_Tp, _Dp>::pointer>()(nullptr, __x.get()); } template<typename _Tp, typename _Dp> inline bool operator>(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) { return std::less<typename unique_ptr<_Tp, _Dp>::pointer>()(__x.get(), nullptr); } template<typename _Tp, typename _Dp, typename _Up, typename _Ep> inline bool operator>=(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) { return !(__x < __y); } template<typename _Tp, typename _Dp> inline bool operator>=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) { return !(__x < nullptr); } template<typename _Tp, typename _Dp> inline bool operator>=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) { return !(nullptr < __x); } template<typename _Tp, typename _Dp> struct hash<unique_ptr<_Tp, _Dp>> : public __hash_base<size_t, unique_ptr<_Tp, _Dp>>, private __poison_hash<typename unique_ptr<_Tp, _Dp>::pointer> { size_t operator()(const unique_ptr<_Tp, _Dp>& __u) const noexcept { typedef unique_ptr<_Tp, _Dp> _UP; return std::hash<typename _UP::pointer>()(__u.get()); } }; template<typename _Tp> struct _MakeUniq { typedef unique_ptr<_Tp> __single_object; }; template<typename _Tp> struct _MakeUniq<_Tp[]> { typedef unique_ptr<_Tp[]> __array; }; template<typename _Tp, size_t _Bound> struct _MakeUniq<_Tp[_Bound]> { struct __invalid_type { }; }; template<typename _Tp, typename... _Args> inline typename _MakeUniq<_Tp>::__single_object make_unique(_Args&&... __args) { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); } template<typename _Tp> inline typename _MakeUniq<_Tp>::__array make_unique(size_t __num) { return unique_ptr<_Tp>(new remove_extent_t<_Tp>[__num]()); } template<typename _Tp, typename... _Args> inline typename _MakeUniq<_Tp>::__invalid_type make_unique(_Args&&...) = delete; } # 81 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/memory" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 1 3 # 52 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_base.h" 1 3 # 53 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_base.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/allocated_ptr.h" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/allocated_ptr.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Alloc> struct __allocated_ptr { using pointer = typename allocator_traits<_Alloc>::pointer; using value_type = typename allocator_traits<_Alloc>::value_type; __allocated_ptr(_Alloc& __a, pointer __ptr) noexcept : _M_alloc(std::__addressof(__a)), _M_ptr(__ptr) { } template<typename _Ptr, typename _Req = _Require<is_same<_Ptr, value_type*>>> __allocated_ptr(_Alloc& __a, _Ptr __ptr) : _M_alloc(std::__addressof(__a)), _M_ptr(pointer_traits<pointer>::pointer_to(*__ptr)) { } __allocated_ptr(__allocated_ptr&& __gd) noexcept : _M_alloc(__gd._M_alloc), _M_ptr(__gd._M_ptr) { __gd._M_ptr = nullptr; } ~__allocated_ptr() { if (_M_ptr != nullptr) std::allocator_traits<_Alloc>::deallocate(*_M_alloc, _M_ptr, 1); } __allocated_ptr& operator=(std::nullptr_t) noexcept { _M_ptr = nullptr; return *this; } value_type* get() { return std::__to_address(_M_ptr); } private: _Alloc* _M_alloc; pointer _M_ptr; }; template<typename _Alloc> __allocated_ptr<_Alloc> __allocate_guarded(_Alloc& __a) { return { __a, std::allocator_traits<_Alloc>::allocate(__a, 1) }; } } # 54 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_base.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/refwrap.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/refwrap.h" 3 # 43 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/refwrap.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Res, typename... _ArgTypes> struct _Maybe_unary_or_binary_function { }; template<typename _Res, typename _T1> struct _Maybe_unary_or_binary_function<_Res, _T1> : std::unary_function<_T1, _Res> { }; template<typename _Res, typename _T1, typename _T2> struct _Maybe_unary_or_binary_function<_Res, _T1, _T2> : std::binary_function<_T1, _T2, _Res> { }; template<typename _Signature> struct _Mem_fn_traits; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits_base { using __result_type = _Res; using __maybe_type = _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>; using __arity = integral_constant<size_t, sizeof...(_ArgTypes)>; }; # 97 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/refwrap.h" 3 template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) > : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) > : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const > : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const > : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile > : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile > : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile > : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile > : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) &> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) &> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const &> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const &> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile &> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile &> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile &> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile &> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) &&> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) &&> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const &&> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const &&> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile &&> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile &&> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile &&> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile &&> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; # 111 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/refwrap.h" 3 template<typename _Functor, typename = __void_t<>> struct _Maybe_get_result_type { }; template<typename _Functor> struct _Maybe_get_result_type<_Functor, __void_t<typename _Functor::result_type>> { typedef typename _Functor::result_type result_type; }; template<typename _Functor> struct _Weak_result_type_impl : _Maybe_get_result_type<_Functor> { }; template<typename _Res, typename... _ArgTypes > struct _Weak_result_type_impl<_Res(_ArgTypes...) > { typedef _Res result_type; }; template<typename _Res, typename... _ArgTypes > struct _Weak_result_type_impl<_Res(_ArgTypes......) > { typedef _Res result_type; }; template<typename _Res, typename... _ArgTypes > struct _Weak_result_type_impl<_Res(*)(_ArgTypes...) > { typedef _Res result_type; }; template<typename _Res, typename... _ArgTypes > struct _Weak_result_type_impl<_Res(*)(_ArgTypes......) > { typedef _Res result_type; }; template<typename _Functor, bool = is_member_function_pointer<_Functor>::value> struct _Weak_result_type_memfun : _Weak_result_type_impl<_Functor> { }; template<typename _MemFunPtr> struct _Weak_result_type_memfun<_MemFunPtr, true> { using result_type = typename _Mem_fn_traits<_MemFunPtr>::__result_type; }; template<typename _Func, typename _Class> struct _Weak_result_type_memfun<_Func _Class::*, false> { }; template<typename _Functor> struct _Weak_result_type : _Weak_result_type_memfun<typename remove_cv<_Functor>::type> { }; template<typename _Tp, typename = __void_t<>> struct _Refwrap_base_arg1 { }; template<typename _Tp> struct _Refwrap_base_arg1<_Tp, __void_t<typename _Tp::argument_type>> { typedef typename _Tp::argument_type argument_type; }; template<typename _Tp, typename = __void_t<>> struct _Refwrap_base_arg2 { }; template<typename _Tp> struct _Refwrap_base_arg2<_Tp, __void_t<typename _Tp::first_argument_type, typename _Tp::second_argument_type>> { typedef typename _Tp::first_argument_type first_argument_type; typedef typename _Tp::second_argument_type second_argument_type; }; template<typename _Tp> struct _Reference_wrapper_base : _Weak_result_type<_Tp>, _Refwrap_base_arg1<_Tp>, _Refwrap_base_arg2<_Tp> { }; template<typename _Res, typename _T1 > struct _Reference_wrapper_base<_Res(_T1) > : unary_function<_T1, _Res> { }; template<typename _Res, typename _T1> struct _Reference_wrapper_base<_Res(_T1) const> : unary_function<_T1, _Res> { }; template<typename _Res, typename _T1> struct _Reference_wrapper_base<_Res(_T1) volatile> : unary_function<_T1, _Res> { }; template<typename _Res, typename _T1> struct _Reference_wrapper_base<_Res(_T1) const volatile> : unary_function<_T1, _Res> { }; template<typename _Res, typename _T1, typename _T2 > struct _Reference_wrapper_base<_Res(_T1, _T2) > : binary_function<_T1, _T2, _Res> { }; template<typename _Res, typename _T1, typename _T2> struct _Reference_wrapper_base<_Res(_T1, _T2) const> : binary_function<_T1, _T2, _Res> { }; template<typename _Res, typename _T1, typename _T2> struct _Reference_wrapper_base<_Res(_T1, _T2) volatile> : binary_function<_T1, _T2, _Res> { }; template<typename _Res, typename _T1, typename _T2> struct _Reference_wrapper_base<_Res(_T1, _T2) const volatile> : binary_function<_T1, _T2, _Res> { }; template<typename _Res, typename _T1 > struct _Reference_wrapper_base<_Res(*)(_T1) > : unary_function<_T1, _Res> { }; template<typename _Res, typename _T1, typename _T2 > struct _Reference_wrapper_base<_Res(*)(_T1, _T2) > : binary_function<_T1, _T2, _Res> { }; template<typename _Tp, bool = is_member_function_pointer<_Tp>::value> struct _Reference_wrapper_base_memfun : _Reference_wrapper_base<_Tp> { }; template<typename _MemFunPtr> struct _Reference_wrapper_base_memfun<_MemFunPtr, true> : _Mem_fn_traits<_MemFunPtr>::__maybe_type { using result_type = typename _Mem_fn_traits<_MemFunPtr>::__result_type; }; template<typename _Tp> class reference_wrapper : public _Reference_wrapper_base_memfun<typename remove_cv<_Tp>::type> { _Tp* _M_data; public: typedef _Tp type; reference_wrapper(_Tp& __indata) noexcept : _M_data(std::__addressof(__indata)) { } reference_wrapper(_Tp&&) = delete; reference_wrapper(const reference_wrapper&) = default; reference_wrapper& operator=(const reference_wrapper&) = default; operator _Tp&() const noexcept { return this->get(); } _Tp& get() const noexcept { return *_M_data; } template<typename... _Args> typename result_of<_Tp&(_Args&&...)>::type operator()(_Args&&... __args) const { return std::__invoke(get(), std::forward<_Args>(__args)...); } }; template<typename _Tp> inline reference_wrapper<_Tp> ref(_Tp& __t) noexcept { return reference_wrapper<_Tp>(__t); } template<typename _Tp> inline reference_wrapper<const _Tp> cref(const _Tp& __t) noexcept { return reference_wrapper<const _Tp>(__t); } template<typename _Tp> void ref(const _Tp&&) = delete; template<typename _Tp> void cref(const _Tp&&) = delete; template<typename _Tp> inline reference_wrapper<_Tp> ref(reference_wrapper<_Tp> __t) noexcept { return __t; } template<typename _Tp> inline reference_wrapper<const _Tp> cref(reference_wrapper<_Tp> __t) noexcept { return { __t.get() }; } } # 55 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_base.h" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/aligned_buffer.h" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/aligned_buffer.h" 3 namespace __gnu_cxx { template<typename _Tp> struct __aligned_membuf { struct _Tp2 { _Tp _M_t; }; alignas(__alignof__(_Tp2::_M_t)) unsigned char _M_storage[sizeof(_Tp)]; __aligned_membuf() = default; __aligned_membuf(std::nullptr_t) { } void* _M_addr() noexcept { return static_cast<void*>(&_M_storage); } const void* _M_addr() const noexcept { return static_cast<const void*>(&_M_storage); } _Tp* _M_ptr() noexcept { return static_cast<_Tp*>(_M_addr()); } const _Tp* _M_ptr() const noexcept { return static_cast<const _Tp*>(_M_addr()); } }; # 89 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/aligned_buffer.h" 3 template<typename _Tp> struct __aligned_buffer : std::aligned_storage<sizeof(_Tp), __alignof__(_Tp)> { typename std::aligned_storage<sizeof(_Tp), __alignof__(_Tp)>::type _M_storage; __aligned_buffer() = default; __aligned_buffer(std::nullptr_t) { } void* _M_addr() noexcept { return static_cast<void*>(&_M_storage); } const void* _M_addr() const noexcept { return static_cast<const void*>(&_M_storage); } _Tp* _M_ptr() noexcept { return static_cast<_Tp*>(_M_addr()); } const _Tp* _M_ptr() const noexcept { return static_cast<const _Tp*>(_M_addr()); } }; } # 57 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_base.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename> class auto_ptr; #pragma GCC diagnostic pop class bad_weak_ptr : public std::exception { public: virtual char const* what() const noexcept; virtual ~bad_weak_ptr() noexcept; }; inline void __throw_bad_weak_ptr() { (__builtin_abort()); } using __gnu_cxx::_Lock_policy; using __gnu_cxx::__default_lock_policy; using __gnu_cxx::_S_single; using __gnu_cxx::_S_mutex; using __gnu_cxx::_S_atomic; template<_Lock_policy _Lp> class _Mutex_base { protected: enum { _S_need_barriers = 0 }; }; template<> class _Mutex_base<_S_mutex> : public __gnu_cxx::__mutex { protected: enum { _S_need_barriers = 1 }; }; template<_Lock_policy _Lp = __default_lock_policy> class _Sp_counted_base : public _Mutex_base<_Lp> { public: _Sp_counted_base() noexcept : _M_use_count(1), _M_weak_count(1) { } virtual ~_Sp_counted_base() noexcept { } virtual void _M_dispose() noexcept = 0; virtual void _M_destroy() noexcept { delete this; } virtual void* _M_get_deleter(const std::type_info&) noexcept = 0; void _M_add_ref_copy() { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); } void _M_add_ref_lock(); bool _M_add_ref_lock_nothrow(); void _M_release() noexcept { ; if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) { ; _M_dispose(); if (_Mutex_base<_Lp>::_S_need_barriers) { __atomic_thread_fence (4); } ; if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1) { ; _M_destroy(); } } } void _M_weak_add_ref() noexcept { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); } void _M_weak_release() noexcept { ; if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1) { ; if (_Mutex_base<_Lp>::_S_need_barriers) { __atomic_thread_fence (4); } _M_destroy(); } } long _M_get_use_count() const noexcept { return __atomic_load_n(&_M_use_count, 0); } private: _Sp_counted_base(_Sp_counted_base const&) = delete; _Sp_counted_base& operator=(_Sp_counted_base const&) = delete; _Atomic_word _M_use_count; _Atomic_word _M_weak_count; }; template<> inline void _Sp_counted_base<_S_single>:: _M_add_ref_lock() { if (_M_use_count == 0) __throw_bad_weak_ptr(); ++_M_use_count; } template<> inline void _Sp_counted_base<_S_mutex>:: _M_add_ref_lock() { __gnu_cxx::__scoped_lock sentry(*this); if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) { _M_use_count = 0; __throw_bad_weak_ptr(); } } template<> inline void _Sp_counted_base<_S_atomic>:: _M_add_ref_lock() { _Atomic_word __count = _M_get_use_count(); do { if (__count == 0) __throw_bad_weak_ptr(); } while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, true, 4, 0)); } template<> inline bool _Sp_counted_base<_S_single>:: _M_add_ref_lock_nothrow() { if (_M_use_count == 0) return false; ++_M_use_count; return true; } template<> inline bool _Sp_counted_base<_S_mutex>:: _M_add_ref_lock_nothrow() { __gnu_cxx::__scoped_lock sentry(*this); if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) { _M_use_count = 0; return false; } return true; } template<> inline bool _Sp_counted_base<_S_atomic>:: _M_add_ref_lock_nothrow() { _Atomic_word __count = _M_get_use_count(); do { if (__count == 0) return false; } while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, true, 4, 0)); return true; } template<> inline void _Sp_counted_base<_S_single>::_M_add_ref_copy() { ++_M_use_count; } template<> inline void _Sp_counted_base<_S_single>::_M_release() noexcept { if (--_M_use_count == 0) { _M_dispose(); if (--_M_weak_count == 0) _M_destroy(); } } template<> inline void _Sp_counted_base<_S_single>::_M_weak_add_ref() noexcept { ++_M_weak_count; } template<> inline void _Sp_counted_base<_S_single>::_M_weak_release() noexcept { if (--_M_weak_count == 0) _M_destroy(); } template<> inline long _Sp_counted_base<_S_single>::_M_get_use_count() const noexcept { return _M_use_count; } template<typename _Tp, _Lock_policy _Lp = __default_lock_policy> class __shared_ptr; template<typename _Tp, _Lock_policy _Lp = __default_lock_policy> class __weak_ptr; template<typename _Tp, _Lock_policy _Lp = __default_lock_policy> class __enable_shared_from_this; template<typename _Tp> class shared_ptr; template<typename _Tp> class weak_ptr; template<typename _Tp> struct owner_less; template<typename _Tp> class enable_shared_from_this; template<_Lock_policy _Lp = __default_lock_policy> class __weak_count; template<_Lock_policy _Lp = __default_lock_policy> class __shared_count; template<typename _Ptr, _Lock_policy _Lp> class _Sp_counted_ptr final : public _Sp_counted_base<_Lp> { public: explicit _Sp_counted_ptr(_Ptr __p) noexcept : _M_ptr(__p) { } virtual void _M_dispose() noexcept { delete _M_ptr; } virtual void _M_destroy() noexcept { delete this; } virtual void* _M_get_deleter(const std::type_info&) noexcept { return nullptr; } _Sp_counted_ptr(const _Sp_counted_ptr&) = delete; _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete; private: _Ptr _M_ptr; }; template<> inline void _Sp_counted_ptr<nullptr_t, _S_single>::_M_dispose() noexcept { } template<> inline void _Sp_counted_ptr<nullptr_t, _S_mutex>::_M_dispose() noexcept { } template<> inline void _Sp_counted_ptr<nullptr_t, _S_atomic>::_M_dispose() noexcept { } template<int _Nm, typename _Tp, bool __use_ebo = !__is_final(_Tp) && __is_empty(_Tp)> struct _Sp_ebo_helper; template<int _Nm, typename _Tp> struct _Sp_ebo_helper<_Nm, _Tp, true> : private _Tp { explicit _Sp_ebo_helper(const _Tp& __tp) : _Tp(__tp) { } explicit _Sp_ebo_helper(_Tp&& __tp) : _Tp(std::move(__tp)) { } static _Tp& _S_get(_Sp_ebo_helper& __eboh) { return static_cast<_Tp&>(__eboh); } }; template<int _Nm, typename _Tp> struct _Sp_ebo_helper<_Nm, _Tp, false> { explicit _Sp_ebo_helper(const _Tp& __tp) : _M_tp(__tp) { } explicit _Sp_ebo_helper(_Tp&& __tp) : _M_tp(std::move(__tp)) { } static _Tp& _S_get(_Sp_ebo_helper& __eboh) { return __eboh._M_tp; } private: _Tp _M_tp; }; template<typename _Ptr, typename _Deleter, typename _Alloc, _Lock_policy _Lp> class _Sp_counted_deleter final : public _Sp_counted_base<_Lp> { class _Impl : _Sp_ebo_helper<0, _Deleter>, _Sp_ebo_helper<1, _Alloc> { typedef _Sp_ebo_helper<0, _Deleter> _Del_base; typedef _Sp_ebo_helper<1, _Alloc> _Alloc_base; public: _Impl(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept : _M_ptr(__p), _Del_base(std::move(__d)), _Alloc_base(__a) { } _Deleter& _M_del() noexcept { return _Del_base::_S_get(*this); } _Alloc& _M_alloc() noexcept { return _Alloc_base::_S_get(*this); } _Ptr _M_ptr; }; public: using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_deleter>; _Sp_counted_deleter(_Ptr __p, _Deleter __d) noexcept : _M_impl(__p, std::move(__d), _Alloc()) { } _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept : _M_impl(__p, std::move(__d), __a) { } ~_Sp_counted_deleter() noexcept { } virtual void _M_dispose() noexcept { _M_impl._M_del()(_M_impl._M_ptr); } virtual void _M_destroy() noexcept { __allocator_type __a(_M_impl._M_alloc()); __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; this->~_Sp_counted_deleter(); } virtual void* _M_get_deleter(const std::type_info& __ti) noexcept { return nullptr; } private: _Impl _M_impl; }; struct _Sp_make_shared_tag { private: template<typename _Tp, typename _Alloc, _Lock_policy _Lp> friend class _Sp_counted_ptr_inplace; static const type_info& _S_ti() noexcept __attribute__ ((__visibility__ ("default"))) { alignas(type_info) static constexpr char __tag[sizeof(type_info)] = { }; return reinterpret_cast<const type_info&>(__tag); } }; template<typename _Alloc> struct _Sp_alloc_shared_tag { const _Alloc& _M_a; }; template<typename _Tp, typename _Alloc, _Lock_policy _Lp> class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp> { class _Impl : _Sp_ebo_helper<0, _Alloc> { typedef _Sp_ebo_helper<0, _Alloc> _A_base; public: explicit _Impl(_Alloc __a) noexcept : _A_base(__a) { } _Alloc& _M_alloc() noexcept { return _A_base::_S_get(*this); } __gnu_cxx::__aligned_buffer<_Tp> _M_storage; }; public: using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>; template<typename... _Args> _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) : _M_impl(__a) { allocator_traits<_Alloc>::construct(__a, _M_ptr(), std::forward<_Args>(__args)...); } ~_Sp_counted_ptr_inplace() noexcept { } virtual void _M_dispose() noexcept { allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); } virtual void _M_destroy() noexcept { __allocator_type __a(_M_impl._M_alloc()); __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; this->~_Sp_counted_ptr_inplace(); } private: friend class __shared_count<_Lp>; virtual void* _M_get_deleter(const std::type_info& __ti) noexcept override { if (&__ti == &_Sp_make_shared_tag::_S_ti()) return const_cast<typename remove_cv<_Tp>::type*>(_M_ptr()); # 589 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_base.h" 3 return nullptr; } _Tp* _M_ptr() noexcept { return _M_impl._M_storage._M_ptr(); } _Impl _M_impl; }; struct __sp_array_delete { template<typename _Yp> void operator()(_Yp* __p) const { delete[] __p; } }; template<_Lock_policy _Lp> class __shared_count { template<typename _Tp> struct __not_alloc_shared_tag { using type = void; }; template<typename _Tp> struct __not_alloc_shared_tag<_Sp_alloc_shared_tag<_Tp>> { }; public: constexpr __shared_count() noexcept : _M_pi(0) { } template<typename _Ptr> explicit __shared_count(_Ptr __p) : _M_pi(0) { if (true) { _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p); } if (false) { delete __p; ; } } template<typename _Ptr> __shared_count(_Ptr __p, false_type) : __shared_count(__p) { } template<typename _Ptr> __shared_count(_Ptr __p, true_type) : __shared_count(__p, __sp_array_delete{}, allocator<void>()) { } template<typename _Ptr, typename _Deleter, typename = typename __not_alloc_shared_tag<_Deleter>::type> __shared_count(_Ptr __p, _Deleter __d) : __shared_count(__p, std::move(__d), allocator<void>()) { } template<typename _Ptr, typename _Deleter, typename _Alloc, typename = typename __not_alloc_shared_tag<_Deleter>::type> __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0) { typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; if (true) { typename _Sp_cd_type::__allocator_type __a2(__a); auto __guard = std::__allocate_guarded(__a2); _Sp_cd_type* __mem = __guard.get(); ::new (__mem) _Sp_cd_type(__p, std::move(__d), std::move(__a)); _M_pi = __mem; __guard = nullptr; } if (false) { __d(__p); ; } } template<typename _Tp, typename _Alloc, typename... _Args> __shared_count(_Tp*& __p, _Sp_alloc_shared_tag<_Alloc> __a, _Args&&... __args) { typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type; typename _Sp_cp_type::__allocator_type __a2(__a._M_a); auto __guard = std::__allocate_guarded(__a2); _Sp_cp_type* __mem = __guard.get(); auto __pi = ::new (__mem) _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...); __guard = nullptr; _M_pi = __pi; __p = __pi->_M_ptr(); } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Tp> explicit __shared_count(std::auto_ptr<_Tp>&& __r); #pragma GCC diagnostic pop template<typename _Tp, typename _Del> explicit __shared_count(std::unique_ptr<_Tp, _Del>&& __r) : _M_pi(0) { if (__r.get() == nullptr) return; using _Ptr = typename unique_ptr<_Tp, _Del>::pointer; using _Del2 = typename conditional<is_reference<_Del>::value, reference_wrapper<typename remove_reference<_Del>::type>, _Del>::type; using _Sp_cd_type = _Sp_counted_deleter<_Ptr, _Del2, allocator<void>, _Lp>; using _Alloc = allocator<_Sp_cd_type>; using _Alloc_traits = allocator_traits<_Alloc>; _Alloc __a; _Sp_cd_type* __mem = _Alloc_traits::allocate(__a, 1); _Alloc_traits::construct(__a, __mem, __r.release(), __r.get_deleter()); _M_pi = __mem; } explicit __shared_count(const __weak_count<_Lp>& __r); explicit __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t); ~__shared_count() noexcept { if (_M_pi != nullptr) _M_pi->_M_release(); } __shared_count(const __shared_count& __r) noexcept : _M_pi(__r._M_pi) { if (_M_pi != 0) _M_pi->_M_add_ref_copy(); } __shared_count& operator=(const __shared_count& __r) noexcept { _Sp_counted_base<_Lp>* __tmp = __r._M_pi; if (__tmp != _M_pi) { if (__tmp != 0) __tmp->_M_add_ref_copy(); if (_M_pi != 0) _M_pi->_M_release(); _M_pi = __tmp; } return *this; } void _M_swap(__shared_count& __r) noexcept { _Sp_counted_base<_Lp>* __tmp = __r._M_pi; __r._M_pi = _M_pi; _M_pi = __tmp; } long _M_get_use_count() const noexcept { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; } bool _M_unique() const noexcept { return this->_M_get_use_count() == 1; } void* _M_get_deleter(const std::type_info& __ti) const noexcept { return _M_pi ? _M_pi->_M_get_deleter(__ti) : nullptr; } bool _M_less(const __shared_count& __rhs) const noexcept { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } bool _M_less(const __weak_count<_Lp>& __rhs) const noexcept { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } friend inline bool operator==(const __shared_count& __a, const __shared_count& __b) noexcept { return __a._M_pi == __b._M_pi; } private: friend class __weak_count<_Lp>; _Sp_counted_base<_Lp>* _M_pi; }; template<_Lock_policy _Lp> class __weak_count { public: constexpr __weak_count() noexcept : _M_pi(nullptr) { } __weak_count(const __shared_count<_Lp>& __r) noexcept : _M_pi(__r._M_pi) { if (_M_pi != nullptr) _M_pi->_M_weak_add_ref(); } __weak_count(const __weak_count& __r) noexcept : _M_pi(__r._M_pi) { if (_M_pi != nullptr) _M_pi->_M_weak_add_ref(); } __weak_count(__weak_count&& __r) noexcept : _M_pi(__r._M_pi) { __r._M_pi = nullptr; } ~__weak_count() noexcept { if (_M_pi != nullptr) _M_pi->_M_weak_release(); } __weak_count& operator=(const __shared_count<_Lp>& __r) noexcept { _Sp_counted_base<_Lp>* __tmp = __r._M_pi; if (__tmp != nullptr) __tmp->_M_weak_add_ref(); if (_M_pi != nullptr) _M_pi->_M_weak_release(); _M_pi = __tmp; return *this; } __weak_count& operator=(const __weak_count& __r) noexcept { _Sp_counted_base<_Lp>* __tmp = __r._M_pi; if (__tmp != nullptr) __tmp->_M_weak_add_ref(); if (_M_pi != nullptr) _M_pi->_M_weak_release(); _M_pi = __tmp; return *this; } __weak_count& operator=(__weak_count&& __r) noexcept { if (_M_pi != nullptr) _M_pi->_M_weak_release(); _M_pi = __r._M_pi; __r._M_pi = nullptr; return *this; } void _M_swap(__weak_count& __r) noexcept { _Sp_counted_base<_Lp>* __tmp = __r._M_pi; __r._M_pi = _M_pi; _M_pi = __tmp; } long _M_get_use_count() const noexcept { return _M_pi != nullptr ? _M_pi->_M_get_use_count() : 0; } bool _M_less(const __weak_count& __rhs) const noexcept { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } bool _M_less(const __shared_count<_Lp>& __rhs) const noexcept { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } friend inline bool operator==(const __weak_count& __a, const __weak_count& __b) noexcept { return __a._M_pi == __b._M_pi; } private: friend class __shared_count<_Lp>; _Sp_counted_base<_Lp>* _M_pi; }; template<_Lock_policy _Lp> inline __shared_count<_Lp>::__shared_count(const __weak_count<_Lp>& __r) : _M_pi(__r._M_pi) { if (_M_pi != nullptr) _M_pi->_M_add_ref_lock(); else __throw_bad_weak_ptr(); } template<_Lock_policy _Lp> inline __shared_count<_Lp>:: __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) : _M_pi(__r._M_pi) { if (_M_pi != nullptr) if (!_M_pi->_M_add_ref_lock_nothrow()) _M_pi = nullptr; } template<typename _Yp_ptr, typename _Tp_ptr> struct __sp_compatible_with : false_type { }; template<typename _Yp, typename _Tp> struct __sp_compatible_with<_Yp*, _Tp*> : is_convertible<_Yp*, _Tp*>::type { }; template<typename _Up, size_t _Nm> struct __sp_compatible_with<_Up(*)[_Nm], _Up(*)[]> : true_type { }; template<typename _Up, size_t _Nm> struct __sp_compatible_with<_Up(*)[_Nm], const _Up(*)[]> : true_type { }; template<typename _Up, size_t _Nm> struct __sp_compatible_with<_Up(*)[_Nm], volatile _Up(*)[]> : true_type { }; template<typename _Up, size_t _Nm> struct __sp_compatible_with<_Up(*)[_Nm], const volatile _Up(*)[]> : true_type { }; template<typename _Up, size_t _Nm, typename _Yp, typename = void> struct __sp_is_constructible_arrN : false_type { }; template<typename _Up, size_t _Nm, typename _Yp> struct __sp_is_constructible_arrN<_Up, _Nm, _Yp, __void_t<_Yp[_Nm]>> : is_convertible<_Yp(*)[_Nm], _Up(*)[_Nm]>::type { }; template<typename _Up, typename _Yp, typename = void> struct __sp_is_constructible_arr : false_type { }; template<typename _Up, typename _Yp> struct __sp_is_constructible_arr<_Up, _Yp, __void_t<_Yp[]>> : is_convertible<_Yp(*)[], _Up(*)[]>::type { }; template<typename _Tp, typename _Yp> struct __sp_is_constructible; template<typename _Up, size_t _Nm, typename _Yp> struct __sp_is_constructible<_Up[_Nm], _Yp> : __sp_is_constructible_arrN<_Up, _Nm, _Yp>::type { }; template<typename _Up, typename _Yp> struct __sp_is_constructible<_Up[], _Yp> : __sp_is_constructible_arr<_Up, _Yp>::type { }; template<typename _Tp, typename _Yp> struct __sp_is_constructible : is_convertible<_Yp*, _Tp*>::type { }; template<typename _Tp, _Lock_policy _Lp, bool = is_array<_Tp>::value, bool = is_void<_Tp>::value> class __shared_ptr_access { public: using element_type = _Tp; element_type& operator*() const noexcept { ; return *_M_get(); } element_type* operator->() const noexcept { ; return _M_get(); } private: element_type* _M_get() const noexcept { return static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get(); } }; template<typename _Tp, _Lock_policy _Lp> class __shared_ptr_access<_Tp, _Lp, false, true> { public: using element_type = _Tp; element_type* operator->() const noexcept { auto __ptr = static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get(); ; return __ptr; } }; template<typename _Tp, _Lock_policy _Lp> class __shared_ptr_access<_Tp, _Lp, true, false> { public: using element_type = typename remove_extent<_Tp>::type; [[__deprecated__("shared_ptr<T[]>::operator* is absent from C++17")]] element_type& operator*() const noexcept { ; return *_M_get(); } [[__deprecated__("shared_ptr<T[]>::operator-> is absent from C++17")]] element_type* operator->() const noexcept { ; return _M_get(); } element_type& operator[](ptrdiff_t __i) const { ; ; return _M_get()[__i]; } private: element_type* _M_get() const noexcept { return static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get(); } }; template<typename _Tp, _Lock_policy _Lp> class __shared_ptr : public __shared_ptr_access<_Tp, _Lp> { public: using element_type = typename remove_extent<_Tp>::type; private: template<typename _Yp> using _SafeConv = typename enable_if<__sp_is_constructible<_Tp, _Yp>::value>::type; template<typename _Yp, typename _Res = void> using _Compatible = typename enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; template<typename _Yp> using _Assignable = _Compatible<_Yp, __shared_ptr&>; template<typename _Yp, typename _Del, typename _Res = void, typename _Ptr = typename unique_ptr<_Yp, _Del>::pointer> using _UniqCompatible = typename enable_if<__and_< __sp_compatible_with<_Yp*, _Tp*>, is_convertible<_Ptr, element_type*> >::value, _Res>::type; template<typename _Yp, typename _Del> using _UniqAssignable = _UniqCompatible<_Yp, _Del, __shared_ptr&>; public: constexpr __shared_ptr() noexcept : _M_ptr(0), _M_refcount() { } template<typename _Yp, typename = _SafeConv<_Yp>> explicit __shared_ptr(_Yp* __p) : _M_ptr(__p), _M_refcount(__p, typename is_array<_Tp>::type()) { static_assert( !is_void<_Yp>::value, "incomplete type" ); static_assert( sizeof(_Yp) > 0, "incomplete type" ); _M_enable_shared_from_this_with(__p); } template<typename _Yp, typename _Deleter, typename = _SafeConv<_Yp>> __shared_ptr(_Yp* __p, _Deleter __d) : _M_ptr(__p), _M_refcount(__p, std::move(__d)) { static_assert(__is_invocable<_Deleter&, _Yp*&>::value, "deleter expression d(p) is well-formed"); _M_enable_shared_from_this_with(__p); } template<typename _Yp, typename _Deleter, typename _Alloc, typename = _SafeConv<_Yp>> __shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) : _M_ptr(__p), _M_refcount(__p, std::move(__d), std::move(__a)) { static_assert(__is_invocable<_Deleter&, _Yp*&>::value, "deleter expression d(p) is well-formed"); _M_enable_shared_from_this_with(__p); } template<typename _Deleter> __shared_ptr(nullptr_t __p, _Deleter __d) : _M_ptr(0), _M_refcount(__p, std::move(__d)) { } template<typename _Deleter, typename _Alloc> __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) : _M_ptr(0), _M_refcount(__p, std::move(__d), std::move(__a)) { } template<typename _Yp> __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r, element_type* __p) noexcept : _M_ptr(__p), _M_refcount(__r._M_refcount) { } __shared_ptr(const __shared_ptr&) noexcept = default; __shared_ptr& operator=(const __shared_ptr&) noexcept = default; ~__shared_ptr() = default; template<typename _Yp, typename = _Compatible<_Yp>> __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) { } __shared_ptr(__shared_ptr&& __r) noexcept : _M_ptr(__r._M_ptr), _M_refcount() { _M_refcount._M_swap(__r._M_refcount); __r._M_ptr = 0; } template<typename _Yp, typename = _Compatible<_Yp>> __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r) noexcept : _M_ptr(__r._M_ptr), _M_refcount() { _M_refcount._M_swap(__r._M_refcount); __r._M_ptr = 0; } template<typename _Yp, typename = _Compatible<_Yp>> explicit __shared_ptr(const __weak_ptr<_Yp, _Lp>& __r) : _M_refcount(__r._M_refcount) { _M_ptr = __r._M_ptr; } template<typename _Yp, typename _Del, typename = _UniqCompatible<_Yp, _Del>> __shared_ptr(unique_ptr<_Yp, _Del>&& __r) : _M_ptr(__r.get()), _M_refcount() { auto __raw = __to_address(__r.get()); _M_refcount = __shared_count<_Lp>(std::move(__r)); _M_enable_shared_from_this_with(__raw); } protected: template<typename _Tp1, typename _Del, typename enable_if<__and_< __not_<is_array<_Tp>>, is_array<_Tp1>, is_convertible<typename unique_ptr<_Tp1, _Del>::pointer, _Tp*> >::value, bool>::type = true> __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete) : _M_ptr(__r.get()), _M_refcount() { auto __raw = __to_address(__r.get()); _M_refcount = __shared_count<_Lp>(std::move(__r)); _M_enable_shared_from_this_with(__raw); } public: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Yp, typename = _Compatible<_Yp>> __shared_ptr(auto_ptr<_Yp>&& __r); #pragma GCC diagnostic pop constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { } template<typename _Yp> _Assignable<_Yp> operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept { _M_ptr = __r._M_ptr; _M_refcount = __r._M_refcount; return *this; } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Yp> _Assignable<_Yp> operator=(auto_ptr<_Yp>&& __r) { __shared_ptr(std::move(__r)).swap(*this); return *this; } #pragma GCC diagnostic pop __shared_ptr& operator=(__shared_ptr&& __r) noexcept { __shared_ptr(std::move(__r)).swap(*this); return *this; } template<class _Yp> _Assignable<_Yp> operator=(__shared_ptr<_Yp, _Lp>&& __r) noexcept { __shared_ptr(std::move(__r)).swap(*this); return *this; } template<typename _Yp, typename _Del> _UniqAssignable<_Yp, _Del> operator=(unique_ptr<_Yp, _Del>&& __r) { __shared_ptr(std::move(__r)).swap(*this); return *this; } void reset() noexcept { __shared_ptr().swap(*this); } template<typename _Yp> _SafeConv<_Yp> reset(_Yp* __p) { ; __shared_ptr(__p).swap(*this); } template<typename _Yp, typename _Deleter> _SafeConv<_Yp> reset(_Yp* __p, _Deleter __d) { __shared_ptr(__p, std::move(__d)).swap(*this); } template<typename _Yp, typename _Deleter, typename _Alloc> _SafeConv<_Yp> reset(_Yp* __p, _Deleter __d, _Alloc __a) { __shared_ptr(__p, std::move(__d), std::move(__a)).swap(*this); } element_type* get() const noexcept { return _M_ptr; } explicit operator bool() const { return _M_ptr == 0 ? false : true; } bool unique() const noexcept { return _M_refcount._M_unique(); } long use_count() const noexcept { return _M_refcount._M_get_use_count(); } void swap(__shared_ptr<_Tp, _Lp>& __other) noexcept { std::swap(_M_ptr, __other._M_ptr); _M_refcount._M_swap(__other._M_refcount); } template<typename _Tp1> bool owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const noexcept { return _M_refcount._M_less(__rhs._M_refcount); } template<typename _Tp1> bool owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const noexcept { return _M_refcount._M_less(__rhs._M_refcount); } protected: template<typename _Alloc, typename... _Args> __shared_ptr(_Sp_alloc_shared_tag<_Alloc> __tag, _Args&&... __args) : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...) { _M_enable_shared_from_this_with(_M_ptr); } template<typename _Tp1, _Lock_policy _Lp1, typename _Alloc, typename... _Args> friend __shared_ptr<_Tp1, _Lp1> __allocate_shared(const _Alloc& __a, _Args&&... __args); __shared_ptr(const __weak_ptr<_Tp, _Lp>& __r, std::nothrow_t) : _M_refcount(__r._M_refcount, std::nothrow) { _M_ptr = _M_refcount._M_get_use_count() ? __r._M_ptr : nullptr; } friend class __weak_ptr<_Tp, _Lp>; private: template<typename _Yp> using __esft_base_t = decltype(__enable_shared_from_this_base( std::declval<const __shared_count<_Lp>&>(), std::declval<_Yp*>())); template<typename _Yp, typename = void> struct __has_esft_base : false_type { }; template<typename _Yp> struct __has_esft_base<_Yp, __void_t<__esft_base_t<_Yp>>> : __not_<is_array<_Tp>> { }; template<typename _Yp, typename _Yp2 = typename remove_cv<_Yp>::type> typename enable_if<__has_esft_base<_Yp2>::value>::type _M_enable_shared_from_this_with(_Yp* __p) noexcept { if (auto __base = __enable_shared_from_this_base(_M_refcount, __p)) __base->_M_weak_assign(const_cast<_Yp2*>(__p), _M_refcount); } template<typename _Yp, typename _Yp2 = typename remove_cv<_Yp>::type> typename enable_if<!__has_esft_base<_Yp2>::value>::type _M_enable_shared_from_this_with(_Yp*) noexcept { } void* _M_get_deleter(const std::type_info& __ti) const noexcept { return _M_refcount._M_get_deleter(__ti); } template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr; template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr; template<typename _Del, typename _Tp1, _Lock_policy _Lp1> friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept; template<typename _Del, typename _Tp1> friend _Del* get_deleter(const shared_ptr<_Tp1>&) noexcept; element_type* _M_ptr; __shared_count<_Lp> _M_refcount; }; template<typename _Tp1, typename _Tp2, _Lock_policy _Lp> inline bool operator==(const __shared_ptr<_Tp1, _Lp>& __a, const __shared_ptr<_Tp2, _Lp>& __b) noexcept { return __a.get() == __b.get(); } template<typename _Tp, _Lock_policy _Lp> inline bool operator==(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept { return !__a; } template<typename _Tp, _Lock_policy _Lp> inline bool operator==(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept { return !__a; } template<typename _Tp1, typename _Tp2, _Lock_policy _Lp> inline bool operator!=(const __shared_ptr<_Tp1, _Lp>& __a, const __shared_ptr<_Tp2, _Lp>& __b) noexcept { return __a.get() != __b.get(); } template<typename _Tp, _Lock_policy _Lp> inline bool operator!=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept { return (bool)__a; } template<typename _Tp, _Lock_policy _Lp> inline bool operator!=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept { return (bool)__a; } template<typename _Tp, typename _Up, _Lock_policy _Lp> inline bool operator<(const __shared_ptr<_Tp, _Lp>& __a, const __shared_ptr<_Up, _Lp>& __b) noexcept { using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; using _Up_elt = typename __shared_ptr<_Up, _Lp>::element_type; using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type; return less<_Vp>()(__a.get(), __b.get()); } template<typename _Tp, _Lock_policy _Lp> inline bool operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept { using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; return less<_Tp_elt*>()(__a.get(), nullptr); } template<typename _Tp, _Lock_policy _Lp> inline bool operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept { using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; return less<_Tp_elt*>()(nullptr, __a.get()); } template<typename _Tp1, typename _Tp2, _Lock_policy _Lp> inline bool operator<=(const __shared_ptr<_Tp1, _Lp>& __a, const __shared_ptr<_Tp2, _Lp>& __b) noexcept { return !(__b < __a); } template<typename _Tp, _Lock_policy _Lp> inline bool operator<=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept { return !(nullptr < __a); } template<typename _Tp, _Lock_policy _Lp> inline bool operator<=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept { return !(__a < nullptr); } template<typename _Tp1, typename _Tp2, _Lock_policy _Lp> inline bool operator>(const __shared_ptr<_Tp1, _Lp>& __a, const __shared_ptr<_Tp2, _Lp>& __b) noexcept { return (__b < __a); } template<typename _Tp, _Lock_policy _Lp> inline bool operator>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept { return nullptr < __a; } template<typename _Tp, _Lock_policy _Lp> inline bool operator>(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept { return __a < nullptr; } template<typename _Tp1, typename _Tp2, _Lock_policy _Lp> inline bool operator>=(const __shared_ptr<_Tp1, _Lp>& __a, const __shared_ptr<_Tp2, _Lp>& __b) noexcept { return !(__a < __b); } template<typename _Tp, _Lock_policy _Lp> inline bool operator>=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept { return !(__a < nullptr); } template<typename _Tp, _Lock_policy _Lp> inline bool operator>=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept { return !(nullptr < __a); } template<typename _Sp> struct _Sp_less : public binary_function<_Sp, _Sp, bool> { bool operator()(const _Sp& __lhs, const _Sp& __rhs) const noexcept { typedef typename _Sp::element_type element_type; return std::less<element_type*>()(__lhs.get(), __rhs.get()); } }; template<typename _Tp, _Lock_policy _Lp> struct less<__shared_ptr<_Tp, _Lp>> : public _Sp_less<__shared_ptr<_Tp, _Lp>> { }; template<typename _Tp, _Lock_policy _Lp> inline void swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept { __a.swap(__b); } # 1544 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_base.h" 3 template<typename _Tp, typename _Tp1, _Lock_policy _Lp> inline __shared_ptr<_Tp, _Lp> static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept { using _Sp = __shared_ptr<_Tp, _Lp>; return _Sp(__r, static_cast<typename _Sp::element_type*>(__r.get())); } template<typename _Tp, typename _Tp1, _Lock_policy _Lp> inline __shared_ptr<_Tp, _Lp> const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept { using _Sp = __shared_ptr<_Tp, _Lp>; return _Sp(__r, const_cast<typename _Sp::element_type*>(__r.get())); } template<typename _Tp, typename _Tp1, _Lock_policy _Lp> inline __shared_ptr<_Tp, _Lp> dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept { using _Sp = __shared_ptr<_Tp, _Lp>; if (auto* __p = dynamic_cast<typename _Sp::element_type*>(__r.get())) return _Sp(__r, __p); return _Sp(); } # 1590 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_base.h" 3 template<typename _Tp, _Lock_policy _Lp> class __weak_ptr { template<typename _Yp, typename _Res = void> using _Compatible = typename enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; template<typename _Yp> using _Assignable = _Compatible<_Yp, __weak_ptr&>; public: using element_type = typename remove_extent<_Tp>::type; constexpr __weak_ptr() noexcept : _M_ptr(nullptr), _M_refcount() { } __weak_ptr(const __weak_ptr&) noexcept = default; ~__weak_ptr() = default; # 1626 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_base.h" 3 template<typename _Yp, typename = _Compatible<_Yp>> __weak_ptr(const __weak_ptr<_Yp, _Lp>& __r) noexcept : _M_refcount(__r._M_refcount) { _M_ptr = __r.lock().get(); } template<typename _Yp, typename = _Compatible<_Yp>> __weak_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) { } __weak_ptr(__weak_ptr&& __r) noexcept : _M_ptr(__r._M_ptr), _M_refcount(std::move(__r._M_refcount)) { __r._M_ptr = nullptr; } template<typename _Yp, typename = _Compatible<_Yp>> __weak_ptr(__weak_ptr<_Yp, _Lp>&& __r) noexcept : _M_ptr(__r.lock().get()), _M_refcount(std::move(__r._M_refcount)) { __r._M_ptr = nullptr; } __weak_ptr& operator=(const __weak_ptr& __r) noexcept = default; template<typename _Yp> _Assignable<_Yp> operator=(const __weak_ptr<_Yp, _Lp>& __r) noexcept { _M_ptr = __r.lock().get(); _M_refcount = __r._M_refcount; return *this; } template<typename _Yp> _Assignable<_Yp> operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept { _M_ptr = __r._M_ptr; _M_refcount = __r._M_refcount; return *this; } __weak_ptr& operator=(__weak_ptr&& __r) noexcept { _M_ptr = __r._M_ptr; _M_refcount = std::move(__r._M_refcount); __r._M_ptr = nullptr; return *this; } template<typename _Yp> _Assignable<_Yp> operator=(__weak_ptr<_Yp, _Lp>&& __r) noexcept { _M_ptr = __r.lock().get(); _M_refcount = std::move(__r._M_refcount); __r._M_ptr = nullptr; return *this; } __shared_ptr<_Tp, _Lp> lock() const noexcept { return __shared_ptr<element_type, _Lp>(*this, std::nothrow); } long use_count() const noexcept { return _M_refcount._M_get_use_count(); } bool expired() const noexcept { return _M_refcount._M_get_use_count() == 0; } template<typename _Tp1> bool owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const noexcept { return _M_refcount._M_less(__rhs._M_refcount); } template<typename _Tp1> bool owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const noexcept { return _M_refcount._M_less(__rhs._M_refcount); } void reset() noexcept { __weak_ptr().swap(*this); } void swap(__weak_ptr& __s) noexcept { std::swap(_M_ptr, __s._M_ptr); _M_refcount._M_swap(__s._M_refcount); } private: void _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount) noexcept { if (use_count() == 0) { _M_ptr = __ptr; _M_refcount = __refcount; } } template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr; template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr; friend class __enable_shared_from_this<_Tp, _Lp>; friend class enable_shared_from_this<_Tp>; element_type* _M_ptr; __weak_count<_Lp> _M_refcount; }; template<typename _Tp, _Lock_policy _Lp> inline void swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept { __a.swap(__b); } template<typename _Tp, typename _Tp1> struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __lhs, const _Tp& __rhs) const noexcept { return __lhs.owner_before(__rhs); } bool operator()(const _Tp& __lhs, const _Tp1& __rhs) const noexcept { return __lhs.owner_before(__rhs); } bool operator()(const _Tp1& __lhs, const _Tp& __rhs) const noexcept { return __lhs.owner_before(__rhs); } }; template<> struct _Sp_owner_less<void, void> { template<typename _Tp, typename _Up> auto operator()(const _Tp& __lhs, const _Up& __rhs) const noexcept -> decltype(__lhs.owner_before(__rhs)) { return __lhs.owner_before(__rhs); } using is_transparent = void; }; template<typename _Tp, _Lock_policy _Lp> struct owner_less<__shared_ptr<_Tp, _Lp>> : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>> { }; template<typename _Tp, _Lock_policy _Lp> struct owner_less<__weak_ptr<_Tp, _Lp>> : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>> { }; template<typename _Tp, _Lock_policy _Lp> class __enable_shared_from_this { protected: constexpr __enable_shared_from_this() noexcept { } __enable_shared_from_this(const __enable_shared_from_this&) noexcept { } __enable_shared_from_this& operator=(const __enable_shared_from_this&) noexcept { return *this; } ~__enable_shared_from_this() { } public: __shared_ptr<_Tp, _Lp> shared_from_this() { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); } __shared_ptr<const _Tp, _Lp> shared_from_this() const { return __shared_ptr<const _Tp, _Lp>(this->_M_weak_this); } # 1817 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_base.h" 3 private: template<typename _Tp1> void _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept { _M_weak_this._M_assign(__p, __n); } friend const __enable_shared_from_this* __enable_shared_from_this_base(const __shared_count<_Lp>&, const __enable_shared_from_this* __p) { return __p; } template<typename, _Lock_policy> friend class __shared_ptr; mutable __weak_ptr<_Tp, _Lp> _M_weak_this; }; template<typename _Tp, _Lock_policy _Lp, typename _Alloc, typename... _Args> inline __shared_ptr<_Tp, _Lp> __allocate_shared(const _Alloc& __a, _Args&&... __args) { return __shared_ptr<_Tp, _Lp>(_Sp_alloc_shared_tag<_Alloc>{__a}, std::forward<_Args>(__args)...); } template<typename _Tp, _Lock_policy _Lp, typename... _Args> inline __shared_ptr<_Tp, _Lp> __make_shared(_Args&&... __args) { typedef typename std::remove_const<_Tp>::type _Tp_nc; return std::__allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(), std::forward<_Args>(__args)...); } template<typename _Tp, _Lock_policy _Lp> struct hash<__shared_ptr<_Tp, _Lp>> : public __hash_base<size_t, __shared_ptr<_Tp, _Lp>> { size_t operator()(const __shared_ptr<_Tp, _Lp>& __s) const noexcept { return hash<typename __shared_ptr<_Tp, _Lp>::element_type*>()( __s.get()); } }; } # 53 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 64 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp> inline std::basic_ostream<_Ch, _Tr>& operator<<(std::basic_ostream<_Ch, _Tr>& __os, const __shared_ptr<_Tp, _Lp>& __p) { __os << __p.get(); return __os; } template<typename _Del, typename _Tp, _Lock_policy _Lp> inline _Del* get_deleter(const __shared_ptr<_Tp, _Lp>& __p) noexcept { return 0; } template<typename _Del, typename _Tp> inline _Del* get_deleter(const shared_ptr<_Tp>& __p) noexcept { return 0; } template<typename _Tp> class shared_ptr : public __shared_ptr<_Tp> { template<typename... _Args> using _Constructible = typename enable_if< is_constructible<__shared_ptr<_Tp>, _Args...>::value >::type; template<typename _Arg> using _Assignable = typename enable_if< is_assignable<__shared_ptr<_Tp>&, _Arg>::value, shared_ptr& >::type; public: using element_type = typename __shared_ptr<_Tp>::element_type; # 127 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 constexpr shared_ptr() noexcept : __shared_ptr<_Tp>() { } shared_ptr(const shared_ptr&) noexcept = default; template<typename _Yp, typename = _Constructible<_Yp*>> explicit shared_ptr(_Yp* __p) : __shared_ptr<_Tp>(__p) { } # 154 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 template<typename _Yp, typename _Deleter, typename = _Constructible<_Yp*, _Deleter>> shared_ptr(_Yp* __p, _Deleter __d) : __shared_ptr<_Tp>(__p, std::move(__d)) { } # 172 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 template<typename _Deleter> shared_ptr(nullptr_t __p, _Deleter __d) : __shared_ptr<_Tp>(__p, std::move(__d)) { } # 191 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 template<typename _Yp, typename _Deleter, typename _Alloc, typename = _Constructible<_Yp*, _Deleter, _Alloc>> shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) : __shared_ptr<_Tp>(__p, std::move(__d), std::move(__a)) { } # 211 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 template<typename _Deleter, typename _Alloc> shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) : __shared_ptr<_Tp>(__p, std::move(__d), std::move(__a)) { } # 233 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 template<typename _Yp> shared_ptr(const shared_ptr<_Yp>& __r, element_type* __p) noexcept : __shared_ptr<_Tp>(__r, __p) { } # 244 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 template<typename _Yp, typename = _Constructible<const shared_ptr<_Yp>&>> shared_ptr(const shared_ptr<_Yp>& __r) noexcept : __shared_ptr<_Tp>(__r) { } shared_ptr(shared_ptr&& __r) noexcept : __shared_ptr<_Tp>(std::move(__r)) { } template<typename _Yp, typename = _Constructible<shared_ptr<_Yp>>> shared_ptr(shared_ptr<_Yp>&& __r) noexcept : __shared_ptr<_Tp>(std::move(__r)) { } # 274 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 template<typename _Yp, typename = _Constructible<const weak_ptr<_Yp>&>> explicit shared_ptr(const weak_ptr<_Yp>& __r) : __shared_ptr<_Tp>(__r) { } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Yp, typename = _Constructible<auto_ptr<_Yp>>> shared_ptr(auto_ptr<_Yp>&& __r); #pragma GCC diagnostic pop template<typename _Yp, typename _Del, typename = _Constructible<unique_ptr<_Yp, _Del>>> shared_ptr(unique_ptr<_Yp, _Del>&& __r) : __shared_ptr<_Tp>(std::move(__r)) { } template<typename _Yp, typename _Del, _Constructible<unique_ptr<_Yp, _Del>, __sp_array_delete>* = 0> shared_ptr(unique_ptr<_Yp, _Del>&& __r) : __shared_ptr<_Tp>(std::move(__r), __sp_array_delete()) { } constexpr shared_ptr(nullptr_t) noexcept : shared_ptr() { } shared_ptr& operator=(const shared_ptr&) noexcept = default; template<typename _Yp> _Assignable<const shared_ptr<_Yp>&> operator=(const shared_ptr<_Yp>& __r) noexcept { this->__shared_ptr<_Tp>::operator=(__r); return *this; } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Yp> _Assignable<auto_ptr<_Yp>> operator=(auto_ptr<_Yp>&& __r) { this->__shared_ptr<_Tp>::operator=(std::move(__r)); return *this; } #pragma GCC diagnostic pop shared_ptr& operator=(shared_ptr&& __r) noexcept { this->__shared_ptr<_Tp>::operator=(std::move(__r)); return *this; } template<class _Yp> _Assignable<shared_ptr<_Yp>> operator=(shared_ptr<_Yp>&& __r) noexcept { this->__shared_ptr<_Tp>::operator=(std::move(__r)); return *this; } template<typename _Yp, typename _Del> _Assignable<unique_ptr<_Yp, _Del>> operator=(unique_ptr<_Yp, _Del>&& __r) { this->__shared_ptr<_Tp>::operator=(std::move(__r)); return *this; } private: template<typename _Alloc, typename... _Args> shared_ptr(_Sp_alloc_shared_tag<_Alloc> __tag, _Args&&... __args) : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...) { } template<typename _Yp, typename _Alloc, typename... _Args> friend shared_ptr<_Yp> allocate_shared(const _Alloc& __a, _Args&&... __args); shared_ptr(const weak_ptr<_Tp>& __r, std::nothrow_t) : __shared_ptr<_Tp>(__r, std::nothrow) { } friend class weak_ptr<_Tp>; }; # 381 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 template<typename _Tp, typename _Up> inline bool operator==(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept { return __a.get() == __b.get(); } template<typename _Tp> inline bool operator==(const shared_ptr<_Tp>& __a, nullptr_t) noexcept { return !__a; } template<typename _Tp> inline bool operator==(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { return !__a; } template<typename _Tp, typename _Up> inline bool operator!=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept { return __a.get() != __b.get(); } template<typename _Tp> inline bool operator!=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept { return (bool)__a; } template<typename _Tp> inline bool operator!=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { return (bool)__a; } template<typename _Tp, typename _Up> inline bool operator<(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept { using _Tp_elt = typename shared_ptr<_Tp>::element_type; using _Up_elt = typename shared_ptr<_Up>::element_type; using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type; return less<_Vp>()(__a.get(), __b.get()); } template<typename _Tp> inline bool operator<(const shared_ptr<_Tp>& __a, nullptr_t) noexcept { using _Tp_elt = typename shared_ptr<_Tp>::element_type; return less<_Tp_elt*>()(__a.get(), nullptr); } template<typename _Tp> inline bool operator<(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { using _Tp_elt = typename shared_ptr<_Tp>::element_type; return less<_Tp_elt*>()(nullptr, __a.get()); } template<typename _Tp, typename _Up> inline bool operator<=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept { return !(__b < __a); } template<typename _Tp> inline bool operator<=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept { return !(nullptr < __a); } template<typename _Tp> inline bool operator<=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { return !(__a < nullptr); } template<typename _Tp, typename _Up> inline bool operator>(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept { return (__b < __a); } template<typename _Tp> inline bool operator>(const shared_ptr<_Tp>& __a, nullptr_t) noexcept { return nullptr < __a; } template<typename _Tp> inline bool operator>(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { return __a < nullptr; } template<typename _Tp, typename _Up> inline bool operator>=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept { return !(__a < __b); } template<typename _Tp> inline bool operator>=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept { return !(__a < nullptr); } template<typename _Tp> inline bool operator>=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { return !(nullptr < __a); } template<typename _Tp> struct less<shared_ptr<_Tp>> : public _Sp_less<shared_ptr<_Tp>> { }; template<typename _Tp> inline void swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept { __a.swap(__b); } template<typename _Tp, typename _Up> inline shared_ptr<_Tp> static_pointer_cast(const shared_ptr<_Up>& __r) noexcept { using _Sp = shared_ptr<_Tp>; return _Sp(__r, static_cast<typename _Sp::element_type*>(__r.get())); } template<typename _Tp, typename _Up> inline shared_ptr<_Tp> const_pointer_cast(const shared_ptr<_Up>& __r) noexcept { using _Sp = shared_ptr<_Tp>; return _Sp(__r, const_cast<typename _Sp::element_type*>(__r.get())); } template<typename _Tp, typename _Up> inline shared_ptr<_Tp> dynamic_pointer_cast(const shared_ptr<_Up>& __r) noexcept { using _Sp = shared_ptr<_Tp>; if (auto* __p = dynamic_cast<typename _Sp::element_type*>(__r.get())) return _Sp(__r, __p); return _Sp(); } # 534 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 template<typename _Tp> class weak_ptr : public __weak_ptr<_Tp> { template<typename _Arg> using _Constructible = typename enable_if< is_constructible<__weak_ptr<_Tp>, _Arg>::value >::type; template<typename _Arg> using _Assignable = typename enable_if< is_assignable<__weak_ptr<_Tp>&, _Arg>::value, weak_ptr& >::type; public: constexpr weak_ptr() noexcept = default; template<typename _Yp, typename = _Constructible<const shared_ptr<_Yp>&>> weak_ptr(const shared_ptr<_Yp>& __r) noexcept : __weak_ptr<_Tp>(__r) { } weak_ptr(const weak_ptr&) noexcept = default; template<typename _Yp, typename = _Constructible<const weak_ptr<_Yp>&>> weak_ptr(const weak_ptr<_Yp>& __r) noexcept : __weak_ptr<_Tp>(__r) { } weak_ptr(weak_ptr&&) noexcept = default; template<typename _Yp, typename = _Constructible<weak_ptr<_Yp>>> weak_ptr(weak_ptr<_Yp>&& __r) noexcept : __weak_ptr<_Tp>(std::move(__r)) { } weak_ptr& operator=(const weak_ptr& __r) noexcept = default; template<typename _Yp> _Assignable<const weak_ptr<_Yp>&> operator=(const weak_ptr<_Yp>& __r) noexcept { this->__weak_ptr<_Tp>::operator=(__r); return *this; } template<typename _Yp> _Assignable<const shared_ptr<_Yp>&> operator=(const shared_ptr<_Yp>& __r) noexcept { this->__weak_ptr<_Tp>::operator=(__r); return *this; } weak_ptr& operator=(weak_ptr&& __r) noexcept = default; template<typename _Yp> _Assignable<weak_ptr<_Yp>> operator=(weak_ptr<_Yp>&& __r) noexcept { this->__weak_ptr<_Tp>::operator=(std::move(__r)); return *this; } shared_ptr<_Tp> lock() const noexcept { return shared_ptr<_Tp>(*this, std::nothrow); } }; template<typename _Tp> inline void swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept { __a.swap(__b); } template<typename _Tp = void> struct owner_less; template<> struct owner_less<void> : _Sp_owner_less<void, void> { }; template<typename _Tp> struct owner_less<shared_ptr<_Tp>> : public _Sp_owner_less<shared_ptr<_Tp>, weak_ptr<_Tp>> { }; template<typename _Tp> struct owner_less<weak_ptr<_Tp>> : public _Sp_owner_less<weak_ptr<_Tp>, shared_ptr<_Tp>> { }; template<typename _Tp> class enable_shared_from_this { protected: constexpr enable_shared_from_this() noexcept { } enable_shared_from_this(const enable_shared_from_this&) noexcept { } enable_shared_from_this& operator=(const enable_shared_from_this&) noexcept { return *this; } ~enable_shared_from_this() { } public: shared_ptr<_Tp> shared_from_this() { return shared_ptr<_Tp>(this->_M_weak_this); } shared_ptr<const _Tp> shared_from_this() const { return shared_ptr<const _Tp>(this->_M_weak_this); } # 672 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 private: template<typename _Tp1> void _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const noexcept { _M_weak_this._M_assign(__p, __n); } friend const enable_shared_from_this* __enable_shared_from_this_base(const __shared_count<>&, const enable_shared_from_this* __p) { return __p; } template<typename, _Lock_policy> friend class __shared_ptr; mutable weak_ptr<_Tp> _M_weak_this; }; # 701 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 template<typename _Tp, typename _Alloc, typename... _Args> inline shared_ptr<_Tp> allocate_shared(const _Alloc& __a, _Args&&... __args) { return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, std::forward<_Args>(__args)...); } # 716 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr.h" 3 template<typename _Tp, typename... _Args> inline shared_ptr<_Tp> make_shared(_Args&&... __args) { typedef typename std::remove_cv<_Tp>::type _Tp_nc; return std::allocate_shared<_Tp>(std::allocator<_Tp_nc>(), std::forward<_Args>(__args)...); } template<typename _Tp> struct hash<shared_ptr<_Tp>> : public __hash_base<size_t, shared_ptr<_Tp>> { size_t operator()(const shared_ptr<_Tp>& __s) const noexcept { return std::hash<typename shared_ptr<_Tp>::element_type*>()(__s.get()); } }; } # 82 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/memory" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_atomic.h" 1 3 # 33 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_atomic.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/atomic_base.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/atomic_base.h" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/atomic_lockfree_defines.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/atomic_lockfree_defines.h" 3 # 38 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/atomic_base.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 55 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/atomic_base.h" 3 typedef enum memory_order { memory_order_relaxed, memory_order_consume, memory_order_acquire, memory_order_release, memory_order_acq_rel, memory_order_seq_cst } memory_order; enum __memory_order_modifier { __memory_order_mask = 0x0ffff, __memory_order_modifier_mask = 0xffff0000, __memory_order_hle_acquire = 0x10000, __memory_order_hle_release = 0x20000 }; constexpr memory_order operator|(memory_order __m, __memory_order_modifier __mod) { return memory_order(__m | int(__mod)); } constexpr memory_order operator&(memory_order __m, __memory_order_modifier __mod) { return memory_order(__m & int(__mod)); } constexpr memory_order __cmpexch_failure_order2(memory_order __m) noexcept { return __m == memory_order_acq_rel ? memory_order_acquire : __m == memory_order_release ? memory_order_relaxed : __m; } constexpr memory_order __cmpexch_failure_order(memory_order __m) noexcept { return memory_order(__cmpexch_failure_order2(__m & __memory_order_mask) | (__m & __memory_order_modifier_mask)); } inline __attribute__((__always_inline__)) void atomic_thread_fence(memory_order __m) noexcept { __atomic_thread_fence(__m); } inline __attribute__((__always_inline__)) void atomic_signal_fence(memory_order __m) noexcept { __atomic_signal_fence(__m); } template<typename _Tp> inline _Tp kill_dependency(_Tp __y) noexcept { _Tp __ret(__y); return __ret; } template<typename _IntTp> struct __atomic_base; template<typename _Tp> struct atomic; template<typename _Tp> struct atomic<_Tp*>; typedef bool __atomic_flag_data_type; # 148 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/atomic_base.h" 3 extern "C" { struct __atomic_flag_base { __atomic_flag_data_type _M_i; }; } struct atomic_flag : public __atomic_flag_base { atomic_flag() noexcept = default; ~atomic_flag() noexcept = default; atomic_flag(const atomic_flag&) = delete; atomic_flag& operator=(const atomic_flag&) = delete; atomic_flag& operator=(const atomic_flag&) volatile = delete; constexpr atomic_flag(bool __i) noexcept : __atomic_flag_base{ _S_init(__i) } { } inline __attribute__((__always_inline__)) bool test_and_set(memory_order __m = memory_order_seq_cst) noexcept { return __atomic_test_and_set (&_M_i, __m); } inline __attribute__((__always_inline__)) bool test_and_set(memory_order __m = memory_order_seq_cst) volatile noexcept { return __atomic_test_and_set (&_M_i, __m); } inline __attribute__((__always_inline__)) void clear(memory_order __m = memory_order_seq_cst) noexcept { memory_order __b = __m & __memory_order_mask; ; ; ; __atomic_clear (&_M_i, __m); } inline __attribute__((__always_inline__)) void clear(memory_order __m = memory_order_seq_cst) volatile noexcept { memory_order __b = __m & __memory_order_mask; ; ; ; __atomic_clear (&_M_i, __m); } private: static constexpr __atomic_flag_data_type _S_init(bool __i) { return __i ? 1 : 0; } }; # 237 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/atomic_base.h" 3 template<typename _ITp> struct __atomic_base { private: typedef _ITp __int_type; static constexpr int _S_alignment = sizeof(_ITp) > alignof(_ITp) ? sizeof(_ITp) : alignof(_ITp); alignas(_S_alignment) __int_type _M_i; public: __atomic_base() noexcept = default; ~__atomic_base() noexcept = default; __atomic_base(const __atomic_base&) = delete; __atomic_base& operator=(const __atomic_base&) = delete; __atomic_base& operator=(const __atomic_base&) volatile = delete; constexpr __atomic_base(__int_type __i) noexcept : _M_i (__i) { } operator __int_type() const noexcept { return load(); } operator __int_type() const volatile noexcept { return load(); } __int_type operator=(__int_type __i) noexcept { store(__i); return __i; } __int_type operator=(__int_type __i) volatile noexcept { store(__i); return __i; } __int_type operator++(int) noexcept { return fetch_add(1); } __int_type operator++(int) volatile noexcept { return fetch_add(1); } __int_type operator--(int) noexcept { return fetch_sub(1); } __int_type operator--(int) volatile noexcept { return fetch_sub(1); } __int_type operator++() noexcept { return __atomic_add_fetch(&_M_i, 1, memory_order_seq_cst); } __int_type operator++() volatile noexcept { return __atomic_add_fetch(&_M_i, 1, memory_order_seq_cst); } __int_type operator--() noexcept { return __atomic_sub_fetch(&_M_i, 1, memory_order_seq_cst); } __int_type operator--() volatile noexcept { return __atomic_sub_fetch(&_M_i, 1, memory_order_seq_cst); } __int_type operator+=(__int_type __i) noexcept { return __atomic_add_fetch(&_M_i, __i, memory_order_seq_cst); } __int_type operator+=(__int_type __i) volatile noexcept { return __atomic_add_fetch(&_M_i, __i, memory_order_seq_cst); } __int_type operator-=(__int_type __i) noexcept { return __atomic_sub_fetch(&_M_i, __i, memory_order_seq_cst); } __int_type operator-=(__int_type __i) volatile noexcept { return __atomic_sub_fetch(&_M_i, __i, memory_order_seq_cst); } __int_type operator&=(__int_type __i) noexcept { return __atomic_and_fetch(&_M_i, __i, memory_order_seq_cst); } __int_type operator&=(__int_type __i) volatile noexcept { return __atomic_and_fetch(&_M_i, __i, memory_order_seq_cst); } __int_type operator|=(__int_type __i) noexcept { return __atomic_or_fetch(&_M_i, __i, memory_order_seq_cst); } __int_type operator|=(__int_type __i) volatile noexcept { return __atomic_or_fetch(&_M_i, __i, memory_order_seq_cst); } __int_type operator^=(__int_type __i) noexcept { return __atomic_xor_fetch(&_M_i, __i, memory_order_seq_cst); } __int_type operator^=(__int_type __i) volatile noexcept { return __atomic_xor_fetch(&_M_i, __i, memory_order_seq_cst); } bool is_lock_free() const noexcept { return __atomic_is_lock_free(sizeof(_M_i), reinterpret_cast<void *>(-__alignof(_M_i))); } bool is_lock_free() const volatile noexcept { return __atomic_is_lock_free(sizeof(_M_i), reinterpret_cast<void *>(-__alignof(_M_i))); } inline __attribute__((__always_inline__)) void store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept { memory_order __b = __m & __memory_order_mask; ; ; ; __atomic_store_n(&_M_i, __i, __m); } inline __attribute__((__always_inline__)) void store(__int_type __i, memory_order __m = memory_order_seq_cst) volatile noexcept { memory_order __b = __m & __memory_order_mask; ; ; ; __atomic_store_n(&_M_i, __i, __m); } inline __attribute__((__always_inline__)) __int_type load(memory_order __m = memory_order_seq_cst) const noexcept { memory_order __b = __m & __memory_order_mask; ; ; return __atomic_load_n(&_M_i, __m); } inline __attribute__((__always_inline__)) __int_type load(memory_order __m = memory_order_seq_cst) const volatile noexcept { memory_order __b = __m & __memory_order_mask; ; ; return __atomic_load_n(&_M_i, __m); } inline __attribute__((__always_inline__)) __int_type exchange(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept { return __atomic_exchange_n(&_M_i, __i, __m); } inline __attribute__((__always_inline__)) __int_type exchange(__int_type __i, memory_order __m = memory_order_seq_cst) volatile noexcept { return __atomic_exchange_n(&_M_i, __i, __m); } inline __attribute__((__always_inline__)) bool compare_exchange_weak(__int_type& __i1, __int_type __i2, memory_order __m1, memory_order __m2) noexcept { memory_order __b2 = __m2 & __memory_order_mask; memory_order __b1 = __m1 & __memory_order_mask; ; ; ; return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, __m2); } inline __attribute__((__always_inline__)) bool compare_exchange_weak(__int_type& __i1, __int_type __i2, memory_order __m1, memory_order __m2) volatile noexcept { memory_order __b2 = __m2 & __memory_order_mask; memory_order __b1 = __m1 & __memory_order_mask; ; ; ; return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, __m2); } inline __attribute__((__always_inline__)) bool compare_exchange_weak(__int_type& __i1, __int_type __i2, memory_order __m = memory_order_seq_cst) noexcept { return compare_exchange_weak(__i1, __i2, __m, __cmpexch_failure_order(__m)); } inline __attribute__((__always_inline__)) bool compare_exchange_weak(__int_type& __i1, __int_type __i2, memory_order __m = memory_order_seq_cst) volatile noexcept { return compare_exchange_weak(__i1, __i2, __m, __cmpexch_failure_order(__m)); } inline __attribute__((__always_inline__)) bool compare_exchange_strong(__int_type& __i1, __int_type __i2, memory_order __m1, memory_order __m2) noexcept { memory_order __b2 = __m2 & __memory_order_mask; memory_order __b1 = __m1 & __memory_order_mask; ; ; ; return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2); } inline __attribute__((__always_inline__)) bool compare_exchange_strong(__int_type& __i1, __int_type __i2, memory_order __m1, memory_order __m2) volatile noexcept { memory_order __b2 = __m2 & __memory_order_mask; memory_order __b1 = __m1 & __memory_order_mask; ; ; ; return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2); } inline __attribute__((__always_inline__)) bool compare_exchange_strong(__int_type& __i1, __int_type __i2, memory_order __m = memory_order_seq_cst) noexcept { return compare_exchange_strong(__i1, __i2, __m, __cmpexch_failure_order(__m)); } inline __attribute__((__always_inline__)) bool compare_exchange_strong(__int_type& __i1, __int_type __i2, memory_order __m = memory_order_seq_cst) volatile noexcept { return compare_exchange_strong(__i1, __i2, __m, __cmpexch_failure_order(__m)); } inline __attribute__((__always_inline__)) __int_type fetch_add(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept { return __atomic_fetch_add(&_M_i, __i, __m); } inline __attribute__((__always_inline__)) __int_type fetch_add(__int_type __i, memory_order __m = memory_order_seq_cst) volatile noexcept { return __atomic_fetch_add(&_M_i, __i, __m); } inline __attribute__((__always_inline__)) __int_type fetch_sub(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept { return __atomic_fetch_sub(&_M_i, __i, __m); } inline __attribute__((__always_inline__)) __int_type fetch_sub(__int_type __i, memory_order __m = memory_order_seq_cst) volatile noexcept { return __atomic_fetch_sub(&_M_i, __i, __m); } inline __attribute__((__always_inline__)) __int_type fetch_and(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept { return __atomic_fetch_and(&_M_i, __i, __m); } inline __attribute__((__always_inline__)) __int_type fetch_and(__int_type __i, memory_order __m = memory_order_seq_cst) volatile noexcept { return __atomic_fetch_and(&_M_i, __i, __m); } inline __attribute__((__always_inline__)) __int_type fetch_or(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept { return __atomic_fetch_or(&_M_i, __i, __m); } inline __attribute__((__always_inline__)) __int_type fetch_or(__int_type __i, memory_order __m = memory_order_seq_cst) volatile noexcept { return __atomic_fetch_or(&_M_i, __i, __m); } inline __attribute__((__always_inline__)) __int_type fetch_xor(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept { return __atomic_fetch_xor(&_M_i, __i, __m); } inline __attribute__((__always_inline__)) __int_type fetch_xor(__int_type __i, memory_order __m = memory_order_seq_cst) volatile noexcept { return __atomic_fetch_xor(&_M_i, __i, __m); } }; template<typename _PTp> struct __atomic_base<_PTp*> { private: typedef _PTp* __pointer_type; __pointer_type _M_p; constexpr ptrdiff_t _M_type_size(ptrdiff_t __d) const { return __d * sizeof(_PTp); } constexpr ptrdiff_t _M_type_size(ptrdiff_t __d) const volatile { return __d * sizeof(_PTp); } public: __atomic_base() noexcept = default; ~__atomic_base() noexcept = default; __atomic_base(const __atomic_base&) = delete; __atomic_base& operator=(const __atomic_base&) = delete; __atomic_base& operator=(const __atomic_base&) volatile = delete; constexpr __atomic_base(__pointer_type __p) noexcept : _M_p (__p) { } operator __pointer_type() const noexcept { return load(); } operator __pointer_type() const volatile noexcept { return load(); } __pointer_type operator=(__pointer_type __p) noexcept { store(__p); return __p; } __pointer_type operator=(__pointer_type __p) volatile noexcept { store(__p); return __p; } __pointer_type operator++(int) noexcept { return fetch_add(1); } __pointer_type operator++(int) volatile noexcept { return fetch_add(1); } __pointer_type operator--(int) noexcept { return fetch_sub(1); } __pointer_type operator--(int) volatile noexcept { return fetch_sub(1); } __pointer_type operator++() noexcept { return __atomic_add_fetch(&_M_p, _M_type_size(1), memory_order_seq_cst); } __pointer_type operator++() volatile noexcept { return __atomic_add_fetch(&_M_p, _M_type_size(1), memory_order_seq_cst); } __pointer_type operator--() noexcept { return __atomic_sub_fetch(&_M_p, _M_type_size(1), memory_order_seq_cst); } __pointer_type operator--() volatile noexcept { return __atomic_sub_fetch(&_M_p, _M_type_size(1), memory_order_seq_cst); } __pointer_type operator+=(ptrdiff_t __d) noexcept { return __atomic_add_fetch(&_M_p, _M_type_size(__d), memory_order_seq_cst); } __pointer_type operator+=(ptrdiff_t __d) volatile noexcept { return __atomic_add_fetch(&_M_p, _M_type_size(__d), memory_order_seq_cst); } __pointer_type operator-=(ptrdiff_t __d) noexcept { return __atomic_sub_fetch(&_M_p, _M_type_size(__d), memory_order_seq_cst); } __pointer_type operator-=(ptrdiff_t __d) volatile noexcept { return __atomic_sub_fetch(&_M_p, _M_type_size(__d), memory_order_seq_cst); } bool is_lock_free() const noexcept { return __atomic_is_lock_free(sizeof(_M_p), reinterpret_cast<void *>(-__alignof(_M_p))); } bool is_lock_free() const volatile noexcept { return __atomic_is_lock_free(sizeof(_M_p), reinterpret_cast<void *>(-__alignof(_M_p))); } inline __attribute__((__always_inline__)) void store(__pointer_type __p, memory_order __m = memory_order_seq_cst) noexcept { memory_order __b = __m & __memory_order_mask; ; ; ; __atomic_store_n(&_M_p, __p, __m); } inline __attribute__((__always_inline__)) void store(__pointer_type __p, memory_order __m = memory_order_seq_cst) volatile noexcept { memory_order __b = __m & __memory_order_mask; ; ; ; __atomic_store_n(&_M_p, __p, __m); } inline __attribute__((__always_inline__)) __pointer_type load(memory_order __m = memory_order_seq_cst) const noexcept { memory_order __b = __m & __memory_order_mask; ; ; return __atomic_load_n(&_M_p, __m); } inline __attribute__((__always_inline__)) __pointer_type load(memory_order __m = memory_order_seq_cst) const volatile noexcept { memory_order __b = __m & __memory_order_mask; ; ; return __atomic_load_n(&_M_p, __m); } inline __attribute__((__always_inline__)) __pointer_type exchange(__pointer_type __p, memory_order __m = memory_order_seq_cst) noexcept { return __atomic_exchange_n(&_M_p, __p, __m); } inline __attribute__((__always_inline__)) __pointer_type exchange(__pointer_type __p, memory_order __m = memory_order_seq_cst) volatile noexcept { return __atomic_exchange_n(&_M_p, __p, __m); } inline __attribute__((__always_inline__)) bool compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, memory_order __m1, memory_order __m2) noexcept { memory_order __b2 = __m2 & __memory_order_mask; memory_order __b1 = __m1 & __memory_order_mask; ; ; ; return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, __m1, __m2); } inline __attribute__((__always_inline__)) bool compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, memory_order __m1, memory_order __m2) volatile noexcept { memory_order __b2 = __m2 & __memory_order_mask; memory_order __b1 = __m1 & __memory_order_mask; ; ; ; return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, __m1, __m2); } inline __attribute__((__always_inline__)) __pointer_type fetch_add(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) noexcept { return __atomic_fetch_add(&_M_p, _M_type_size(__d), __m); } inline __attribute__((__always_inline__)) __pointer_type fetch_add(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) volatile noexcept { return __atomic_fetch_add(&_M_p, _M_type_size(__d), __m); } inline __attribute__((__always_inline__)) __pointer_type fetch_sub(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) noexcept { return __atomic_fetch_sub(&_M_p, _M_type_size(__d), __m); } inline __attribute__((__always_inline__)) __pointer_type fetch_sub(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) volatile noexcept { return __atomic_fetch_sub(&_M_p, _M_type_size(__d), __m); } }; } # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_atomic.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { struct _Sp_locker { _Sp_locker(const _Sp_locker&) = delete; _Sp_locker& operator=(const _Sp_locker&) = delete; explicit _Sp_locker(const void*) noexcept; _Sp_locker(const void*, const void*) noexcept; ~_Sp_locker(); private: unsigned char _M_key1; unsigned char _M_key2; }; template<typename _Tp, _Lock_policy _Lp> inline bool atomic_is_lock_free(const __shared_ptr<_Tp, _Lp>* __p) { return __gthread_active_p() == 0; } template<typename _Tp> inline bool atomic_is_lock_free(const shared_ptr<_Tp>* __p) { return std::atomic_is_lock_free<_Tp, __default_lock_policy>(__p); } # 96 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_atomic.h" 3 template<typename _Tp> inline shared_ptr<_Tp> atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order) { _Sp_locker __lock{__p}; return *__p; } template<typename _Tp> inline shared_ptr<_Tp> atomic_load(const shared_ptr<_Tp>* __p) { return std::atomic_load_explicit(__p, memory_order_seq_cst); } template<typename _Tp, _Lock_policy _Lp> inline __shared_ptr<_Tp, _Lp> atomic_load_explicit(const __shared_ptr<_Tp, _Lp>* __p, memory_order) { _Sp_locker __lock{__p}; return *__p; } template<typename _Tp, _Lock_policy _Lp> inline __shared_ptr<_Tp, _Lp> atomic_load(const __shared_ptr<_Tp, _Lp>* __p) { return std::atomic_load_explicit(__p, memory_order_seq_cst); } # 132 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_atomic.h" 3 template<typename _Tp> inline void atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order) { _Sp_locker __lock{__p}; __p->swap(__r); } template<typename _Tp> inline void atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); } template<typename _Tp, _Lock_policy _Lp> inline void atomic_store_explicit(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r, memory_order) { _Sp_locker __lock{__p}; __p->swap(__r); } template<typename _Tp, _Lock_policy _Lp> inline void atomic_store(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r) { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); } # 169 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_atomic.h" 3 template<typename _Tp> inline shared_ptr<_Tp> atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order) { _Sp_locker __lock{__p}; __p->swap(__r); return __r; } template<typename _Tp> inline shared_ptr<_Tp> atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) { return std::atomic_exchange_explicit(__p, std::move(__r), memory_order_seq_cst); } template<typename _Tp, _Lock_policy _Lp> inline __shared_ptr<_Tp, _Lp> atomic_exchange_explicit(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r, memory_order) { _Sp_locker __lock{__p}; __p->swap(__r); return __r; } template<typename _Tp, _Lock_policy _Lp> inline __shared_ptr<_Tp, _Lp> atomic_exchange(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r) { return std::atomic_exchange_explicit(__p, std::move(__r), memory_order_seq_cst); } # 218 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/shared_ptr_atomic.h" 3 template<typename _Tp> bool atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w, memory_order, memory_order) { shared_ptr<_Tp> __x; _Sp_locker __lock{__p, __v}; owner_less<shared_ptr<_Tp>> __less; if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p)) { __x = std::move(*__p); *__p = std::move(__w); return true; } __x = std::move(*__v); *__v = *__p; return false; } template<typename _Tp> inline bool atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w) { return std::atomic_compare_exchange_strong_explicit(__p, __v, std::move(__w), memory_order_seq_cst, memory_order_seq_cst); } template<typename _Tp> inline bool atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w, memory_order __success, memory_order __failure) { return std::atomic_compare_exchange_strong_explicit(__p, __v, std::move(__w), __success, __failure); } template<typename _Tp> inline bool atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w) { return std::atomic_compare_exchange_weak_explicit(__p, __v, std::move(__w), memory_order_seq_cst, memory_order_seq_cst); } template<typename _Tp, _Lock_policy _Lp> bool atomic_compare_exchange_strong_explicit(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp>* __v, __shared_ptr<_Tp, _Lp> __w, memory_order, memory_order) { __shared_ptr<_Tp, _Lp> __x; _Sp_locker __lock{__p, __v}; owner_less<__shared_ptr<_Tp, _Lp>> __less; if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p)) { __x = std::move(*__p); *__p = std::move(__w); return true; } __x = std::move(*__v); *__v = *__p; return false; } template<typename _Tp, _Lock_policy _Lp> inline bool atomic_compare_exchange_strong(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp>* __v, __shared_ptr<_Tp, _Lp> __w) { return std::atomic_compare_exchange_strong_explicit(__p, __v, std::move(__w), memory_order_seq_cst, memory_order_seq_cst); } template<typename _Tp, _Lock_policy _Lp> inline bool atomic_compare_exchange_weak_explicit(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp>* __v, __shared_ptr<_Tp, _Lp> __w, memory_order __success, memory_order __failure) { return std::atomic_compare_exchange_strong_explicit(__p, __v, std::move(__w), __success, __failure); } template<typename _Tp, _Lock_policy _Lp> inline bool atomic_compare_exchange_weak(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp>* __v, __shared_ptr<_Tp, _Lp> __w) { return std::atomic_compare_exchange_weak_explicit(__p, __v, std::move(__w), memory_order_seq_cst, memory_order_seq_cst); } } # 83 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/memory" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/auto_ptr.h" 1 3 # 36 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/auto_ptr.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 47 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/auto_ptr.h" 3 template<typename _Tp1> struct auto_ptr_ref { _Tp1* _M_ptr; explicit auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { } } __attribute__ ((__deprecated__)); #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 88 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/auto_ptr.h" 3 template<typename _Tp> class auto_ptr { private: _Tp* _M_ptr; public: typedef _Tp element_type; explicit auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } # 114 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/auto_ptr.h" 3 auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } # 126 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/auto_ptr.h" 3 template<typename _Tp1> auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } # 137 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/auto_ptr.h" 3 auto_ptr& operator=(auto_ptr& __a) throw() { reset(__a.release()); return *this; } # 154 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/auto_ptr.h" 3 template<typename _Tp1> auto_ptr& operator=(auto_ptr<_Tp1>& __a) throw() { reset(__a.release()); return *this; } # 172 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/auto_ptr.h" 3 ~auto_ptr() { delete _M_ptr; } # 182 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/auto_ptr.h" 3 element_type& operator*() const throw() { ; return *_M_ptr; } element_type* operator->() const throw() { ; return _M_ptr; } # 212 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/auto_ptr.h" 3 element_type* get() const throw() { return _M_ptr; } # 226 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/auto_ptr.h" 3 element_type* release() throw() { element_type* __tmp = _M_ptr; _M_ptr = 0; return __tmp; } # 241 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/auto_ptr.h" 3 void reset(element_type* __p = 0) throw() { if (__p != _M_ptr) { delete _M_ptr; _M_ptr = __p; } } # 266 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward/auto_ptr.h" 3 auto_ptr(auto_ptr_ref<element_type> __ref) throw() : _M_ptr(__ref._M_ptr) { } auto_ptr& operator=(auto_ptr_ref<element_type> __ref) throw() { if (__ref._M_ptr != this->get()) { delete _M_ptr; _M_ptr = __ref._M_ptr; } return *this; } template<typename _Tp1> operator auto_ptr_ref<_Tp1>() throw() { return auto_ptr_ref<_Tp1>(this->release()); } template<typename _Tp1> operator auto_ptr<_Tp1>() throw() { return auto_ptr<_Tp1>(this->release()); } } __attribute__ ((__deprecated__)); template<> class auto_ptr<void> { public: typedef void element_type; } __attribute__ ((__deprecated__)); template<_Lock_policy _Lp> template<typename _Tp> inline __shared_count<_Lp>::__shared_count(std::auto_ptr<_Tp>&& __r) : _M_pi(new _Sp_counted_ptr<_Tp*, _Lp>(__r.get())) { __r.release(); } template<typename _Tp, _Lock_policy _Lp> template<typename _Tp1, typename> inline __shared_ptr<_Tp, _Lp>::__shared_ptr(std::auto_ptr<_Tp1>&& __r) : _M_ptr(__r.get()), _M_refcount() { static_assert( sizeof(_Tp1) > 0, "incomplete type" ); _Tp1* __tmp = __r.get(); _M_refcount = __shared_count<_Lp>(std::move(__r)); _M_enable_shared_from_this_with(__tmp); } template<typename _Tp> template<typename _Tp1, typename> inline shared_ptr<_Tp>::shared_ptr(std::auto_ptr<_Tp1>&& __r) : __shared_ptr<_Tp>(std::move(__r)) { } template<typename _Tp, typename _Dp> template<typename _Up, typename> inline unique_ptr<_Tp, _Dp>::unique_ptr(auto_ptr<_Up>&& __u) noexcept : _M_t(__u.release(), deleter_type()) { } #pragma GCC diagnostic pop } # 85 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/memory" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 113 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/memory" 3 inline void* align(size_t __align, size_t __size, void*& __ptr, size_t& __space) noexcept { const auto __intptr = reinterpret_cast<uintptr_t>(__ptr); const auto __aligned = (__intptr - 1u + __align) & -__align; const auto __diff = __aligned - __intptr; if ((__size + __diff) > __space) return nullptr; else { __space -= __diff; return __ptr = reinterpret_cast<void*>(__aligned); } } enum class pointer_safety { relaxed, preferred, strict }; inline void declare_reachable(void*) { } template <typename _Tp> inline _Tp* undeclare_reachable(_Tp* __p) { return __p; } inline void declare_no_pointers(char*, size_t) { } inline void undeclare_no_pointers(char*, size_t) { } inline pointer_safety get_pointer_safety() noexcept { return pointer_safety::relaxed; } } # 32 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallVector.h" 2 namespace llvm { # 46 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallVector.h" template <class Size_T> class SmallVectorBase { protected: void *BeginX; Size_T Size = 0, Capacity; static constexpr size_t SizeTypeMax() { return std::numeric_limits<Size_T>::max(); } SmallVectorBase() = delete; SmallVectorBase(void *FirstEl, size_t TotalCapacity) : BeginX(FirstEl), Capacity(TotalCapacity) {} void grow_pod(void *FirstEl, size_t MinCapacity, size_t TSize); public: size_t size() const { return Size; } size_t capacity() const { return Capacity; } [[clang::warn_unused_result]] bool empty() const { return !Size; } # 80 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallVector.h" void set_size(size_t N) { (static_cast<void> (0)); Size = N; } }; template <class T> using SmallVectorSizeType = typename std::conditional<sizeof(T) < 4 && sizeof(void *) >= 8, uint64_t, uint32_t>::type; template <class T, typename = void> struct SmallVectorAlignmentAndSize { AlignedCharArrayUnion<SmallVectorBase<SmallVectorSizeType<T>>> Base; AlignedCharArrayUnion<T> FirstEl; }; template <typename T, typename = void> class SmallVectorTemplateCommon : public SmallVectorBase<SmallVectorSizeType<T>> { using Base = SmallVectorBase<SmallVectorSizeType<T>>; void *getFirstEl() const { return const_cast<void *>(reinterpret_cast<const void *>( reinterpret_cast<const char *>(this) + __builtin_offsetof(SmallVectorAlignmentAndSize<T>, FirstEl))); } protected: SmallVectorTemplateCommon(size_t Size) : Base(getFirstEl(), Size) {} void grow_pod(size_t MinCapacity, size_t TSize) { Base::grow_pod(getFirstEl(), MinCapacity, TSize); } bool isSmall() const { return this->BeginX == getFirstEl(); } void resetToSmall() { this->BeginX = getFirstEl(); this->Size = this->Capacity = 0; } public: using size_type = size_t; using difference_type = ptrdiff_t; using value_type = T; using iterator = T *; using const_iterator = const T *; using const_reverse_iterator = std::reverse_iterator<const_iterator>; using reverse_iterator = std::reverse_iterator<iterator>; using reference = T &; using const_reference = const T &; using pointer = T *; using const_pointer = const T *; using Base::capacity; using Base::empty; using Base::size; iterator begin() { return (iterator)this->BeginX; } const_iterator begin() const { return (const_iterator)this->BeginX; } iterator end() { return begin() + size(); } const_iterator end() const { return begin() + size(); } reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const{ return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin());} size_type size_in_bytes() const { return size() * sizeof(T); } size_type max_size() const { return std::min(this->SizeTypeMax(), size_type(-1) / sizeof(T)); } size_t capacity_in_bytes() const { return capacity() * sizeof(T); } pointer data() { return pointer(begin()); } const_pointer data() const { return const_pointer(begin()); } reference operator[](size_type idx) { (static_cast<void> (0)); return begin()[idx]; } const_reference operator[](size_type idx) const { (static_cast<void> (0)); return begin()[idx]; } reference front() { (static_cast<void> (0)); return begin()[0]; } const_reference front() const { (static_cast<void> (0)); return begin()[0]; } reference back() { (static_cast<void> (0)); return end()[-1]; } const_reference back() const { (static_cast<void> (0)); return end()[-1]; } }; # 211 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallVector.h" template <typename T, bool = (is_trivially_copy_constructible<T>::value) && (is_trivially_move_constructible<T>::value) && std::is_trivially_destructible<T>::value> class SmallVectorTemplateBase : public SmallVectorTemplateCommon<T> { protected: SmallVectorTemplateBase(size_t Size) : SmallVectorTemplateCommon<T>(Size) {} static void destroy_range(T *S, T *E) { while (S != E) { --E; E->~T(); } } template<typename It1, typename It2> static void uninitialized_move(It1 I, It1 E, It2 Dest) { std::uninitialized_copy(std::make_move_iterator(I), std::make_move_iterator(E), Dest); } template<typename It1, typename It2> static void uninitialized_copy(It1 I, It1 E, It2 Dest) { std::uninitialized_copy(I, E, Dest); } void grow(size_t MinSize = 0); public: void push_back(const T &Elt) { if (__builtin_expect((bool)(this->size() >= this->capacity()), false)) this->grow(); ::new ((void*) this->end()) T(Elt); this->set_size(this->size() + 1); } void push_back(T &&Elt) { if (__builtin_expect((bool)(this->size() >= this->capacity()), false)) this->grow(); ::new ((void*) this->end()) T(::std::move(Elt)); this->set_size(this->size() + 1); } void pop_back() { this->set_size(this->size() - 1); this->end()->~T(); } }; template <typename T, bool TriviallyCopyable> void SmallVectorTemplateBase<T, TriviallyCopyable>::grow(size_t MinSize) { if (MinSize > this->SizeTypeMax()) report_bad_alloc_error("SmallVector capacity overflow during allocation"); if (this->capacity() == this->SizeTypeMax()) report_bad_alloc_error("SmallVector capacity unable to grow"); size_t NewCapacity = size_t(NextPowerOf2(this->capacity() + 2)); NewCapacity = std::min(std::max(NewCapacity, MinSize), this->SizeTypeMax()); T *NewElts = static_cast<T*>(llvm::safe_malloc(NewCapacity*sizeof(T))); this->uninitialized_move(this->begin(), this->end(), NewElts); destroy_range(this->begin(), this->end()); if (!this->isSmall()) free(this->begin()); this->BeginX = NewElts; this->Capacity = NewCapacity; } template <typename T> class SmallVectorTemplateBase<T, true> : public SmallVectorTemplateCommon<T> { protected: SmallVectorTemplateBase(size_t Size) : SmallVectorTemplateCommon<T>(Size) {} static void destroy_range(T *, T *) {} template<typename It1, typename It2> static void uninitialized_move(It1 I, It1 E, It2 Dest) { uninitialized_copy(I, E, Dest); } template<typename It1, typename It2> static void uninitialized_copy(It1 I, It1 E, It2 Dest) { std::uninitialized_copy(I, E, Dest); } template <typename T1, typename T2> static void uninitialized_copy( T1 *I, T1 *E, T2 *Dest, std::enable_if_t<std::is_same<typename std::remove_const<T1>::type, T2>::value> * = nullptr) { if (I != E) memcpy(reinterpret_cast<void *>(Dest), I, (E - I) * sizeof(T)); } void grow(size_t MinSize = 0) { this->grow_pod(MinSize, sizeof(T)); } public: void push_back(const T &Elt) { if (__builtin_expect((bool)(this->size() >= this->capacity()), false)) this->grow(); memcpy(reinterpret_cast<void *>(this->end()), &Elt, sizeof(T)); this->set_size(this->size() + 1); } void pop_back() { this->set_size(this->size() - 1); } }; template <typename T> class SmallVectorImpl : public SmallVectorTemplateBase<T> { using SuperClass = SmallVectorTemplateBase<T>; public: using iterator = typename SuperClass::iterator; using const_iterator = typename SuperClass::const_iterator; using reference = typename SuperClass::reference; using size_type = typename SuperClass::size_type; protected: explicit SmallVectorImpl(unsigned N) : SmallVectorTemplateBase<T>(N) {} public: SmallVectorImpl(const SmallVectorImpl &) = delete; ~SmallVectorImpl() { if (!this->isSmall()) free(this->begin()); } void clear() { this->destroy_range(this->begin(), this->end()); this->Size = 0; } void resize(size_type N) { if (N < this->size()) { this->destroy_range(this->begin()+N, this->end()); this->set_size(N); } else if (N > this->size()) { if (this->capacity() < N) this->grow(N); for (auto I = this->end(), E = this->begin() + N; I != E; ++I) new (&*I) T(); this->set_size(N); } } void resize(size_type N, const T &NV) { if (N < this->size()) { this->destroy_range(this->begin()+N, this->end()); this->set_size(N); } else if (N > this->size()) { if (this->capacity() < N) this->grow(N); std::uninitialized_fill(this->end(), this->begin()+N, NV); this->set_size(N); } } void reserve(size_type N) { if (this->capacity() < N) this->grow(N); } [[clang::warn_unused_result]] T pop_back_val() { T Result = ::std::move(this->back()); this->pop_back(); return Result; } void swap(SmallVectorImpl &RHS); template <typename in_iter, typename = std::enable_if_t<std::is_convertible< typename std::iterator_traits<in_iter>::iterator_category, std::input_iterator_tag>::value>> void append(in_iter in_start, in_iter in_end) { size_type NumInputs = std::distance(in_start, in_end); if (NumInputs > this->capacity() - this->size()) this->grow(this->size()+NumInputs); this->uninitialized_copy(in_start, in_end, this->end()); this->set_size(this->size() + NumInputs); } void append(size_type NumInputs, const T &Elt) { if (NumInputs > this->capacity() - this->size()) this->grow(this->size()+NumInputs); std::uninitialized_fill_n(this->end(), NumInputs, Elt); this->set_size(this->size() + NumInputs); } void append(std::initializer_list<T> IL) { append(IL.begin(), IL.end()); } void assign(size_type NumElts, const T &Elt) { clear(); if (this->capacity() < NumElts) this->grow(NumElts); this->set_size(NumElts); std::uninitialized_fill(this->begin(), this->end(), Elt); } template <typename in_iter, typename = std::enable_if_t<std::is_convertible< typename std::iterator_traits<in_iter>::iterator_category, std::input_iterator_tag>::value>> void assign(in_iter in_start, in_iter in_end) { clear(); append(in_start, in_end); } void assign(std::initializer_list<T> IL) { clear(); append(IL); } iterator erase(const_iterator CI) { iterator I = const_cast<iterator>(CI); (static_cast<void> (0)); (static_cast<void> (0)); iterator N = I; std::move(I+1, this->end(), I); this->pop_back(); return(N); } iterator erase(const_iterator CS, const_iterator CE) { iterator S = const_cast<iterator>(CS); iterator E = const_cast<iterator>(CE); (static_cast<void> (0)); (static_cast<void> (0)); (static_cast<void> (0)); iterator N = S; iterator I = std::move(E, this->end(), S); this->destroy_range(I, this->end()); this->set_size(I - this->begin()); return(N); } iterator insert(iterator I, T &&Elt) { if (I == this->end()) { this->push_back(::std::move(Elt)); return this->end()-1; } (static_cast<void> (0)); (static_cast<void> (0)); if (this->size() >= this->capacity()) { size_t EltNo = I-this->begin(); this->grow(); I = this->begin()+EltNo; } ::new ((void*) this->end()) T(::std::move(this->back())); std::move_backward(I, this->end()-1, this->end()); this->set_size(this->size() + 1); T *EltPtr = &Elt; if (I <= EltPtr && EltPtr < this->end()) ++EltPtr; *I = ::std::move(*EltPtr); return I; } iterator insert(iterator I, const T &Elt) { if (I == this->end()) { this->push_back(Elt); return this->end()-1; } (static_cast<void> (0)); (static_cast<void> (0)); if (this->size() >= this->capacity()) { size_t EltNo = I-this->begin(); this->grow(); I = this->begin()+EltNo; } ::new ((void*) this->end()) T(std::move(this->back())); std::move_backward(I, this->end()-1, this->end()); this->set_size(this->size() + 1); const T *EltPtr = &Elt; if (I <= EltPtr && EltPtr < this->end()) ++EltPtr; *I = *EltPtr; return I; } iterator insert(iterator I, size_type NumToInsert, const T &Elt) { size_t InsertElt = I - this->begin(); if (I == this->end()) { append(NumToInsert, Elt); return this->begin()+InsertElt; } (static_cast<void> (0)); (static_cast<void> (0)); reserve(this->size() + NumToInsert); I = this->begin()+InsertElt; if (size_t(this->end()-I) >= NumToInsert) { T *OldEnd = this->end(); append(std::move_iterator<iterator>(this->end() - NumToInsert), std::move_iterator<iterator>(this->end())); std::move_backward(I, OldEnd-NumToInsert, OldEnd); std::fill_n(I, NumToInsert, Elt); return I; } T *OldEnd = this->end(); this->set_size(this->size() + NumToInsert); size_t NumOverwritten = OldEnd-I; this->uninitialized_move(I, OldEnd, this->end()-NumOverwritten); std::fill_n(I, NumOverwritten, Elt); std::uninitialized_fill_n(OldEnd, NumToInsert-NumOverwritten, Elt); return I; } template <typename ItTy, typename = std::enable_if_t<std::is_convertible< typename std::iterator_traits<ItTy>::iterator_category, std::input_iterator_tag>::value>> iterator insert(iterator I, ItTy From, ItTy To) { size_t InsertElt = I - this->begin(); if (I == this->end()) { append(From, To); return this->begin()+InsertElt; } (static_cast<void> (0)); (static_cast<void> (0)); size_t NumToInsert = std::distance(From, To); reserve(this->size() + NumToInsert); I = this->begin()+InsertElt; if (size_t(this->end()-I) >= NumToInsert) { T *OldEnd = this->end(); append(std::move_iterator<iterator>(this->end() - NumToInsert), std::move_iterator<iterator>(this->end())); std::move_backward(I, OldEnd-NumToInsert, OldEnd); std::copy(From, To, I); return I; } T *OldEnd = this->end(); this->set_size(this->size() + NumToInsert); size_t NumOverwritten = OldEnd-I; this->uninitialized_move(I, OldEnd, this->end()-NumOverwritten); for (T *J = I; NumOverwritten > 0; --NumOverwritten) { *J = *From; ++J; ++From; } this->uninitialized_copy(From, To, OldEnd); return I; } void insert(iterator I, std::initializer_list<T> IL) { insert(I, IL.begin(), IL.end()); } template <typename... ArgTypes> reference emplace_back(ArgTypes &&... Args) { if (__builtin_expect((bool)(this->size() >= this->capacity()), false)) this->grow(); ::new ((void *)this->end()) T(std::forward<ArgTypes>(Args)...); this->set_size(this->size() + 1); return this->back(); } SmallVectorImpl &operator=(const SmallVectorImpl &RHS); SmallVectorImpl &operator=(SmallVectorImpl &&RHS); bool operator==(const SmallVectorImpl &RHS) const { if (this->size() != RHS.size()) return false; return std::equal(this->begin(), this->end(), RHS.begin()); } bool operator!=(const SmallVectorImpl &RHS) const { return !(*this == RHS); } bool operator<(const SmallVectorImpl &RHS) const { return std::lexicographical_compare(this->begin(), this->end(), RHS.begin(), RHS.end()); } }; template <typename T> void SmallVectorImpl<T>::swap(SmallVectorImpl<T> &RHS) { if (this == &RHS) return; if (!this->isSmall() && !RHS.isSmall()) { std::swap(this->BeginX, RHS.BeginX); std::swap(this->Size, RHS.Size); std::swap(this->Capacity, RHS.Capacity); return; } if (RHS.size() > this->capacity()) this->grow(RHS.size()); if (this->size() > RHS.capacity()) RHS.grow(this->size()); size_t NumShared = this->size(); if (NumShared > RHS.size()) NumShared = RHS.size(); for (size_type i = 0; i != NumShared; ++i) std::swap((*this)[i], RHS[i]); if (this->size() > RHS.size()) { size_t EltDiff = this->size() - RHS.size(); this->uninitialized_copy(this->begin()+NumShared, this->end(), RHS.end()); RHS.set_size(RHS.size() + EltDiff); this->destroy_range(this->begin()+NumShared, this->end()); this->set_size(NumShared); } else if (RHS.size() > this->size()) { size_t EltDiff = RHS.size() - this->size(); this->uninitialized_copy(RHS.begin()+NumShared, RHS.end(), this->end()); this->set_size(this->size() + EltDiff); this->destroy_range(RHS.begin()+NumShared, RHS.end()); RHS.set_size(NumShared); } } template <typename T> SmallVectorImpl<T> &SmallVectorImpl<T>:: operator=(const SmallVectorImpl<T> &RHS) { if (this == &RHS) return *this; size_t RHSSize = RHS.size(); size_t CurSize = this->size(); if (CurSize >= RHSSize) { iterator NewEnd; if (RHSSize) NewEnd = std::copy(RHS.begin(), RHS.begin()+RHSSize, this->begin()); else NewEnd = this->begin(); this->destroy_range(NewEnd, this->end()); this->set_size(RHSSize); return *this; } if (this->capacity() < RHSSize) { this->destroy_range(this->begin(), this->end()); this->set_size(0); CurSize = 0; this->grow(RHSSize); } else if (CurSize) { std::copy(RHS.begin(), RHS.begin()+CurSize, this->begin()); } this->uninitialized_copy(RHS.begin()+CurSize, RHS.end(), this->begin()+CurSize); this->set_size(RHSSize); return *this; } template <typename T> SmallVectorImpl<T> &SmallVectorImpl<T>::operator=(SmallVectorImpl<T> &&RHS) { if (this == &RHS) return *this; if (!RHS.isSmall()) { this->destroy_range(this->begin(), this->end()); if (!this->isSmall()) free(this->begin()); this->BeginX = RHS.BeginX; this->Size = RHS.Size; this->Capacity = RHS.Capacity; RHS.resetToSmall(); return *this; } size_t RHSSize = RHS.size(); size_t CurSize = this->size(); if (CurSize >= RHSSize) { iterator NewEnd = this->begin(); if (RHSSize) NewEnd = std::move(RHS.begin(), RHS.end(), NewEnd); this->destroy_range(NewEnd, this->end()); this->set_size(RHSSize); RHS.clear(); return *this; } if (this->capacity() < RHSSize) { this->destroy_range(this->begin(), this->end()); this->set_size(0); CurSize = 0; this->grow(RHSSize); } else if (CurSize) { std::move(RHS.begin(), RHS.begin()+CurSize, this->begin()); } this->uninitialized_move(RHS.begin()+CurSize, RHS.end(), this->begin()+CurSize); this->set_size(RHSSize); RHS.clear(); return *this; } template <typename T, unsigned N> struct SmallVectorStorage { AlignedCharArrayUnion<T> InlineElts[N]; }; template <typename T> struct alignas(alignof(T)) SmallVectorStorage<T, 0> {}; # 882 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallVector.h" template <typename T, unsigned N> class SmallVector : public SmallVectorImpl<T>, SmallVectorStorage<T, N> { public: SmallVector() : SmallVectorImpl<T>(N) {} ~SmallVector() { this->destroy_range(this->begin(), this->end()); } explicit SmallVector(size_t Size, const T &Value = T()) : SmallVectorImpl<T>(N) { this->assign(Size, Value); } template <typename ItTy, typename = std::enable_if_t<std::is_convertible< typename std::iterator_traits<ItTy>::iterator_category, std::input_iterator_tag>::value>> SmallVector(ItTy S, ItTy E) : SmallVectorImpl<T>(N) { this->append(S, E); } template <typename RangeTy> explicit SmallVector(const iterator_range<RangeTy> &R) : SmallVectorImpl<T>(N) { this->append(R.begin(), R.end()); } SmallVector(std::initializer_list<T> IL) : SmallVectorImpl<T>(N) { this->assign(IL); } SmallVector(const SmallVector &RHS) : SmallVectorImpl<T>(N) { if (!RHS.empty()) SmallVectorImpl<T>::operator=(RHS); } const SmallVector &operator=(const SmallVector &RHS) { SmallVectorImpl<T>::operator=(RHS); return *this; } SmallVector(SmallVector &&RHS) : SmallVectorImpl<T>(N) { if (!RHS.empty()) SmallVectorImpl<T>::operator=(::std::move(RHS)); } SmallVector(SmallVectorImpl<T> &&RHS) : SmallVectorImpl<T>(N) { if (!RHS.empty()) SmallVectorImpl<T>::operator=(::std::move(RHS)); } const SmallVector &operator=(SmallVector &&RHS) { SmallVectorImpl<T>::operator=(::std::move(RHS)); return *this; } const SmallVector &operator=(SmallVectorImpl<T> &&RHS) { SmallVectorImpl<T>::operator=(::std::move(RHS)); return *this; } const SmallVector &operator=(std::initializer_list<T> IL) { this->assign(IL); return *this; } }; template <typename T, unsigned N> inline size_t capacity_in_bytes(const SmallVector<T, N> &X) { return X.capacity_in_bytes(); } template <unsigned Size, typename R> SmallVector<typename std::remove_const<typename std::remove_reference< decltype(*std::begin(std::declval<R &>()))>::type>::type, Size> to_vector(R &&Range) { return {std::begin(Range), std::end(Range)}; } } namespace std { template<typename T> inline void swap(llvm::SmallVectorImpl<T> &LHS, llvm::SmallVectorImpl<T> &RHS) { LHS.swap(RHS); } template<typename T, unsigned N> inline void swap(llvm::SmallVector<T, N> &LHS, llvm::SmallVector<T, N> &RHS) { LHS.swap(RHS); } } # 15 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ArrayRef.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" 1 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Optional.h" 1 # 21 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Optional.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Optional.h" 2 namespace llvm { class raw_ostream; namespace optional_detail { struct in_place_t {}; template <typename T, bool = is_trivially_copyable<T>::value> class OptionalStorage { union { char empty; T value; }; bool hasVal; public: ~OptionalStorage() { reset(); } OptionalStorage() noexcept : empty(), hasVal(false) {} OptionalStorage(OptionalStorage const &other) : OptionalStorage() { if (other.hasValue()) { emplace(other.value); } } OptionalStorage(OptionalStorage &&other) : OptionalStorage() { if (other.hasValue()) { emplace(std::move(other.value)); } } template <class... Args> explicit OptionalStorage(in_place_t, Args &&... args) : value(std::forward<Args>(args)...), hasVal(true) {} void reset() noexcept { if (hasVal) { value.~T(); hasVal = false; } } bool hasValue() const noexcept { return hasVal; } T &getValue() & noexcept { (static_cast<void> (0)); return value; } T const &getValue() const & noexcept { (static_cast<void> (0)); return value; } T &&getValue() && noexcept { (static_cast<void> (0)); return std::move(value); } template <class... Args> void emplace(Args &&... args) { reset(); ::new ((void *)std::addressof(value)) T(std::forward<Args>(args)...); hasVal = true; } OptionalStorage &operator=(T const &y) { if (hasValue()) { value = y; } else { ::new ((void *)std::addressof(value)) T(y); hasVal = true; } return *this; } OptionalStorage &operator=(T &&y) { if (hasValue()) { value = std::move(y); } else { ::new ((void *)std::addressof(value)) T(std::move(y)); hasVal = true; } return *this; } OptionalStorage &operator=(OptionalStorage const &other) { if (other.hasValue()) { if (hasValue()) { value = other.value; } else { ::new ((void *)std::addressof(value)) T(other.value); hasVal = true; } } else { reset(); } return *this; } OptionalStorage &operator=(OptionalStorage &&other) { if (other.hasValue()) { if (hasValue()) { value = std::move(other.value); } else { ::new ((void *)std::addressof(value)) T(std::move(other.value)); hasVal = true; } } else { reset(); } return *this; } }; template <typename T> class OptionalStorage<T, true> { union { char empty; T value; }; bool hasVal = false; public: ~OptionalStorage() = default; OptionalStorage() noexcept : empty{} {} OptionalStorage(OptionalStorage const &other) = default; OptionalStorage(OptionalStorage &&other) = default; OptionalStorage &operator=(OptionalStorage const &other) = default; OptionalStorage &operator=(OptionalStorage &&other) = default; template <class... Args> explicit OptionalStorage(in_place_t, Args &&... args) : value(std::forward<Args>(args)...), hasVal(true) {} void reset() noexcept { if (hasVal) { value.~T(); hasVal = false; } } bool hasValue() const noexcept { return hasVal; } T &getValue() & noexcept { (static_cast<void> (0)); return value; } T const &getValue() const & noexcept { (static_cast<void> (0)); return value; } T &&getValue() && noexcept { (static_cast<void> (0)); return std::move(value); } template <class... Args> void emplace(Args &&... args) { reset(); ::new ((void *)std::addressof(value)) T(std::forward<Args>(args)...); hasVal = true; } OptionalStorage &operator=(T const &y) { if (hasValue()) { value = y; } else { ::new ((void *)std::addressof(value)) T(y); hasVal = true; } return *this; } OptionalStorage &operator=(T &&y) { if (hasValue()) { value = std::move(y); } else { ::new ((void *)std::addressof(value)) T(std::move(y)); hasVal = true; } return *this; } }; } template <typename T> class Optional { optional_detail::OptionalStorage<T> Storage; public: using value_type = T; constexpr Optional() {} constexpr Optional(NoneType) {} Optional(const T &y) : Storage(optional_detail::in_place_t{}, y) {} Optional(const Optional &O) = default; Optional(T &&y) : Storage(optional_detail::in_place_t{}, std::move(y)) {} Optional(Optional &&O) = default; Optional &operator=(T &&y) { Storage = std::move(y); return *this; } Optional &operator=(Optional &&O) = default; template <typename... ArgTypes> void emplace(ArgTypes &&... Args) { Storage.emplace(std::forward<ArgTypes>(Args)...); } static inline Optional create(const T *y) { return y ? Optional(*y) : Optional(); } Optional &operator=(const T &y) { Storage = y; return *this; } Optional &operator=(const Optional &O) = default; void reset() { Storage.reset(); } const T *getPointer() const { return &Storage.getValue(); } T *getPointer() { return &Storage.getValue(); } const T &getValue() const & { return Storage.getValue(); } T &getValue() & { return Storage.getValue(); } explicit operator bool() const { return hasValue(); } bool hasValue() const { return Storage.hasValue(); } const T *operator->() const { return getPointer(); } T *operator->() { return getPointer(); } const T &operator*() const & { return getValue(); } T &operator*() & { return getValue(); } template <typename U> constexpr T getValueOr(U &&value) const & { return hasValue() ? getValue() : std::forward<U>(value); } template <class Function> auto map(const Function &F) const & -> Optional<decltype(F(getValue()))> { if (*this) return F(getValue()); return None; } T &&getValue() && { return std::move(Storage.getValue()); } T &&operator*() && { return std::move(Storage.getValue()); } template <typename U> T getValueOr(U &&value) && { return hasValue() ? std::move(getValue()) : std::forward<U>(value); } template <class Function> auto map(const Function &F) && -> Optional<decltype(F(std::move(*this).getValue()))> { if (*this) return F(std::move(*this).getValue()); return None; } }; template <typename T, typename U> bool operator==(const Optional<T> &X, const Optional<U> &Y) { if (X && Y) return *X == *Y; return X.hasValue() == Y.hasValue(); } template <typename T, typename U> bool operator!=(const Optional<T> &X, const Optional<U> &Y) { return !(X == Y); } template <typename T, typename U> bool operator<(const Optional<T> &X, const Optional<U> &Y) { if (X && Y) return *X < *Y; return X.hasValue() < Y.hasValue(); } template <typename T, typename U> bool operator<=(const Optional<T> &X, const Optional<U> &Y) { return !(Y < X); } template <typename T, typename U> bool operator>(const Optional<T> &X, const Optional<U> &Y) { return Y < X; } template <typename T, typename U> bool operator>=(const Optional<T> &X, const Optional<U> &Y) { return !(X < Y); } template<typename T> bool operator==(const Optional<T> &X, NoneType) { return !X; } template<typename T> bool operator==(NoneType, const Optional<T> &X) { return X == None; } template<typename T> bool operator!=(const Optional<T> &X, NoneType) { return !(X == None); } template<typename T> bool operator!=(NoneType, const Optional<T> &X) { return X != None; } template <typename T> bool operator<(const Optional<T> &X, NoneType) { return false; } template <typename T> bool operator<(NoneType, const Optional<T> &X) { return X.hasValue(); } template <typename T> bool operator<=(const Optional<T> &X, NoneType) { return !(None < X); } template <typename T> bool operator<=(NoneType, const Optional<T> &X) { return !(X < None); } template <typename T> bool operator>(const Optional<T> &X, NoneType) { return None < X; } template <typename T> bool operator>(NoneType, const Optional<T> &X) { return X < None; } template <typename T> bool operator>=(const Optional<T> &X, NoneType) { return None <= X; } template <typename T> bool operator>=(NoneType, const Optional<T> &X) { return X <= None; } template <typename T> bool operator==(const Optional<T> &X, const T &Y) { return X && *X == Y; } template <typename T> bool operator==(const T &X, const Optional<T> &Y) { return Y && X == *Y; } template <typename T> bool operator!=(const Optional<T> &X, const T &Y) { return !(X == Y); } template <typename T> bool operator!=(const T &X, const Optional<T> &Y) { return !(X == Y); } template <typename T> bool operator<(const Optional<T> &X, const T &Y) { return !X || *X < Y; } template <typename T> bool operator<(const T &X, const Optional<T> &Y) { return Y && X < *Y; } template <typename T> bool operator<=(const Optional<T> &X, const T &Y) { return !(Y < X); } template <typename T> bool operator<=(const T &X, const Optional<T> &Y) { return !(Y < X); } template <typename T> bool operator>(const Optional<T> &X, const T &Y) { return Y < X; } template <typename T> bool operator>(const T &X, const Optional<T> &Y) { return Y < X; } template <typename T> bool operator>=(const Optional<T> &X, const T &Y) { return !(X < Y); } template <typename T> bool operator>=(const T &X, const Optional<T> &Y) { return !(X < Y); } raw_ostream &operator<<(raw_ostream &OS, NoneType); template <typename T, typename = decltype(std::declval<raw_ostream &>() << std::declval<const T &>())> raw_ostream &operator<<(raw_ostream &OS, const Optional<T> &O) { if (O) OS << *O; else OS << None; return OS; } } # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/iterator.h" 1 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/iterator.h" namespace llvm { # 64 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/iterator.h" template <typename DerivedT, typename IteratorCategoryT, typename T, typename DifferenceTypeT = std::ptrdiff_t, typename PointerT = T *, typename ReferenceT = T &> class iterator_facade_base : public std::iterator<IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT> { protected: enum { IsRandomAccess = std::is_base_of<std::random_access_iterator_tag, IteratorCategoryT>::value, IsBidirectional = std::is_base_of<std::bidirectional_iterator_tag, IteratorCategoryT>::value, }; class ReferenceProxy { friend iterator_facade_base; DerivedT I; ReferenceProxy(DerivedT I) : I(std::move(I)) {} public: operator ReferenceT() const { return *I; } }; public: DerivedT operator+(DifferenceTypeT n) const { static_assert(std::is_base_of<iterator_facade_base, DerivedT>::value, "Must pass the derived type to this template!"); static_assert( IsRandomAccess, "The '+' operator is only defined for random access iterators."); DerivedT tmp = *static_cast<const DerivedT *>(this); tmp += n; return tmp; } friend DerivedT operator+(DifferenceTypeT n, const DerivedT &i) { static_assert( IsRandomAccess, "The '+' operator is only defined for random access iterators."); return i + n; } DerivedT operator-(DifferenceTypeT n) const { static_assert( IsRandomAccess, "The '-' operator is only defined for random access iterators."); DerivedT tmp = *static_cast<const DerivedT *>(this); tmp -= n; return tmp; } DerivedT &operator++() { static_assert(std::is_base_of<iterator_facade_base, DerivedT>::value, "Must pass the derived type to this template!"); return static_cast<DerivedT *>(this)->operator+=(1); } DerivedT operator++(int) { DerivedT tmp = *static_cast<DerivedT *>(this); ++*static_cast<DerivedT *>(this); return tmp; } DerivedT &operator--() { static_assert( IsBidirectional, "The decrement operator is only defined for bidirectional iterators."); return static_cast<DerivedT *>(this)->operator-=(1); } DerivedT operator--(int) { static_assert( IsBidirectional, "The decrement operator is only defined for bidirectional iterators."); DerivedT tmp = *static_cast<DerivedT *>(this); --*static_cast<DerivedT *>(this); return tmp; } bool operator!=(const DerivedT &RHS) const { return !static_cast<const DerivedT *>(this)->operator==(RHS); } bool operator>(const DerivedT &RHS) const { static_assert( IsRandomAccess, "Relational operators are only defined for random access iterators."); return !static_cast<const DerivedT *>(this)->operator<(RHS) && !static_cast<const DerivedT *>(this)->operator==(RHS); } bool operator<=(const DerivedT &RHS) const { static_assert( IsRandomAccess, "Relational operators are only defined for random access iterators."); return !static_cast<const DerivedT *>(this)->operator>(RHS); } bool operator>=(const DerivedT &RHS) const { static_assert( IsRandomAccess, "Relational operators are only defined for random access iterators."); return !static_cast<const DerivedT *>(this)->operator<(RHS); } PointerT operator->() { return &static_cast<DerivedT *>(this)->operator*(); } PointerT operator->() const { return &static_cast<const DerivedT *>(this)->operator*(); } ReferenceProxy operator[](DifferenceTypeT n) { static_assert(IsRandomAccess, "Subscripting is only defined for random access iterators."); return ReferenceProxy(static_cast<DerivedT *>(this)->operator+(n)); } ReferenceProxy operator[](DifferenceTypeT n) const { static_assert(IsRandomAccess, "Subscripting is only defined for random access iterators."); return ReferenceProxy(static_cast<const DerivedT *>(this)->operator+(n)); } }; template < typename DerivedT, typename WrappedIteratorT, typename IteratorCategoryT = typename std::iterator_traits<WrappedIteratorT>::iterator_category, typename T = typename std::iterator_traits<WrappedIteratorT>::value_type, typename DifferenceTypeT = typename std::iterator_traits<WrappedIteratorT>::difference_type, typename PointerT = std::conditional_t< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::pointer, T *>, typename ReferenceT = std::conditional_t< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::reference, T &>> class iterator_adaptor_base : public iterator_facade_base<DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT> { using BaseT = typename iterator_adaptor_base::iterator_facade_base; protected: WrappedIteratorT I; iterator_adaptor_base() = default; explicit iterator_adaptor_base(WrappedIteratorT u) : I(std::move(u)) { static_assert(std::is_base_of<iterator_adaptor_base, DerivedT>::value, "Must pass the derived type to this template!"); } const WrappedIteratorT &wrapped() const { return I; } public: using difference_type = DifferenceTypeT; DerivedT &operator+=(difference_type n) { static_assert( BaseT::IsRandomAccess, "The '+=' operator is only defined for random access iterators."); I += n; return *static_cast<DerivedT *>(this); } DerivedT &operator-=(difference_type n) { static_assert( BaseT::IsRandomAccess, "The '-=' operator is only defined for random access iterators."); I -= n; return *static_cast<DerivedT *>(this); } using BaseT::operator-; difference_type operator-(const DerivedT &RHS) const { static_assert( BaseT::IsRandomAccess, "The '-' operator is only defined for random access iterators."); return I - RHS.I; } using BaseT::operator++; DerivedT &operator++() { ++I; return *static_cast<DerivedT *>(this); } using BaseT::operator--; DerivedT &operator--() { static_assert( BaseT::IsBidirectional, "The decrement operator is only defined for bidirectional iterators."); --I; return *static_cast<DerivedT *>(this); } bool operator==(const DerivedT &RHS) const { return I == RHS.I; } bool operator<(const DerivedT &RHS) const { static_assert( BaseT::IsRandomAccess, "Relational operators are only defined for random access iterators."); return I < RHS.I; } ReferenceT operator*() const { return *I; } }; # 283 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/iterator.h" template <typename WrappedIteratorT, typename T = std::remove_reference_t<decltype( **std::declval<WrappedIteratorT>())>> struct pointee_iterator : iterator_adaptor_base< pointee_iterator<WrappedIteratorT, T>, WrappedIteratorT, typename std::iterator_traits<WrappedIteratorT>::iterator_category, T> { pointee_iterator() = default; template <typename U> pointee_iterator(U &&u) : pointee_iterator::iterator_adaptor_base(std::forward<U &&>(u)) {} T &operator*() const { return **this->I; } }; template <typename RangeT, typename WrappedIteratorT = decltype(std::begin(std::declval<RangeT>()))> iterator_range<pointee_iterator<WrappedIteratorT>> make_pointee_range(RangeT &&Range) { using PointeeIteratorT = pointee_iterator<WrappedIteratorT>; return make_range(PointeeIteratorT(std::begin(std::forward<RangeT>(Range))), PointeeIteratorT(std::end(std::forward<RangeT>(Range)))); } template <typename WrappedIteratorT, typename T = decltype(&*std::declval<WrappedIteratorT>())> class pointer_iterator : public iterator_adaptor_base< pointer_iterator<WrappedIteratorT, T>, WrappedIteratorT, typename std::iterator_traits<WrappedIteratorT>::iterator_category, T> { mutable T Ptr; public: pointer_iterator() = default; explicit pointer_iterator(WrappedIteratorT u) : pointer_iterator::iterator_adaptor_base(std::move(u)) {} T &operator*() { return Ptr = &*this->I; } const T &operator*() const { return Ptr = &*this->I; } }; template <typename RangeT, typename WrappedIteratorT = decltype(std::begin(std::declval<RangeT>()))> iterator_range<pointer_iterator<WrappedIteratorT>> make_pointer_range(RangeT &&Range) { using PointerIteratorT = pointer_iterator<WrappedIteratorT>; return make_range(PointerIteratorT(std::begin(std::forward<RangeT>(Range))), PointerIteratorT(std::end(std::forward<RangeT>(Range)))); } template <typename WrappedIteratorT, typename T1 = std::remove_reference_t<decltype( **std::declval<WrappedIteratorT>())>, typename T2 = std::add_pointer_t<T1>> using raw_pointer_iterator = pointer_iterator<pointee_iterator<WrappedIteratorT, T1>, T2>; template <typename ItType, typename NodeRef, typename DataRef> class WrappedPairNodeDataIterator : public iterator_adaptor_base< WrappedPairNodeDataIterator<ItType, NodeRef, DataRef>, ItType, typename std::iterator_traits<ItType>::iterator_category, NodeRef, std::ptrdiff_t, NodeRef *, NodeRef &> { using BaseT = iterator_adaptor_base< WrappedPairNodeDataIterator, ItType, typename std::iterator_traits<ItType>::iterator_category, NodeRef, std::ptrdiff_t, NodeRef *, NodeRef &>; const DataRef DR; mutable NodeRef NR; public: WrappedPairNodeDataIterator(ItType Begin, const DataRef DR) : BaseT(Begin), DR(DR) { NR.first = DR; } NodeRef &operator*() const { NR.second = *this->I; return NR; } }; } # 21 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" 2 # 1 "include/llvm/Config/abi-breaking.h" 1 # 44 "include/llvm/Config/abi-breaking.h" namespace llvm { extern int DisableABIBreakingChecks; __attribute__ ((visibility("hidden"))) __attribute__((weak)) int *VerifyDisableABIBreakingChecks = &DisableABIBreakingChecks; } # 23 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 26 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 3 # 29 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/functional" 1 3 # 47 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/functional" 3 # 59 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/functional" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 1 3 # 34 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 # 47 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { class bad_function_call : public std::exception { public: virtual ~bad_function_call() noexcept; const char* what() const noexcept; }; template<typename _Tp> struct __is_location_invariant : is_trivially_copyable<_Tp>::type { }; class _Undefined_class; union _Nocopy_types { void* _M_object; const void* _M_const_object; void (*_M_function_pointer)(); void (_Undefined_class::*_M_member_pointer)(); }; union [[gnu::may_alias]] _Any_data { void* _M_access() { return &_M_pod_data[0]; } const void* _M_access() const { return &_M_pod_data[0]; } template<typename _Tp> _Tp& _M_access() { return *static_cast<_Tp*>(_M_access()); } template<typename _Tp> const _Tp& _M_access() const { return *static_cast<const _Tp*>(_M_access()); } _Nocopy_types _M_unused; char _M_pod_data[sizeof(_Nocopy_types)]; }; enum _Manager_operation { __get_type_info, __get_functor_ptr, __clone_functor, __destroy_functor }; template<typename _Tp> struct _Simple_type_wrapper { _Simple_type_wrapper(_Tp __value) : __value(__value) { } _Tp __value; }; template<typename _Tp> struct __is_location_invariant<_Simple_type_wrapper<_Tp> > : __is_location_invariant<_Tp> { }; template<typename _Signature> class function; class _Function_base { public: static const std::size_t _M_max_size = sizeof(_Nocopy_types); static const std::size_t _M_max_align = __alignof__(_Nocopy_types); template<typename _Functor> class _Base_manager { protected: static const bool __stored_locally = (__is_location_invariant<_Functor>::value && sizeof(_Functor) <= _M_max_size && __alignof__(_Functor) <= _M_max_align && (_M_max_align % __alignof__(_Functor) == 0)); typedef integral_constant<bool, __stored_locally> _Local_storage; static _Functor* _M_get_pointer(const _Any_data& __source) { const _Functor* __ptr = __stored_locally? std::__addressof(__source._M_access<_Functor>()) : __source._M_access<_Functor*>(); return const_cast<_Functor*>(__ptr); } static void _M_clone(_Any_data& __dest, const _Any_data& __source, true_type) { ::new (__dest._M_access()) _Functor(__source._M_access<_Functor>()); } static void _M_clone(_Any_data& __dest, const _Any_data& __source, false_type) { __dest._M_access<_Functor*>() = new _Functor(*__source._M_access<_Functor*>()); } static void _M_destroy(_Any_data& __victim, true_type) { __victim._M_access<_Functor>().~_Functor(); } static void _M_destroy(_Any_data& __victim, false_type) { delete __victim._M_access<_Functor*>(); } public: static bool _M_manager(_Any_data& __dest, const _Any_data& __source, _Manager_operation __op) { switch (__op) { case __get_functor_ptr: __dest._M_access<_Functor*>() = _M_get_pointer(__source); break; case __clone_functor: _M_clone(__dest, __source, _Local_storage()); break; case __destroy_functor: _M_destroy(__dest, _Local_storage()); break; } return false; } static void _M_init_functor(_Any_data& __functor, _Functor&& __f) { _M_init_functor(__functor, std::move(__f), _Local_storage()); } template<typename _Signature> static bool _M_not_empty_function(const function<_Signature>& __f) { return static_cast<bool>(__f); } template<typename _Tp> static bool _M_not_empty_function(_Tp* __fp) { return __fp != nullptr; } template<typename _Class, typename _Tp> static bool _M_not_empty_function(_Tp _Class::* __mp) { return __mp != nullptr; } template<typename _Tp> static bool _M_not_empty_function(const _Tp&) { return true; } private: static void _M_init_functor(_Any_data& __functor, _Functor&& __f, true_type) { ::new (__functor._M_access()) _Functor(std::move(__f)); } static void _M_init_functor(_Any_data& __functor, _Functor&& __f, false_type) { __functor._M_access<_Functor*>() = new _Functor(std::move(__f)); } }; _Function_base() : _M_manager(nullptr) { } ~_Function_base() { if (_M_manager) _M_manager(_M_functor, _M_functor, __destroy_functor); } bool _M_empty() const { return !_M_manager; } typedef bool (*_Manager_type)(_Any_data&, const _Any_data&, _Manager_operation); _Any_data _M_functor; _Manager_type _M_manager; }; template<typename _Signature, typename _Functor> class _Function_handler; template<typename _Res, typename _Functor, typename... _ArgTypes> class _Function_handler<_Res(_ArgTypes...), _Functor> : public _Function_base::_Base_manager<_Functor> { typedef _Function_base::_Base_manager<_Functor> _Base; public: static _Res _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) { return (*_Base::_M_get_pointer(__functor))( std::forward<_ArgTypes>(__args)...); } }; template<typename _Functor, typename... _ArgTypes> class _Function_handler<void(_ArgTypes...), _Functor> : public _Function_base::_Base_manager<_Functor> { typedef _Function_base::_Base_manager<_Functor> _Base; public: static void _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) { (*_Base::_M_get_pointer(__functor))( std::forward<_ArgTypes>(__args)...); } }; template<typename _Class, typename _Member, typename _Res, typename... _ArgTypes> class _Function_handler<_Res(_ArgTypes...), _Member _Class::*> : public _Function_handler<void(_ArgTypes...), _Member _Class::*> { typedef _Function_handler<void(_ArgTypes...), _Member _Class::*> _Base; public: static _Res _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) { return std::__invoke(_Base::_M_get_pointer(__functor)->__value, std::forward<_ArgTypes>(__args)...); } }; template<typename _Class, typename _Member, typename... _ArgTypes> class _Function_handler<void(_ArgTypes...), _Member _Class::*> : public _Function_base::_Base_manager< _Simple_type_wrapper< _Member _Class::* > > { typedef _Member _Class::* _Functor; typedef _Simple_type_wrapper<_Functor> _Wrapper; typedef _Function_base::_Base_manager<_Wrapper> _Base; public: static bool _M_manager(_Any_data& __dest, const _Any_data& __source, _Manager_operation __op) { switch (__op) { case __get_functor_ptr: __dest._M_access<_Functor*>() = &_Base::_M_get_pointer(__source)->__value; break; default: _Base::_M_manager(__dest, __source, __op); } return false; } static void _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) { std::__invoke(_Base::_M_get_pointer(__functor)->__value, std::forward<_ArgTypes>(__args)...); } }; template<typename _From, typename _To> using __check_func_return_type = __or_<is_void<_To>, is_same<_From, _To>, is_convertible<_From, _To>>; template<typename _Res, typename... _ArgTypes> class function<_Res(_ArgTypes...)> : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>, private _Function_base { template<typename _Func, typename _Res2 = typename result_of<_Func&(_ArgTypes...)>::type> struct _Callable : __check_func_return_type<_Res2, _Res> { }; template<typename _Tp> struct _Callable<function, _Tp> : false_type { }; template<typename _Cond, typename _Tp> using _Requires = typename enable_if<_Cond::value, _Tp>::type; public: typedef _Res result_type; function() noexcept : _Function_base() { } function(nullptr_t) noexcept : _Function_base() { } # 413 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 function(const function& __x); # 422 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 function(function&& __x) noexcept : _Function_base() { __x.swap(*this); } # 443 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 template<typename _Functor, typename = _Requires<__not_<is_same<_Functor, function>>, void>, typename = _Requires<_Callable<_Functor>, void>> function(_Functor); # 460 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 function& operator=(const function& __x) { function(__x).swap(*this); return *this; } # 478 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 function& operator=(function&& __x) noexcept { function(std::move(__x)).swap(*this); return *this; } # 492 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 function& operator=(nullptr_t) noexcept { if (_M_manager) { _M_manager(_M_functor, _M_functor, __destroy_functor); _M_manager = nullptr; _M_invoker = nullptr; } return *this; } # 520 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 template<typename _Functor> _Requires<_Callable<typename decay<_Functor>::type>, function&> operator=(_Functor&& __f) { function(std::forward<_Functor>(__f)).swap(*this); return *this; } template<typename _Functor> function& operator=(reference_wrapper<_Functor> __f) noexcept { function(__f).swap(*this); return *this; } # 546 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 void swap(function& __x) noexcept { std::swap(_M_functor, __x._M_functor); std::swap(_M_manager, __x._M_manager); std::swap(_M_invoker, __x._M_invoker); } # 563 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 explicit operator bool() const noexcept { return !_M_empty(); } # 576 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 _Res operator()(_ArgTypes... __args) const; # 608 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 private: using _Invoker_type = _Res (*)(const _Any_data&, _ArgTypes&&...); _Invoker_type _M_invoker; }; # 651 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 template<typename _Res, typename... _ArgTypes> function<_Res(_ArgTypes...)>:: function(const function& __x) : _Function_base() { if (static_cast<bool>(__x)) { __x._M_manager(_M_functor, __x._M_functor, __clone_functor); _M_invoker = __x._M_invoker; _M_manager = __x._M_manager; } } template<typename _Res, typename... _ArgTypes> template<typename _Functor, typename, typename> function<_Res(_ArgTypes...)>:: function(_Functor __f) : _Function_base() { typedef _Function_handler<_Res(_ArgTypes...), _Functor> _My_handler; if (_My_handler::_M_not_empty_function(__f)) { _My_handler::_M_init_functor(_M_functor, std::move(__f)); _M_invoker = &_My_handler::_M_invoke; _M_manager = &_My_handler::_M_manager; } } template<typename _Res, typename... _ArgTypes> _Res function<_Res(_ArgTypes...)>:: operator()(_ArgTypes... __args) const { if (_M_empty()) __throw_bad_function_call(); return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...); } # 743 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 template<typename _Res, typename... _Args> inline bool operator==(const function<_Res(_Args...)>& __f, nullptr_t) noexcept { return !static_cast<bool>(__f); } template<typename _Res, typename... _Args> inline bool operator==(nullptr_t, const function<_Res(_Args...)>& __f) noexcept { return !static_cast<bool>(__f); } # 761 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 template<typename _Res, typename... _Args> inline bool operator!=(const function<_Res(_Args...)>& __f, nullptr_t) noexcept { return static_cast<bool>(__f); } template<typename _Res, typename... _Args> inline bool operator!=(nullptr_t, const function<_Res(_Args...)>& __f) noexcept { return static_cast<bool>(__f); } # 782 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h" 3 template<typename _Res, typename... _Args> inline void swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept { __x.swap(__y); } } # 60 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/functional" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 86 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/functional" 3 template<typename _MemFunPtr, bool __is_mem_fn = is_member_function_pointer<_MemFunPtr>::value> class _Mem_fn_base : public _Mem_fn_traits<_MemFunPtr>::__maybe_type { using _Traits = _Mem_fn_traits<_MemFunPtr>; using _Arity = typename _Traits::__arity; using _Varargs = typename _Traits::__vararg; template<typename _Func, typename... _BoundArgs> friend struct _Bind_check_arity; _MemFunPtr _M_pmf; public: using result_type = typename _Traits::__result_type; explicit constexpr _Mem_fn_base(_MemFunPtr __pmf) noexcept : _M_pmf(__pmf) { } template<typename... _Args> auto operator()(_Args&&... __args) const noexcept(noexcept( std::__invoke(_M_pmf, std::forward<_Args>(__args)...))) -> decltype(std::__invoke(_M_pmf, std::forward<_Args>(__args)...)) { return std::__invoke(_M_pmf, std::forward<_Args>(__args)...); } }; template<typename _MemObjPtr> class _Mem_fn_base<_MemObjPtr, false> { using _Arity = integral_constant<size_t, 0>; using _Varargs = false_type; template<typename _Func, typename... _BoundArgs> friend struct _Bind_check_arity; _MemObjPtr _M_pm; public: explicit constexpr _Mem_fn_base(_MemObjPtr __pm) noexcept : _M_pm(__pm) { } template<typename _Tp> auto operator()(_Tp&& __obj) const noexcept(noexcept(std::__invoke(_M_pm, std::forward<_Tp>(__obj)))) -> decltype(std::__invoke(_M_pm, std::forward<_Tp>(__obj))) { return std::__invoke(_M_pm, std::forward<_Tp>(__obj)); } }; template<typename _MemberPointer> struct _Mem_fn; template<typename _Res, typename _Class> struct _Mem_fn<_Res _Class::*> : _Mem_fn_base<_Res _Class::*> { using _Mem_fn_base<_Res _Class::*>::_Mem_fn_base; }; # 158 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/functional" 3 template<typename _Tp, typename _Class> inline _Mem_fn<_Tp _Class::*> mem_fn(_Tp _Class::* __pm) noexcept { return _Mem_fn<_Tp _Class::*>(__pm); } # 173 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/functional" 3 template<typename _Tp> struct is_bind_expression : public false_type { }; # 184 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/functional" 3 template<typename _Tp> struct is_placeholder : public integral_constant<int, 0> { }; # 199 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/functional" 3 template<int _Num> struct _Placeholder { }; namespace placeholders { extern const _Placeholder<1> _1; extern const _Placeholder<2> _2; extern const _Placeholder<3> _3; extern const _Placeholder<4> _4; extern const _Placeholder<5> _5; extern const _Placeholder<6> _6; extern const _Placeholder<7> _7; extern const _Placeholder<8> _8; extern const _Placeholder<9> _9; extern const _Placeholder<10> _10; extern const _Placeholder<11> _11; extern const _Placeholder<12> _12; extern const _Placeholder<13> _13; extern const _Placeholder<14> _14; extern const _Placeholder<15> _15; extern const _Placeholder<16> _16; extern const _Placeholder<17> _17; extern const _Placeholder<18> _18; extern const _Placeholder<19> _19; extern const _Placeholder<20> _20; extern const _Placeholder<21> _21; extern const _Placeholder<22> _22; extern const _Placeholder<23> _23; extern const _Placeholder<24> _24; extern const _Placeholder<25> _25; extern const _Placeholder<26> _26; extern const _Placeholder<27> _27; extern const _Placeholder<28> _28; extern const _Placeholder<29> _29; } template<int _Num> struct is_placeholder<_Placeholder<_Num> > : public integral_constant<int, _Num> { }; template<int _Num> struct is_placeholder<const _Placeholder<_Num> > : public integral_constant<int, _Num> { }; template<std::size_t __i, typename _Tuple> using _Safe_tuple_element_t = typename enable_if<(__i < tuple_size<_Tuple>::value), tuple_element<__i, _Tuple>>::type::type; # 275 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/functional" 3 template<typename _Arg, bool _IsBindExp = is_bind_expression<_Arg>::value, bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)> class _Mu; template<typename _Tp> class _Mu<reference_wrapper<_Tp>, false, false> { public: template<typename _CVRef, typename _Tuple> _Tp& operator()(_CVRef& __arg, _Tuple&) const volatile { return __arg.get(); } }; template<typename _Arg> class _Mu<_Arg, true, false> { public: template<typename _CVArg, typename... _Args> auto operator()(_CVArg& __arg, tuple<_Args...>& __tuple) const volatile -> decltype(__arg(declval<_Args>()...)) { typedef typename _Build_index_tuple<sizeof...(_Args)>::__type _Indexes; return this->__call(__arg, __tuple, _Indexes()); } private: template<typename _CVArg, typename... _Args, std::size_t... _Indexes> auto __call(_CVArg& __arg, tuple<_Args...>& __tuple, const _Index_tuple<_Indexes...>&) const volatile -> decltype(__arg(declval<_Args>()...)) { return __arg(std::get<_Indexes>(std::move(__tuple))...); } }; template<typename _Arg> class _Mu<_Arg, false, true> { public: template<typename _Tuple> _Safe_tuple_element_t<(is_placeholder<_Arg>::value - 1), _Tuple>&& operator()(const volatile _Arg&, _Tuple& __tuple) const volatile { return ::std::get<(is_placeholder<_Arg>::value - 1)>(std::move(__tuple)); } }; template<typename _Arg> class _Mu<_Arg, false, false> { public: template<typename _CVArg, typename _Tuple> _CVArg&& operator()(_CVArg&& __arg, _Tuple&) const volatile { return std::forward<_CVArg>(__arg); } }; template<std::size_t _Ind, typename... _Tp> inline auto __volget(volatile tuple<_Tp...>& __tuple) -> __tuple_element_t<_Ind, tuple<_Tp...>> volatile& { return std::get<_Ind>(const_cast<tuple<_Tp...>&>(__tuple)); } template<std::size_t _Ind, typename... _Tp> inline auto __volget(const volatile tuple<_Tp...>& __tuple) -> __tuple_element_t<_Ind, tuple<_Tp...>> const volatile& { return std::get<_Ind>(const_cast<const tuple<_Tp...>&>(__tuple)); } template<typename _Signature> struct _Bind; template<typename _Functor, typename... _Bound_args> class _Bind<_Functor(_Bound_args...)> : public _Weak_result_type<_Functor> { typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type _Bound_indexes; _Functor _M_f; tuple<_Bound_args...> _M_bound_args; template<typename _Result, typename... _Args, std::size_t... _Indexes> _Result __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) { return std::__invoke(_M_f, _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... ); } template<typename _Result, typename... _Args, std::size_t... _Indexes> _Result __call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const { return std::__invoke(_M_f, _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... ); } template<typename _Result, typename... _Args, std::size_t... _Indexes> _Result __call_v(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile { return std::__invoke(_M_f, _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... ); } template<typename _Result, typename... _Args, std::size_t... _Indexes> _Result __call_c_v(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const volatile { return std::__invoke(_M_f, _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... ); } template<typename _BoundArg, typename _CallArgs> using _Mu_type = decltype( _Mu<typename remove_cv<_BoundArg>::type>()( std::declval<_BoundArg&>(), std::declval<_CallArgs&>()) ); template<typename _Fn, typename _CallArgs, typename... _BArgs> using _Res_type_impl = typename result_of< _Fn&(_Mu_type<_BArgs, _CallArgs>&&...) >::type; template<typename _CallArgs> using _Res_type = _Res_type_impl<_Functor, _CallArgs, _Bound_args...>; template<typename _CallArgs> using __dependent = typename enable_if<bool(tuple_size<_CallArgs>::value+1), _Functor>::type; template<typename _CallArgs, template<class> class __cv_quals> using _Res_type_cv = _Res_type_impl< typename __cv_quals<__dependent<_CallArgs>>::type, _CallArgs, typename __cv_quals<_Bound_args>::type...>; public: template<typename... _Args> explicit _Bind(const _Functor& __f, _Args&&... __args) : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) { } template<typename... _Args> explicit _Bind(_Functor&& __f, _Args&&... __args) : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) { } _Bind(const _Bind&) = default; _Bind(_Bind&& __b) : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args)) { } template<typename... _Args, typename _Result = _Res_type<tuple<_Args...>>> _Result operator()(_Args&&... __args) { return this->__call<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } template<typename... _Args, typename _Result = _Res_type_cv<tuple<_Args...>, add_const>> _Result operator()(_Args&&... __args) const { return this->__call_c<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } # 505 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/functional" 3 template<typename... _Args, typename _Result = _Res_type_cv<tuple<_Args...>, add_volatile>> _Result operator()(_Args&&... __args) volatile { return this->__call_v<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } template<typename... _Args, typename _Result = _Res_type_cv<tuple<_Args...>, add_cv>> _Result operator()(_Args&&... __args) const volatile { return this->__call_c_v<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } }; template<typename _Result, typename _Signature> struct _Bind_result; template<typename _Result, typename _Functor, typename... _Bound_args> class _Bind_result<_Result, _Functor(_Bound_args...)> { typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type _Bound_indexes; _Functor _M_f; tuple<_Bound_args...> _M_bound_args; template<typename _Res> using __enable_if_void = typename enable_if<is_void<_Res>{}>::type; template<typename _Res> using __disable_if_void = typename enable_if<!is_void<_Res>{}, _Result>::type; template<typename _Res, typename... _Args, std::size_t... _Indexes> __disable_if_void<_Res> __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) { return std::__invoke(_M_f, _Mu<_Bound_args>() (std::get<_Indexes>(_M_bound_args), __args)...); } template<typename _Res, typename... _Args, std::size_t... _Indexes> __enable_if_void<_Res> __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) { std::__invoke(_M_f, _Mu<_Bound_args>() (std::get<_Indexes>(_M_bound_args), __args)...); } template<typename _Res, typename... _Args, std::size_t... _Indexes> __disable_if_void<_Res> __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const { return std::__invoke(_M_f, _Mu<_Bound_args>() (std::get<_Indexes>(_M_bound_args), __args)...); } template<typename _Res, typename... _Args, std::size_t... _Indexes> __enable_if_void<_Res> __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const { std::__invoke(_M_f, _Mu<_Bound_args>() (std::get<_Indexes>(_M_bound_args), __args)...); } template<typename _Res, typename... _Args, std::size_t... _Indexes> __disable_if_void<_Res> __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile { return std::__invoke(_M_f, _Mu<_Bound_args>() (__volget<_Indexes>(_M_bound_args), __args)...); } template<typename _Res, typename... _Args, std::size_t... _Indexes> __enable_if_void<_Res> __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile { std::__invoke(_M_f, _Mu<_Bound_args>() (__volget<_Indexes>(_M_bound_args), __args)...); } template<typename _Res, typename... _Args, std::size_t... _Indexes> __disable_if_void<_Res> __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const volatile { return std::__invoke(_M_f, _Mu<_Bound_args>() (__volget<_Indexes>(_M_bound_args), __args)...); } template<typename _Res, typename... _Args, std::size_t... _Indexes> __enable_if_void<_Res> __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const volatile { std::__invoke(_M_f, _Mu<_Bound_args>() (__volget<_Indexes>(_M_bound_args), __args)...); } public: typedef _Result result_type; template<typename... _Args> explicit _Bind_result(const _Functor& __f, _Args&&... __args) : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) { } template<typename... _Args> explicit _Bind_result(_Functor&& __f, _Args&&... __args) : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) { } _Bind_result(const _Bind_result&) = default; _Bind_result(_Bind_result&& __b) : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args)) { } template<typename... _Args> result_type operator()(_Args&&... __args) { return this->__call<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } template<typename... _Args> result_type operator()(_Args&&... __args) const { return this->__call<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } template<typename... _Args> result_type operator()(_Args&&... __args) volatile { return this->__call<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } template<typename... _Args> result_type operator()(_Args&&... __args) const volatile { return this->__call<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } }; template<typename _Signature> struct is_bind_expression<_Bind<_Signature> > : public true_type { }; template<typename _Signature> struct is_bind_expression<const _Bind<_Signature> > : public true_type { }; template<typename _Signature> struct is_bind_expression<volatile _Bind<_Signature> > : public true_type { }; template<typename _Signature> struct is_bind_expression<const volatile _Bind<_Signature>> : public true_type { }; template<typename _Result, typename _Signature> struct is_bind_expression<_Bind_result<_Result, _Signature>> : public true_type { }; template<typename _Result, typename _Signature> struct is_bind_expression<const _Bind_result<_Result, _Signature>> : public true_type { }; template<typename _Result, typename _Signature> struct is_bind_expression<volatile _Bind_result<_Result, _Signature>> : public true_type { }; template<typename _Result, typename _Signature> struct is_bind_expression<const volatile _Bind_result<_Result, _Signature>> : public true_type { }; template<typename _Func, typename... _BoundArgs> struct _Bind_check_arity { }; template<typename _Ret, typename... _Args, typename... _BoundArgs> struct _Bind_check_arity<_Ret (*)(_Args...), _BoundArgs...> { static_assert(sizeof...(_BoundArgs) == sizeof...(_Args), "Wrong number of arguments for function"); }; template<typename _Ret, typename... _Args, typename... _BoundArgs> struct _Bind_check_arity<_Ret (*)(_Args......), _BoundArgs...> { static_assert(sizeof...(_BoundArgs) >= sizeof...(_Args), "Wrong number of arguments for function"); }; template<typename _Tp, typename _Class, typename... _BoundArgs> struct _Bind_check_arity<_Tp _Class::*, _BoundArgs...> { using _Arity = typename _Mem_fn<_Tp _Class::*>::_Arity; using _Varargs = typename _Mem_fn<_Tp _Class::*>::_Varargs; static_assert(_Varargs::value ? sizeof...(_BoundArgs) >= _Arity::value + 1 : sizeof...(_BoundArgs) == _Arity::value + 1, "Wrong number of arguments for pointer-to-member"); }; template<typename _Tp, typename _Tp2 = typename decay<_Tp>::type> using __is_socketlike = __or_<is_integral<_Tp2>, is_enum<_Tp2>>; template<bool _SocketLike, typename _Func, typename... _BoundArgs> struct _Bind_helper : _Bind_check_arity<typename decay<_Func>::type, _BoundArgs...> { typedef typename decay<_Func>::type __func_type; typedef _Bind<__func_type(typename decay<_BoundArgs>::type...)> type; }; template<typename _Func, typename... _BoundArgs> struct _Bind_helper<true, _Func, _BoundArgs...> { }; template<typename _Func, typename... _BoundArgs> inline typename _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs...>::type bind(_Func&& __f, _BoundArgs&&... __args) { typedef _Bind_helper<false, _Func, _BoundArgs...> __helper_type; return typename __helper_type::type(std::forward<_Func>(__f), std::forward<_BoundArgs>(__args)...); } template<typename _Result, typename _Func, typename... _BoundArgs> struct _Bindres_helper : _Bind_check_arity<typename decay<_Func>::type, _BoundArgs...> { typedef typename decay<_Func>::type __functor_type; typedef _Bind_result<_Result, __functor_type(typename decay<_BoundArgs>::type...)> type; }; template<typename _Result, typename _Func, typename... _BoundArgs> inline typename _Bindres_helper<_Result, _Func, _BoundArgs...>::type bind(_Func&& __f, _BoundArgs&&... __args) { typedef _Bindres_helper<_Result, _Func, _BoundArgs...> __helper_type; return typename __helper_type::type(std::forward<_Func>(__f), std::forward<_BoundArgs>(__args)...); } template<typename _Fn> class _Not_fn { template<typename _Fn2, typename... _Args> using __inv_res_t = typename __invoke_result<_Fn2, _Args...>::type; template<typename _Tp> static decltype(!std::declval<_Tp>()) _S_not() noexcept(noexcept(!std::declval<_Tp>())); public: template<typename _Fn2> _Not_fn(_Fn2&& __fn, int) : _M_fn(std::forward<_Fn2>(__fn)) { } _Not_fn(const _Not_fn& __fn) = default; _Not_fn(_Not_fn&& __fn) = default; ~_Not_fn() = default; # 873 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/functional" 3 template<typename... _Args> decltype(_S_not<__inv_res_t<_Fn &, _Args...>>()) operator()(_Args&&... __args) & noexcept(__is_nothrow_invocable<_Fn &, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn &, _Args...>>())) { return !std::__invoke(std::forward< _Fn & >(_M_fn), std::forward<_Args>(__args)...); } template<typename... _Args> decltype(_S_not<__inv_res_t<_Fn const &, _Args...>>()) operator()(_Args&&... __args) const & noexcept(__is_nothrow_invocable<_Fn const &, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn const &, _Args...>>())) { return !std::__invoke(std::forward< _Fn const & >(_M_fn), std::forward<_Args>(__args)...); } template<typename... _Args> decltype(_S_not<__inv_res_t<_Fn &&, _Args...>>()) operator()(_Args&&... __args) && noexcept(__is_nothrow_invocable<_Fn &&, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn &&, _Args...>>())) { return !std::__invoke(std::forward< _Fn && >(_M_fn), std::forward<_Args>(__args)...); } template<typename... _Args> decltype(_S_not<__inv_res_t<_Fn const &&, _Args...>>()) operator()(_Args&&... __args) const && noexcept(__is_nothrow_invocable<_Fn const &&, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn const &&, _Args...>>())) { return !std::__invoke(std::forward< _Fn const && >(_M_fn), std::forward<_Args>(__args)...); } private: _Fn _M_fn; }; template<typename _Tp, typename _Pred> struct __is_byte_like : false_type { }; template<typename _Tp> struct __is_byte_like<_Tp, equal_to<_Tp>> : __bool_constant<sizeof(_Tp) == 1 && is_integral<_Tp>::value> { }; template<typename _Tp> struct __is_byte_like<_Tp, equal_to<void>> : __bool_constant<sizeof(_Tp) == 1 && is_integral<_Tp>::value> { }; # 1194 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/functional" 3 } # 30 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" 2 # 42 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" namespace llvm { template <typename T, T> struct SameType; namespace detail { template <typename RangeT> using IterOfRange = decltype(std::begin(std::declval<RangeT &>())); template <typename RangeT> using ValueOfRange = typename std::remove_reference<decltype( *std::begin(std::declval<RangeT &>()))>::type; } template <typename T> struct negation : std::integral_constant<bool, !bool(T::value)> {}; template <typename...> struct conjunction : std::true_type {}; template <typename B1> struct conjunction<B1> : B1 {}; template <typename B1, typename... Bn> struct conjunction<B1, Bn...> : std::conditional<bool(B1::value), conjunction<Bn...>, B1>::type {}; template <typename T> struct make_const_ptr { using type = typename std::add_pointer<typename std::add_const<T>::type>::type; }; template <typename T> struct make_const_ref { using type = typename std::add_lvalue_reference< typename std::add_const<T>::type>::type; }; # 89 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" namespace detail { template <typename...> using void_t = void; template <class, template <class...> class Op, class... Args> struct detector { using value_t = std::false_type; }; template <template <class...> class Op, class... Args> struct detector<void_t<Op<Args...>>, Op, Args...> { using value_t = std::true_type; }; } template <template <class...> class Op, class... Args> using is_detected = typename detail::detector<void, Op, Args...>::value_t; namespace detail { template <typename Callable, typename... Args> using is_invocable = decltype(std::declval<Callable &>()(std::declval<Args>()...)); } template <typename Callable, typename... Args> using is_invocable = is_detected<detail::is_invocable, Callable, Args...>; template <typename T, bool isClass = std::is_class<T>::value> struct function_traits : public function_traits<decltype(&T::operator())> {}; template <typename ClassType, typename ReturnType, typename... Args> struct function_traits<ReturnType (ClassType::*)(Args...) const, false> { enum { num_args = sizeof...(Args) }; using result_t = ReturnType; template <size_t Index> using arg_t = typename std::tuple_element<Index, std::tuple<Args...>>::type; }; template <typename ClassType, typename ReturnType, typename... Args> struct function_traits<ReturnType (ClassType::*)(Args...), false> : function_traits<ReturnType (ClassType::*)(Args...) const> {}; template <typename ReturnType, typename... Args> struct function_traits<ReturnType (*)(Args...), false> { enum { num_args = sizeof...(Args) }; using result_t = ReturnType; template <size_t i> using arg_t = typename std::tuple_element<i, std::tuple<Args...>>::type; }; template <typename ReturnType, typename... Args> struct function_traits<ReturnType (&)(Args...), false> : public function_traits<ReturnType (*)(Args...)> {}; template <class Ty> struct identity { using argument_type = Ty; Ty &operator()(Ty &self) const { return self; } const Ty &operator()(const Ty &self) const { return self; } }; template<typename Fn> class function_ref; template<typename Ret, typename ...Params> class function_ref<Ret(Params...)> { Ret (*callback)(intptr_t callable, Params ...params) = nullptr; intptr_t callable; template<typename Callable> static Ret callback_fn(intptr_t callable, Params ...params) { return (*reinterpret_cast<Callable*>(callable))( std::forward<Params>(params)...); } public: function_ref() = default; function_ref(std::nullptr_t) {} template <typename Callable> function_ref( Callable &&callable, std::enable_if_t< !std::is_same<std::remove_cv_t<std::remove_reference_t<Callable>>, function_ref>::value> * = nullptr) : callback(callback_fn<typename std::remove_reference<Callable>::type>), callable(reinterpret_cast<intptr_t>(&callable)) {} Ret operator()(Params ...params) const { return callback(callable, std::forward<Params>(params)...); } explicit operator bool() const { return callback; } }; template <class T> inline void deleter(T *Ptr) { delete Ptr; } namespace adl_detail { using std::begin; template <typename ContainerTy> decltype(auto) adl_begin(ContainerTy &&container) { return begin(std::forward<ContainerTy>(container)); } using std::end; template <typename ContainerTy> decltype(auto) adl_end(ContainerTy &&container) { return end(std::forward<ContainerTy>(container)); } using std::swap; template <typename T> void adl_swap(T &&lhs, T &&rhs) noexcept(noexcept(swap(std::declval<T>(), std::declval<T>()))) { swap(std::forward<T>(lhs), std::forward<T>(rhs)); } } template <typename ContainerTy> decltype(auto) adl_begin(ContainerTy &&container) { return adl_detail::adl_begin(std::forward<ContainerTy>(container)); } template <typename ContainerTy> decltype(auto) adl_end(ContainerTy &&container) { return adl_detail::adl_end(std::forward<ContainerTy>(container)); } template <typename T> void adl_swap(T &&lhs, T &&rhs) noexcept( noexcept(adl_detail::adl_swap(std::declval<T>(), std::declval<T>()))) { adl_detail::adl_swap(std::forward<T>(lhs), std::forward<T>(rhs)); } template <typename T> constexpr bool empty(const T &RangeOrContainer) { return adl_begin(RangeOrContainer) == adl_end(RangeOrContainer); } template <typename ContainerTy> bool hasSingleElement(ContainerTy &&C) { auto B = std::begin(C), E = std::end(C); return B != E && std::next(B) == E; } template <typename T> auto drop_begin(T &&RangeOrContainer, size_t N) { return make_range(std::next(adl_begin(RangeOrContainer), N), adl_end(RangeOrContainer)); } template <typename ItTy, typename FuncTy, typename FuncReturnTy = decltype(std::declval<FuncTy>()(*std::declval<ItTy>()))> class mapped_iterator : public iterator_adaptor_base< mapped_iterator<ItTy, FuncTy>, ItTy, typename std::iterator_traits<ItTy>::iterator_category, typename std::remove_reference<FuncReturnTy>::type> { public: mapped_iterator(ItTy U, FuncTy F) : mapped_iterator::iterator_adaptor_base(std::move(U)), F(std::move(F)) {} ItTy getCurrent() { return this->I; } FuncReturnTy operator*() const { return F(*this->I); } private: FuncTy F; }; template <class ItTy, class FuncTy> inline mapped_iterator<ItTy, FuncTy> map_iterator(ItTy I, FuncTy F) { return mapped_iterator<ItTy, FuncTy>(std::move(I), std::move(F)); } template <class ContainerTy, class FuncTy> auto map_range(ContainerTy &&C, FuncTy F) { return make_range(map_iterator(C.begin(), F), map_iterator(C.end(), F)); } template <typename Ty> class has_rbegin_impl { using yes = char[1]; using no = char[2]; template <typename Inner> static yes& test(Inner *I, decltype(I->rbegin()) * = nullptr); template <typename> static no& test(...); public: static const bool value = sizeof(test<Ty>(nullptr)) == sizeof(yes); }; template <typename Ty> struct has_rbegin : has_rbegin_impl<typename std::remove_reference<Ty>::type> { }; template <typename ContainerTy> auto reverse(ContainerTy &&C, std::enable_if_t<has_rbegin<ContainerTy>::value> * = nullptr) { return make_range(C.rbegin(), C.rend()); } template <typename IteratorTy> std::reverse_iterator<IteratorTy> make_reverse_iterator(IteratorTy It) { return std::reverse_iterator<IteratorTy>(It); } template <typename ContainerTy> auto reverse(ContainerTy &&C, std::enable_if_t<!has_rbegin<ContainerTy>::value> * = nullptr) { return make_range(llvm::make_reverse_iterator(std::end(C)), llvm::make_reverse_iterator(std::begin(C))); } # 378 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" template <typename WrappedIteratorT, typename PredicateT, typename IterTag> class filter_iterator_base : public iterator_adaptor_base< filter_iterator_base<WrappedIteratorT, PredicateT, IterTag>, WrappedIteratorT, typename std::common_type< IterTag, typename std::iterator_traits< WrappedIteratorT>::iterator_category>::type> { using BaseT = iterator_adaptor_base< filter_iterator_base<WrappedIteratorT, PredicateT, IterTag>, WrappedIteratorT, typename std::common_type< IterTag, typename std::iterator_traits< WrappedIteratorT>::iterator_category>::type>; protected: WrappedIteratorT End; PredicateT Pred; void findNextValid() { while (this->I != End && !Pred(*this->I)) BaseT::operator++(); } filter_iterator_base(WrappedIteratorT Begin, WrappedIteratorT End, PredicateT Pred) : BaseT(Begin), End(End), Pred(Pred) { findNextValid(); } public: using BaseT::operator++; filter_iterator_base &operator++() { BaseT::operator++(); findNextValid(); return *this; } }; template <typename WrappedIteratorT, typename PredicateT, typename IterTag = std::forward_iterator_tag> class filter_iterator_impl : public filter_iterator_base<WrappedIteratorT, PredicateT, IterTag> { using BaseT = filter_iterator_base<WrappedIteratorT, PredicateT, IterTag>; public: filter_iterator_impl(WrappedIteratorT Begin, WrappedIteratorT End, PredicateT Pred) : BaseT(Begin, End, Pred) {} }; template <typename WrappedIteratorT, typename PredicateT> class filter_iterator_impl<WrappedIteratorT, PredicateT, std::bidirectional_iterator_tag> : public filter_iterator_base<WrappedIteratorT, PredicateT, std::bidirectional_iterator_tag> { using BaseT = filter_iterator_base<WrappedIteratorT, PredicateT, std::bidirectional_iterator_tag>; void findPrevValid() { while (!this->Pred(*this->I)) BaseT::operator--(); } public: using BaseT::operator--; filter_iterator_impl(WrappedIteratorT Begin, WrappedIteratorT End, PredicateT Pred) : BaseT(Begin, End, Pred) {} filter_iterator_impl &operator--() { BaseT::operator--(); findPrevValid(); return *this; } }; namespace detail { template <bool is_bidirectional> struct fwd_or_bidi_tag_impl { using type = std::forward_iterator_tag; }; template <> struct fwd_or_bidi_tag_impl<true> { using type = std::bidirectional_iterator_tag; }; template <typename IterT> struct fwd_or_bidi_tag { using type = typename fwd_or_bidi_tag_impl<std::is_base_of< std::bidirectional_iterator_tag, typename std::iterator_traits<IterT>::iterator_category>::value>::type; }; } template <typename WrappedIteratorT, typename PredicateT> using filter_iterator = filter_iterator_impl< WrappedIteratorT, PredicateT, typename detail::fwd_or_bidi_tag<WrappedIteratorT>::type>; # 496 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" template <typename RangeT, typename PredicateT> iterator_range<filter_iterator<detail::IterOfRange<RangeT>, PredicateT>> make_filter_range(RangeT &&Range, PredicateT Pred) { using FilterIteratorT = filter_iterator<detail::IterOfRange<RangeT>, PredicateT>; return make_range( FilterIteratorT(std::begin(std::forward<RangeT>(Range)), std::end(std::forward<RangeT>(Range)), Pred), FilterIteratorT(std::end(std::forward<RangeT>(Range)), std::end(std::forward<RangeT>(Range)), Pred)); } # 525 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" template <typename WrappedIteratorT> class early_inc_iterator_impl : public iterator_adaptor_base<early_inc_iterator_impl<WrappedIteratorT>, WrappedIteratorT, std::input_iterator_tag> { using BaseT = iterator_adaptor_base<early_inc_iterator_impl<WrappedIteratorT>, WrappedIteratorT, std::input_iterator_tag>; using PointerT = typename std::iterator_traits<WrappedIteratorT>::pointer; protected: public: early_inc_iterator_impl(WrappedIteratorT I) : BaseT(I) {} using BaseT::operator*; typename BaseT::reference operator*() { return *(this->I)++; } using BaseT::operator++; early_inc_iterator_impl &operator++() { return *this; } using BaseT::operator==; bool operator==(const early_inc_iterator_impl &RHS) const { return BaseT::operator==(RHS); } }; # 582 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" template <typename RangeT> iterator_range<early_inc_iterator_impl<detail::IterOfRange<RangeT>>> make_early_inc_range(RangeT &&Range) { using EarlyIncIteratorT = early_inc_iterator_impl<detail::IterOfRange<RangeT>>; return make_range(EarlyIncIteratorT(std::begin(std::forward<RangeT>(Range))), EarlyIncIteratorT(std::end(std::forward<RangeT>(Range)))); } template <typename R, typename UnaryPredicate> bool all_of(R &&range, UnaryPredicate P); template <typename R, typename UnaryPredicate> bool any_of(R &&range, UnaryPredicate P); namespace detail { using std::declval; template<typename... Iters> struct ZipTupleType { using type = std::tuple<decltype(*declval<Iters>())...>; }; template <typename ZipType, typename... Iters> using zip_traits = iterator_facade_base< ZipType, typename std::common_type<std::bidirectional_iterator_tag, typename std::iterator_traits< Iters>::iterator_category...>::type, typename ZipTupleType<Iters...>::type, typename std::iterator_traits<typename std::tuple_element< 0, std::tuple<Iters...>>::type>::difference_type, typename ZipTupleType<Iters...>::type *, typename ZipTupleType<Iters...>::type>; template <typename ZipType, typename... Iters> struct zip_common : public zip_traits<ZipType, Iters...> { using Base = zip_traits<ZipType, Iters...>; using value_type = typename Base::value_type; std::tuple<Iters...> iterators; protected: template <size_t... Ns> value_type deref(std::index_sequence<Ns...>) const { return value_type(*std::get<Ns>(iterators)...); } template <size_t... Ns> decltype(iterators) tup_inc(std::index_sequence<Ns...>) const { return std::tuple<Iters...>(std::next(std::get<Ns>(iterators))...); } template <size_t... Ns> decltype(iterators) tup_dec(std::index_sequence<Ns...>) const { return std::tuple<Iters...>(std::prev(std::get<Ns>(iterators))...); } public: zip_common(Iters &&... ts) : iterators(std::forward<Iters>(ts)...) {} value_type operator*() { return deref(std::index_sequence_for<Iters...>{}); } const value_type operator*() const { return deref(std::index_sequence_for<Iters...>{}); } ZipType &operator++() { iterators = tup_inc(std::index_sequence_for<Iters...>{}); return *reinterpret_cast<ZipType *>(this); } ZipType &operator--() { static_assert(Base::IsBidirectional, "All inner iterators must be at least bidirectional."); iterators = tup_dec(std::index_sequence_for<Iters...>{}); return *reinterpret_cast<ZipType *>(this); } }; template <typename... Iters> struct zip_first : public zip_common<zip_first<Iters...>, Iters...> { using Base = zip_common<zip_first<Iters...>, Iters...>; bool operator==(const zip_first<Iters...> &other) const { return std::get<0>(this->iterators) == std::get<0>(other.iterators); } zip_first(Iters &&... ts) : Base(std::forward<Iters>(ts)...) {} }; template <typename... Iters> class zip_shortest : public zip_common<zip_shortest<Iters...>, Iters...> { template <size_t... Ns> bool test(const zip_shortest<Iters...> &other, std::index_sequence<Ns...>) const { return all_of(std::initializer_list<bool>{std::get<Ns>(this->iterators) != std::get<Ns>(other.iterators)...}, identity<bool>{}); } public: using Base = zip_common<zip_shortest<Iters...>, Iters...>; zip_shortest(Iters &&... ts) : Base(std::forward<Iters>(ts)...) {} bool operator==(const zip_shortest<Iters...> &other) const { return !test(other, std::index_sequence_for<Iters...>{}); } }; template <template <typename...> class ItType, typename... Args> class zippy { public: using iterator = ItType<decltype(std::begin(std::declval<Args>()))...>; using iterator_category = typename iterator::iterator_category; using value_type = typename iterator::value_type; using difference_type = typename iterator::difference_type; using pointer = typename iterator::pointer; using reference = typename iterator::reference; private: std::tuple<Args...> ts; template <size_t... Ns> iterator begin_impl(std::index_sequence<Ns...>) const { return iterator(std::begin(std::get<Ns>(ts))...); } template <size_t... Ns> iterator end_impl(std::index_sequence<Ns...>) const { return iterator(std::end(std::get<Ns>(ts))...); } public: zippy(Args &&... ts_) : ts(std::forward<Args>(ts_)...) {} iterator begin() const { return begin_impl(std::index_sequence_for<Args...>{}); } iterator end() const { return end_impl(std::index_sequence_for<Args...>{}); } }; } template <typename T, typename U, typename... Args> detail::zippy<detail::zip_shortest, T, U, Args...> zip(T &&t, U &&u, Args &&... args) { return detail::zippy<detail::zip_shortest, T, U, Args...>( std::forward<T>(t), std::forward<U>(u), std::forward<Args>(args)...); } template <typename T, typename U, typename... Args> detail::zippy<detail::zip_first, T, U, Args...> zip_first(T &&t, U &&u, Args &&... args) { return detail::zippy<detail::zip_first, T, U, Args...>( std::forward<T>(t), std::forward<U>(u), std::forward<Args>(args)...); } namespace detail { template <typename Iter> Iter next_or_end(const Iter &I, const Iter &End) { if (I == End) return End; return std::next(I); } template <typename Iter> auto deref_or_none(const Iter &I, const Iter &End) -> llvm::Optional< std::remove_const_t<std::remove_reference_t<decltype(*I)>>> { if (I == End) return None; return *I; } template <typename Iter> struct ZipLongestItemType { using type = llvm::Optional<typename std::remove_const<typename std::remove_reference< decltype(*std::declval<Iter>())>::type>::type>; }; template <typename... Iters> struct ZipLongestTupleType { using type = std::tuple<typename ZipLongestItemType<Iters>::type...>; }; template <typename... Iters> class zip_longest_iterator : public iterator_facade_base< zip_longest_iterator<Iters...>, typename std::common_type< std::forward_iterator_tag, typename std::iterator_traits<Iters>::iterator_category...>::type, typename ZipLongestTupleType<Iters...>::type, typename std::iterator_traits<typename std::tuple_element< 0, std::tuple<Iters...>>::type>::difference_type, typename ZipLongestTupleType<Iters...>::type *, typename ZipLongestTupleType<Iters...>::type> { public: using value_type = typename ZipLongestTupleType<Iters...>::type; private: std::tuple<Iters...> iterators; std::tuple<Iters...> end_iterators; template <size_t... Ns> bool test(const zip_longest_iterator<Iters...> &other, std::index_sequence<Ns...>) const { return llvm::any_of( std::initializer_list<bool>{std::get<Ns>(this->iterators) != std::get<Ns>(other.iterators)...}, identity<bool>{}); } template <size_t... Ns> value_type deref(std::index_sequence<Ns...>) const { return value_type( deref_or_none(std::get<Ns>(iterators), std::get<Ns>(end_iterators))...); } template <size_t... Ns> decltype(iterators) tup_inc(std::index_sequence<Ns...>) const { return std::tuple<Iters...>( next_or_end(std::get<Ns>(iterators), std::get<Ns>(end_iterators))...); } public: zip_longest_iterator(std::pair<Iters &&, Iters &&>... ts) : iterators(std::forward<Iters>(ts.first)...), end_iterators(std::forward<Iters>(ts.second)...) {} value_type operator*() { return deref(std::index_sequence_for<Iters...>{}); } value_type operator*() const { return deref(std::index_sequence_for<Iters...>{}); } zip_longest_iterator<Iters...> &operator++() { iterators = tup_inc(std::index_sequence_for<Iters...>{}); return *this; } bool operator==(const zip_longest_iterator<Iters...> &other) const { return !test(other, std::index_sequence_for<Iters...>{}); } }; template <typename... Args> class zip_longest_range { public: using iterator = zip_longest_iterator<decltype(adl_begin(std::declval<Args>()))...>; using iterator_category = typename iterator::iterator_category; using value_type = typename iterator::value_type; using difference_type = typename iterator::difference_type; using pointer = typename iterator::pointer; using reference = typename iterator::reference; private: std::tuple<Args...> ts; template <size_t... Ns> iterator begin_impl(std::index_sequence<Ns...>) const { return iterator(std::make_pair(adl_begin(std::get<Ns>(ts)), adl_end(std::get<Ns>(ts)))...); } template <size_t... Ns> iterator end_impl(std::index_sequence<Ns...>) const { return iterator(std::make_pair(adl_end(std::get<Ns>(ts)), adl_end(std::get<Ns>(ts)))...); } public: zip_longest_range(Args &&... ts_) : ts(std::forward<Args>(ts_)...) {} iterator begin() const { return begin_impl(std::index_sequence_for<Args...>{}); } iterator end() const { return end_impl(std::index_sequence_for<Args...>{}); } }; } template <typename T, typename U, typename... Args> detail::zip_longest_range<T, U, Args...> zip_longest(T &&t, U &&u, Args &&... args) { return detail::zip_longest_range<T, U, Args...>( std::forward<T>(t), std::forward<U>(u), std::forward<Args>(args)...); } # 886 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" template <typename ValueT, typename... IterTs> class concat_iterator : public iterator_facade_base<concat_iterator<ValueT, IterTs...>, std::forward_iterator_tag, ValueT> { using BaseT = typename concat_iterator::iterator_facade_base; std::tuple<IterTs...> Begins; std::tuple<IterTs...> Ends; template <size_t Index> bool incrementHelper() { auto &Begin = std::get<Index>(Begins); auto &End = std::get<Index>(Ends); if (Begin == End) return false; ++Begin; return true; } template <size_t... Ns> void increment(std::index_sequence<Ns...>) { bool (concat_iterator::*IncrementHelperFns[])() = { &concat_iterator::incrementHelper<Ns>...}; for (auto &IncrementHelperFn : IncrementHelperFns) if ((this->*IncrementHelperFn)()) return; __builtin_unreachable(); } template <size_t Index> ValueT *getHelper() const { auto &Begin = std::get<Index>(Begins); auto &End = std::get<Index>(Ends); if (Begin == End) return nullptr; return &*Begin; } template <size_t... Ns> ValueT &get(std::index_sequence<Ns...>) const { ValueT *(concat_iterator::*GetHelperFns[])() const = { &concat_iterator::getHelper<Ns>...}; for (auto &GetHelperFn : GetHelperFns) if (ValueT *P = (this->*GetHelperFn)()) return *P; __builtin_unreachable(); } public: template <typename... RangeTs> explicit concat_iterator(RangeTs &&... Ranges) : Begins(std::begin(Ranges)...), Ends(std::end(Ranges)...) {} using BaseT::operator++; concat_iterator &operator++() { increment(std::index_sequence_for<IterTs...>()); return *this; } ValueT &operator*() const { return get(std::index_sequence_for<IterTs...>()); } bool operator==(const concat_iterator &RHS) const { return Begins == RHS.Begins && Ends == RHS.Ends; } }; namespace detail { template <typename ValueT, typename... RangeTs> class concat_range { public: using iterator = concat_iterator<ValueT, decltype(std::begin(std::declval<RangeTs &>()))...>; private: std::tuple<RangeTs...> Ranges; template <size_t... Ns> iterator begin_impl(std::index_sequence<Ns...>) { return iterator(std::get<Ns>(Ranges)...); } template <size_t... Ns> iterator end_impl(std::index_sequence<Ns...>) { return iterator(make_range(std::end(std::get<Ns>(Ranges)), std::end(std::get<Ns>(Ranges)))...); } public: concat_range(RangeTs &&... Ranges) : Ranges(std::forward<RangeTs>(Ranges)...) {} iterator begin() { return begin_impl(std::index_sequence_for<RangeTs...>{}); } iterator end() { return end_impl(std::index_sequence_for<RangeTs...>{}); } }; } template <typename ValueT, typename... RangeTs> detail::concat_range<ValueT, RangeTs...> concat(RangeTs &&... Ranges) { static_assert(sizeof...(RangeTs) > 1, "Need more than one range to concatenate!"); return detail::concat_range<ValueT, RangeTs...>( std::forward<RangeTs>(Ranges)...); } template <typename DerivedT, typename BaseT, typename T, typename PointerT = T *, typename ReferenceT = T &> class indexed_accessor_iterator : public llvm::iterator_facade_base<DerivedT, std::random_access_iterator_tag, T, std::ptrdiff_t, PointerT, ReferenceT> { public: ptrdiff_t operator-(const indexed_accessor_iterator &rhs) const { (static_cast<void> (0)); return index - rhs.index; } bool operator==(const indexed_accessor_iterator &rhs) const { return base == rhs.base && index == rhs.index; } bool operator<(const indexed_accessor_iterator &rhs) const { (static_cast<void> (0)); return index < rhs.index; } DerivedT &operator+=(ptrdiff_t offset) { this->index += offset; return static_cast<DerivedT &>(*this); } DerivedT &operator-=(ptrdiff_t offset) { this->index -= offset; return static_cast<DerivedT &>(*this); } ptrdiff_t getIndex() const { return index; } const BaseT &getBase() const { return base; } protected: indexed_accessor_iterator(BaseT base, ptrdiff_t index) : base(base), index(index) {} BaseT base; ptrdiff_t index; }; namespace detail { # 1084 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" template <typename DerivedT, typename BaseT, typename T, typename PointerT = T *, typename ReferenceT = T &> class indexed_accessor_range_base { public: using RangeBaseT = indexed_accessor_range_base<DerivedT, BaseT, T, PointerT, ReferenceT>; class iterator : public indexed_accessor_iterator<iterator, BaseT, T, PointerT, ReferenceT> { public: ReferenceT operator*() const { return DerivedT::dereference_iterator(this->getBase(), this->getIndex()); } private: iterator(BaseT owner, ptrdiff_t curIndex) : indexed_accessor_iterator<iterator, BaseT, T, PointerT, ReferenceT>( owner, curIndex) {} friend indexed_accessor_range_base<DerivedT, BaseT, T, PointerT, ReferenceT>; }; indexed_accessor_range_base(iterator begin, iterator end) : base(offset_base(begin.getBase(), begin.getIndex())), count(end.getIndex() - begin.getIndex()) {} indexed_accessor_range_base(const iterator_range<iterator> &range) : indexed_accessor_range_base(range.begin(), range.end()) {} indexed_accessor_range_base(BaseT base, ptrdiff_t count) : base(base), count(count) {} iterator begin() const { return iterator(base, 0); } iterator end() const { return iterator(base, count); } ReferenceT operator[](unsigned index) const { (static_cast<void> (0)); return DerivedT::dereference_iterator(base, index); } ReferenceT front() const { (static_cast<void> (0)); return (*this)[0]; } ReferenceT back() const { (static_cast<void> (0)); return (*this)[size() - 1]; } template <typename OtherT> bool operator==(const OtherT &other) const { return size() == static_cast<size_t>(std::distance(other.begin(), other.end())) && std::equal(begin(), end(), other.begin()); } template <typename OtherT> bool operator!=(const OtherT &other) const { return !(*this == other); } size_t size() const { return count; } bool empty() const { return size() == 0; } DerivedT slice(size_t n, size_t m) const { (static_cast<void> (0)); return DerivedT(offset_base(base, n), m); } DerivedT drop_front(size_t n = 1) const { (static_cast<void> (0)); return slice(n, size() - n); } DerivedT drop_back(size_t n = 1) const { (static_cast<void> (0)); return DerivedT(base, size() - n); } DerivedT take_front(size_t n = 1) const { return n < size() ? drop_back(size() - n) : static_cast<const DerivedT &>(*this); } DerivedT take_back(size_t n = 1) const { return n < size() ? drop_front(size() - n) : static_cast<const DerivedT &>(*this); } template <typename RangeT, typename = std::enable_if_t<std::is_constructible< RangeT, iterator_range<iterator>>::value>> operator RangeT() const { return RangeT(iterator_range<iterator>(*this)); } const BaseT &getBase() const { return base; } private: static BaseT offset_base(const BaseT &base, size_t n) { return n == 0 ? base : DerivedT::offset_base(base, n); } protected: indexed_accessor_range_base(const indexed_accessor_range_base &) = default; indexed_accessor_range_base(indexed_accessor_range_base &&) = default; indexed_accessor_range_base & operator=(const indexed_accessor_range_base &) = default; BaseT base; ptrdiff_t count; }; } # 1214 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" template <typename DerivedT, typename BaseT, typename T, typename PointerT = T *, typename ReferenceT = T &> class indexed_accessor_range : public detail::indexed_accessor_range_base< DerivedT, std::pair<BaseT, ptrdiff_t>, T, PointerT, ReferenceT> { public: indexed_accessor_range(BaseT base, ptrdiff_t startIndex, ptrdiff_t count) : detail::indexed_accessor_range_base< DerivedT, std::pair<BaseT, ptrdiff_t>, T, PointerT, ReferenceT>( std::make_pair(base, startIndex), count) {} using detail::indexed_accessor_range_base< DerivedT, std::pair<BaseT, ptrdiff_t>, T, PointerT, ReferenceT>::indexed_accessor_range_base; const BaseT &getBase() const { return this->base.first; } ptrdiff_t getStartIndex() const { return this->base.second; } static std::pair<BaseT, ptrdiff_t> offset_base(const std::pair<BaseT, ptrdiff_t> &base, ptrdiff_t index) { return std::make_pair(base.first, base.second + index); } static ReferenceT dereference_iterator(const std::pair<BaseT, ptrdiff_t> &base, ptrdiff_t index) { return DerivedT::dereference(base.first, base.second + index); } }; template <typename ContainerTy> auto make_second_range(ContainerTy &&c) { return llvm::map_range( std::forward<ContainerTy>(c), [](decltype((*std::begin(c))) elt) -> decltype((elt.second)) { return elt.second; }); } struct less_first { template <typename T> bool operator()(const T &lhs, const T &rhs) const { return lhs.first < rhs.first; } }; struct less_second { template <typename T> bool operator()(const T &lhs, const T &rhs) const { return lhs.second < rhs.second; } }; template<typename FuncTy> struct on_first { FuncTy func; template <typename T> decltype(auto) operator()(const T &lhs, const T &rhs) const { return func(lhs.first, rhs.first); } }; template <int N> struct rank : rank<N - 1> {}; template <> struct rank<0> {}; template <typename T, typename... Ts> struct is_one_of { static const bool value = false; }; template <typename T, typename U, typename... Ts> struct is_one_of<T, U, Ts...> { static const bool value = std::is_same<T, U>::value || is_one_of<T, Ts...>::value; }; template <typename T, typename... Ts> struct are_base_of { static const bool value = true; }; template <typename T, typename U, typename... Ts> struct are_base_of<T, U, Ts...> { static const bool value = std::is_base_of<T, U>::value && are_base_of<T, Ts...>::value; }; template <class Iterator, class RNG> void shuffle(Iterator first, Iterator last, RNG &&g) { for (auto size = last - first; size > 1; ++first, (void)--size) std::iter_swap(first, first + g() % size); } template <class T, std::size_t N> constexpr inline size_t array_lengthof(T (&)[N]) { return N; } template<typename T> inline int array_pod_sort_comparator(const void *P1, const void *P2) { if (std::less<T>()(*reinterpret_cast<const T*>(P1), *reinterpret_cast<const T*>(P2))) return -1; if (std::less<T>()(*reinterpret_cast<const T*>(P2), *reinterpret_cast<const T*>(P1))) return 1; return 0; } template<typename T> inline int (*get_array_pod_sort_comparator(const T &)) (const void*, const void*) { return array_pod_sort_comparator<T>; } # 1390 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" template<class IteratorTy> inline void array_pod_sort(IteratorTy Start, IteratorTy End) { auto NElts = End - Start; if (NElts <= 1) return; qsort(&*Start, NElts, sizeof(*Start), get_array_pod_sort_comparator(*Start)); } template <class IteratorTy> inline void array_pod_sort( IteratorTy Start, IteratorTy End, int (*Compare)( const typename std::iterator_traits<IteratorTy>::value_type *, const typename std::iterator_traits<IteratorTy>::value_type *)) { auto NElts = End - Start; if (NElts <= 1) return; qsort(&*Start, NElts, sizeof(*Start), reinterpret_cast<int (*)(const void *, const void *)>(Compare)); } namespace detail { template <typename T> using sort_trivially_copyable = conjunction< std::is_pointer<T>, is_trivially_copyable<typename std::iterator_traits<T>::value_type>>; } template <typename IteratorTy, std::enable_if_t<!detail::sort_trivially_copyable<IteratorTy>::value, int> = 0> inline void sort(IteratorTy Start, IteratorTy End) { std::sort(Start, End); } template <typename IteratorTy, std::enable_if_t<detail::sort_trivially_copyable<IteratorTy>::value, int> = 0> inline void sort(IteratorTy Start, IteratorTy End) { array_pod_sort(Start, End); } template <typename Container> inline void sort(Container &&C) { llvm::sort(adl_begin(C), adl_end(C)); } template <typename IteratorTy, typename Compare> inline void sort(IteratorTy Start, IteratorTy End, Compare Comp) { std::sort(Start, End, Comp); } template <typename Container, typename Compare> inline void sort(Container &&C, Compare Comp) { llvm::sort(adl_begin(C), adl_end(C), Comp); } template <typename R> auto size(R &&Range, std::enable_if_t<std::is_same<typename std::iterator_traits<decltype( Range.begin())>::iterator_category, std::random_access_iterator_tag>::value, void> * = nullptr) { return std::distance(Range.begin(), Range.end()); } template <typename R, typename UnaryPredicate> UnaryPredicate for_each(R &&Range, UnaryPredicate P) { return std::for_each(adl_begin(Range), adl_end(Range), P); } template <typename R, typename UnaryPredicate> bool all_of(R &&Range, UnaryPredicate P) { return std::all_of(adl_begin(Range), adl_end(Range), P); } template <typename R, typename UnaryPredicate> bool any_of(R &&Range, UnaryPredicate P) { return std::any_of(adl_begin(Range), adl_end(Range), P); } template <typename R, typename UnaryPredicate> bool none_of(R &&Range, UnaryPredicate P) { return std::none_of(adl_begin(Range), adl_end(Range), P); } template <typename R, typename T> auto find(R &&Range, const T &Val) { return std::find(adl_begin(Range), adl_end(Range), Val); } template <typename R, typename UnaryPredicate> auto find_if(R &&Range, UnaryPredicate P) { return std::find_if(adl_begin(Range), adl_end(Range), P); } template <typename R, typename UnaryPredicate> auto find_if_not(R &&Range, UnaryPredicate P) { return std::find_if_not(adl_begin(Range), adl_end(Range), P); } template <typename R, typename UnaryPredicate> auto remove_if(R &&Range, UnaryPredicate P) { return std::remove_if(adl_begin(Range), adl_end(Range), P); } template <typename R, typename OutputIt, typename UnaryPredicate> OutputIt copy_if(R &&Range, OutputIt Out, UnaryPredicate P) { return std::copy_if(adl_begin(Range), adl_end(Range), Out, P); } template <typename R, typename OutputIt> OutputIt copy(R &&Range, OutputIt Out) { return std::copy(adl_begin(Range), adl_end(Range), Out); } template <typename R, typename E> bool is_contained(R &&Range, const E &Element) { return std::find(adl_begin(Range), adl_end(Range), Element) != adl_end(Range); } template <typename R, typename Compare> bool is_sorted(R &&Range, Compare C) { return std::is_sorted(adl_begin(Range), adl_end(Range), C); } template <typename R> bool is_sorted(R &&Range) { return std::is_sorted(adl_begin(Range), adl_end(Range)); } template <typename R, typename E> auto count(R &&Range, const E &Element) { return std::count(adl_begin(Range), adl_end(Range), Element); } template <typename R, typename UnaryPredicate> auto count_if(R &&Range, UnaryPredicate P) { return std::count_if(adl_begin(Range), adl_end(Range), P); } template <typename R, typename OutputIt, typename UnaryPredicate> OutputIt transform(R &&Range, OutputIt d_first, UnaryPredicate P) { return std::transform(adl_begin(Range), adl_end(Range), d_first, P); } template <typename R, typename UnaryPredicate> auto partition(R &&Range, UnaryPredicate P) { return std::partition(adl_begin(Range), adl_end(Range), P); } template <typename R, typename T> auto lower_bound(R &&Range, T &&Value) { return std::lower_bound(adl_begin(Range), adl_end(Range), std::forward<T>(Value)); } template <typename R, typename T, typename Compare> auto lower_bound(R &&Range, T &&Value, Compare C) { return std::lower_bound(adl_begin(Range), adl_end(Range), std::forward<T>(Value), C); } template <typename R, typename T> auto upper_bound(R &&Range, T &&Value) { return std::upper_bound(adl_begin(Range), adl_end(Range), std::forward<T>(Value)); } template <typename R, typename T, typename Compare> auto upper_bound(R &&Range, T &&Value, Compare C) { return std::upper_bound(adl_begin(Range), adl_end(Range), std::forward<T>(Value), C); } template <typename R> void stable_sort(R &&Range) { std::stable_sort(adl_begin(Range), adl_end(Range)); } template <typename R, typename Compare> void stable_sort(R &&Range, Compare C) { std::stable_sort(adl_begin(Range), adl_end(Range), C); } template <typename R, typename Predicate, typename Val = decltype(*adl_begin(std::declval<R>()))> auto partition_point(R &&Range, Predicate P) { return std::partition_point(adl_begin(Range), adl_end(Range), P); } template <typename R> bool is_splat(R &&Range) { size_t range_size = size(Range); return range_size != 0 && (range_size == 1 || std::equal(adl_begin(Range) + 1, adl_end(Range), adl_begin(Range))); } # 1652 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" template <typename Container, typename UnaryPredicate> void erase_if(Container &C, UnaryPredicate P) { C.erase(remove_if(C, P), C.end()); } template<typename Container, typename RandomAccessIterator> void replace(Container &Cont, typename Container::iterator ContIt, typename Container::iterator ContEnd, RandomAccessIterator ValIt, RandomAccessIterator ValEnd) { while (true) { if (ValIt == ValEnd) { Cont.erase(ContIt, ContEnd); return; } else if (ContIt == ContEnd) { Cont.insert(ContIt, ValIt, ValEnd); return; } *ContIt++ = *ValIt++; } } template<typename Container, typename Range = std::initializer_list< typename Container::value_type>> void replace(Container &Cont, typename Container::iterator ContIt, typename Container::iterator ContEnd, Range R) { replace(Cont, ContIt, ContEnd, R.begin(), R.end()); } # 1694 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" template <typename ForwardIterator, typename UnaryFunctor, typename NullaryFunctor, typename = typename std::enable_if< !std::is_constructible<StringRef, UnaryFunctor>::value && !std::is_constructible<StringRef, NullaryFunctor>::value>::type> inline void interleave(ForwardIterator begin, ForwardIterator end, UnaryFunctor each_fn, NullaryFunctor between_fn) { if (begin == end) return; each_fn(*begin); ++begin; for (; begin != end; ++begin) { between_fn(); each_fn(*begin); } } template <typename Container, typename UnaryFunctor, typename NullaryFunctor, typename = typename std::enable_if< !std::is_constructible<StringRef, UnaryFunctor>::value && !std::is_constructible<StringRef, NullaryFunctor>::value>::type> inline void interleave(const Container &c, UnaryFunctor each_fn, NullaryFunctor between_fn) { interleave(c.begin(), c.end(), each_fn, between_fn); } template <typename Container, typename UnaryFunctor, typename StreamT, typename T = detail::ValueOfRange<Container>> inline void interleave(const Container &c, StreamT &os, UnaryFunctor each_fn, const StringRef &separator) { interleave(c.begin(), c.end(), each_fn, [&] { os << separator; }); } template <typename Container, typename StreamT, typename T = detail::ValueOfRange<Container>> inline void interleave(const Container &c, StreamT &os, const StringRef &separator) { interleave( c, os, [&](const T &a) { os << a; }, separator); } template <typename Container, typename UnaryFunctor, typename StreamT, typename T = detail::ValueOfRange<Container>> inline void interleaveComma(const Container &c, StreamT &os, UnaryFunctor each_fn) { interleave(c, os, each_fn, ", "); } template <typename Container, typename StreamT, typename T = detail::ValueOfRange<Container>> inline void interleaveComma(const Container &c, StreamT &os) { interleaveComma(c, os, [&](const T &a) { os << a; }); } struct FreeDeleter { void operator()(void* v) { ::free(v); } }; template<typename First, typename Second> struct pair_hash { size_t operator()(const std::pair<First, Second> &P) const { return std::hash<First>()(P.first) * 31 + std::hash<Second>()(P.second); } }; template <typename T> struct deref { T func; template <typename A, typename B> auto operator()(A &lhs, B &rhs) const { (static_cast<void> (0)); (static_cast<void> (0)); return func(*lhs, *rhs); } }; namespace detail { template <typename R> class enumerator_iter; template <typename R> struct result_pair { using value_reference = typename std::iterator_traits<IterOfRange<R>>::reference; friend class enumerator_iter<R>; result_pair() = default; result_pair(std::size_t Index, IterOfRange<R> Iter) : Index(Index), Iter(Iter) {} result_pair<R>(const result_pair<R> &Other) : Index(Other.Index), Iter(Other.Iter) {} result_pair<R> &operator=(const result_pair<R> &Other) { Index = Other.Index; Iter = Other.Iter; return *this; } std::size_t index() const { return Index; } const value_reference value() const { return *Iter; } value_reference value() { return *Iter; } private: std::size_t Index = std::numeric_limits<std::size_t>::max(); IterOfRange<R> Iter; }; template <typename R> class enumerator_iter : public iterator_facade_base< enumerator_iter<R>, std::forward_iterator_tag, result_pair<R>, typename std::iterator_traits<IterOfRange<R>>::difference_type, typename std::iterator_traits<IterOfRange<R>>::pointer, typename std::iterator_traits<IterOfRange<R>>::reference> { using result_type = result_pair<R>; public: explicit enumerator_iter(IterOfRange<R> EndIter) : Result(std::numeric_limits<size_t>::max(), EndIter) {} enumerator_iter(std::size_t Index, IterOfRange<R> Iter) : Result(Index, Iter) {} result_type &operator*() { return Result; } const result_type &operator*() const { return Result; } enumerator_iter<R> &operator++() { (static_cast<void> (0)); ++Result.Iter; ++Result.Index; return *this; } bool operator==(const enumerator_iter<R> &RHS) const { return Result.Iter == RHS.Result.Iter; } enumerator_iter<R>(const enumerator_iter<R> &Other) : Result(Other.Result) {} enumerator_iter<R> &operator=(const enumerator_iter<R> &Other) { Result = Other.Result; return *this; } private: result_type Result; }; template <typename R> class enumerator { public: explicit enumerator(R &&Range) : TheRange(std::forward<R>(Range)) {} enumerator_iter<R> begin() { return enumerator_iter<R>(0, std::begin(TheRange)); } enumerator_iter<R> end() { return enumerator_iter<R>(std::end(TheRange)); } private: R TheRange; }; } # 1886 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" template <typename R> detail::enumerator<R> enumerate(R &&TheRange) { return detail::enumerator<R>(std::forward<R>(TheRange)); } namespace detail { template <typename F, typename Tuple, std::size_t... I> decltype(auto) apply_tuple_impl(F &&f, Tuple &&t, std::index_sequence<I...>) { return std::forward<F>(f)(std::get<I>(std::forward<Tuple>(t))...); } } template <typename F, typename Tuple> decltype(auto) apply_tuple(F &&f, Tuple &&t) { using Indices = std::make_index_sequence< std::tuple_size<typename std::decay<Tuple>::type>::value>; return detail::apply_tuple_impl(std::forward<F>(f), std::forward<Tuple>(t), Indices{}); } template<typename IterTy, typename Pred = bool (*)(const decltype(*std::declval<IterTy>()) &)> bool hasNItems( IterTy &&Begin, IterTy &&End, unsigned N, Pred &&ShouldBeCounted = [](const decltype(*std::declval<IterTy>()) &) { return true; }, std::enable_if_t< !std::is_same<typename std::iterator_traits<std::remove_reference_t< decltype(Begin)>>::iterator_category, std::random_access_iterator_tag>::value, void> * = nullptr) { for (; N; ++Begin) { if (Begin == End) return false; N -= ShouldBeCounted(*Begin); } for (; Begin != End; ++Begin) if (ShouldBeCounted(*Begin)) return false; return true; } template<typename IterTy, typename Pred = bool (*)(const decltype(*std::declval<IterTy>()) &)> bool hasNItemsOrMore( IterTy &&Begin, IterTy &&End, unsigned N, Pred &&ShouldBeCounted = [](const decltype(*std::declval<IterTy>()) &) { return true; }, std::enable_if_t< !std::is_same<typename std::iterator_traits<std::remove_reference_t< decltype(Begin)>>::iterator_category, std::random_access_iterator_tag>::value, void> * = nullptr) { for (; N; ++Begin) { if (Begin == End) return false; N -= ShouldBeCounted(*Begin); } return true; } template <typename IterTy, typename Pred = bool (*)(const decltype(*std::declval<IterTy>()) &)> bool hasNItemsOrLess( IterTy &&Begin, IterTy &&End, unsigned N, Pred &&ShouldBeCounted = [](const decltype(*std::declval<IterTy>()) &) { return true; }) { (static_cast<void> (0)); return !hasNItemsOrMore(Begin, End, N + 1, ShouldBeCounted); } template <typename ContainerTy> bool hasNItems(ContainerTy &&C, unsigned N) { return hasNItems(std::begin(C), std::end(C), N); } template <typename ContainerTy> bool hasNItemsOrMore(ContainerTy &&C, unsigned N) { return hasNItemsOrMore(std::begin(C), std::end(C), N); } template <typename ContainerTy> bool hasNItemsOrLess(ContainerTy &&C, unsigned N) { return hasNItemsOrLess(std::begin(C), std::end(C), N); } # 1995 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/STLExtras.h" template <class Ptr> auto to_address(const Ptr &P) { return P.operator->(); } template <class T> constexpr T *to_address(T *P) { return P; } } # 16 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ArrayRef.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ArrayRef.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/vector" 1 3 # 59 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/vector" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 1 3 # 74 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp, typename _Alloc> struct _Vector_base { typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Tp>::other _Tp_alloc_type; typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer pointer; struct _Vector_impl : public _Tp_alloc_type { pointer _M_start; pointer _M_finish; pointer _M_end_of_storage; _Vector_impl() : _Tp_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage() { } _Vector_impl(_Tp_alloc_type const& __a) noexcept : _Tp_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage() { } _Vector_impl(_Tp_alloc_type&& __a) noexcept : _Tp_alloc_type(std::move(__a)), _M_start(), _M_finish(), _M_end_of_storage() { } void _M_swap_data(_Vector_impl& __x) noexcept { std::swap(_M_start, __x._M_start); std::swap(_M_finish, __x._M_finish); std::swap(_M_end_of_storage, __x._M_end_of_storage); } # 231 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 }; public: typedef _Alloc allocator_type; _Tp_alloc_type& _M_get_Tp_allocator() noexcept { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } const _Tp_alloc_type& _M_get_Tp_allocator() const noexcept { return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); } allocator_type get_allocator() const noexcept { return allocator_type(_M_get_Tp_allocator()); } _Vector_base() : _M_impl() { } _Vector_base(const allocator_type& __a) noexcept : _M_impl(__a) { } _Vector_base(size_t __n) : _M_impl() { _M_create_storage(__n); } _Vector_base(size_t __n, const allocator_type& __a) : _M_impl(__a) { _M_create_storage(__n); } _Vector_base(_Tp_alloc_type&& __a) noexcept : _M_impl(std::move(__a)) { } _Vector_base(_Vector_base&& __x) noexcept : _M_impl(std::move(__x._M_get_Tp_allocator())) { this->_M_impl._M_swap_data(__x._M_impl); } _Vector_base(_Vector_base&& __x, const allocator_type& __a) : _M_impl(__a) { if (__x.get_allocator() == __a) this->_M_impl._M_swap_data(__x._M_impl); else { size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start; _M_create_storage(__n); } } ~_Vector_base() noexcept { _M_deallocate(_M_impl._M_start, _M_impl._M_end_of_storage - _M_impl._M_start); } public: _Vector_impl _M_impl; pointer _M_allocate(size_t __n) { typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; return __n != 0 ? _Tr::allocate(_M_impl, __n) : pointer(); } void _M_deallocate(pointer __p, size_t __n) { typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; if (__p) _Tr::deallocate(_M_impl, __p, __n); } private: void _M_create_storage(size_t __n) { this->_M_impl._M_start = this->_M_allocate(__n); this->_M_impl._M_finish = this->_M_impl._M_start; this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; } }; # 338 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 template<typename _Tp, typename _Alloc = std::allocator<_Tp> > class vector : protected _Vector_base<_Tp, _Alloc> { # 351 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value, "std::vector must have a non-const, non-volatile value_type"); static_assert(is_same<typename _Alloc::value_type, _Tp>::value, "std::vector must have the same value_type as its allocator"); typedef _Vector_base<_Tp, _Alloc> _Base; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits; public: typedef _Tp value_type; typedef typename _Base::pointer pointer; typedef typename _Alloc_traits::const_pointer const_pointer; typedef typename _Alloc_traits::reference reference; typedef typename _Alloc_traits::const_reference const_reference; typedef __gnu_cxx::__normal_iterator<pointer, vector> iterator; typedef __gnu_cxx::__normal_iterator<const_pointer, vector> const_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Alloc allocator_type; protected: using _Base::_M_allocate; using _Base::_M_deallocate; using _Base::_M_impl; using _Base::_M_get_Tp_allocator; public: vector() noexcept(is_nothrow_default_constructible<_Alloc>::value) : _Base() { } explicit vector(const allocator_type& __a) noexcept : _Base(__a) { } # 414 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 explicit vector(size_type __n, const allocator_type& __a = allocator_type()) : _Base(__n, __a) { _M_default_initialize(__n); } # 427 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 vector(size_type __n, const value_type& __value, const allocator_type& __a = allocator_type()) : _Base(__n, __a) { _M_fill_initialize(__n, __value); } # 458 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 vector(const vector& __x) : _Base(__x.size(), _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator())) { this->_M_impl._M_finish = std::__uninitialized_copy_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); } # 476 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 vector(vector&& __x) noexcept : _Base(std::move(__x)) { } vector(const vector& __x, const allocator_type& __a) : _Base(__x.size(), __a) { this->_M_impl._M_finish = std::__uninitialized_copy_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); } vector(vector&& __rv, const allocator_type& __m) noexcept(_Alloc_traits::_S_always_equal()) : _Base(std::move(__rv), __m) { if (__rv.get_allocator() != __m) { this->_M_impl._M_finish = std::__uninitialized_move_a(__rv.begin(), __rv.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); __rv.clear(); } } # 515 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 vector(initializer_list<value_type> __l, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_range_initialize(__l.begin(), __l.end(), random_access_iterator_tag()); } # 541 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_initialize_dispatch(__first, __last, __false_type()); } # 565 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 ~vector() noexcept { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); ; } # 581 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 vector& operator=(const vector& __x); # 595 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 vector& operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) { constexpr bool __move_storage = _Alloc_traits::_S_propagate_on_move_assign() || _Alloc_traits::_S_always_equal(); _M_move_assign(std::move(__x), __bool_constant<__move_storage>()); return *this; } # 616 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 vector& operator=(initializer_list<value_type> __l) { this->_M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); return *this; } # 635 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 void assign(size_type __n, const value_type& __val) { _M_fill_assign(__n, __val); } # 652 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> void assign(_InputIterator __first, _InputIterator __last) { _M_assign_dispatch(__first, __last, __false_type()); } # 680 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 void assign(initializer_list<value_type> __l) { this->_M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } using _Base::get_allocator; iterator begin() noexcept { return iterator(this->_M_impl._M_start); } const_iterator begin() const noexcept { return const_iterator(this->_M_impl._M_start); } iterator end() noexcept { return iterator(this->_M_impl._M_finish); } const_iterator end() const noexcept { return const_iterator(this->_M_impl._M_finish); } reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } reverse_iterator rend() noexcept { return reverse_iterator(begin()); } const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } const_iterator cbegin() const noexcept { return const_iterator(this->_M_impl._M_start); } const_iterator cend() const noexcept { return const_iterator(this->_M_impl._M_finish); } const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } size_type size() const noexcept { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } size_type max_size() const noexcept { return _Alloc_traits::max_size(_M_get_Tp_allocator()); } # 823 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 void resize(size_type __new_size) { if (__new_size > size()) _M_default_append(__new_size - size()); else if (__new_size < size()) _M_erase_at_end(this->_M_impl._M_start + __new_size); } # 843 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 void resize(size_type __new_size, const value_type& __x) { if (__new_size > size()) _M_fill_insert(end(), __new_size - size(), __x); else if (__new_size < size()) _M_erase_at_end(this->_M_impl._M_start + __new_size); } # 875 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 void shrink_to_fit() { _M_shrink_to_fit(); } size_type capacity() const noexcept { return size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_start); } bool empty() const noexcept { return begin() == end(); } # 914 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 void reserve(size_type __n); # 929 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 reference operator[](size_type __n) noexcept { ; return *(this->_M_impl._M_start + __n); } # 947 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 const_reference operator[](size_type __n) const noexcept { ; return *(this->_M_impl._M_start + __n); } protected: void _M_range_check(size_type __n) const { if (__n >= this->size()) __throw_out_of_range_fmt(("vector::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)"), __n, this->size()); } public: # 978 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 reference at(size_type __n) { _M_range_check(__n); return (*this)[__n]; } # 996 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 const_reference at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; } reference front() noexcept { ; return *begin(); } const_reference front() const noexcept { ; return *begin(); } reference back() noexcept { ; return *(end() - 1); } const_reference back() const noexcept { ; return *(end() - 1); } # 1054 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 _Tp* data() noexcept { return _M_data_ptr(this->_M_impl._M_start); } const _Tp* data() const noexcept { return _M_data_ptr(this->_M_impl._M_start); } # 1073 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 void push_back(const value_type& __x) { if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) { ; _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, __x); ++this->_M_impl._M_finish; ; } else _M_realloc_insert(end(), __x); } void push_back(value_type&& __x) { emplace_back(std::move(__x)); } template<typename... _Args> void emplace_back(_Args&&... __args); # 1111 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 void pop_back() noexcept { ; --this->_M_impl._M_finish; _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); ; } # 1133 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 template<typename... _Args> iterator emplace(const_iterator __position, _Args&&... __args) { return _M_emplace_aux(__position, std::forward<_Args>(__args)...); } # 1149 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 iterator insert(const_iterator __position, const value_type& __x); # 1179 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 iterator insert(const_iterator __position, value_type&& __x) { return _M_insert_rval(__position, std::move(__x)); } # 1196 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 iterator insert(const_iterator __position, initializer_list<value_type> __l) { auto __offset = __position - cbegin(); _M_range_insert(begin() + __offset, __l.begin(), __l.end(), std::random_access_iterator_tag()); return begin() + __offset; } # 1221 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 iterator insert(const_iterator __position, size_type __n, const value_type& __x) { difference_type __offset = __position - cbegin(); _M_fill_insert(begin() + __offset, __n, __x); return begin() + __offset; } # 1263 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> iterator insert(const_iterator __position, _InputIterator __first, _InputIterator __last) { difference_type __offset = __position - cbegin(); _M_insert_dispatch(begin() + __offset, __first, __last, __false_type()); return begin() + __offset; } # 1315 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 iterator erase(const_iterator __position) { return _M_erase(begin() + (__position - cbegin())); } # 1342 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 iterator erase(const_iterator __first, const_iterator __last) { const auto __beg = begin(); const auto __cbeg = cbegin(); return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg)); } # 1366 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 void swap(vector& __x) noexcept { ; this->_M_impl._M_swap_data(__x._M_impl); _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } void clear() noexcept { _M_erase_at_end(this->_M_impl._M_start); } protected: template<typename _ForwardIterator> pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, _ForwardIterator __last) { pointer __result = this->_M_allocate(__n); if (true) { std::__uninitialized_copy_a(__first, __last, __result, _M_get_Tp_allocator()); return __result; } if (false) { _M_deallocate(__result, __n); ; } } # 1419 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 template<typename _Integer> void _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) { this->_M_impl._M_start = _M_allocate(static_cast<size_type>(__n)); this->_M_impl._M_end_of_storage = this->_M_impl._M_start + static_cast<size_type>(__n); _M_fill_initialize(static_cast<size_type>(__n), __value); } template<typename _InputIterator> void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_range_initialize(__first, __last, _IterCategory()); } template<typename _InputIterator> void _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { if (true) { for (; __first != __last; ++__first) emplace_back(*__first); } if (false) { clear(); ; } } template<typename _ForwardIterator> void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __n = std::distance(__first, __last); this->_M_impl._M_start = this->_M_allocate(__n); this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; this->_M_impl._M_finish = std::__uninitialized_copy_a(__first, __last, this->_M_impl._M_start, _M_get_Tp_allocator()); } void _M_fill_initialize(size_type __n, const value_type& __value) { this->_M_impl._M_finish = std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, _M_get_Tp_allocator()); } void _M_default_initialize(size_type __n) { this->_M_impl._M_finish = std::__uninitialized_default_n_a(this->_M_impl._M_start, __n, _M_get_Tp_allocator()); } # 1502 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 template<typename _Integer> void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign(__n, __val); } template<typename _InputIterator> void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } template<typename _InputIterator> void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); template<typename _ForwardIterator> void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); void _M_fill_assign(size_type __n, const value_type& __val); template<typename _Integer> void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, __true_type) { _M_fill_insert(__pos, __n, __val); } template<typename _InputIterator> void _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) { _M_range_insert(__pos, __first, __last, std::__iterator_category(__first)); } template<typename _InputIterator> void _M_range_insert(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag); template<typename _ForwardIterator> void _M_range_insert(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); void _M_default_append(size_type __n); bool _M_shrink_to_fit(); # 1589 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 struct _Temporary_value { template<typename... _Args> explicit _Temporary_value(vector* __vec, _Args&&... __args) : _M_this(__vec) { _Alloc_traits::construct(_M_this->_M_impl, _M_ptr(), std::forward<_Args>(__args)...); } ~_Temporary_value() { _Alloc_traits::destroy(_M_this->_M_impl, _M_ptr()); } value_type& _M_val() { return *reinterpret_cast<_Tp*>(&__buf); } private: pointer _M_ptr() { return pointer_traits<pointer>::pointer_to(_M_val()); } vector* _M_this; typename aligned_storage<sizeof(_Tp), alignof(_Tp)>::type __buf; }; template<typename _Arg> void _M_insert_aux(iterator __position, _Arg&& __arg); template<typename... _Args> void _M_realloc_insert(iterator __position, _Args&&... __args); iterator _M_insert_rval(const_iterator __position, value_type&& __v); template<typename... _Args> iterator _M_emplace_aux(const_iterator __position, _Args&&... __args); iterator _M_emplace_aux(const_iterator __position, value_type&& __v) { return _M_insert_rval(__position, std::move(__v)); } size_type _M_check_len(size_type __n, const char* __s) const { if (max_size() - size() < __n) __throw_length_error((__s)); const size_type __len = size() + std::max(size(), __n); return (__len < size() || __len > max_size()) ? max_size() : __len; } void _M_erase_at_end(pointer __pos) noexcept { if (size_type __n = this->_M_impl._M_finish - __pos) { std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __pos; ; } } iterator _M_erase(iterator __position); iterator _M_erase(iterator __first, iterator __last); private: void _M_move_assign(vector&& __x, std::true_type) noexcept { vector __tmp(get_allocator()); this->_M_impl._M_swap_data(__tmp._M_impl); this->_M_impl._M_swap_data(__x._M_impl); std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } void _M_move_assign(vector&& __x, std::false_type) { if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) _M_move_assign(std::move(__x), std::true_type()); else { this->assign(std::__make_move_if_noexcept_iterator(__x.begin()), std::__make_move_if_noexcept_iterator(__x.end())); __x.clear(); } } template<typename _Up> _Up* _M_data_ptr(_Up* __ptr) const noexcept { return __ptr; } template<typename _Ptr> typename std::pointer_traits<_Ptr>::element_type* _M_data_ptr(_Ptr __ptr) const { return empty() ? nullptr : std::__to_address(__ptr); } # 1729 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 }; # 1751 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 template<typename _Tp, typename _Alloc> inline bool operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return (__x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin())); } # 1768 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h" 3 template<typename _Tp, typename _Alloc> inline bool operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template<typename _Tp, typename _Alloc> inline bool operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__x == __y); } template<typename _Tp, typename _Alloc> inline bool operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return __y < __x; } template<typename _Tp, typename _Alloc> inline bool operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__y < __x); } template<typename _Tp, typename _Alloc> inline bool operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__x < __y); } template<typename _Tp, typename _Alloc> inline void swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } } # 65 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/vector" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_bvector.h" 1 3 # 64 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_bvector.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { typedef unsigned long _Bit_type; enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; struct _Bit_reference { _Bit_type * _M_p; _Bit_type _M_mask; _Bit_reference(_Bit_type * __x, _Bit_type __y) : _M_p(__x), _M_mask(__y) { } _Bit_reference() noexcept : _M_p(0), _M_mask(0) { } operator bool() const noexcept { return !!(*_M_p & _M_mask); } _Bit_reference& operator=(bool __x) noexcept { if (__x) *_M_p |= _M_mask; else *_M_p &= ~_M_mask; return *this; } _Bit_reference& operator=(const _Bit_reference& __x) noexcept { return *this = bool(__x); } bool operator==(const _Bit_reference& __x) const { return bool(*this) == bool(__x); } bool operator<(const _Bit_reference& __x) const { return !bool(*this) && bool(__x); } void flip() noexcept { *_M_p ^= _M_mask; } }; inline void swap(_Bit_reference __x, _Bit_reference __y) noexcept { bool __tmp = __x; __x = __y; __y = __tmp; } inline void swap(_Bit_reference __x, bool& __y) noexcept { bool __tmp = __x; __x = __y; __y = __tmp; } inline void swap(bool& __x, _Bit_reference __y) noexcept { bool __tmp = __x; __x = __y; __y = __tmp; } struct _Bit_iterator_base : public std::iterator<std::random_access_iterator_tag, bool> { _Bit_type * _M_p; unsigned int _M_offset; _Bit_iterator_base(_Bit_type * __x, unsigned int __y) : _M_p(__x), _M_offset(__y) { } void _M_bump_up() { if (_M_offset++ == int(_S_word_bit) - 1) { _M_offset = 0; ++_M_p; } } void _M_bump_down() { if (_M_offset-- == 0) { _M_offset = int(_S_word_bit) - 1; --_M_p; } } void _M_incr(ptrdiff_t __i) { difference_type __n = __i + _M_offset; _M_p += __n / int(_S_word_bit); __n = __n % int(_S_word_bit); if (__n < 0) { __n += int(_S_word_bit); --_M_p; } _M_offset = static_cast<unsigned int>(__n); } bool operator==(const _Bit_iterator_base& __i) const { return _M_p == __i._M_p && _M_offset == __i._M_offset; } bool operator<(const _Bit_iterator_base& __i) const { return _M_p < __i._M_p || (_M_p == __i._M_p && _M_offset < __i._M_offset); } bool operator!=(const _Bit_iterator_base& __i) const { return !(*this == __i); } bool operator>(const _Bit_iterator_base& __i) const { return __i < *this; } bool operator<=(const _Bit_iterator_base& __i) const { return !(__i < *this); } bool operator>=(const _Bit_iterator_base& __i) const { return !(*this < __i); } }; inline ptrdiff_t operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { return (int(_S_word_bit) * (__x._M_p - __y._M_p) + __x._M_offset - __y._M_offset); } struct _Bit_iterator : public _Bit_iterator_base { typedef _Bit_reference reference; typedef _Bit_reference* pointer; typedef _Bit_iterator iterator; _Bit_iterator() : _Bit_iterator_base(0, 0) { } _Bit_iterator(_Bit_type * __x, unsigned int __y) : _Bit_iterator_base(__x, __y) { } iterator _M_const_cast() const { return *this; } reference operator*() const { return reference(_M_p, 1UL << _M_offset); } iterator& operator++() { _M_bump_up(); return *this; } iterator operator++(int) { iterator __tmp = *this; _M_bump_up(); return __tmp; } iterator& operator--() { _M_bump_down(); return *this; } iterator operator--(int) { iterator __tmp = *this; _M_bump_down(); return __tmp; } iterator& operator+=(difference_type __i) { _M_incr(__i); return *this; } iterator& operator-=(difference_type __i) { *this += -__i; return *this; } iterator operator+(difference_type __i) const { iterator __tmp = *this; return __tmp += __i; } iterator operator-(difference_type __i) const { iterator __tmp = *this; return __tmp -= __i; } reference operator[](difference_type __i) const { return *(*this + __i); } }; inline _Bit_iterator operator+(ptrdiff_t __n, const _Bit_iterator& __x) { return __x + __n; } struct _Bit_const_iterator : public _Bit_iterator_base { typedef bool reference; typedef bool const_reference; typedef const bool* pointer; typedef _Bit_const_iterator const_iterator; _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } _Bit_const_iterator(_Bit_type * __x, unsigned int __y) : _Bit_iterator_base(__x, __y) { } _Bit_const_iterator(const _Bit_iterator& __x) : _Bit_iterator_base(__x._M_p, __x._M_offset) { } _Bit_iterator _M_const_cast() const { return _Bit_iterator(_M_p, _M_offset); } const_reference operator*() const { return _Bit_reference(_M_p, 1UL << _M_offset); } const_iterator& operator++() { _M_bump_up(); return *this; } const_iterator operator++(int) { const_iterator __tmp = *this; _M_bump_up(); return __tmp; } const_iterator& operator--() { _M_bump_down(); return *this; } const_iterator operator--(int) { const_iterator __tmp = *this; _M_bump_down(); return __tmp; } const_iterator& operator+=(difference_type __i) { _M_incr(__i); return *this; } const_iterator& operator-=(difference_type __i) { *this += -__i; return *this; } const_iterator operator+(difference_type __i) const { const_iterator __tmp = *this; return __tmp += __i; } const_iterator operator-(difference_type __i) const { const_iterator __tmp = *this; return __tmp -= __i; } const_reference operator[](difference_type __i) const { return *(*this + __i); } }; inline _Bit_const_iterator operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) { return __x + __n; } inline void __fill_bvector(_Bit_type * __v, unsigned int __first, unsigned int __last, bool __x) { const _Bit_type __fmask = ~0ul << __first; const _Bit_type __lmask = ~0ul >> (_S_word_bit - __last); const _Bit_type __mask = __fmask & __lmask; if (__x) *__v |= __mask; else *__v &= ~__mask; } inline void fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) { if (__first._M_p != __last._M_p) { _Bit_type* __first_p = __first._M_p; if (__first._M_offset != 0) __fill_bvector(__first_p++, __first._M_offset, _S_word_bit, __x); __builtin_memset(__first_p, __x ? ~0 : 0, (__last._M_p - __first_p) * sizeof(_Bit_type)); if (__last._M_offset != 0) __fill_bvector(__last._M_p, 0, __last._M_offset, __x); } else if (__first._M_offset != __last._M_offset) __fill_bvector(__first._M_p, __first._M_offset, __last._M_offset, __x); } template<typename _Alloc> struct _Bvector_base { typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Bit_type>::other _Bit_alloc_type; typedef typename __gnu_cxx::__alloc_traits<_Bit_alloc_type> _Bit_alloc_traits; typedef typename _Bit_alloc_traits::pointer _Bit_pointer; struct _Bvector_impl_data { _Bit_iterator _M_start; _Bit_iterator _M_finish; _Bit_pointer _M_end_of_storage; _Bvector_impl_data() noexcept : _M_start(), _M_finish(), _M_end_of_storage() { } _Bvector_impl_data(_Bvector_impl_data&& __x) noexcept : _M_start(__x._M_start), _M_finish(__x._M_finish) , _M_end_of_storage(__x._M_end_of_storage) { __x._M_reset(); } void _M_move_data(_Bvector_impl_data&& __x) noexcept { this->_M_start = __x._M_start; this->_M_finish = __x._M_finish; this->_M_end_of_storage = __x._M_end_of_storage; __x._M_reset(); } void _M_reset() noexcept { _M_start = _M_finish = _Bit_iterator(); _M_end_of_storage = _Bit_pointer(); } }; struct _Bvector_impl : public _Bit_alloc_type, public _Bvector_impl_data { public: _Bvector_impl() noexcept(is_nothrow_default_constructible<_Bit_alloc_type>::value) : _Bit_alloc_type() { } _Bvector_impl(const _Bit_alloc_type& __a) noexcept : _Bit_alloc_type(__a) { } _Bvector_impl(_Bvector_impl&&) = default; _Bit_type* _M_end_addr() const noexcept { if (this->_M_end_of_storage) return std::__addressof(this->_M_end_of_storage[-1]) + 1; return 0; } }; public: typedef _Alloc allocator_type; _Bit_alloc_type& _M_get_Bit_allocator() noexcept { return this->_M_impl; } const _Bit_alloc_type& _M_get_Bit_allocator() const noexcept { return this->_M_impl; } allocator_type get_allocator() const noexcept { return allocator_type(_M_get_Bit_allocator()); } _Bvector_base() = default; _Bvector_base(const allocator_type& __a) : _M_impl(__a) { } _Bvector_base(_Bvector_base&&) = default; ~_Bvector_base() { this->_M_deallocate(); } protected: _Bvector_impl _M_impl; _Bit_pointer _M_allocate(size_t __n) { return _Bit_alloc_traits::allocate(_M_impl, _S_nword(__n)); } void _M_deallocate() { if (_M_impl._M_start._M_p) { const size_t __n = _M_impl._M_end_addr() - _M_impl._M_start._M_p; _Bit_alloc_traits::deallocate(_M_impl, _M_impl._M_end_of_storage - __n, __n); _M_impl._M_reset(); } } void _M_move_data(_Bvector_base&& __x) noexcept { _M_impl._M_move_data(std::move(__x._M_impl)); } static size_t _S_nword(size_t __n) { return (__n + int(_S_word_bit) - 1) / int(_S_word_bit); } }; } namespace std __attribute__ ((__visibility__ ("default"))) { # 587 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_bvector.h" 3 template<typename _Alloc> class vector<bool, _Alloc> : protected _Bvector_base<_Alloc> { typedef _Bvector_base<_Alloc> _Base; typedef typename _Base::_Bit_pointer _Bit_pointer; typedef typename _Base::_Bit_alloc_traits _Bit_alloc_traits; friend struct std::hash<vector>; public: typedef bool value_type; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Bit_reference reference; typedef bool const_reference; typedef _Bit_reference* pointer; typedef const bool* const_pointer; typedef _Bit_iterator iterator; typedef _Bit_const_iterator const_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; typedef _Alloc allocator_type; allocator_type get_allocator() const { return _Base::get_allocator(); } protected: using _Base::_M_allocate; using _Base::_M_deallocate; using _Base::_S_nword; using _Base::_M_get_Bit_allocator; public: vector() = default; explicit vector(const allocator_type& __a) : _Base(__a) { } explicit vector(size_type __n, const allocator_type& __a = allocator_type()) : vector(__n, false, __a) { } vector(size_type __n, const bool& __value, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_initialize(__n); _M_initialize_value(__value); } vector(const vector& __x) : _Base(_Bit_alloc_traits::_S_select_on_copy(__x._M_get_Bit_allocator())) { _M_initialize(__x.size()); _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); } vector(vector&&) = default; vector(vector&& __x, const allocator_type& __a) noexcept(_Bit_alloc_traits::_S_always_equal()) : _Base(__a) { if (__x.get_allocator() == __a) this->_M_move_data(std::move(__x)); else { _M_initialize(__x.size()); _M_copy_aligned(__x.begin(), __x.end(), begin()); __x.clear(); } } vector(const vector& __x, const allocator_type& __a) : _Base(__a) { _M_initialize(__x.size()); _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); } vector(initializer_list<bool> __l, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_initialize_range(__l.begin(), __l.end(), random_access_iterator_tag()); } template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_initialize_dispatch(__first, __last, __false_type()); } # 710 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_bvector.h" 3 ~vector() noexcept { } vector& operator=(const vector& __x) { if (&__x == this) return *this; if (_Bit_alloc_traits::_S_propagate_on_copy_assign()) { if (this->_M_get_Bit_allocator() != __x._M_get_Bit_allocator()) { this->_M_deallocate(); std::__alloc_on_copy(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); _M_initialize(__x.size()); } else std::__alloc_on_copy(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); } if (__x.size() > capacity()) { this->_M_deallocate(); _M_initialize(__x.size()); } this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), begin()); return *this; } vector& operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move()) { if (_Bit_alloc_traits::_S_propagate_on_move_assign() || this->_M_get_Bit_allocator() == __x._M_get_Bit_allocator()) { this->_M_deallocate(); this->_M_move_data(std::move(__x)); std::__alloc_on_move(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); } else { if (__x.size() > capacity()) { this->_M_deallocate(); _M_initialize(__x.size()); } this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), begin()); __x.clear(); } return *this; } vector& operator=(initializer_list<bool> __l) { this->assign (__l.begin(), __l.end()); return *this; } void assign(size_type __n, const bool& __x) { _M_fill_assign(__n, __x); } template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> void assign(_InputIterator __first, _InputIterator __last) { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } # 801 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_bvector.h" 3 void assign(initializer_list<bool> __l) { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } iterator begin() noexcept { return this->_M_impl._M_start; } const_iterator begin() const noexcept { return this->_M_impl._M_start; } iterator end() noexcept { return this->_M_impl._M_finish; } const_iterator end() const noexcept { return this->_M_impl._M_finish; } reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } reverse_iterator rend() noexcept { return reverse_iterator(begin()); } const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } const_iterator cbegin() const noexcept { return this->_M_impl._M_start; } const_iterator cend() const noexcept { return this->_M_impl._M_finish; } const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } size_type size() const noexcept { return size_type(end() - begin()); } size_type max_size() const noexcept { const size_type __isize = __gnu_cxx::__numeric_traits<difference_type>::__max - int(_S_word_bit) + 1; const size_type __asize = _Bit_alloc_traits::max_size(_M_get_Bit_allocator()); return (__asize <= __isize / int(_S_word_bit) ? __asize * int(_S_word_bit) : __isize); } size_type capacity() const noexcept { return size_type(const_iterator(this->_M_impl._M_end_addr(), 0) - begin()); } bool empty() const noexcept { return begin() == end(); } reference operator[](size_type __n) { return *iterator(this->_M_impl._M_start._M_p + __n / int(_S_word_bit), __n % int(_S_word_bit)); } const_reference operator[](size_type __n) const { return *const_iterator(this->_M_impl._M_start._M_p + __n / int(_S_word_bit), __n % int(_S_word_bit)); } protected: void _M_range_check(size_type __n) const { if (__n >= this->size()) __throw_out_of_range_fmt(("vector<bool>::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)"), __n, this->size()); } public: reference at(size_type __n) { _M_range_check(__n); return (*this)[__n]; } const_reference at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; } void reserve(size_type __n) { if (__n > max_size()) __throw_length_error(("vector::reserve")); if (capacity() < __n) _M_reallocate(__n); } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } void data() noexcept { } void push_back(bool __x) { if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) *this->_M_impl._M_finish++ = __x; else _M_insert_aux(end(), __x); } void swap(vector& __x) noexcept { std::swap(this->_M_impl._M_start, __x._M_impl._M_start); std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); std::swap(this->_M_impl._M_end_of_storage, __x._M_impl._M_end_of_storage); _Bit_alloc_traits::_S_on_swap(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); } static void swap(reference __x, reference __y) noexcept { bool __tmp = __x; __x = __y; __y = __tmp; } iterator insert(const_iterator __position, const bool& __x = bool()) { const difference_type __n = __position - begin(); if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr() && __position == end()) *this->_M_impl._M_finish++ = __x; else _M_insert_aux(__position._M_const_cast(), __x); return begin() + __n; } template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> iterator insert(const_iterator __position, _InputIterator __first, _InputIterator __last) { difference_type __offset = __position - cbegin(); _M_insert_dispatch(__position._M_const_cast(), __first, __last, __false_type()); return begin() + __offset; } # 1017 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_bvector.h" 3 iterator insert(const_iterator __position, size_type __n, const bool& __x) { difference_type __offset = __position - cbegin(); _M_fill_insert(__position._M_const_cast(), __n, __x); return begin() + __offset; } iterator insert(const_iterator __p, initializer_list<bool> __l) { return this->insert(__p, __l.begin(), __l.end()); } void pop_back() { --this->_M_impl._M_finish; } iterator erase(const_iterator __position) { return _M_erase(__position._M_const_cast()); } iterator erase(const_iterator __first, const_iterator __last) { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); } void resize(size_type __new_size, bool __x = bool()) { if (__new_size < size()) _M_erase_at_end(begin() + difference_type(__new_size)); else insert(end(), __new_size - size(), __x); } void shrink_to_fit() { _M_shrink_to_fit(); } void flip() noexcept { _Bit_type * const __end = this->_M_impl._M_end_addr(); for (_Bit_type * __p = this->_M_impl._M_start._M_p; __p != __end; ++__p) *__p = ~*__p; } void clear() noexcept { _M_erase_at_end(begin()); } template<typename... _Args> void emplace_back(_Args&&... __args) { push_back(bool(__args...)); } template<typename... _Args> iterator emplace(const_iterator __pos, _Args&&... __args) { return insert(__pos, bool(__args...)); } protected: iterator _M_copy_aligned(const_iterator __first, const_iterator __last, iterator __result) { _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); return std::copy(const_iterator(__last._M_p, 0), __last, iterator(__q, 0)); } void _M_initialize(size_type __n) { if (__n) { _Bit_pointer __q = this->_M_allocate(__n); this->_M_impl._M_end_of_storage = __q + _S_nword(__n); this->_M_impl._M_start = iterator(std::__addressof(*__q), 0); } else { this->_M_impl._M_end_of_storage = _Bit_pointer(); this->_M_impl._M_start = iterator(0, 0); } this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); } void _M_initialize_value(bool __x) { if (_Bit_type* __p = this->_M_impl._M_start._M_p) __builtin_memset(__p, __x ? ~0 : 0, (this->_M_impl._M_end_addr() - __p) * sizeof(_Bit_type)); } void _M_reallocate(size_type __n); bool _M_shrink_to_fit(); template<typename _Integer> void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { _M_initialize(static_cast<size_type>(__n)); _M_initialize_value(__x); } template<typename _InputIterator> void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _M_initialize_range(__first, __last, std::__iterator_category(__first)); } template<typename _InputIterator> void _M_initialize_range(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) push_back(*__first); } template<typename _ForwardIterator> void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __n = std::distance(__first, __last); _M_initialize(__n); std::copy(__first, __last, this->_M_impl._M_start); } # 1203 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_bvector.h" 3 void _M_fill_assign(size_t __n, bool __x) { if (__n > size()) { _M_initialize_value(__x); insert(end(), __n - size(), __x); } else { _M_erase_at_end(begin() + __n); _M_initialize_value(__x); } } template<typename _InputIterator> void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { iterator __cur = begin(); for (; __first != __last && __cur != end(); ++__cur, ++__first) *__cur = *__first; if (__first == __last) _M_erase_at_end(__cur); else insert(end(), __first, __last); } template<typename _ForwardIterator> void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __len = std::distance(__first, __last); if (__len < size()) _M_erase_at_end(std::copy(__first, __last, begin())); else { _ForwardIterator __mid = __first; std::advance(__mid, size()); std::copy(__first, __mid, begin()); insert(end(), __mid, __last); } } template<typename _Integer> void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, __true_type) { _M_fill_insert(__pos, __n, __x); } template<typename _InputIterator> void _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) { _M_insert_range(__pos, __first, __last, std::__iterator_category(__first)); } void _M_fill_insert(iterator __position, size_type __n, bool __x); template<typename _InputIterator> void _M_insert_range(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) { __pos = insert(__pos, *__first); ++__pos; } } template<typename _ForwardIterator> void _M_insert_range(iterator __position, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); void _M_insert_aux(iterator __position, bool __x); size_type _M_check_len(size_type __n, const char* __s) const { if (max_size() - size() < __n) __throw_length_error((__s)); const size_type __len = size() + std::max(size(), __n); return (__len < size() || __len > max_size()) ? max_size() : __len; } void _M_erase_at_end(iterator __pos) { this->_M_impl._M_finish = __pos; } iterator _M_erase(iterator __pos); iterator _M_erase(iterator __first, iterator __last); }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Alloc> struct hash<std::vector<bool, _Alloc>> : public __hash_base<size_t, std::vector<bool, _Alloc>> { size_t operator()(const std::vector<bool, _Alloc>&) const noexcept; }; } # 66 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/vector" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/vector.tcc" 1 3 # 59 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/vector.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp, typename _Alloc> void vector<_Tp, _Alloc>:: reserve(size_type __n) { if (__n > this->max_size()) __throw_length_error(("vector::reserve")); if (this->capacity() < __n) { const size_type __old_size = size(); pointer __tmp = _M_allocate_and_copy(__n, std::__make_move_if_noexcept_iterator(this->_M_impl._M_start), std::__make_move_if_noexcept_iterator(this->_M_impl._M_finish)); ; std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __tmp; this->_M_impl._M_finish = __tmp + __old_size; this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; } } template<typename _Tp, typename _Alloc> template<typename... _Args> void vector<_Tp, _Alloc>:: emplace_back(_Args&&... __args) { if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) { ; _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, std::forward<_Args>(__args)...); ++this->_M_impl._M_finish; ; } else _M_realloc_insert(end(), std::forward<_Args>(__args)...); } template<typename _Tp, typename _Alloc> typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: insert(const_iterator __position, const value_type& __x) { const size_type __n = __position - begin(); if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) if (__position == end()) { ; _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, __x); ++this->_M_impl._M_finish; ; } else { const auto __pos = begin() + (__position - cbegin()); _Temporary_value __x_copy(this, __x); _M_insert_aux(__pos, std::move(__x_copy._M_val())); } else _M_realloc_insert(begin() + (__position - cbegin()), __x); return iterator(this->_M_impl._M_start + __n); } template<typename _Tp, typename _Alloc> typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: _M_erase(iterator __position) { if (__position + 1 != end()) std::move(__position + 1, end(), __position); --this->_M_impl._M_finish; _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); ; return __position; } template<typename _Tp, typename _Alloc> typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: _M_erase(iterator __first, iterator __last) { if (__first != __last) { if (__last != end()) std::move(__last, end(), __first); _M_erase_at_end(__first.base() + (end() - __last)); } return __first; } template<typename _Tp, typename _Alloc> vector<_Tp, _Alloc>& vector<_Tp, _Alloc>:: operator=(const vector<_Tp, _Alloc>& __x) { if (&__x != this) { ; if (_Alloc_traits::_S_propagate_on_copy_assign()) { if (!_Alloc_traits::_S_always_equal() && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) { this->clear(); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = nullptr; this->_M_impl._M_finish = nullptr; this->_M_impl._M_end_of_storage = nullptr; } std::__alloc_on_copy(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } const size_type __xlen = __x.size(); if (__xlen > capacity()) { pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), __x.end()); std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __tmp; this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; } else if (size() >= __xlen) { std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), end(), _M_get_Tp_allocator()); } else { std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), this->_M_impl._M_start); std::__uninitialized_copy_a(__x._M_impl._M_start + size(), __x._M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); } this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; } return *this; } template<typename _Tp, typename _Alloc> void vector<_Tp, _Alloc>:: _M_fill_assign(size_t __n, const value_type& __val) { if (__n > capacity()) { vector __tmp(__n, __val, _M_get_Tp_allocator()); __tmp._M_impl._M_swap_data(this->_M_impl); } else if (__n > size()) { std::fill(begin(), end(), __val); const size_type __add = __n - size(); ; this->_M_impl._M_finish = std::__uninitialized_fill_n_a(this->_M_impl._M_finish, __add, __val, _M_get_Tp_allocator()); ; } else _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); } template<typename _Tp, typename _Alloc> template<typename _InputIterator> void vector<_Tp, _Alloc>:: _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { pointer __cur(this->_M_impl._M_start); for (; __first != __last && __cur != this->_M_impl._M_finish; ++__cur, ++__first) *__cur = *__first; if (__first == __last) _M_erase_at_end(__cur); else _M_range_insert(end(), __first, __last, std::__iterator_category(__first)); } template<typename _Tp, typename _Alloc> template<typename _ForwardIterator> void vector<_Tp, _Alloc>:: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __len = std::distance(__first, __last); if (__len > capacity()) { pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); ; std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __tmp; this->_M_impl._M_finish = this->_M_impl._M_start + __len; this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; } else if (size() >= __len) _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); else { _ForwardIterator __mid = __first; std::advance(__mid, size()); std::copy(__first, __mid, this->_M_impl._M_start); const size_type __attribute__((__unused__)) __n = __len - size(); ; this->_M_impl._M_finish = std::__uninitialized_copy_a(__mid, __last, this->_M_impl._M_finish, _M_get_Tp_allocator()); ; } } template<typename _Tp, typename _Alloc> auto vector<_Tp, _Alloc>:: _M_insert_rval(const_iterator __position, value_type&& __v) -> iterator { const auto __n = __position - cbegin(); if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) if (__position == cend()) { ; _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, std::move(__v)); ++this->_M_impl._M_finish; ; } else _M_insert_aux(begin() + __n, std::move(__v)); else _M_realloc_insert(begin() + __n, std::move(__v)); return iterator(this->_M_impl._M_start + __n); } template<typename _Tp, typename _Alloc> template<typename... _Args> auto vector<_Tp, _Alloc>:: _M_emplace_aux(const_iterator __position, _Args&&... __args) -> iterator { const auto __n = __position - cbegin(); if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) if (__position == cend()) { ; _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, std::forward<_Args>(__args)...); ++this->_M_impl._M_finish; ; } else { _Temporary_value __tmp(this, std::forward<_Args>(__args)...); _M_insert_aux(begin() + __n, std::move(__tmp._M_val())); } else _M_realloc_insert(begin() + __n, std::forward<_Args>(__args)...); return iterator(this->_M_impl._M_start + __n); } template<typename _Tp, typename _Alloc> template<typename _Arg> void vector<_Tp, _Alloc>:: _M_insert_aux(iterator __position, _Arg&& __arg) { ; _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, std::move(*(this->_M_impl._M_finish - 1))); ++this->_M_impl._M_finish; ; std::move_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1); *__position = std::forward<_Arg>(__arg); } template<typename _Tp, typename _Alloc> template<typename... _Args> void vector<_Tp, _Alloc>:: _M_realloc_insert(iterator __position, _Args&&... __args) { const size_type __len = _M_check_len(size_type(1), "vector::_M_realloc_insert"); pointer __old_start = this->_M_impl._M_start; pointer __old_finish = this->_M_impl._M_finish; const size_type __elems_before = __position - begin(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); if (true) { _Alloc_traits::construct(this->_M_impl, __new_start + __elems_before, std::forward<_Args>(__args)...); __new_finish = pointer(); __new_finish = std::__uninitialized_move_if_noexcept_a (__old_start, __position.base(), __new_start, _M_get_Tp_allocator()); ++__new_finish; __new_finish = std::__uninitialized_move_if_noexcept_a (__position.base(), __old_finish, __new_finish, _M_get_Tp_allocator()); } if (false) { if (!__new_finish) _Alloc_traits::destroy(this->_M_impl, __new_start + __elems_before); else std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); ; } ; std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator()); _M_deallocate(__old_start, this->_M_impl._M_end_of_storage - __old_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_finish; this->_M_impl._M_end_of_storage = __new_start + __len; } template<typename _Tp, typename _Alloc> void vector<_Tp, _Alloc>:: _M_fill_insert(iterator __position, size_type __n, const value_type& __x) { if (__n != 0) { if (size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish) >= __n) { _Temporary_value __tmp(this, __x); value_type& __x_copy = __tmp._M_val(); const size_type __elems_after = end() - __position; pointer __old_finish(this->_M_impl._M_finish); if (__elems_after > __n) { ; std::__uninitialized_move_a(this->_M_impl._M_finish - __n, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n; ; std::move_backward(__position.base(), __old_finish - __n, __old_finish); std::fill(__position.base(), __position.base() + __n, __x_copy); } else { ; this->_M_impl._M_finish = std::__uninitialized_fill_n_a(this->_M_impl._M_finish, __n - __elems_after, __x_copy, _M_get_Tp_allocator()); ; std::__uninitialized_move_a(__position.base(), __old_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __elems_after; ; std::fill(__position.base(), __old_finish, __x_copy); } } else { const size_type __len = _M_check_len(__n, "vector::_M_fill_insert"); const size_type __elems_before = __position - begin(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); if (true) { std::__uninitialized_fill_n_a(__new_start + __elems_before, __n, __x, _M_get_Tp_allocator()); __new_finish = pointer(); __new_finish = std::__uninitialized_move_if_noexcept_a (this->_M_impl._M_start, __position.base(), __new_start, _M_get_Tp_allocator()); __new_finish += __n; __new_finish = std::__uninitialized_move_if_noexcept_a (__position.base(), this->_M_impl._M_finish, __new_finish, _M_get_Tp_allocator()); } if (false) { if (!__new_finish) std::_Destroy(__new_start + __elems_before, __new_start + __elems_before + __n, _M_get_Tp_allocator()); else std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); ; } ; std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_finish; this->_M_impl._M_end_of_storage = __new_start + __len; } } } template<typename _Tp, typename _Alloc> void vector<_Tp, _Alloc>:: _M_default_append(size_type __n) { if (__n != 0) { const size_type __size = size(); size_type __navail = size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish); if (__size > max_size() || __navail > max_size() - __size) __builtin_unreachable(); if (__navail >= __n) { ; this->_M_impl._M_finish = std::__uninitialized_default_n_a(this->_M_impl._M_finish, __n, _M_get_Tp_allocator()); ; } else { const size_type __len = _M_check_len(__n, "vector::_M_default_append"); pointer __new_start(this->_M_allocate(__len)); pointer __destroy_from = pointer(); if (true) { std::__uninitialized_default_n_a(__new_start + __size, __n, _M_get_Tp_allocator()); __destroy_from = __new_start + __size; std::__uninitialized_move_if_noexcept_a( this->_M_impl._M_start, this->_M_impl._M_finish, __new_start, _M_get_Tp_allocator()); } if (false) { if (__destroy_from) std::_Destroy(__destroy_from, __destroy_from + __n, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); ; } ; std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_start + __size + __n; this->_M_impl._M_end_of_storage = __new_start + __len; } } } template<typename _Tp, typename _Alloc> bool vector<_Tp, _Alloc>:: _M_shrink_to_fit() { if (capacity() == size()) return false; ; return std::__shrink_to_fit_aux<vector>::_S_do_it(*this); } template<typename _Tp, typename _Alloc> template<typename _InputIterator> void vector<_Tp, _Alloc>:: _M_range_insert(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) { if (__pos == end()) { for (; __first != __last; ++__first) insert(end(), *__first); } else if (__first != __last) { vector __tmp(__first, __last, _M_get_Tp_allocator()); insert(__pos, std::make_move_iterator(__tmp.begin()), std::make_move_iterator(__tmp.end())); } } template<typename _Tp, typename _Alloc> template<typename _ForwardIterator> void vector<_Tp, _Alloc>:: _M_range_insert(iterator __position, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { if (__first != __last) { const size_type __n = std::distance(__first, __last); if (size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish) >= __n) { const size_type __elems_after = end() - __position; pointer __old_finish(this->_M_impl._M_finish); if (__elems_after > __n) { ; std::__uninitialized_move_a(this->_M_impl._M_finish - __n, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n; ; std::move_backward(__position.base(), __old_finish - __n, __old_finish); std::copy(__first, __last, __position); } else { _ForwardIterator __mid = __first; std::advance(__mid, __elems_after); ; std::__uninitialized_copy_a(__mid, __last, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n - __elems_after; ; std::__uninitialized_move_a(__position.base(), __old_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __elems_after; ; std::copy(__first, __mid, __position); } } else { const size_type __len = _M_check_len(__n, "vector::_M_range_insert"); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); if (true) { __new_finish = std::__uninitialized_move_if_noexcept_a (this->_M_impl._M_start, __position.base(), __new_start, _M_get_Tp_allocator()); __new_finish = std::__uninitialized_copy_a(__first, __last, __new_finish, _M_get_Tp_allocator()); __new_finish = std::__uninitialized_move_if_noexcept_a (__position.base(), this->_M_impl._M_finish, __new_finish, _M_get_Tp_allocator()); } if (false) { std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); ; } ; std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_finish; this->_M_impl._M_end_of_storage = __new_start + __len; } } } template<typename _Alloc> void vector<bool, _Alloc>:: _M_reallocate(size_type __n) { _Bit_pointer __q = this->_M_allocate(__n); iterator __start(std::__addressof(*__q), 0); iterator __finish(_M_copy_aligned(begin(), end(), __start)); this->_M_deallocate(); this->_M_impl._M_start = __start; this->_M_impl._M_finish = __finish; this->_M_impl._M_end_of_storage = __q + _S_nword(__n); } template<typename _Alloc> void vector<bool, _Alloc>:: _M_fill_insert(iterator __position, size_type __n, bool __x) { if (__n == 0) return; if (capacity() - size() >= __n) { std::copy_backward(__position, end(), this->_M_impl._M_finish + difference_type(__n)); std::fill(__position, __position + difference_type(__n), __x); this->_M_impl._M_finish += difference_type(__n); } else { const size_type __len = _M_check_len(__n, "vector<bool>::_M_fill_insert"); _Bit_pointer __q = this->_M_allocate(__len); iterator __start(std::__addressof(*__q), 0); iterator __i = _M_copy_aligned(begin(), __position, __start); std::fill(__i, __i + difference_type(__n), __x); iterator __finish = std::copy(__position, end(), __i + difference_type(__n)); this->_M_deallocate(); this->_M_impl._M_end_of_storage = __q + _S_nword(__len); this->_M_impl._M_start = __start; this->_M_impl._M_finish = __finish; } } template<typename _Alloc> template<typename _ForwardIterator> void vector<bool, _Alloc>:: _M_insert_range(iterator __position, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { if (__first != __last) { size_type __n = std::distance(__first, __last); if (capacity() - size() >= __n) { std::copy_backward(__position, end(), this->_M_impl._M_finish + difference_type(__n)); std::copy(__first, __last, __position); this->_M_impl._M_finish += difference_type(__n); } else { const size_type __len = _M_check_len(__n, "vector<bool>::_M_insert_range"); _Bit_pointer __q = this->_M_allocate(__len); iterator __start(std::__addressof(*__q), 0); iterator __i = _M_copy_aligned(begin(), __position, __start); __i = std::copy(__first, __last, __i); iterator __finish = std::copy(__position, end(), __i); this->_M_deallocate(); this->_M_impl._M_end_of_storage = __q + _S_nword(__len); this->_M_impl._M_start = __start; this->_M_impl._M_finish = __finish; } } } template<typename _Alloc> void vector<bool, _Alloc>:: _M_insert_aux(iterator __position, bool __x) { if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) { std::copy_backward(__position, this->_M_impl._M_finish, this->_M_impl._M_finish + 1); *__position = __x; ++this->_M_impl._M_finish; } else { const size_type __len = _M_check_len(size_type(1), "vector<bool>::_M_insert_aux"); _Bit_pointer __q = this->_M_allocate(__len); iterator __start(std::__addressof(*__q), 0); iterator __i = _M_copy_aligned(begin(), __position, __start); *__i++ = __x; iterator __finish = std::copy(__position, end(), __i); this->_M_deallocate(); this->_M_impl._M_end_of_storage = __q + _S_nword(__len); this->_M_impl._M_start = __start; this->_M_impl._M_finish = __finish; } } template<typename _Alloc> typename vector<bool, _Alloc>::iterator vector<bool, _Alloc>:: _M_erase(iterator __position) { if (__position + 1 != end()) std::copy(__position + 1, end(), __position); --this->_M_impl._M_finish; return __position; } template<typename _Alloc> typename vector<bool, _Alloc>::iterator vector<bool, _Alloc>:: _M_erase(iterator __first, iterator __last) { if (__first != __last) _M_erase_at_end(std::copy(__last, end(), __first)); return __first; } template<typename _Alloc> bool vector<bool, _Alloc>:: _M_shrink_to_fit() { if (capacity() - size() < int(_S_word_bit)) return false; if (true) { _M_reallocate(size()); return true; } if (false) { return false; } } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Alloc> size_t hash<std::vector<bool, _Alloc>>:: operator()(const std::vector<bool, _Alloc>& __b) const noexcept { size_t __hash = 0; using std::_S_word_bit; using std::_Bit_type; const size_t __words = __b.size() / _S_word_bit; if (__words) { const size_t __clength = __words * sizeof(_Bit_type); __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength); } const size_t __extrabits = __b.size() % _S_word_bit; if (__extrabits) { _Bit_type __hiword = *__b._M_impl._M_finish._M_p; __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits); const size_t __clength = (__extrabits + 8 - 1) / 8; if (__words) __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash); else __hash = std::_Hash_impl::hash(&__hiword, __clength); } return __hash; } } # 70 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/vector" 2 3 # 26 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ArrayRef.h" 2 namespace llvm { # 40 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ArrayRef.h" template<typename T> class [[clang::warn_unused_result]] ArrayRef { public: using iterator = const T *; using const_iterator = const T *; using size_type = size_t; using reverse_iterator = std::reverse_iterator<iterator>; private: const T *Data = nullptr; size_type Length = 0; public: ArrayRef() = default; ArrayRef(NoneType) {} ArrayRef(const T &OneElt) : Data(&OneElt), Length(1) {} ArrayRef(const T *data, size_t length) : Data(data), Length(length) {} ArrayRef(const T *begin, const T *end) : Data(begin), Length(end - begin) {} template<typename U> ArrayRef(const SmallVectorTemplateCommon<T, U> &Vec) : Data(Vec.data()), Length(Vec.size()) { } template<typename A> ArrayRef(const std::vector<T, A> &Vec) : Data(Vec.data()), Length(Vec.size()) {} template <size_t N> constexpr ArrayRef(const std::array<T, N> &Arr) : Data(Arr.data()), Length(N) {} template <size_t N> constexpr ArrayRef(const T (&Arr)[N]) : Data(Arr), Length(N) {} # 107 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ArrayRef.h" ArrayRef(const std::initializer_list<T> &Vec) : Data(Vec.begin() == Vec.end() ? (T*)nullptr : Vec.begin()), Length(Vec.size()) {} template <typename U> ArrayRef(const ArrayRef<U *> &A, std::enable_if_t<std::is_convertible<U *const *, T const *>::value> * = nullptr) : Data(A.data()), Length(A.size()) {} template <typename U, typename DummyT> ArrayRef( const SmallVectorTemplateCommon<U *, DummyT> &Vec, std::enable_if_t<std::is_convertible<U *const *, T const *>::value> * = nullptr) : Data(Vec.data()), Length(Vec.size()) {} template <typename U, typename A> ArrayRef(const std::vector<U *, A> &Vec, std::enable_if_t<std::is_convertible<U *const *, T const *>::value> * = 0) : Data(Vec.data()), Length(Vec.size()) {} iterator begin() const { return Data; } iterator end() const { return Data + Length; } reverse_iterator rbegin() const { return reverse_iterator(end()); } reverse_iterator rend() const { return reverse_iterator(begin()); } bool empty() const { return Length == 0; } const T *data() const { return Data; } size_t size() const { return Length; } const T &front() const { (static_cast<void> (0)); return Data[0]; } const T &back() const { (static_cast<void> (0)); return Data[Length-1]; } template <typename Allocator> ArrayRef<T> copy(Allocator &A) { T *Buff = A.template Allocate<T>(Length); std::uninitialized_copy(begin(), end(), Buff); return ArrayRef<T>(Buff, Length); } bool equals(ArrayRef RHS) const { if (Length != RHS.Length) return false; return std::equal(begin(), end(), RHS.begin()); } ArrayRef<T> slice(size_t N, size_t M) const { (static_cast<void> (0)); return ArrayRef<T>(data()+N, M); } ArrayRef<T> slice(size_t N) const { return slice(N, size() - N); } ArrayRef<T> drop_front(size_t N = 1) const { (static_cast<void> (0)); return slice(N, size() - N); } ArrayRef<T> drop_back(size_t N = 1) const { (static_cast<void> (0)); return slice(0, size() - N); } template <class PredicateT> ArrayRef<T> drop_while(PredicateT Pred) const { return ArrayRef<T>(find_if_not(*this, Pred), end()); } template <class PredicateT> ArrayRef<T> drop_until(PredicateT Pred) const { return ArrayRef<T>(find_if(*this, Pred), end()); } ArrayRef<T> take_front(size_t N = 1) const { if (N >= size()) return *this; return drop_back(size() - N); } ArrayRef<T> take_back(size_t N = 1) const { if (N >= size()) return *this; return drop_front(size() - N); } template <class PredicateT> ArrayRef<T> take_while(PredicateT Pred) const { return ArrayRef<T>(begin(), find_if_not(*this, Pred)); } template <class PredicateT> ArrayRef<T> take_until(PredicateT Pred) const { return ArrayRef<T>(begin(), find_if(*this, Pred)); } const T &operator[](size_t Index) const { (static_cast<void> (0)); return Data[Index]; } template <typename U> std::enable_if_t<std::is_same<U, T>::value, ArrayRef<T>> & operator=(U &&Temporary) = delete; template <typename U> std::enable_if_t<std::is_same<U, T>::value, ArrayRef<T>> & operator=(std::initializer_list<U>) = delete; std::vector<T> vec() const { return std::vector<T>(Data, Data+Length); } operator std::vector<T>() const { return std::vector<T>(Data, Data+Length); } }; # 297 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ArrayRef.h" template<typename T> class [[clang::warn_unused_result]] MutableArrayRef : public ArrayRef<T> { public: using iterator = T *; using reverse_iterator = std::reverse_iterator<iterator>; MutableArrayRef() = default; MutableArrayRef(NoneType) : ArrayRef<T>() {} MutableArrayRef(T &OneElt) : ArrayRef<T>(OneElt) {} MutableArrayRef(T *data, size_t length) : ArrayRef<T>(data, length) {} MutableArrayRef(T *begin, T *end) : ArrayRef<T>(begin, end) {} MutableArrayRef(SmallVectorImpl<T> &Vec) : ArrayRef<T>(Vec) {} MutableArrayRef(std::vector<T> &Vec) : ArrayRef<T>(Vec) {} template <size_t N> constexpr MutableArrayRef(std::array<T, N> &Arr) : ArrayRef<T>(Arr) {} template <size_t N> constexpr MutableArrayRef(T (&Arr)[N]) : ArrayRef<T>(Arr) {} T *data() const { return const_cast<T*>(ArrayRef<T>::data()); } iterator begin() const { return data(); } iterator end() const { return data() + this->size(); } reverse_iterator rbegin() const { return reverse_iterator(end()); } reverse_iterator rend() const { return reverse_iterator(begin()); } T &front() const { (static_cast<void> (0)); return data()[0]; } T &back() const { (static_cast<void> (0)); return data()[this->size()-1]; } MutableArrayRef<T> slice(size_t N, size_t M) const { (static_cast<void> (0)); return MutableArrayRef<T>(this->data() + N, M); } MutableArrayRef<T> slice(size_t N) const { return slice(N, this->size() - N); } MutableArrayRef<T> drop_front(size_t N = 1) const { (static_cast<void> (0)); return slice(N, this->size() - N); } MutableArrayRef<T> drop_back(size_t N = 1) const { (static_cast<void> (0)); return slice(0, this->size() - N); } template <class PredicateT> MutableArrayRef<T> drop_while(PredicateT Pred) const { return MutableArrayRef<T>(find_if_not(*this, Pred), end()); } template <class PredicateT> MutableArrayRef<T> drop_until(PredicateT Pred) const { return MutableArrayRef<T>(find_if(*this, Pred), end()); } MutableArrayRef<T> take_front(size_t N = 1) const { if (N >= this->size()) return *this; return drop_back(this->size() - N); } MutableArrayRef<T> take_back(size_t N = 1) const { if (N >= this->size()) return *this; return drop_front(this->size() - N); } template <class PredicateT> MutableArrayRef<T> take_while(PredicateT Pred) const { return MutableArrayRef<T>(begin(), find_if_not(*this, Pred)); } template <class PredicateT> MutableArrayRef<T> take_until(PredicateT Pred) const { return MutableArrayRef<T>(begin(), find_if(*this, Pred)); } T &operator[](size_t Index) const { (static_cast<void> (0)); return data()[Index]; } }; template <typename T> class OwningArrayRef : public MutableArrayRef<T> { public: OwningArrayRef() = default; OwningArrayRef(size_t Size) : MutableArrayRef<T>(new T[Size], Size) {} OwningArrayRef(ArrayRef<T> Data) : MutableArrayRef<T>(new T[Data.size()], Data.size()) { std::copy(Data.begin(), Data.end(), this->begin()); } OwningArrayRef(OwningArrayRef &&Other) { *this = std::move(Other); } OwningArrayRef &operator=(OwningArrayRef &&Other) { delete[] this->data(); this->MutableArrayRef<T>::operator=(Other); Other.MutableArrayRef<T>::operator=(MutableArrayRef<T>()); return *this; } ~OwningArrayRef() { delete[] this->data(); } }; template<typename T> ArrayRef<T> makeArrayRef(const T &OneElt) { return OneElt; } template<typename T> ArrayRef<T> makeArrayRef(const T *data, size_t length) { return ArrayRef<T>(data, length); } template<typename T> ArrayRef<T> makeArrayRef(const T *begin, const T *end) { return ArrayRef<T>(begin, end); } template <typename T> ArrayRef<T> makeArrayRef(const SmallVectorImpl<T> &Vec) { return Vec; } template <typename T, unsigned N> ArrayRef<T> makeArrayRef(const SmallVector<T, N> &Vec) { return Vec; } template<typename T> ArrayRef<T> makeArrayRef(const std::vector<T> &Vec) { return Vec; } template <typename T, std::size_t N> ArrayRef<T> makeArrayRef(const std::array<T, N> &Arr) { return Arr; } template <typename T> ArrayRef<T> makeArrayRef(const ArrayRef<T> &Vec) { return Vec; } template <typename T> ArrayRef<T> &makeArrayRef(ArrayRef<T> &Vec) { return Vec; } template<typename T, size_t N> ArrayRef<T> makeArrayRef(const T (&Arr)[N]) { return ArrayRef<T>(Arr); } template<typename T> MutableArrayRef<T> makeMutableArrayRef(T &OneElt) { return OneElt; } template<typename T> MutableArrayRef<T> makeMutableArrayRef(T *data, size_t length) { return MutableArrayRef<T>(data, length); } template<typename T> inline bool operator==(ArrayRef<T> LHS, ArrayRef<T> RHS) { return LHS.equals(RHS); } template <typename T> inline bool operator==(SmallVectorImpl<T> &LHS, ArrayRef<T> RHS) { return ArrayRef<T>(LHS).equals(RHS); } template <typename T> inline bool operator!=(ArrayRef<T> LHS, ArrayRef<T> RHS) { return !(LHS == RHS); } template <typename T> inline bool operator!=(SmallVectorImpl<T> &LHS, ArrayRef<T> RHS) { return !(LHS == RHS); } template <typename T> hash_code hash_value(ArrayRef<T> S) { return hash_combine_range(S.begin(), S.end()); } } # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseMap.h" 1 # 16 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseMap.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseMapInfo.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseMapInfo.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" 1 # 16 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 3 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" 2 # 33 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" namespace llvm { class APInt; class hash_code; template <typename T> class SmallVectorImpl; class StringRef; bool getAsUnsignedInteger(StringRef Str, unsigned Radix, unsigned long long &Result); bool getAsSignedInteger(StringRef Str, unsigned Radix, long long &Result); bool consumeUnsignedInteger(StringRef &Str, unsigned Radix, unsigned long long &Result); bool consumeSignedInteger(StringRef &Str, unsigned Radix, long long &Result); # 57 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" class StringRef { public: static constexpr size_t npos = ~size_t(0); using iterator = const char *; using const_iterator = const char *; using size_type = size_t; private: const char *Data = nullptr; size_t Length = 0; static int compareMemory(const char *Lhs, const char *Rhs, size_t Length) { if (Length == 0) { return 0; } return ::memcmp(Lhs,Rhs,Length); } static constexpr size_t strLen(const char *Str) { return __builtin_strlen(Str); } public: StringRef() = default; StringRef(std::nullptr_t) = delete; constexpr StringRef(const char *Str) : Data(Str), Length(Str ? strLen(Str) : 0) {} constexpr StringRef(const char *data, size_t length) : Data(data), Length(length) {} StringRef(const std::string &Str) : Data(Str.data()), Length(Str.length()) {} static StringRef withNullAsEmpty(const char *data) { return StringRef(data ? data : ""); } iterator begin() const { return Data; } iterator end() const { return Data + Length; } const unsigned char *bytes_begin() const { return reinterpret_cast<const unsigned char *>(begin()); } const unsigned char *bytes_end() const { return reinterpret_cast<const unsigned char *>(end()); } iterator_range<const unsigned char *> bytes() const { return make_range(bytes_begin(), bytes_end()); } [[clang::warn_unused_result]] const char *data() const { return Data; } [[clang::warn_unused_result]] bool empty() const { return Length == 0; } [[clang::warn_unused_result]] size_t size() const { return Length; } [[clang::warn_unused_result]] char front() const { (static_cast<void> (0)); return Data[0]; } [[clang::warn_unused_result]] char back() const { (static_cast<void> (0)); return Data[Length-1]; } template <typename Allocator> [[clang::warn_unused_result]] StringRef copy(Allocator &A) const { if (empty()) return StringRef(); char *S = A.template Allocate<char>(Length); std::copy(begin(), end(), S); return StringRef(S, Length); } [[clang::warn_unused_result]] bool equals(StringRef RHS) const { return (Length == RHS.Length && compareMemory(Data, RHS.Data, RHS.Length) == 0); } [[clang::warn_unused_result]] bool equals_lower(StringRef RHS) const { return Length == RHS.Length && compare_lower(RHS) == 0; } [[clang::warn_unused_result]] int compare(StringRef RHS) const { if (int Res = compareMemory(Data, RHS.Data, std::min(Length, RHS.Length))) return Res < 0 ? -1 : 1; if (Length == RHS.Length) return 0; return Length < RHS.Length ? -1 : 1; } [[clang::warn_unused_result]] int compare_lower(StringRef RHS) const; [[clang::warn_unused_result]] int compare_numeric(StringRef RHS) const; # 242 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" [[clang::warn_unused_result]] unsigned edit_distance(StringRef Other, bool AllowReplacements = true, unsigned MaxEditDistance = 0) const; [[clang::warn_unused_result]] std::string str() const { if (!Data) return std::string(); return std::string(Data, Length); } [[clang::warn_unused_result]] char operator[](size_t Index) const { (static_cast<void> (0)); return Data[Index]; } template <typename T> std::enable_if_t<std::is_same<T, std::string>::value, StringRef> & operator=(T &&Str) = delete; explicit operator std::string() const { return str(); } # 288 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" [[clang::warn_unused_result]] bool startswith(StringRef Prefix) const { return Length >= Prefix.Length && compareMemory(Data, Prefix.Data, Prefix.Length) == 0; } [[clang::warn_unused_result]] bool startswith_lower(StringRef Prefix) const; [[clang::warn_unused_result]] bool endswith(StringRef Suffix) const { return Length >= Suffix.Length && compareMemory(end() - Suffix.Length, Suffix.Data, Suffix.Length) == 0; } [[clang::warn_unused_result]] bool endswith_lower(StringRef Suffix) const; # 317 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" [[clang::warn_unused_result]] size_t find(char C, size_t From = 0) const { size_t FindBegin = std::min(From, Length); if (FindBegin < Length) { if (const void *P = ::memchr(Data + FindBegin, C, Length - FindBegin)) return static_cast<const char *>(P) - Data; } return npos; } [[clang::warn_unused_result]] size_t find_lower(char C, size_t From = 0) const; [[clang::warn_unused_result]] size_t find_if(function_ref<bool(char)> F, size_t From = 0) const { StringRef S = drop_front(From); while (!S.empty()) { if (F(S.front())) return size() - S.size(); S = S.drop_front(); } return npos; } [[clang::warn_unused_result]] size_t find_if_not(function_ref<bool(char)> F, size_t From = 0) const { return find_if([F](char c) { return !F(c); }, From); } [[clang::warn_unused_result]] size_t find(StringRef Str, size_t From = 0) const; [[clang::warn_unused_result]] size_t find_lower(StringRef Str, size_t From = 0) const; [[clang::warn_unused_result]] size_t rfind(char C, size_t From = npos) const { From = std::min(From, Length); size_t i = From; while (i != 0) { --i; if (Data[i] == C) return i; } return npos; } [[clang::warn_unused_result]] size_t rfind_lower(char C, size_t From = npos) const; [[clang::warn_unused_result]] size_t rfind(StringRef Str) const; [[clang::warn_unused_result]] size_t rfind_lower(StringRef Str) const; [[clang::warn_unused_result]] size_t find_first_of(char C, size_t From = 0) const { return find(C, From); } [[clang::warn_unused_result]] size_t find_first_of(StringRef Chars, size_t From = 0) const; [[clang::warn_unused_result]] size_t find_first_not_of(char C, size_t From = 0) const; [[clang::warn_unused_result]] size_t find_first_not_of(StringRef Chars, size_t From = 0) const; [[clang::warn_unused_result]] size_t find_last_of(char C, size_t From = npos) const { return rfind(C, From); } [[clang::warn_unused_result]] size_t find_last_of(StringRef Chars, size_t From = npos) const; [[clang::warn_unused_result]] size_t find_last_not_of(char C, size_t From = npos) const; [[clang::warn_unused_result]] size_t find_last_not_of(StringRef Chars, size_t From = npos) const; [[clang::warn_unused_result]] bool contains(StringRef Other) const { return find(Other) != npos; } [[clang::warn_unused_result]] bool contains(char C) const { return find_first_of(C) != npos; } [[clang::warn_unused_result]] bool contains_lower(StringRef Other) const { return find_lower(Other) != npos; } [[clang::warn_unused_result]] bool contains_lower(char C) const { return find_lower(C) != npos; } [[clang::warn_unused_result]] size_t count(char C) const { size_t Count = 0; for (size_t i = 0, e = Length; i != e; ++i) if (Data[i] == C) ++Count; return Count; } size_t count(StringRef Str) const; # 509 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" template <typename T> std::enable_if_t<std::numeric_limits<T>::is_signed, bool> getAsInteger(unsigned Radix, T &Result) const { long long LLVal; if (getAsSignedInteger(*this, Radix, LLVal) || static_cast<T>(LLVal) != LLVal) return true; Result = LLVal; return false; } template <typename T> std::enable_if_t<!std::numeric_limits<T>::is_signed, bool> getAsInteger(unsigned Radix, T &Result) const { unsigned long long ULLVal; if (getAsUnsignedInteger(*this, Radix, ULLVal) || static_cast<unsigned long long>(static_cast<T>(ULLVal)) != ULLVal) return true; Result = ULLVal; return false; } # 543 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" template <typename T> std::enable_if_t<std::numeric_limits<T>::is_signed, bool> consumeInteger(unsigned Radix, T &Result) { long long LLVal; if (consumeSignedInteger(*this, Radix, LLVal) || static_cast<long long>(static_cast<T>(LLVal)) != LLVal) return true; Result = LLVal; return false; } template <typename T> std::enable_if_t<!std::numeric_limits<T>::is_signed, bool> consumeInteger(unsigned Radix, T &Result) { unsigned long long ULLVal; if (consumeUnsignedInteger(*this, Radix, ULLVal) || static_cast<unsigned long long>(static_cast<T>(ULLVal)) != ULLVal) return true; Result = ULLVal; return false; } # 575 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" bool getAsInteger(unsigned Radix, APInt &Result) const; # 584 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" bool getAsDouble(double &Result, bool AllowInexact = true) const; [[clang::warn_unused_result]] std::string lower() const; [[clang::warn_unused_result]] std::string upper() const; # 611 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" [[clang::warn_unused_result]] StringRef substr(size_t Start, size_t N = npos) const { Start = std::min(Start, Length); return StringRef(Data + Start, std::min(N, Length - Start)); } [[clang::warn_unused_result]] StringRef take_front(size_t N = 1) const { if (N >= size()) return *this; return drop_back(size() - N); } [[clang::warn_unused_result]] StringRef take_back(size_t N = 1) const { if (N >= size()) return *this; return drop_front(size() - N); } [[clang::warn_unused_result]] StringRef take_while(function_ref<bool(char)> F) const { return substr(0, find_if_not(F)); } [[clang::warn_unused_result]] StringRef take_until(function_ref<bool(char)> F) const { return substr(0, find_if(F)); } [[clang::warn_unused_result]] StringRef drop_front(size_t N = 1) const { (static_cast<void> (0)); return substr(N); } [[clang::warn_unused_result]] StringRef drop_back(size_t N = 1) const { (static_cast<void> (0)); return substr(0, size()-N); } [[clang::warn_unused_result]] StringRef drop_while(function_ref<bool(char)> F) const { return substr(find_if_not(F)); } [[clang::warn_unused_result]] StringRef drop_until(function_ref<bool(char)> F) const { return substr(find_if(F)); } bool consume_front(StringRef Prefix) { if (!startswith(Prefix)) return false; *this = drop_front(Prefix.size()); return true; } bool consume_back(StringRef Suffix) { if (!endswith(Suffix)) return false; *this = drop_back(Suffix.size()); return true; } # 712 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" [[clang::warn_unused_result]] StringRef slice(size_t Start, size_t End) const { Start = std::min(Start, Length); End = std::min(std::max(Start, End), Length); return StringRef(Data + Start, End - Start); } # 729 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" [[clang::warn_unused_result]] std::pair<StringRef, StringRef> split(char Separator) const { return split(StringRef(&Separator, 1)); } # 744 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" [[clang::warn_unused_result]] std::pair<StringRef, StringRef> split(StringRef Separator) const { size_t Idx = find(Separator); if (Idx == npos) return std::make_pair(*this, StringRef()); return std::make_pair(slice(0, Idx), slice(Idx + Separator.size(), npos)); } # 762 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" [[clang::warn_unused_result]] std::pair<StringRef, StringRef> rsplit(StringRef Separator) const { size_t Idx = rfind(Separator); if (Idx == npos) return std::make_pair(*this, StringRef()); return std::make_pair(slice(0, Idx), slice(Idx + Separator.size(), npos)); } # 784 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" void split(SmallVectorImpl<StringRef> &A, StringRef Separator, int MaxSplit = -1, bool KeepEmpty = true) const; # 802 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" void split(SmallVectorImpl<StringRef> &A, char Separator, int MaxSplit = -1, bool KeepEmpty = true) const; # 815 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" [[clang::warn_unused_result]] std::pair<StringRef, StringRef> rsplit(char Separator) const { return rsplit(StringRef(&Separator, 1)); } [[clang::warn_unused_result]] StringRef ltrim(char Char) const { return drop_front(std::min(Length, find_first_not_of(Char))); } [[clang::warn_unused_result]] StringRef ltrim(StringRef Chars = " \t\n\v\f\r") const { return drop_front(std::min(Length, find_first_not_of(Chars))); } [[clang::warn_unused_result]] StringRef rtrim(char Char) const { return drop_back(Length - std::min(Length, find_last_not_of(Char) + 1)); } [[clang::warn_unused_result]] StringRef rtrim(StringRef Chars = " \t\n\v\f\r") const { return drop_back(Length - std::min(Length, find_last_not_of(Chars) + 1)); } [[clang::warn_unused_result]] StringRef trim(char Char) const { return ltrim(Char).rtrim(Char); } [[clang::warn_unused_result]] StringRef trim(StringRef Chars = " \t\n\v\f\r") const { return ltrim(Chars).rtrim(Chars); } }; # 872 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringRef.h" class StringLiteral : public StringRef { private: constexpr StringLiteral(const char *Str, size_t N) : StringRef(Str, N) { } public: template <size_t N> constexpr StringLiteral(const char (&Str)[N]) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgcc-compat" __attribute((enable_if(__builtin_strlen(Str) == N - 1, "invalid string literal"))) #pragma clang diagnostic pop : StringRef(Str, N - 1) { } template <size_t N> static constexpr StringLiteral withInnerNUL(const char (&Str)[N]) { return StringLiteral(Str, N - 1); } }; inline bool operator==(StringRef LHS, StringRef RHS) { return LHS.equals(RHS); } inline bool operator!=(StringRef LHS, StringRef RHS) { return !(LHS == RHS); } inline bool operator<(StringRef LHS, StringRef RHS) { return LHS.compare(RHS) == -1; } inline bool operator<=(StringRef LHS, StringRef RHS) { return LHS.compare(RHS) != 1; } inline bool operator>(StringRef LHS, StringRef RHS) { return LHS.compare(RHS) == 1; } inline bool operator>=(StringRef LHS, StringRef RHS) { return LHS.compare(RHS) != -1; } inline std::string &operator+=(std::string &buffer, StringRef string) { return buffer.append(string.data(), string.size()); } [[clang::warn_unused_result]] hash_code hash_value(StringRef S); } # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseMapInfo.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseMapInfo.h" 2 namespace llvm { namespace detail { static inline unsigned combineHashValue(unsigned a, unsigned b) { uint64_t key = (uint64_t)a << 32 | (uint64_t)b; key += ~(key << 32); key ^= (key >> 22); key += ~(key << 13); key ^= (key >> 8); key += (key << 3); key ^= (key >> 15); key += ~(key << 27); key ^= (key >> 31); return (unsigned)key; } } template<typename T> struct DenseMapInfo { }; template<typename T> struct DenseMapInfo<T*> { static constexpr uintptr_t Log2MaxAlign = 12; static inline T* getEmptyKey() { uintptr_t Val = static_cast<uintptr_t>(-1); Val <<= Log2MaxAlign; return reinterpret_cast<T*>(Val); } static inline T* getTombstoneKey() { uintptr_t Val = static_cast<uintptr_t>(-2); Val <<= Log2MaxAlign; return reinterpret_cast<T*>(Val); } static unsigned getHashValue(const T *PtrVal) { return (unsigned((uintptr_t)PtrVal) >> 4) ^ (unsigned((uintptr_t)PtrVal) >> 9); } static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; } }; template<> struct DenseMapInfo<char> { static inline char getEmptyKey() { return ~0; } static inline char getTombstoneKey() { return ~0 - 1; } static unsigned getHashValue(const char& Val) { return Val * 37U; } static bool isEqual(const char &LHS, const char &RHS) { return LHS == RHS; } }; template <> struct DenseMapInfo<unsigned char> { static inline unsigned char getEmptyKey() { return ~0; } static inline unsigned char getTombstoneKey() { return ~0 - 1; } static unsigned getHashValue(const unsigned char &Val) { return Val * 37U; } static bool isEqual(const unsigned char &LHS, const unsigned char &RHS) { return LHS == RHS; } }; template <> struct DenseMapInfo<unsigned short> { static inline unsigned short getEmptyKey() { return 0xFFFF; } static inline unsigned short getTombstoneKey() { return 0xFFFF - 1; } static unsigned getHashValue(const unsigned short &Val) { return Val * 37U; } static bool isEqual(const unsigned short &LHS, const unsigned short &RHS) { return LHS == RHS; } }; template<> struct DenseMapInfo<unsigned> { static inline unsigned getEmptyKey() { return ~0U; } static inline unsigned getTombstoneKey() { return ~0U - 1; } static unsigned getHashValue(const unsigned& Val) { return Val * 37U; } static bool isEqual(const unsigned& LHS, const unsigned& RHS) { return LHS == RHS; } }; template<> struct DenseMapInfo<unsigned long> { static inline unsigned long getEmptyKey() { return ~0UL; } static inline unsigned long getTombstoneKey() { return ~0UL - 1L; } static unsigned getHashValue(const unsigned long& Val) { return (unsigned)(Val * 37UL); } static bool isEqual(const unsigned long& LHS, const unsigned long& RHS) { return LHS == RHS; } }; template<> struct DenseMapInfo<unsigned long long> { static inline unsigned long long getEmptyKey() { return ~0ULL; } static inline unsigned long long getTombstoneKey() { return ~0ULL - 1ULL; } static unsigned getHashValue(const unsigned long long& Val) { return (unsigned)(Val * 37ULL); } static bool isEqual(const unsigned long long& LHS, const unsigned long long& RHS) { return LHS == RHS; } }; template <> struct DenseMapInfo<short> { static inline short getEmptyKey() { return 0x7FFF; } static inline short getTombstoneKey() { return -0x7FFF - 1; } static unsigned getHashValue(const short &Val) { return Val * 37U; } static bool isEqual(const short &LHS, const short &RHS) { return LHS == RHS; } }; template<> struct DenseMapInfo<int> { static inline int getEmptyKey() { return 0x7fffffff; } static inline int getTombstoneKey() { return -0x7fffffff - 1; } static unsigned getHashValue(const int& Val) { return (unsigned)(Val * 37U); } static bool isEqual(const int& LHS, const int& RHS) { return LHS == RHS; } }; template<> struct DenseMapInfo<long> { static inline long getEmptyKey() { return (1UL << (sizeof(long) * 8 - 1)) - 1UL; } static inline long getTombstoneKey() { return getEmptyKey() - 1L; } static unsigned getHashValue(const long& Val) { return (unsigned)(Val * 37UL); } static bool isEqual(const long& LHS, const long& RHS) { return LHS == RHS; } }; template<> struct DenseMapInfo<long long> { static inline long long getEmptyKey() { return 0x7fffffffffffffffLL; } static inline long long getTombstoneKey() { return -0x7fffffffffffffffLL-1; } static unsigned getHashValue(const long long& Val) { return (unsigned)(Val * 37ULL); } static bool isEqual(const long long& LHS, const long long& RHS) { return LHS == RHS; } }; template<typename T, typename U> struct DenseMapInfo<std::pair<T, U>> { using Pair = std::pair<T, U>; using FirstInfo = DenseMapInfo<T>; using SecondInfo = DenseMapInfo<U>; static inline Pair getEmptyKey() { return std::make_pair(FirstInfo::getEmptyKey(), SecondInfo::getEmptyKey()); } static inline Pair getTombstoneKey() { return std::make_pair(FirstInfo::getTombstoneKey(), SecondInfo::getTombstoneKey()); } static unsigned getHashValue(const Pair& PairVal) { return detail::combineHashValue(FirstInfo::getHashValue(PairVal.first), SecondInfo::getHashValue(PairVal.second)); } static bool isEqual(const Pair &LHS, const Pair &RHS) { return FirstInfo::isEqual(LHS.first, RHS.first) && SecondInfo::isEqual(LHS.second, RHS.second); } }; template <typename... Ts> struct DenseMapInfo<std::tuple<Ts...>> { using Tuple = std::tuple<Ts...>; static inline Tuple getEmptyKey() { return Tuple(DenseMapInfo<Ts>::getEmptyKey()...); } static inline Tuple getTombstoneKey() { return Tuple(DenseMapInfo<Ts>::getTombstoneKey()...); } template <unsigned I> static unsigned getHashValueImpl(const Tuple &values, std::false_type) { using EltType = typename std::tuple_element<I, Tuple>::type; std::integral_constant<bool, I + 1 == sizeof...(Ts)> atEnd; return detail::combineHashValue( DenseMapInfo<EltType>::getHashValue(std::get<I>(values)), getHashValueImpl<I + 1>(values, atEnd)); } template <unsigned I> static unsigned getHashValueImpl(const Tuple &values, std::true_type) { return 0; } static unsigned getHashValue(const std::tuple<Ts...> &values) { std::integral_constant<bool, 0 == sizeof...(Ts)> atEnd; return getHashValueImpl<0>(values, atEnd); } template <unsigned I> static bool isEqualImpl(const Tuple &lhs, const Tuple &rhs, std::false_type) { using EltType = typename std::tuple_element<I, Tuple>::type; std::integral_constant<bool, I + 1 == sizeof...(Ts)> atEnd; return DenseMapInfo<EltType>::isEqual(std::get<I>(lhs), std::get<I>(rhs)) && isEqualImpl<I + 1>(lhs, rhs, atEnd); } template <unsigned I> static bool isEqualImpl(const Tuple &lhs, const Tuple &rhs, std::true_type) { return true; } static bool isEqual(const Tuple &lhs, const Tuple &rhs) { std::integral_constant<bool, 0 == sizeof...(Ts)> atEnd; return isEqualImpl<0>(lhs, rhs, atEnd); } }; template <> struct DenseMapInfo<StringRef> { static inline StringRef getEmptyKey() { return StringRef(reinterpret_cast<const char *>(~static_cast<uintptr_t>(0)), 0); } static inline StringRef getTombstoneKey() { return StringRef(reinterpret_cast<const char *>(~static_cast<uintptr_t>(1)), 0); } static unsigned getHashValue(StringRef Val) { (static_cast<void> (0)); (static_cast<void> (0)); return (unsigned)(hash_value(Val)); } static bool isEqual(StringRef LHS, StringRef RHS) { if (RHS.data() == getEmptyKey().data()) return LHS.data() == getEmptyKey().data(); if (RHS.data() == getTombstoneKey().data()) return LHS.data() == getTombstoneKey().data(); return LHS == RHS; } }; template <typename T> struct DenseMapInfo<ArrayRef<T>> { static inline ArrayRef<T> getEmptyKey() { return ArrayRef<T>(reinterpret_cast<const T *>(~static_cast<uintptr_t>(0)), size_t(0)); } static inline ArrayRef<T> getTombstoneKey() { return ArrayRef<T>(reinterpret_cast<const T *>(~static_cast<uintptr_t>(1)), size_t(0)); } static unsigned getHashValue(ArrayRef<T> Val) { (static_cast<void> (0)); (static_cast<void> (0)); return (unsigned)(hash_value(Val)); } static bool isEqual(ArrayRef<T> LHS, ArrayRef<T> RHS) { if (RHS.data() == getEmptyKey().data()) return LHS.data() == getEmptyKey().data(); if (RHS.data() == getTombstoneKey().data()) return LHS.data() == getTombstoneKey().data(); return LHS == RHS; } }; template <> struct DenseMapInfo<hash_code> { static inline hash_code getEmptyKey() { return hash_code(-1); } static inline hash_code getTombstoneKey() { return hash_code(-2); } static unsigned getHashValue(hash_code val) { return val; } static bool isEqual(hash_code LHS, hash_code RHS) { return LHS == RHS; } }; } # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseMap.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/EpochTracker.h" 1 # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/EpochTracker.h" namespace llvm { # 81 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/EpochTracker.h" class DebugEpochBase { public: void incrementEpoch() {} class HandleBase { public: HandleBase() = default; explicit HandleBase(const DebugEpochBase *) {} bool isHandleInSync() const { return true; } const void *getEpochAddress() const { return nullptr; } }; }; } # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseMap.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/ReverseIteration.h" 1 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/PointerLikeTypeTraits.h" 1 # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/PointerLikeTypeTraits.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/DataTypes.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/PointerLikeTypeTraits.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/PointerLikeTypeTraits.h" 2 namespace llvm { template <typename T> struct PointerLikeTypeTraits; namespace detail { template <size_t N> struct ConstantLog2 : std::integral_constant<size_t, ConstantLog2<N / 2>::value + 1> {}; template <> struct ConstantLog2<1> : std::integral_constant<size_t, 0> {}; template <typename T, typename U = void> struct HasPointerLikeTypeTraits { static const bool value = false; }; template <typename T> struct HasPointerLikeTypeTraits< T, decltype((sizeof(PointerLikeTypeTraits<T>) + sizeof(T)), void())> { static const bool value = true; }; template <typename T> struct IsPointerLike { static const bool value = HasPointerLikeTypeTraits<T>::value; }; template <typename T> struct IsPointerLike<T *> { static const bool value = true; }; } template <typename T> struct PointerLikeTypeTraits<T *> { static inline void *getAsVoidPointer(T *P) { return P; } static inline T *getFromVoidPointer(void *P) { return static_cast<T *>(P); } static constexpr int NumLowBitsAvailable = detail::ConstantLog2<alignof(T)>::value; }; template <> struct PointerLikeTypeTraits<void *> { static inline void *getAsVoidPointer(void *P) { return P; } static inline void *getFromVoidPointer(void *P) { return P; } # 75 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/PointerLikeTypeTraits.h" static constexpr int NumLowBitsAvailable = 2; }; template <typename T> struct PointerLikeTypeTraits<const T> { typedef PointerLikeTypeTraits<T> NonConst; static inline const void *getAsVoidPointer(const T P) { return NonConst::getAsVoidPointer(P); } static inline const T getFromVoidPointer(const void *P) { return NonConst::getFromVoidPointer(const_cast<void *>(P)); } static constexpr int NumLowBitsAvailable = NonConst::NumLowBitsAvailable; }; template <typename T> struct PointerLikeTypeTraits<const T *> { typedef PointerLikeTypeTraits<T *> NonConst; static inline const void *getAsVoidPointer(const T *P) { return NonConst::getAsVoidPointer(const_cast<T *>(P)); } static inline const T *getFromVoidPointer(const void *P) { return NonConst::getFromVoidPointer(const_cast<void *>(P)); } static constexpr int NumLowBitsAvailable = NonConst::NumLowBitsAvailable; }; template <> struct PointerLikeTypeTraits<uintptr_t> { static inline void *getAsVoidPointer(uintptr_t P) { return reinterpret_cast<void *>(P); } static inline uintptr_t getFromVoidPointer(void *P) { return reinterpret_cast<uintptr_t>(P); } static constexpr int NumLowBitsAvailable = 0; }; # 124 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/PointerLikeTypeTraits.h" template <int Alignment, typename FunctionPointerT> struct FunctionPointerLikeTypeTraits { static constexpr int NumLowBitsAvailable = detail::ConstantLog2<Alignment>::value; static inline void *getAsVoidPointer(FunctionPointerT P) { (static_cast<void> (0)); return reinterpret_cast<void *>(P); } static inline FunctionPointerT getFromVoidPointer(void *P) { return reinterpret_cast<FunctionPointerT>(P); } }; # 146 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/PointerLikeTypeTraits.h" template <typename ReturnT, typename... ParamTs> struct PointerLikeTypeTraits<ReturnT (*)(ParamTs...)> : FunctionPointerLikeTypeTraits<4, ReturnT (*)(ParamTs...)> {}; } # 6 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/ReverseIteration.h" 2 namespace llvm { template<class T = void *> bool shouldReverseIterate() { return false; } } # 23 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseMap.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 26 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseMap.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 3 # 28 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseMap.h" 2 namespace llvm { namespace detail { template <typename KeyT, typename ValueT> struct DenseMapPair : public std::pair<KeyT, ValueT> { using std::pair<KeyT, ValueT>::pair; KeyT &getFirst() { return std::pair<KeyT, ValueT>::first; } const KeyT &getFirst() const { return std::pair<KeyT, ValueT>::first; } ValueT &getSecond() { return std::pair<KeyT, ValueT>::second; } const ValueT &getSecond() const { return std::pair<KeyT, ValueT>::second; } }; } template <typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename Bucket = llvm::detail::DenseMapPair<KeyT, ValueT>, bool IsConst = false> class DenseMapIterator; template <typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT> class DenseMapBase : public DebugEpochBase { template <typename T> using const_arg_type_t = typename const_pointer_or_const_ref<T>::type; public: using size_type = unsigned; using key_type = KeyT; using mapped_type = ValueT; using value_type = BucketT; using iterator = DenseMapIterator<KeyT, ValueT, KeyInfoT, BucketT>; using const_iterator = DenseMapIterator<KeyT, ValueT, KeyInfoT, BucketT, true>; inline iterator begin() { if (empty()) return end(); if (shouldReverseIterate<KeyT>()) return makeIterator(getBucketsEnd() - 1, getBuckets(), *this); return makeIterator(getBuckets(), getBucketsEnd(), *this); } inline iterator end() { return makeIterator(getBucketsEnd(), getBucketsEnd(), *this, true); } inline const_iterator begin() const { if (empty()) return end(); if (shouldReverseIterate<KeyT>()) return makeConstIterator(getBucketsEnd() - 1, getBuckets(), *this); return makeConstIterator(getBuckets(), getBucketsEnd(), *this); } inline const_iterator end() const { return makeConstIterator(getBucketsEnd(), getBucketsEnd(), *this, true); } [[clang::warn_unused_result]] bool empty() const { return getNumEntries() == 0; } unsigned size() const { return getNumEntries(); } void reserve(size_type NumEntries) { auto NumBuckets = getMinBucketToReserveForEntries(NumEntries); incrementEpoch(); if (NumBuckets > getNumBuckets()) grow(NumBuckets); } void clear() { incrementEpoch(); if (getNumEntries() == 0 && getNumTombstones() == 0) return; if (getNumEntries() * 4 < getNumBuckets() && getNumBuckets() > 64) { shrink_and_clear(); return; } const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey(); if (std::is_trivially_destructible<ValueT>::value) { for (BucketT *P = getBuckets(), *E = getBucketsEnd(); P != E; ++P) P->getFirst() = EmptyKey; } else { unsigned NumEntries = getNumEntries(); for (BucketT *P = getBuckets(), *E = getBucketsEnd(); P != E; ++P) { if (!KeyInfoT::isEqual(P->getFirst(), EmptyKey)) { if (!KeyInfoT::isEqual(P->getFirst(), TombstoneKey)) { P->getSecond().~ValueT(); --NumEntries; } P->getFirst() = EmptyKey; } } (static_cast<void> (0)); } setNumEntries(0); setNumTombstones(0); } size_type count(const_arg_type_t<KeyT> Val) const { const BucketT *TheBucket; return LookupBucketFor(Val, TheBucket) ? 1 : 0; } iterator find(const_arg_type_t<KeyT> Val) { BucketT *TheBucket; if (LookupBucketFor(Val, TheBucket)) return makeIterator(TheBucket, shouldReverseIterate<KeyT>() ? getBuckets() : getBucketsEnd(), *this, true); return end(); } const_iterator find(const_arg_type_t<KeyT> Val) const { const BucketT *TheBucket; if (LookupBucketFor(Val, TheBucket)) return makeConstIterator(TheBucket, shouldReverseIterate<KeyT>() ? getBuckets() : getBucketsEnd(), *this, true); return end(); } template<class LookupKeyT> iterator find_as(const LookupKeyT &Val) { BucketT *TheBucket; if (LookupBucketFor(Val, TheBucket)) return makeIterator(TheBucket, shouldReverseIterate<KeyT>() ? getBuckets() : getBucketsEnd(), *this, true); return end(); } template<class LookupKeyT> const_iterator find_as(const LookupKeyT &Val) const { const BucketT *TheBucket; if (LookupBucketFor(Val, TheBucket)) return makeConstIterator(TheBucket, shouldReverseIterate<KeyT>() ? getBuckets() : getBucketsEnd(), *this, true); return end(); } ValueT lookup(const_arg_type_t<KeyT> Val) const { const BucketT *TheBucket; if (LookupBucketFor(Val, TheBucket)) return TheBucket->getSecond(); return ValueT(); } std::pair<iterator, bool> insert(const std::pair<KeyT, ValueT> &KV) { return try_emplace(KV.first, KV.second); } std::pair<iterator, bool> insert(std::pair<KeyT, ValueT> &&KV) { return try_emplace(std::move(KV.first), std::move(KV.second)); } template <typename... Ts> std::pair<iterator, bool> try_emplace(KeyT &&Key, Ts &&... Args) { BucketT *TheBucket; if (LookupBucketFor(Key, TheBucket)) return std::make_pair(makeIterator(TheBucket, shouldReverseIterate<KeyT>() ? getBuckets() : getBucketsEnd(), *this, true), false); TheBucket = InsertIntoBucket(TheBucket, std::move(Key), std::forward<Ts>(Args)...); return std::make_pair(makeIterator(TheBucket, shouldReverseIterate<KeyT>() ? getBuckets() : getBucketsEnd(), *this, true), true); } template <typename... Ts> std::pair<iterator, bool> try_emplace(const KeyT &Key, Ts &&... Args) { BucketT *TheBucket; if (LookupBucketFor(Key, TheBucket)) return std::make_pair(makeIterator(TheBucket, shouldReverseIterate<KeyT>() ? getBuckets() : getBucketsEnd(), *this, true), false); TheBucket = InsertIntoBucket(TheBucket, Key, std::forward<Ts>(Args)...); return std::make_pair(makeIterator(TheBucket, shouldReverseIterate<KeyT>() ? getBuckets() : getBucketsEnd(), *this, true), true); } template <typename LookupKeyT> std::pair<iterator, bool> insert_as(std::pair<KeyT, ValueT> &&KV, const LookupKeyT &Val) { BucketT *TheBucket; if (LookupBucketFor(Val, TheBucket)) return std::make_pair(makeIterator(TheBucket, shouldReverseIterate<KeyT>() ? getBuckets() : getBucketsEnd(), *this, true), false); TheBucket = InsertIntoBucketWithLookup(TheBucket, std::move(KV.first), std::move(KV.second), Val); return std::make_pair(makeIterator(TheBucket, shouldReverseIterate<KeyT>() ? getBuckets() : getBucketsEnd(), *this, true), true); } template<typename InputIt> void insert(InputIt I, InputIt E) { for (; I != E; ++I) insert(*I); } bool erase(const KeyT &Val) { BucketT *TheBucket; if (!LookupBucketFor(Val, TheBucket)) return false; TheBucket->getSecond().~ValueT(); TheBucket->getFirst() = getTombstoneKey(); decrementNumEntries(); incrementNumTombstones(); return true; } void erase(iterator I) { BucketT *TheBucket = &*I; TheBucket->getSecond().~ValueT(); TheBucket->getFirst() = getTombstoneKey(); decrementNumEntries(); incrementNumTombstones(); } value_type& FindAndConstruct(const KeyT &Key) { BucketT *TheBucket; if (LookupBucketFor(Key, TheBucket)) return *TheBucket; return *InsertIntoBucket(TheBucket, Key); } ValueT &operator[](const KeyT &Key) { return FindAndConstruct(Key).second; } value_type& FindAndConstruct(KeyT &&Key) { BucketT *TheBucket; if (LookupBucketFor(Key, TheBucket)) return *TheBucket; return *InsertIntoBucket(TheBucket, std::move(Key)); } ValueT &operator[](KeyT &&Key) { return FindAndConstruct(std::move(Key)).second; } bool isPointerIntoBucketsArray(const void *Ptr) const { return Ptr >= getBuckets() && Ptr < getBucketsEnd(); } const void *getPointerIntoBucketsArray() const { return getBuckets(); } protected: DenseMapBase() = default; void destroyAll() { if (getNumBuckets() == 0) return; const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey(); for (BucketT *P = getBuckets(), *E = getBucketsEnd(); P != E; ++P) { if (!KeyInfoT::isEqual(P->getFirst(), EmptyKey) && !KeyInfoT::isEqual(P->getFirst(), TombstoneKey)) P->getSecond().~ValueT(); P->getFirst().~KeyT(); } } void initEmpty() { setNumEntries(0); setNumTombstones(0); (static_cast<void> (0)); const KeyT EmptyKey = getEmptyKey(); for (BucketT *B = getBuckets(), *E = getBucketsEnd(); B != E; ++B) ::new (&B->getFirst()) KeyT(EmptyKey); } unsigned getMinBucketToReserveForEntries(unsigned NumEntries) { if (NumEntries == 0) return 0; return NextPowerOf2(NumEntries * 4 / 3 + 1); } void moveFromOldBuckets(BucketT *OldBucketsBegin, BucketT *OldBucketsEnd) { initEmpty(); const KeyT EmptyKey = getEmptyKey(); const KeyT TombstoneKey = getTombstoneKey(); for (BucketT *B = OldBucketsBegin, *E = OldBucketsEnd; B != E; ++B) { if (!KeyInfoT::isEqual(B->getFirst(), EmptyKey) && !KeyInfoT::isEqual(B->getFirst(), TombstoneKey)) { BucketT *DestBucket; bool FoundVal = LookupBucketFor(B->getFirst(), DestBucket); (void)FoundVal; (static_cast<void> (0)); DestBucket->getFirst() = std::move(B->getFirst()); ::new (&DestBucket->getSecond()) ValueT(std::move(B->getSecond())); incrementNumEntries(); B->getSecond().~ValueT(); } B->getFirst().~KeyT(); } } template <typename OtherBaseT> void copyFrom( const DenseMapBase<OtherBaseT, KeyT, ValueT, KeyInfoT, BucketT> &other) { (static_cast<void> (0)); (static_cast<void> (0)); setNumEntries(other.getNumEntries()); setNumTombstones(other.getNumTombstones()); if (is_trivially_copyable<KeyT>::value && is_trivially_copyable<ValueT>::value) memcpy(reinterpret_cast<void *>(getBuckets()), other.getBuckets(), getNumBuckets() * sizeof(BucketT)); else for (size_t i = 0; i < getNumBuckets(); ++i) { ::new (&getBuckets()[i].getFirst()) KeyT(other.getBuckets()[i].getFirst()); if (!KeyInfoT::isEqual(getBuckets()[i].getFirst(), getEmptyKey()) && !KeyInfoT::isEqual(getBuckets()[i].getFirst(), getTombstoneKey())) ::new (&getBuckets()[i].getSecond()) ValueT(other.getBuckets()[i].getSecond()); } } static unsigned getHashValue(const KeyT &Val) { return KeyInfoT::getHashValue(Val); } template<typename LookupKeyT> static unsigned getHashValue(const LookupKeyT &Val) { return KeyInfoT::getHashValue(Val); } static const KeyT getEmptyKey() { static_assert(std::is_base_of<DenseMapBase, DerivedT>::value, "Must pass the derived type to this template!"); return KeyInfoT::getEmptyKey(); } static const KeyT getTombstoneKey() { return KeyInfoT::getTombstoneKey(); } private: iterator makeIterator(BucketT *P, BucketT *E, DebugEpochBase &Epoch, bool NoAdvance=false) { if (shouldReverseIterate<KeyT>()) { BucketT *B = P == getBucketsEnd() ? getBuckets() : P + 1; return iterator(B, E, Epoch, NoAdvance); } return iterator(P, E, Epoch, NoAdvance); } const_iterator makeConstIterator(const BucketT *P, const BucketT *E, const DebugEpochBase &Epoch, const bool NoAdvance=false) const { if (shouldReverseIterate<KeyT>()) { const BucketT *B = P == getBucketsEnd() ? getBuckets() : P + 1; return const_iterator(B, E, Epoch, NoAdvance); } return const_iterator(P, E, Epoch, NoAdvance); } unsigned getNumEntries() const { return static_cast<const DerivedT *>(this)->getNumEntries(); } void setNumEntries(unsigned Num) { static_cast<DerivedT *>(this)->setNumEntries(Num); } void incrementNumEntries() { setNumEntries(getNumEntries() + 1); } void decrementNumEntries() { setNumEntries(getNumEntries() - 1); } unsigned getNumTombstones() const { return static_cast<const DerivedT *>(this)->getNumTombstones(); } void setNumTombstones(unsigned Num) { static_cast<DerivedT *>(this)->setNumTombstones(Num); } void incrementNumTombstones() { setNumTombstones(getNumTombstones() + 1); } void decrementNumTombstones() { setNumTombstones(getNumTombstones() - 1); } const BucketT *getBuckets() const { return static_cast<const DerivedT *>(this)->getBuckets(); } BucketT *getBuckets() { return static_cast<DerivedT *>(this)->getBuckets(); } unsigned getNumBuckets() const { return static_cast<const DerivedT *>(this)->getNumBuckets(); } BucketT *getBucketsEnd() { return getBuckets() + getNumBuckets(); } const BucketT *getBucketsEnd() const { return getBuckets() + getNumBuckets(); } void grow(unsigned AtLeast) { static_cast<DerivedT *>(this)->grow(AtLeast); } void shrink_and_clear() { static_cast<DerivedT *>(this)->shrink_and_clear(); } template <typename KeyArg, typename... ValueArgs> BucketT *InsertIntoBucket(BucketT *TheBucket, KeyArg &&Key, ValueArgs &&... Values) { TheBucket = InsertIntoBucketImpl(Key, Key, TheBucket); TheBucket->getFirst() = std::forward<KeyArg>(Key); ::new (&TheBucket->getSecond()) ValueT(std::forward<ValueArgs>(Values)...); return TheBucket; } template <typename LookupKeyT> BucketT *InsertIntoBucketWithLookup(BucketT *TheBucket, KeyT &&Key, ValueT &&Value, LookupKeyT &Lookup) { TheBucket = InsertIntoBucketImpl(Key, Lookup, TheBucket); TheBucket->getFirst() = std::move(Key); ::new (&TheBucket->getSecond()) ValueT(std::move(Value)); return TheBucket; } template <typename LookupKeyT> BucketT *InsertIntoBucketImpl(const KeyT &Key, const LookupKeyT &Lookup, BucketT *TheBucket) { incrementEpoch(); # 578 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseMap.h" unsigned NewNumEntries = getNumEntries() + 1; unsigned NumBuckets = getNumBuckets(); if (__builtin_expect((bool)(NewNumEntries * 4 >= NumBuckets * 3), false)) { this->grow(NumBuckets * 2); LookupBucketFor(Lookup, TheBucket); NumBuckets = getNumBuckets(); } else if (__builtin_expect((bool)(NumBuckets-(NewNumEntries+getNumTombstones()) <= NumBuckets/8), false)) { this->grow(NumBuckets); LookupBucketFor(Lookup, TheBucket); } (static_cast<void> (0)); incrementNumEntries(); const KeyT EmptyKey = getEmptyKey(); if (!KeyInfoT::isEqual(TheBucket->getFirst(), EmptyKey)) decrementNumTombstones(); return TheBucket; } template<typename LookupKeyT> bool LookupBucketFor(const LookupKeyT &Val, const BucketT *&FoundBucket) const { const BucketT *BucketsPtr = getBuckets(); const unsigned NumBuckets = getNumBuckets(); if (NumBuckets == 0) { FoundBucket = nullptr; return false; } const BucketT *FoundTombstone = nullptr; const KeyT EmptyKey = getEmptyKey(); const KeyT TombstoneKey = getTombstoneKey(); (static_cast<void> (0)); unsigned BucketNo = getHashValue(Val) & (NumBuckets-1); unsigned ProbeAmt = 1; while (true) { const BucketT *ThisBucket = BucketsPtr + BucketNo; if (__builtin_expect((bool)(KeyInfoT::isEqual(Val, ThisBucket->getFirst())), true)) { FoundBucket = ThisBucket; return true; } if (__builtin_expect((bool)(KeyInfoT::isEqual(ThisBucket->getFirst(), EmptyKey)), true)) { FoundBucket = FoundTombstone ? FoundTombstone : ThisBucket; return false; } if (KeyInfoT::isEqual(ThisBucket->getFirst(), TombstoneKey) && !FoundTombstone) FoundTombstone = ThisBucket; BucketNo += ProbeAmt++; BucketNo &= (NumBuckets-1); } } template <typename LookupKeyT> bool LookupBucketFor(const LookupKeyT &Val, BucketT *&FoundBucket) { const BucketT *ConstFoundBucket; bool Result = const_cast<const DenseMapBase *>(this) ->LookupBucketFor(Val, ConstFoundBucket); FoundBucket = const_cast<BucketT *>(ConstFoundBucket); return Result; } public: size_t getMemorySize() const { return getNumBuckets() * sizeof(BucketT); } }; template <typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT> bool operator==( const DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT> &LHS, const DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT> &RHS) { if (LHS.size() != RHS.size()) return false; for (auto &KV : LHS) { auto I = RHS.find(KV.first); if (I == RHS.end() || I->second != KV.second) return false; } return true; } template <typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT> bool operator!=( const DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT> &LHS, const DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT> &RHS) { return !(LHS == RHS); } template <typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>> class DenseMap : public DenseMapBase<DenseMap<KeyT, ValueT, KeyInfoT, BucketT>, KeyT, ValueT, KeyInfoT, BucketT> { friend class DenseMapBase<DenseMap, KeyT, ValueT, KeyInfoT, BucketT>; using BaseT = DenseMapBase<DenseMap, KeyT, ValueT, KeyInfoT, BucketT>; BucketT *Buckets; unsigned NumEntries; unsigned NumTombstones; unsigned NumBuckets; public: explicit DenseMap(unsigned InitialReserve = 0) { init(InitialReserve); } DenseMap(const DenseMap &other) : BaseT() { init(0); copyFrom(other); } DenseMap(DenseMap &&other) : BaseT() { init(0); swap(other); } template<typename InputIt> DenseMap(const InputIt &I, const InputIt &E) { init(std::distance(I, E)); this->insert(I, E); } DenseMap(std::initializer_list<typename BaseT::value_type> Vals) { init(Vals.size()); this->insert(Vals.begin(), Vals.end()); } ~DenseMap() { this->destroyAll(); deallocate_buffer(Buckets, sizeof(BucketT) * NumBuckets, alignof(BucketT)); } void swap(DenseMap& RHS) { this->incrementEpoch(); RHS.incrementEpoch(); std::swap(Buckets, RHS.Buckets); std::swap(NumEntries, RHS.NumEntries); std::swap(NumTombstones, RHS.NumTombstones); std::swap(NumBuckets, RHS.NumBuckets); } DenseMap& operator=(const DenseMap& other) { if (&other != this) copyFrom(other); return *this; } DenseMap& operator=(DenseMap &&other) { this->destroyAll(); deallocate_buffer(Buckets, sizeof(BucketT) * NumBuckets, alignof(BucketT)); init(0); swap(other); return *this; } void copyFrom(const DenseMap& other) { this->destroyAll(); deallocate_buffer(Buckets, sizeof(BucketT) * NumBuckets, alignof(BucketT)); if (allocateBuckets(other.NumBuckets)) { this->BaseT::copyFrom(other); } else { NumEntries = 0; NumTombstones = 0; } } void init(unsigned InitNumEntries) { auto InitBuckets = BaseT::getMinBucketToReserveForEntries(InitNumEntries); if (allocateBuckets(InitBuckets)) { this->BaseT::initEmpty(); } else { NumEntries = 0; NumTombstones = 0; } } void grow(unsigned AtLeast) { unsigned OldNumBuckets = NumBuckets; BucketT *OldBuckets = Buckets; allocateBuckets(std::max<unsigned>(64, static_cast<unsigned>(NextPowerOf2(AtLeast-1)))); (static_cast<void> (0)); if (!OldBuckets) { this->BaseT::initEmpty(); return; } this->moveFromOldBuckets(OldBuckets, OldBuckets+OldNumBuckets); deallocate_buffer(OldBuckets, sizeof(BucketT) * OldNumBuckets, alignof(BucketT)); } void shrink_and_clear() { unsigned OldNumBuckets = NumBuckets; unsigned OldNumEntries = NumEntries; this->destroyAll(); unsigned NewNumBuckets = 0; if (OldNumEntries) NewNumBuckets = std::max(64, 1 << (Log2_32_Ceil(OldNumEntries) + 1)); if (NewNumBuckets == NumBuckets) { this->BaseT::initEmpty(); return; } deallocate_buffer(Buckets, sizeof(BucketT) * OldNumBuckets, alignof(BucketT)); init(NewNumBuckets); } private: unsigned getNumEntries() const { return NumEntries; } void setNumEntries(unsigned Num) { NumEntries = Num; } unsigned getNumTombstones() const { return NumTombstones; } void setNumTombstones(unsigned Num) { NumTombstones = Num; } BucketT *getBuckets() const { return Buckets; } unsigned getNumBuckets() const { return NumBuckets; } bool allocateBuckets(unsigned Num) { NumBuckets = Num; if (NumBuckets == 0) { Buckets = nullptr; return false; } Buckets = static_cast<BucketT *>( allocate_buffer(sizeof(BucketT) * NumBuckets, alignof(BucketT))); return true; } }; template <typename KeyT, typename ValueT, unsigned InlineBuckets = 4, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>> class SmallDenseMap : public DenseMapBase< SmallDenseMap<KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT>, KeyT, ValueT, KeyInfoT, BucketT> { friend class DenseMapBase<SmallDenseMap, KeyT, ValueT, KeyInfoT, BucketT>; using BaseT = DenseMapBase<SmallDenseMap, KeyT, ValueT, KeyInfoT, BucketT>; static_assert(isPowerOf2_64(InlineBuckets), "InlineBuckets must be a power of 2."); unsigned Small : 1; unsigned NumEntries : 31; unsigned NumTombstones; struct LargeRep { BucketT *Buckets; unsigned NumBuckets; }; AlignedCharArrayUnion<BucketT[InlineBuckets], LargeRep> storage; public: explicit SmallDenseMap(unsigned NumInitBuckets = 0) { init(NumInitBuckets); } SmallDenseMap(const SmallDenseMap &other) : BaseT() { init(0); copyFrom(other); } SmallDenseMap(SmallDenseMap &&other) : BaseT() { init(0); swap(other); } template<typename InputIt> SmallDenseMap(const InputIt &I, const InputIt &E) { init(NextPowerOf2(std::distance(I, E))); this->insert(I, E); } ~SmallDenseMap() { this->destroyAll(); deallocateBuckets(); } void swap(SmallDenseMap& RHS) { unsigned TmpNumEntries = RHS.NumEntries; RHS.NumEntries = NumEntries; NumEntries = TmpNumEntries; std::swap(NumTombstones, RHS.NumTombstones); const KeyT EmptyKey = this->getEmptyKey(); const KeyT TombstoneKey = this->getTombstoneKey(); if (Small && RHS.Small) { for (unsigned i = 0, e = InlineBuckets; i != e; ++i) { BucketT *LHSB = &getInlineBuckets()[i], *RHSB = &RHS.getInlineBuckets()[i]; bool hasLHSValue = (!KeyInfoT::isEqual(LHSB->getFirst(), EmptyKey) && !KeyInfoT::isEqual(LHSB->getFirst(), TombstoneKey)); bool hasRHSValue = (!KeyInfoT::isEqual(RHSB->getFirst(), EmptyKey) && !KeyInfoT::isEqual(RHSB->getFirst(), TombstoneKey)); if (hasLHSValue && hasRHSValue) { std::swap(*LHSB, *RHSB); continue; } std::swap(LHSB->getFirst(), RHSB->getFirst()); if (hasLHSValue) { ::new (&RHSB->getSecond()) ValueT(std::move(LHSB->getSecond())); LHSB->getSecond().~ValueT(); } else if (hasRHSValue) { ::new (&LHSB->getSecond()) ValueT(std::move(RHSB->getSecond())); RHSB->getSecond().~ValueT(); } } return; } if (!Small && !RHS.Small) { std::swap(getLargeRep()->Buckets, RHS.getLargeRep()->Buckets); std::swap(getLargeRep()->NumBuckets, RHS.getLargeRep()->NumBuckets); return; } SmallDenseMap &SmallSide = Small ? *this : RHS; SmallDenseMap &LargeSide = Small ? RHS : *this; LargeRep TmpRep = std::move(*LargeSide.getLargeRep()); LargeSide.getLargeRep()->~LargeRep(); LargeSide.Small = true; for (unsigned i = 0, e = InlineBuckets; i != e; ++i) { BucketT *NewB = &LargeSide.getInlineBuckets()[i], *OldB = &SmallSide.getInlineBuckets()[i]; ::new (&NewB->getFirst()) KeyT(std::move(OldB->getFirst())); OldB->getFirst().~KeyT(); if (!KeyInfoT::isEqual(NewB->getFirst(), EmptyKey) && !KeyInfoT::isEqual(NewB->getFirst(), TombstoneKey)) { ::new (&NewB->getSecond()) ValueT(std::move(OldB->getSecond())); OldB->getSecond().~ValueT(); } } SmallSide.Small = false; new (SmallSide.getLargeRep()) LargeRep(std::move(TmpRep)); } SmallDenseMap& operator=(const SmallDenseMap& other) { if (&other != this) copyFrom(other); return *this; } SmallDenseMap& operator=(SmallDenseMap &&other) { this->destroyAll(); deallocateBuckets(); init(0); swap(other); return *this; } void copyFrom(const SmallDenseMap& other) { this->destroyAll(); deallocateBuckets(); Small = true; if (other.getNumBuckets() > InlineBuckets) { Small = false; new (getLargeRep()) LargeRep(allocateBuckets(other.getNumBuckets())); } this->BaseT::copyFrom(other); } void init(unsigned InitBuckets) { Small = true; if (InitBuckets > InlineBuckets) { Small = false; new (getLargeRep()) LargeRep(allocateBuckets(InitBuckets)); } this->BaseT::initEmpty(); } void grow(unsigned AtLeast) { if (AtLeast > InlineBuckets) AtLeast = std::max<unsigned>(64, NextPowerOf2(AtLeast-1)); if (Small) { AlignedCharArrayUnion<BucketT[InlineBuckets]> TmpStorage; BucketT *TmpBegin = reinterpret_cast<BucketT *>(TmpStorage.buffer); BucketT *TmpEnd = TmpBegin; const KeyT EmptyKey = this->getEmptyKey(); const KeyT TombstoneKey = this->getTombstoneKey(); for (BucketT *P = getBuckets(), *E = P + InlineBuckets; P != E; ++P) { if (!KeyInfoT::isEqual(P->getFirst(), EmptyKey) && !KeyInfoT::isEqual(P->getFirst(), TombstoneKey)) { (static_cast<void> (0)); ::new (&TmpEnd->getFirst()) KeyT(std::move(P->getFirst())); ::new (&TmpEnd->getSecond()) ValueT(std::move(P->getSecond())); ++TmpEnd; P->getSecond().~ValueT(); } P->getFirst().~KeyT(); } if (AtLeast > InlineBuckets) { Small = false; new (getLargeRep()) LargeRep(allocateBuckets(AtLeast)); } this->moveFromOldBuckets(TmpBegin, TmpEnd); return; } LargeRep OldRep = std::move(*getLargeRep()); getLargeRep()->~LargeRep(); if (AtLeast <= InlineBuckets) { Small = true; } else { new (getLargeRep()) LargeRep(allocateBuckets(AtLeast)); } this->moveFromOldBuckets(OldRep.Buckets, OldRep.Buckets+OldRep.NumBuckets); deallocate_buffer(OldRep.Buckets, sizeof(BucketT) * OldRep.NumBuckets, alignof(BucketT)); } void shrink_and_clear() { unsigned OldSize = this->size(); this->destroyAll(); unsigned NewNumBuckets = 0; if (OldSize) { NewNumBuckets = 1 << (Log2_32_Ceil(OldSize) + 1); if (NewNumBuckets > InlineBuckets && NewNumBuckets < 64u) NewNumBuckets = 64; } if ((Small && NewNumBuckets <= InlineBuckets) || (!Small && NewNumBuckets == getLargeRep()->NumBuckets)) { this->BaseT::initEmpty(); return; } deallocateBuckets(); init(NewNumBuckets); } private: unsigned getNumEntries() const { return NumEntries; } void setNumEntries(unsigned Num) { (static_cast<void> (0)); NumEntries = Num; } unsigned getNumTombstones() const { return NumTombstones; } void setNumTombstones(unsigned Num) { NumTombstones = Num; } const BucketT *getInlineBuckets() const { (static_cast<void> (0)); return reinterpret_cast<const BucketT *>(storage.buffer); } BucketT *getInlineBuckets() { return const_cast<BucketT *>( const_cast<const SmallDenseMap *>(this)->getInlineBuckets()); } const LargeRep *getLargeRep() const { (static_cast<void> (0)); return reinterpret_cast<const LargeRep *>(storage.buffer); } LargeRep *getLargeRep() { return const_cast<LargeRep *>( const_cast<const SmallDenseMap *>(this)->getLargeRep()); } const BucketT *getBuckets() const { return Small ? getInlineBuckets() : getLargeRep()->Buckets; } BucketT *getBuckets() { return const_cast<BucketT *>( const_cast<const SmallDenseMap *>(this)->getBuckets()); } unsigned getNumBuckets() const { return Small ? InlineBuckets : getLargeRep()->NumBuckets; } void deallocateBuckets() { if (Small) return; deallocate_buffer(getLargeRep()->Buckets, sizeof(BucketT) * getLargeRep()->NumBuckets, alignof(BucketT)); getLargeRep()->~LargeRep(); } LargeRep allocateBuckets(unsigned Num) { (static_cast<void> (0)); LargeRep Rep = {static_cast<BucketT *>(allocate_buffer( sizeof(BucketT) * Num, alignof(BucketT))), Num}; return Rep; } }; template <typename KeyT, typename ValueT, typename KeyInfoT, typename Bucket, bool IsConst> class DenseMapIterator : DebugEpochBase::HandleBase { friend class DenseMapIterator<KeyT, ValueT, KeyInfoT, Bucket, true>; friend class DenseMapIterator<KeyT, ValueT, KeyInfoT, Bucket, false>; using ConstIterator = DenseMapIterator<KeyT, ValueT, KeyInfoT, Bucket, true>; public: using difference_type = ptrdiff_t; using value_type = typename std::conditional<IsConst, const Bucket, Bucket>::type; using pointer = value_type *; using reference = value_type &; using iterator_category = std::forward_iterator_tag; private: pointer Ptr = nullptr; pointer End = nullptr; public: DenseMapIterator() = default; DenseMapIterator(pointer Pos, pointer E, const DebugEpochBase &Epoch, bool NoAdvance = false) : DebugEpochBase::HandleBase(&Epoch), Ptr(Pos), End(E) { (static_cast<void> (0)); if (NoAdvance) return; if (shouldReverseIterate<KeyT>()) { RetreatPastEmptyBuckets(); return; } AdvancePastEmptyBuckets(); } template <bool IsConstSrc, typename = std::enable_if_t<!IsConstSrc && IsConst>> DenseMapIterator( const DenseMapIterator<KeyT, ValueT, KeyInfoT, Bucket, IsConstSrc> &I) : DebugEpochBase::HandleBase(I), Ptr(I.Ptr), End(I.End) {} reference operator*() const { (static_cast<void> (0)); (static_cast<void> (0)); if (shouldReverseIterate<KeyT>()) return Ptr[-1]; return *Ptr; } pointer operator->() const { (static_cast<void> (0)); (static_cast<void> (0)); if (shouldReverseIterate<KeyT>()) return &(Ptr[-1]); return Ptr; } bool operator==(const ConstIterator &RHS) const { (static_cast<void> (0)); (static_cast<void> (0)); (static_cast<void> (0)); return Ptr == RHS.Ptr; } bool operator!=(const ConstIterator &RHS) const { (static_cast<void> (0)); (static_cast<void> (0)); (static_cast<void> (0)); return Ptr != RHS.Ptr; } inline DenseMapIterator& operator++() { (static_cast<void> (0)); (static_cast<void> (0)); if (shouldReverseIterate<KeyT>()) { --Ptr; RetreatPastEmptyBuckets(); return *this; } ++Ptr; AdvancePastEmptyBuckets(); return *this; } DenseMapIterator operator++(int) { (static_cast<void> (0)); DenseMapIterator tmp = *this; ++*this; return tmp; } private: void AdvancePastEmptyBuckets() { (static_cast<void> (0)); const KeyT Empty = KeyInfoT::getEmptyKey(); const KeyT Tombstone = KeyInfoT::getTombstoneKey(); while (Ptr != End && (KeyInfoT::isEqual(Ptr->getFirst(), Empty) || KeyInfoT::isEqual(Ptr->getFirst(), Tombstone))) ++Ptr; } void RetreatPastEmptyBuckets() { (static_cast<void> (0)); const KeyT Empty = KeyInfoT::getEmptyKey(); const KeyT Tombstone = KeyInfoT::getTombstoneKey(); while (Ptr != End && (KeyInfoT::isEqual(Ptr[-1].getFirst(), Empty) || KeyInfoT::isEqual(Ptr[-1].getFirst(), Tombstone))) --Ptr; } }; template <typename KeyT, typename ValueT, typename KeyInfoT> inline size_t capacity_in_bytes(const DenseMap<KeyT, ValueT, KeyInfoT> &X) { return X.getMemorySize(); } } # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/UniqueVector.h" 1 # 12 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/UniqueVector.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 13 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/UniqueVector.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/map" 1 3 # 59 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/map" 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h" 1 3 # 62 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h" 3 # 75 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 99 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h" 3 enum _Rb_tree_color { _S_red = false, _S_black = true }; struct _Rb_tree_node_base { typedef _Rb_tree_node_base* _Base_ptr; typedef const _Rb_tree_node_base* _Const_Base_ptr; _Rb_tree_color _M_color; _Base_ptr _M_parent; _Base_ptr _M_left; _Base_ptr _M_right; static _Base_ptr _S_minimum(_Base_ptr __x) noexcept { while (__x->_M_left != 0) __x = __x->_M_left; return __x; } static _Const_Base_ptr _S_minimum(_Const_Base_ptr __x) noexcept { while (__x->_M_left != 0) __x = __x->_M_left; return __x; } static _Base_ptr _S_maximum(_Base_ptr __x) noexcept { while (__x->_M_right != 0) __x = __x->_M_right; return __x; } static _Const_Base_ptr _S_maximum(_Const_Base_ptr __x) noexcept { while (__x->_M_right != 0) __x = __x->_M_right; return __x; } }; template<typename _Key_compare> struct _Rb_tree_key_compare { _Key_compare _M_key_compare; _Rb_tree_key_compare() noexcept(is_nothrow_default_constructible<_Key_compare>::value) : _M_key_compare() { } _Rb_tree_key_compare(const _Key_compare& __comp) : _M_key_compare(__comp) { } _Rb_tree_key_compare(const _Rb_tree_key_compare&) = default; _Rb_tree_key_compare(_Rb_tree_key_compare&& __x) noexcept(is_nothrow_copy_constructible<_Key_compare>::value) : _M_key_compare(__x._M_key_compare) { } }; struct _Rb_tree_header { _Rb_tree_node_base _M_header; size_t _M_node_count; _Rb_tree_header() noexcept { _M_header._M_color = _S_red; _M_reset(); } _Rb_tree_header(_Rb_tree_header&& __x) noexcept { if (__x._M_header._M_parent != nullptr) _M_move_data(__x); else { _M_header._M_color = _S_red; _M_reset(); } } void _M_move_data(_Rb_tree_header& __from) { _M_header._M_color = __from._M_header._M_color; _M_header._M_parent = __from._M_header._M_parent; _M_header._M_left = __from._M_header._M_left; _M_header._M_right = __from._M_header._M_right; _M_header._M_parent->_M_parent = &_M_header; _M_node_count = __from._M_node_count; __from._M_reset(); } void _M_reset() { _M_header._M_parent = 0; _M_header._M_left = &_M_header; _M_header._M_right = &_M_header; _M_node_count = 0; } }; template<typename _Val> struct _Rb_tree_node : public _Rb_tree_node_base { typedef _Rb_tree_node<_Val>* _Link_type; # 231 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h" 3 __gnu_cxx::__aligned_membuf<_Val> _M_storage; _Val* _M_valptr() { return _M_storage._M_ptr(); } const _Val* _M_valptr() const { return _M_storage._M_ptr(); } }; __attribute__ ((__pure__)) _Rb_tree_node_base* _Rb_tree_increment(_Rb_tree_node_base* __x) throw (); __attribute__ ((__pure__)) const _Rb_tree_node_base* _Rb_tree_increment(const _Rb_tree_node_base* __x) throw (); __attribute__ ((__pure__)) _Rb_tree_node_base* _Rb_tree_decrement(_Rb_tree_node_base* __x) throw (); __attribute__ ((__pure__)) const _Rb_tree_node_base* _Rb_tree_decrement(const _Rb_tree_node_base* __x) throw (); template<typename _Tp> struct _Rb_tree_iterator { typedef _Tp value_type; typedef _Tp& reference; typedef _Tp* pointer; typedef bidirectional_iterator_tag iterator_category; typedef ptrdiff_t difference_type; typedef _Rb_tree_iterator<_Tp> _Self; typedef _Rb_tree_node_base::_Base_ptr _Base_ptr; typedef _Rb_tree_node<_Tp>* _Link_type; _Rb_tree_iterator() noexcept : _M_node() { } explicit _Rb_tree_iterator(_Base_ptr __x) noexcept : _M_node(__x) { } reference operator*() const noexcept { return *static_cast<_Link_type>(_M_node)->_M_valptr(); } pointer operator->() const noexcept { return static_cast<_Link_type> (_M_node)->_M_valptr(); } _Self& operator++() noexcept { _M_node = _Rb_tree_increment(_M_node); return *this; } _Self operator++(int) noexcept { _Self __tmp = *this; _M_node = _Rb_tree_increment(_M_node); return __tmp; } _Self& operator--() noexcept { _M_node = _Rb_tree_decrement(_M_node); return *this; } _Self operator--(int) noexcept { _Self __tmp = *this; _M_node = _Rb_tree_decrement(_M_node); return __tmp; } bool operator==(const _Self& __x) const noexcept { return _M_node == __x._M_node; } bool operator!=(const _Self& __x) const noexcept { return _M_node != __x._M_node; } _Base_ptr _M_node; }; template<typename _Tp> struct _Rb_tree_const_iterator { typedef _Tp value_type; typedef const _Tp& reference; typedef const _Tp* pointer; typedef _Rb_tree_iterator<_Tp> iterator; typedef bidirectional_iterator_tag iterator_category; typedef ptrdiff_t difference_type; typedef _Rb_tree_const_iterator<_Tp> _Self; typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr; typedef const _Rb_tree_node<_Tp>* _Link_type; _Rb_tree_const_iterator() noexcept : _M_node() { } explicit _Rb_tree_const_iterator(_Base_ptr __x) noexcept : _M_node(__x) { } _Rb_tree_const_iterator(const iterator& __it) noexcept : _M_node(__it._M_node) { } iterator _M_const_cast() const noexcept { return iterator(const_cast<typename iterator::_Base_ptr>(_M_node)); } reference operator*() const noexcept { return *static_cast<_Link_type>(_M_node)->_M_valptr(); } pointer operator->() const noexcept { return static_cast<_Link_type>(_M_node)->_M_valptr(); } _Self& operator++() noexcept { _M_node = _Rb_tree_increment(_M_node); return *this; } _Self operator++(int) noexcept { _Self __tmp = *this; _M_node = _Rb_tree_increment(_M_node); return __tmp; } _Self& operator--() noexcept { _M_node = _Rb_tree_decrement(_M_node); return *this; } _Self operator--(int) noexcept { _Self __tmp = *this; _M_node = _Rb_tree_decrement(_M_node); return __tmp; } bool operator==(const _Self& __x) const noexcept { return _M_node == __x._M_node; } bool operator!=(const _Self& __x) const noexcept { return _M_node != __x._M_node; } _Base_ptr _M_node; }; template<typename _Val> inline bool operator==(const _Rb_tree_iterator<_Val>& __x, const _Rb_tree_const_iterator<_Val>& __y) noexcept { return __x._M_node == __y._M_node; } template<typename _Val> inline bool operator!=(const _Rb_tree_iterator<_Val>& __x, const _Rb_tree_const_iterator<_Val>& __y) noexcept { return __x._M_node != __y._M_node; } void _Rb_tree_insert_and_rebalance(const bool __insert_left, _Rb_tree_node_base* __x, _Rb_tree_node_base* __p, _Rb_tree_node_base& __header) throw (); _Rb_tree_node_base* _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, _Rb_tree_node_base& __header) throw (); template<typename _Cmp, typename _SfinaeType, typename = __void_t<>> struct __has_is_transparent { }; template<typename _Cmp, typename _SfinaeType> struct __has_is_transparent<_Cmp, _SfinaeType, __void_t<typename _Cmp::is_transparent>> { typedef void type; }; template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc = allocator<_Val> > class _Rb_tree { typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Rb_tree_node<_Val> >::other _Node_allocator; typedef __gnu_cxx::__alloc_traits<_Node_allocator> _Alloc_traits; static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{}, "comparison object must be invocable with two arguments of key type"); # 462 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h" 3 protected: typedef _Rb_tree_node_base* _Base_ptr; typedef const _Rb_tree_node_base* _Const_Base_ptr; typedef _Rb_tree_node<_Val>* _Link_type; typedef const _Rb_tree_node<_Val>* _Const_Link_type; private: struct _Reuse_or_alloc_node { _Reuse_or_alloc_node(_Rb_tree& __t) : _M_root(__t._M_root()), _M_nodes(__t._M_rightmost()), _M_t(__t) { if (_M_root) { _M_root->_M_parent = 0; if (_M_nodes->_M_left) _M_nodes = _M_nodes->_M_left; } else _M_nodes = 0; } _Reuse_or_alloc_node(const _Reuse_or_alloc_node&) = delete; ~_Reuse_or_alloc_node() { _M_t._M_erase(static_cast<_Link_type>(_M_root)); } template<typename _Arg> _Link_type operator()(_Arg&& __arg) { _Link_type __node = static_cast<_Link_type>(_M_extract()); if (__node) { _M_t._M_destroy_node(__node); _M_t._M_construct_node(__node, std::forward<_Arg>(__arg)); return __node; } return _M_t._M_create_node(std::forward<_Arg>(__arg)); } private: _Base_ptr _M_extract() { if (!_M_nodes) return _M_nodes; _Base_ptr __node = _M_nodes; _M_nodes = _M_nodes->_M_parent; if (_M_nodes) { if (_M_nodes->_M_right == __node) { _M_nodes->_M_right = 0; if (_M_nodes->_M_left) { _M_nodes = _M_nodes->_M_left; while (_M_nodes->_M_right) _M_nodes = _M_nodes->_M_right; if (_M_nodes->_M_left) _M_nodes = _M_nodes->_M_left; } } else _M_nodes->_M_left = 0; } else _M_root = 0; return __node; } _Base_ptr _M_root; _Base_ptr _M_nodes; _Rb_tree& _M_t; }; struct _Alloc_node { _Alloc_node(_Rb_tree& __t) : _M_t(__t) { } template<typename _Arg> _Link_type operator()(_Arg&& __arg) const { return _M_t._M_create_node(std::forward<_Arg>(__arg)); } private: _Rb_tree& _M_t; }; public: typedef _Key key_type; typedef _Val value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Alloc allocator_type; _Node_allocator& _M_get_Node_allocator() noexcept { return this->_M_impl; } const _Node_allocator& _M_get_Node_allocator() const noexcept { return this->_M_impl; } allocator_type get_allocator() const noexcept { return allocator_type(_M_get_Node_allocator()); } protected: _Link_type _M_get_node() { return _Alloc_traits::allocate(_M_get_Node_allocator(), 1); } void _M_put_node(_Link_type __p) noexcept { _Alloc_traits::deallocate(_M_get_Node_allocator(), __p, 1); } # 630 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h" 3 template<typename... _Args> void _M_construct_node(_Link_type __node, _Args&&... __args) { if (true) { ::new(__node) _Rb_tree_node<_Val>; _Alloc_traits::construct(_M_get_Node_allocator(), __node->_M_valptr(), std::forward<_Args>(__args)...); } if (false) { __node->~_Rb_tree_node<_Val>(); _M_put_node(__node); ; } } template<typename... _Args> _Link_type _M_create_node(_Args&&... __args) { _Link_type __tmp = _M_get_node(); _M_construct_node(__tmp, std::forward<_Args>(__args)...); return __tmp; } void _M_destroy_node(_Link_type __p) noexcept { _Alloc_traits::destroy(_M_get_Node_allocator(), __p->_M_valptr()); __p->~_Rb_tree_node<_Val>(); } void _M_drop_node(_Link_type __p) noexcept { _M_destroy_node(__p); _M_put_node(__p); } template<typename _NodeGen> _Link_type _M_clone_node(_Const_Link_type __x, _NodeGen& __node_gen) { _Link_type __tmp = __node_gen(*__x->_M_valptr()); __tmp->_M_color = __x->_M_color; __tmp->_M_left = 0; __tmp->_M_right = 0; return __tmp; } protected: template<typename _Key_compare, bool = __is_pod(_Key_compare)> struct _Rb_tree_impl : public _Node_allocator , public _Rb_tree_key_compare<_Key_compare> , public _Rb_tree_header { typedef _Rb_tree_key_compare<_Key_compare> _Base_key_compare; _Rb_tree_impl() noexcept(is_nothrow_default_constructible<_Node_allocator>::value && is_nothrow_default_constructible<_Base_key_compare>::value) : _Node_allocator() { } _Rb_tree_impl(const _Rb_tree_impl& __x) : _Node_allocator(_Alloc_traits::_S_select_on_copy(__x)) , _Base_key_compare(__x._M_key_compare) { } _Rb_tree_impl(_Rb_tree_impl&&) = default; _Rb_tree_impl(const _Key_compare& __comp, _Node_allocator&& __a) : _Node_allocator(std::move(__a)), _Base_key_compare(__comp) { } }; _Rb_tree_impl<_Compare> _M_impl; protected: _Base_ptr& _M_root() noexcept { return this->_M_impl._M_header._M_parent; } _Const_Base_ptr _M_root() const noexcept { return this->_M_impl._M_header._M_parent; } _Base_ptr& _M_leftmost() noexcept { return this->_M_impl._M_header._M_left; } _Const_Base_ptr _M_leftmost() const noexcept { return this->_M_impl._M_header._M_left; } _Base_ptr& _M_rightmost() noexcept { return this->_M_impl._M_header._M_right; } _Const_Base_ptr _M_rightmost() const noexcept { return this->_M_impl._M_header._M_right; } _Link_type _M_begin() noexcept { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } _Const_Link_type _M_begin() const noexcept { return static_cast<_Const_Link_type> (this->_M_impl._M_header._M_parent); } _Base_ptr _M_end() noexcept { return &this->_M_impl._M_header; } _Const_Base_ptr _M_end() const noexcept { return &this->_M_impl._M_header; } static const_reference _S_value(_Const_Link_type __x) { return *__x->_M_valptr(); } static const _Key& _S_key(_Const_Link_type __x) { return _KeyOfValue()(_S_value(__x)); } static _Link_type _S_left(_Base_ptr __x) noexcept { return static_cast<_Link_type>(__x->_M_left); } static _Const_Link_type _S_left(_Const_Base_ptr __x) noexcept { return static_cast<_Const_Link_type>(__x->_M_left); } static _Link_type _S_right(_Base_ptr __x) noexcept { return static_cast<_Link_type>(__x->_M_right); } static _Const_Link_type _S_right(_Const_Base_ptr __x) noexcept { return static_cast<_Const_Link_type>(__x->_M_right); } static const_reference _S_value(_Const_Base_ptr __x) { return *static_cast<_Const_Link_type>(__x)->_M_valptr(); } static const _Key& _S_key(_Const_Base_ptr __x) { return _KeyOfValue()(_S_value(__x)); } static _Base_ptr _S_minimum(_Base_ptr __x) noexcept { return _Rb_tree_node_base::_S_minimum(__x); } static _Const_Base_ptr _S_minimum(_Const_Base_ptr __x) noexcept { return _Rb_tree_node_base::_S_minimum(__x); } static _Base_ptr _S_maximum(_Base_ptr __x) noexcept { return _Rb_tree_node_base::_S_maximum(__x); } static _Const_Base_ptr _S_maximum(_Const_Base_ptr __x) noexcept { return _Rb_tree_node_base::_S_maximum(__x); } public: typedef _Rb_tree_iterator<value_type> iterator; typedef _Rb_tree_const_iterator<value_type> const_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; # 832 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h" 3 pair<_Base_ptr, _Base_ptr> _M_get_insert_unique_pos(const key_type& __k); pair<_Base_ptr, _Base_ptr> _M_get_insert_equal_pos(const key_type& __k); pair<_Base_ptr, _Base_ptr> _M_get_insert_hint_unique_pos(const_iterator __pos, const key_type& __k); pair<_Base_ptr, _Base_ptr> _M_get_insert_hint_equal_pos(const_iterator __pos, const key_type& __k); private: template<typename _Arg, typename _NodeGen> iterator _M_insert_(_Base_ptr __x, _Base_ptr __y, _Arg&& __v, _NodeGen&); iterator _M_insert_node(_Base_ptr __x, _Base_ptr __y, _Link_type __z); template<typename _Arg> iterator _M_insert_lower(_Base_ptr __y, _Arg&& __v); template<typename _Arg> iterator _M_insert_equal_lower(_Arg&& __x); iterator _M_insert_lower_node(_Base_ptr __p, _Link_type __z); iterator _M_insert_equal_lower_node(_Link_type __z); # 883 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h" 3 template<typename _NodeGen> _Link_type _M_copy(_Const_Link_type __x, _Base_ptr __p, _NodeGen&); template<typename _NodeGen> _Link_type _M_copy(const _Rb_tree& __x, _NodeGen& __gen) { _Link_type __root = _M_copy(__x._M_begin(), _M_end(), __gen); _M_leftmost() = _S_minimum(__root); _M_rightmost() = _S_maximum(__root); _M_impl._M_node_count = __x._M_impl._M_node_count; return __root; } _Link_type _M_copy(const _Rb_tree& __x) { _Alloc_node __an(*this); return _M_copy(__x, __an); } void _M_erase(_Link_type __x); iterator _M_lower_bound(_Link_type __x, _Base_ptr __y, const _Key& __k); const_iterator _M_lower_bound(_Const_Link_type __x, _Const_Base_ptr __y, const _Key& __k) const; iterator _M_upper_bound(_Link_type __x, _Base_ptr __y, const _Key& __k); const_iterator _M_upper_bound(_Const_Link_type __x, _Const_Base_ptr __y, const _Key& __k) const; public: _Rb_tree() = default; _Rb_tree(const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_impl(__comp, _Node_allocator(__a)) { } _Rb_tree(const _Rb_tree& __x) : _M_impl(__x._M_impl) { if (__x._M_root() != 0) _M_root() = _M_copy(__x); } _Rb_tree(const allocator_type& __a) : _M_impl(_Compare(), _Node_allocator(__a)) { } _Rb_tree(const _Rb_tree& __x, const allocator_type& __a) : _M_impl(__x._M_impl._M_key_compare, _Node_allocator(__a)) { if (__x._M_root() != nullptr) _M_root() = _M_copy(__x); } _Rb_tree(_Rb_tree&&) = default; _Rb_tree(_Rb_tree&& __x, const allocator_type& __a) : _Rb_tree(std::move(__x), _Node_allocator(__a)) { } _Rb_tree(_Rb_tree&& __x, _Node_allocator&& __a); ~_Rb_tree() noexcept { _M_erase(_M_begin()); } _Rb_tree& operator=(const _Rb_tree& __x); _Compare key_comp() const { return _M_impl._M_key_compare; } iterator begin() noexcept { return iterator(this->_M_impl._M_header._M_left); } const_iterator begin() const noexcept { return const_iterator(this->_M_impl._M_header._M_left); } iterator end() noexcept { return iterator(&this->_M_impl._M_header); } const_iterator end() const noexcept { return const_iterator(&this->_M_impl._M_header); } reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } reverse_iterator rend() noexcept { return reverse_iterator(begin()); } const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } bool empty() const noexcept { return _M_impl._M_node_count == 0; } size_type size() const noexcept { return _M_impl._M_node_count; } size_type max_size() const noexcept { return _Alloc_traits::max_size(_M_get_Node_allocator()); } void swap(_Rb_tree& __t) noexcept(__is_nothrow_swappable<_Compare>::value); template<typename _Arg> pair<iterator, bool> _M_insert_unique(_Arg&& __x); template<typename _Arg> iterator _M_insert_equal(_Arg&& __x); template<typename _Arg, typename _NodeGen> iterator _M_insert_unique_(const_iterator __pos, _Arg&& __x, _NodeGen&); template<typename _Arg> iterator _M_insert_unique_(const_iterator __pos, _Arg&& __x) { _Alloc_node __an(*this); return _M_insert_unique_(__pos, std::forward<_Arg>(__x), __an); } template<typename _Arg, typename _NodeGen> iterator _M_insert_equal_(const_iterator __pos, _Arg&& __x, _NodeGen&); template<typename _Arg> iterator _M_insert_equal_(const_iterator __pos, _Arg&& __x) { _Alloc_node __an(*this); return _M_insert_equal_(__pos, std::forward<_Arg>(__x), __an); } template<typename... _Args> pair<iterator, bool> _M_emplace_unique(_Args&&... __args); template<typename... _Args> iterator _M_emplace_equal(_Args&&... __args); template<typename... _Args> iterator _M_emplace_hint_unique(const_iterator __pos, _Args&&... __args); template<typename... _Args> iterator _M_emplace_hint_equal(const_iterator __pos, _Args&&... __args); # 1103 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h" 3 template<typename _InputIterator> void _M_insert_unique(_InputIterator __first, _InputIterator __last); template<typename _InputIterator> void _M_insert_equal(_InputIterator __first, _InputIterator __last); private: void _M_erase_aux(const_iterator __position); void _M_erase_aux(const_iterator __first, const_iterator __last); public: __attribute ((__abi_tag__ ("cxx11"))) iterator erase(const_iterator __position) { ; const_iterator __result = __position; ++__result; _M_erase_aux(__position); return __result._M_const_cast(); } __attribute ((__abi_tag__ ("cxx11"))) iterator erase(iterator __position) { ; iterator __result = __position; ++__result; _M_erase_aux(__position); return __result; } # 1159 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h" 3 size_type erase(const key_type& __x); __attribute ((__abi_tag__ ("cxx11"))) iterator erase(const_iterator __first, const_iterator __last) { _M_erase_aux(__first, __last); return __last._M_const_cast(); } # 1181 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h" 3 void erase(const key_type* __first, const key_type* __last); void clear() noexcept { _M_erase(_M_begin()); _M_impl._M_reset(); } iterator find(const key_type& __k); const_iterator find(const key_type& __k) const; size_type count(const key_type& __k) const; iterator lower_bound(const key_type& __k) { return _M_lower_bound(_M_begin(), _M_end(), __k); } const_iterator lower_bound(const key_type& __k) const { return _M_lower_bound(_M_begin(), _M_end(), __k); } iterator upper_bound(const key_type& __k) { return _M_upper_bound(_M_begin(), _M_end(), __k); } const_iterator upper_bound(const key_type& __k) const { return _M_upper_bound(_M_begin(), _M_end(), __k); } pair<iterator, iterator> equal_range(const key_type& __k); pair<const_iterator, const_iterator> equal_range(const key_type& __k) const; template<typename _Kt, typename _Req = typename __has_is_transparent<_Compare, _Kt>::type> iterator _M_find_tr(const _Kt& __k) { const _Rb_tree* __const_this = this; return __const_this->_M_find_tr(__k)._M_const_cast(); } template<typename _Kt, typename _Req = typename __has_is_transparent<_Compare, _Kt>::type> const_iterator _M_find_tr(const _Kt& __k) const { auto __j = _M_lower_bound_tr(__k); if (__j != end() && _M_impl._M_key_compare(__k, _S_key(__j._M_node))) __j = end(); return __j; } template<typename _Kt, typename _Req = typename __has_is_transparent<_Compare, _Kt>::type> size_type _M_count_tr(const _Kt& __k) const { auto __p = _M_equal_range_tr(__k); return std::distance(__p.first, __p.second); } template<typename _Kt, typename _Req = typename __has_is_transparent<_Compare, _Kt>::type> iterator _M_lower_bound_tr(const _Kt& __k) { const _Rb_tree* __const_this = this; return __const_this->_M_lower_bound_tr(__k)._M_const_cast(); } template<typename _Kt, typename _Req = typename __has_is_transparent<_Compare, _Kt>::type> const_iterator _M_lower_bound_tr(const _Kt& __k) const { auto __x = _M_begin(); auto __y = _M_end(); while (__x != 0) if (!_M_impl._M_key_compare(_S_key(__x), __k)) { __y = __x; __x = _S_left(__x); } else __x = _S_right(__x); return const_iterator(__y); } template<typename _Kt, typename _Req = typename __has_is_transparent<_Compare, _Kt>::type> iterator _M_upper_bound_tr(const _Kt& __k) { const _Rb_tree* __const_this = this; return __const_this->_M_upper_bound_tr(__k)._M_const_cast(); } template<typename _Kt, typename _Req = typename __has_is_transparent<_Compare, _Kt>::type> const_iterator _M_upper_bound_tr(const _Kt& __k) const { auto __x = _M_begin(); auto __y = _M_end(); while (__x != 0) if (_M_impl._M_key_compare(__k, _S_key(__x))) { __y = __x; __x = _S_left(__x); } else __x = _S_right(__x); return const_iterator(__y); } template<typename _Kt, typename _Req = typename __has_is_transparent<_Compare, _Kt>::type> pair<iterator, iterator> _M_equal_range_tr(const _Kt& __k) { const _Rb_tree* __const_this = this; auto __ret = __const_this->_M_equal_range_tr(__k); return { __ret.first._M_const_cast(), __ret.second._M_const_cast() }; } template<typename _Kt, typename _Req = typename __has_is_transparent<_Compare, _Kt>::type> pair<const_iterator, const_iterator> _M_equal_range_tr(const _Kt& __k) const { auto __low = _M_lower_bound_tr(__k); auto __high = __low; auto& __cmp = _M_impl._M_key_compare; while (__high != end() && !__cmp(__k, _S_key(__high._M_node))) ++__high; return { __low, __high }; } bool __rb_verify() const; _Rb_tree& operator=(_Rb_tree&&) noexcept(_Alloc_traits::_S_nothrow_move() && is_nothrow_move_assignable<_Compare>::value); template<typename _Iterator> void _M_assign_unique(_Iterator, _Iterator); template<typename _Iterator> void _M_assign_equal(_Iterator, _Iterator); private: void _M_move_data(_Rb_tree& __x, std::true_type) { _M_impl._M_move_data(__x._M_impl); } void _M_move_data(_Rb_tree&, std::false_type); void _M_move_assign(_Rb_tree&, std::true_type); void _M_move_assign(_Rb_tree&, std::false_type); # 1544 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h" 3 }; template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> inline bool operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return __x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin()); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> inline bool operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> inline bool operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return !(__x == __y); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> inline bool operator>(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return __y < __x; } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> inline bool operator<=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return !(__y < __x); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> inline bool operator>=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return !(__x < __y); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> inline void swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { __x.swap(__y); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _Rb_tree(_Rb_tree&& __x, _Node_allocator&& __a) : _M_impl(__x._M_impl._M_key_compare, std::move(__a)) { using __eq = typename _Alloc_traits::is_always_equal; if (__x._M_root() != nullptr) _M_move_data(__x, __eq()); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_move_data(_Rb_tree& __x, std::false_type) { if (_M_get_Node_allocator() == __x._M_get_Node_allocator()) _M_move_data(__x, std::true_type()); else { _Alloc_node __an(*this); auto __lbd = [&__an](const value_type& __cval) { auto& __val = const_cast<value_type&>(__cval); return __an(std::move_if_noexcept(__val)); }; _M_root() = _M_copy(__x, __lbd); } } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> inline void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_move_assign(_Rb_tree& __x, true_type) { clear(); if (__x._M_root() != nullptr) _M_move_data(__x, std::true_type()); std::__alloc_on_move(_M_get_Node_allocator(), __x._M_get_Node_allocator()); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_move_assign(_Rb_tree& __x, false_type) { if (_M_get_Node_allocator() == __x._M_get_Node_allocator()) return _M_move_assign(__x, true_type{}); _Reuse_or_alloc_node __roan(*this); _M_impl._M_reset(); if (__x._M_root() != nullptr) { auto __lbd = [&__roan](const value_type& __cval) { auto& __val = const_cast<value_type&>(__cval); return __roan(std::move_if_noexcept(__val)); }; _M_root() = _M_copy(__x, __lbd); __x.clear(); } } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> inline _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: operator=(_Rb_tree&& __x) noexcept(_Alloc_traits::_S_nothrow_move() && is_nothrow_move_assignable<_Compare>::value) { _M_impl._M_key_compare = std::move(__x._M_impl._M_key_compare); _M_move_assign(__x, __bool_constant<_Alloc_traits::_S_nothrow_move()>()); return *this; } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> template<typename _Iterator> void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_assign_unique(_Iterator __first, _Iterator __last) { _Reuse_or_alloc_node __roan(*this); _M_impl._M_reset(); for (; __first != __last; ++__first) _M_insert_unique_(end(), *__first, __roan); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> template<typename _Iterator> void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_assign_equal(_Iterator __first, _Iterator __last) { _Reuse_or_alloc_node __roan(*this); _M_impl._M_reset(); for (; __first != __last; ++__first) _M_insert_equal_(end(), *__first, __roan); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: operator=(const _Rb_tree& __x) { if (this != &__x) { if (_Alloc_traits::_S_propagate_on_copy_assign()) { auto& __this_alloc = this->_M_get_Node_allocator(); auto& __that_alloc = __x._M_get_Node_allocator(); if (!_Alloc_traits::_S_always_equal() && __this_alloc != __that_alloc) { clear(); std::__alloc_on_copy(__this_alloc, __that_alloc); } } _Reuse_or_alloc_node __roan(*this); _M_impl._M_reset(); _M_impl._M_key_compare = __x._M_impl._M_key_compare; if (__x._M_root() != 0) _M_root() = _M_copy(__x, __roan); } return *this; } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> template<typename _Arg, typename _NodeGen> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_(_Base_ptr __x, _Base_ptr __p, _Arg&& __v, _NodeGen& __node_gen) { bool __insert_left = (__x != 0 || __p == _M_end() || _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__p))); _Link_type __z = __node_gen(std::forward<_Arg>(__v)); _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, this->_M_impl._M_header); ++_M_impl._M_node_count; return iterator(__z); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> template<typename _Arg> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_lower(_Base_ptr __p, _Arg&& __v) { bool __insert_left = (__p == _M_end() || !_M_impl._M_key_compare(_S_key(__p), _KeyOfValue()(__v))); _Link_type __z = _M_create_node(std::forward<_Arg>(__v)); _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, this->_M_impl._M_header); ++_M_impl._M_node_count; return iterator(__z); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> template<typename _Arg> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_equal_lower(_Arg&& __v) { _Link_type __x = _M_begin(); _Base_ptr __y = _M_end(); while (__x != 0) { __y = __x; __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ? _S_left(__x) : _S_right(__x); } return _M_insert_lower(__y, std::forward<_Arg>(__v)); } template<typename _Key, typename _Val, typename _KoV, typename _Compare, typename _Alloc> template<typename _NodeGen> typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: _M_copy(_Const_Link_type __x, _Base_ptr __p, _NodeGen& __node_gen) { _Link_type __top = _M_clone_node(__x, __node_gen); __top->_M_parent = __p; if (true) { if (__x->_M_right) __top->_M_right = _M_copy(_S_right(__x), __top, __node_gen); __p = __top; __x = _S_left(__x); while (__x != 0) { _Link_type __y = _M_clone_node(__x, __node_gen); __p->_M_left = __y; __y->_M_parent = __p; if (__x->_M_right) __y->_M_right = _M_copy(_S_right(__x), __y, __node_gen); __p = __y; __x = _S_left(__x); } } if (false) { _M_erase(__top); ; } return __top; } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_erase(_Link_type __x) { while (__x != 0) { _M_erase(_S_right(__x)); _Link_type __y = _S_left(__x); _M_drop_node(__x); __x = __y; } } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_lower_bound(_Link_type __x, _Base_ptr __y, const _Key& __k) { while (__x != 0) if (!_M_impl._M_key_compare(_S_key(__x), __k)) __y = __x, __x = _S_left(__x); else __x = _S_right(__x); return iterator(__y); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_lower_bound(_Const_Link_type __x, _Const_Base_ptr __y, const _Key& __k) const { while (__x != 0) if (!_M_impl._M_key_compare(_S_key(__x), __k)) __y = __x, __x = _S_left(__x); else __x = _S_right(__x); return const_iterator(__y); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_upper_bound(_Link_type __x, _Base_ptr __y, const _Key& __k) { while (__x != 0) if (_M_impl._M_key_compare(__k, _S_key(__x))) __y = __x, __x = _S_left(__x); else __x = _S_right(__x); return iterator(__y); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_upper_bound(_Const_Link_type __x, _Const_Base_ptr __y, const _Key& __k) const { while (__x != 0) if (_M_impl._M_key_compare(__k, _S_key(__x))) __y = __x, __x = _S_left(__x); else __x = _S_right(__x); return const_iterator(__y); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator, typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: equal_range(const _Key& __k) { _Link_type __x = _M_begin(); _Base_ptr __y = _M_end(); while (__x != 0) { if (_M_impl._M_key_compare(_S_key(__x), __k)) __x = _S_right(__x); else if (_M_impl._M_key_compare(__k, _S_key(__x))) __y = __x, __x = _S_left(__x); else { _Link_type __xu(__x); _Base_ptr __yu(__y); __y = __x, __x = _S_left(__x); __xu = _S_right(__xu); return pair<iterator, iterator>(_M_lower_bound(__x, __y, __k), _M_upper_bound(__xu, __yu, __k)); } } return pair<iterator, iterator>(iterator(__y), iterator(__y)); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: equal_range(const _Key& __k) const { _Const_Link_type __x = _M_begin(); _Const_Base_ptr __y = _M_end(); while (__x != 0) { if (_M_impl._M_key_compare(_S_key(__x), __k)) __x = _S_right(__x); else if (_M_impl._M_key_compare(__k, _S_key(__x))) __y = __x, __x = _S_left(__x); else { _Const_Link_type __xu(__x); _Const_Base_ptr __yu(__y); __y = __x, __x = _S_left(__x); __xu = _S_right(__xu); return pair<const_iterator, const_iterator>(_M_lower_bound(__x, __y, __k), _M_upper_bound(__xu, __yu, __k)); } } return pair<const_iterator, const_iterator>(const_iterator(__y), const_iterator(__y)); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: swap(_Rb_tree& __t) noexcept(__is_nothrow_swappable<_Compare>::value) { if (_M_root() == 0) { if (__t._M_root() != 0) _M_impl._M_move_data(__t._M_impl); } else if (__t._M_root() == 0) __t._M_impl._M_move_data(_M_impl); else { std::swap(_M_root(),__t._M_root()); std::swap(_M_leftmost(),__t._M_leftmost()); std::swap(_M_rightmost(),__t._M_rightmost()); _M_root()->_M_parent = _M_end(); __t._M_root()->_M_parent = __t._M_end(); std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count); } std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare); _Alloc_traits::_S_on_swap(_M_get_Node_allocator(), __t._M_get_Node_allocator()); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr, typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_get_insert_unique_pos(const key_type& __k) { typedef pair<_Base_ptr, _Base_ptr> _Res; _Link_type __x = _M_begin(); _Base_ptr __y = _M_end(); bool __comp = true; while (__x != 0) { __y = __x; __comp = _M_impl._M_key_compare(__k, _S_key(__x)); __x = __comp ? _S_left(__x) : _S_right(__x); } iterator __j = iterator(__y); if (__comp) { if (__j == begin()) return _Res(__x, __y); else --__j; } if (_M_impl._M_key_compare(_S_key(__j._M_node), __k)) return _Res(__x, __y); return _Res(__j._M_node, 0); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr, typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_get_insert_equal_pos(const key_type& __k) { typedef pair<_Base_ptr, _Base_ptr> _Res; _Link_type __x = _M_begin(); _Base_ptr __y = _M_end(); while (__x != 0) { __y = __x; __x = _M_impl._M_key_compare(__k, _S_key(__x)) ? _S_left(__x) : _S_right(__x); } return _Res(__x, __y); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> template<typename _Arg> pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator, bool> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_unique(_Arg&& __v) { typedef pair<iterator, bool> _Res; pair<_Base_ptr, _Base_ptr> __res = _M_get_insert_unique_pos(_KeyOfValue()(__v)); if (__res.second) { _Alloc_node __an(*this); return _Res(_M_insert_(__res.first, __res.second, std::forward<_Arg>(__v), __an), true); } return _Res(iterator(__res.first), false); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> template<typename _Arg> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_equal(_Arg&& __v) { pair<_Base_ptr, _Base_ptr> __res = _M_get_insert_equal_pos(_KeyOfValue()(__v)); _Alloc_node __an(*this); return _M_insert_(__res.first, __res.second, std::forward<_Arg>(__v), __an); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr, typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_get_insert_hint_unique_pos(const_iterator __position, const key_type& __k) { iterator __pos = __position._M_const_cast(); typedef pair<_Base_ptr, _Base_ptr> _Res; if (__pos._M_node == _M_end()) { if (size() > 0 && _M_impl._M_key_compare(_S_key(_M_rightmost()), __k)) return _Res(0, _M_rightmost()); else return _M_get_insert_unique_pos(__k); } else if (_M_impl._M_key_compare(__k, _S_key(__pos._M_node))) { iterator __before = __pos; if (__pos._M_node == _M_leftmost()) return _Res(_M_leftmost(), _M_leftmost()); else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), __k)) { if (_S_right(__before._M_node) == 0) return _Res(0, __before._M_node); else return _Res(__pos._M_node, __pos._M_node); } else return _M_get_insert_unique_pos(__k); } else if (_M_impl._M_key_compare(_S_key(__pos._M_node), __k)) { iterator __after = __pos; if (__pos._M_node == _M_rightmost()) return _Res(0, _M_rightmost()); else if (_M_impl._M_key_compare(__k, _S_key((++__after)._M_node))) { if (_S_right(__pos._M_node) == 0) return _Res(0, __pos._M_node); else return _Res(__after._M_node, __after._M_node); } else return _M_get_insert_unique_pos(__k); } else return _Res(__pos._M_node, 0); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> template<typename _Arg, typename _NodeGen> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_unique_(const_iterator __position, _Arg&& __v, _NodeGen& __node_gen) { pair<_Base_ptr, _Base_ptr> __res = _M_get_insert_hint_unique_pos(__position, _KeyOfValue()(__v)); if (__res.second) return _M_insert_(__res.first, __res.second, std::forward<_Arg>(__v), __node_gen); return iterator(__res.first); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr, typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_get_insert_hint_equal_pos(const_iterator __position, const key_type& __k) { iterator __pos = __position._M_const_cast(); typedef pair<_Base_ptr, _Base_ptr> _Res; if (__pos._M_node == _M_end()) { if (size() > 0 && !_M_impl._M_key_compare(__k, _S_key(_M_rightmost()))) return _Res(0, _M_rightmost()); else return _M_get_insert_equal_pos(__k); } else if (!_M_impl._M_key_compare(_S_key(__pos._M_node), __k)) { iterator __before = __pos; if (__pos._M_node == _M_leftmost()) return _Res(_M_leftmost(), _M_leftmost()); else if (!_M_impl._M_key_compare(__k, _S_key((--__before)._M_node))) { if (_S_right(__before._M_node) == 0) return _Res(0, __before._M_node); else return _Res(__pos._M_node, __pos._M_node); } else return _M_get_insert_equal_pos(__k); } else { iterator __after = __pos; if (__pos._M_node == _M_rightmost()) return _Res(0, _M_rightmost()); else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), __k)) { if (_S_right(__pos._M_node) == 0) return _Res(0, __pos._M_node); else return _Res(__after._M_node, __after._M_node); } else return _Res(0, 0); } } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> template<typename _Arg, typename _NodeGen> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_equal_(const_iterator __position, _Arg&& __v, _NodeGen& __node_gen) { pair<_Base_ptr, _Base_ptr> __res = _M_get_insert_hint_equal_pos(__position, _KeyOfValue()(__v)); if (__res.second) return _M_insert_(__res.first, __res.second, std::forward<_Arg>(__v), __node_gen); return _M_insert_equal_lower(std::forward<_Arg>(__v)); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_node(_Base_ptr __x, _Base_ptr __p, _Link_type __z) { bool __insert_left = (__x != 0 || __p == _M_end() || _M_impl._M_key_compare(_S_key(__z), _S_key(__p))); _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, this->_M_impl._M_header); ++_M_impl._M_node_count; return iterator(__z); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_lower_node(_Base_ptr __p, _Link_type __z) { bool __insert_left = (__p == _M_end() || !_M_impl._M_key_compare(_S_key(__p), _S_key(__z))); _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, this->_M_impl._M_header); ++_M_impl._M_node_count; return iterator(__z); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_equal_lower_node(_Link_type __z) { _Link_type __x = _M_begin(); _Base_ptr __y = _M_end(); while (__x != 0) { __y = __x; __x = !_M_impl._M_key_compare(_S_key(__x), _S_key(__z)) ? _S_left(__x) : _S_right(__x); } return _M_insert_lower_node(__y, __z); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> template<typename... _Args> pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator, bool> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_emplace_unique(_Args&&... __args) { _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); if (true) { typedef pair<iterator, bool> _Res; auto __res = _M_get_insert_unique_pos(_S_key(__z)); if (__res.second) return _Res(_M_insert_node(__res.first, __res.second, __z), true); _M_drop_node(__z); return _Res(iterator(__res.first), false); } if (false) { _M_drop_node(__z); ; } } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> template<typename... _Args> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_emplace_equal(_Args&&... __args) { _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); if (true) { auto __res = _M_get_insert_equal_pos(_S_key(__z)); return _M_insert_node(__res.first, __res.second, __z); } if (false) { _M_drop_node(__z); ; } } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> template<typename... _Args> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_emplace_hint_unique(const_iterator __pos, _Args&&... __args) { _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); if (true) { auto __res = _M_get_insert_hint_unique_pos(__pos, _S_key(__z)); if (__res.second) return _M_insert_node(__res.first, __res.second, __z); _M_drop_node(__z); return iterator(__res.first); } if (false) { _M_drop_node(__z); ; } } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> template<typename... _Args> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_emplace_hint_equal(const_iterator __pos, _Args&&... __args) { _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); if (true) { auto __res = _M_get_insert_hint_equal_pos(__pos, _S_key(__z)); if (__res.second) return _M_insert_node(__res.first, __res.second, __z); return _M_insert_equal_lower_node(__z); } if (false) { _M_drop_node(__z); ; } } template<typename _Key, typename _Val, typename _KoV, typename _Cmp, typename _Alloc> template<class _II> void _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: _M_insert_unique(_II __first, _II __last) { _Alloc_node __an(*this); for (; __first != __last; ++__first) _M_insert_unique_(end(), *__first, __an); } template<typename _Key, typename _Val, typename _KoV, typename _Cmp, typename _Alloc> template<class _II> void _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: _M_insert_equal(_II __first, _II __last) { _Alloc_node __an(*this); for (; __first != __last; ++__first) _M_insert_equal_(end(), *__first, __an); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_erase_aux(const_iterator __position) { _Link_type __y = static_cast<_Link_type>(_Rb_tree_rebalance_for_erase (const_cast<_Base_ptr>(__position._M_node), this->_M_impl._M_header)); _M_drop_node(__y); --_M_impl._M_node_count; } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_erase_aux(const_iterator __first, const_iterator __last) { if (__first == begin() && __last == end()) clear(); else while (__first != __last) _M_erase_aux(__first++); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(const _Key& __x) { pair<iterator, iterator> __p = equal_range(__x); const size_type __old_size = size(); _M_erase_aux(__p.first, __p.second); return __old_size - size(); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(const _Key* __first, const _Key* __last) { while (__first != __last) erase(*__first++); } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: find(const _Key& __k) { iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); return (__j == end() || _M_impl._M_key_compare(__k, _S_key(__j._M_node))) ? end() : __j; } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: find(const _Key& __k) const { const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); return (__j == end() || _M_impl._M_key_compare(__k, _S_key(__j._M_node))) ? end() : __j; } template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: count(const _Key& __k) const { pair<const_iterator, const_iterator> __p = equal_range(__k); const size_type __n = std::distance(__p.first, __p.second); return __n; } __attribute__ ((__pure__)) unsigned int _Rb_tree_black_count(const _Rb_tree_node_base* __node, const _Rb_tree_node_base* __root) throw (); template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> bool _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const { if (_M_impl._M_node_count == 0 || begin() == end()) return _M_impl._M_node_count == 0 && begin() == end() && this->_M_impl._M_header._M_left == _M_end() && this->_M_impl._M_header._M_right == _M_end(); unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root()); for (const_iterator __it = begin(); __it != end(); ++__it) { _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node); _Const_Link_type __L = _S_left(__x); _Const_Link_type __R = _S_right(__x); if (__x->_M_color == _S_red) if ((__L && __L->_M_color == _S_red) || (__R && __R->_M_color == _S_red)) return false; if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L))) return false; if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x))) return false; if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len) return false; } if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) return false; if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) return false; return true; } # 2628 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h" 3 } # 61 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/map" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 1 3 # 66 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template <typename _Key, typename _Tp, typename _Compare, typename _Alloc> class multimap; # 98 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>, typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > > class map { public: typedef _Key key_type; typedef _Tp mapped_type; typedef std::pair<const _Key, _Tp> value_type; typedef _Compare key_compare; typedef _Alloc allocator_type; private: # 122 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 static_assert(is_same<typename _Alloc::value_type, value_type>::value, "std::map must have the same value_type as its allocator"); public: class value_compare : public std::binary_function<value_type, value_type, bool> { friend class map<_Key, _Tp, _Compare, _Alloc>; protected: _Compare comp; value_compare(_Compare __c) : comp(__c) { } public: bool operator()(const value_type& __x, const value_type& __y) const { return comp(__x.first, __y.first); } }; private: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<value_type>::other _Pair_alloc_type; typedef _Rb_tree<key_type, value_type, _Select1st<value_type>, key_compare, _Pair_alloc_type> _Rep_type; _Rep_type _M_t; typedef __gnu_cxx::__alloc_traits<_Pair_alloc_type> _Alloc_traits; public: typedef typename _Alloc_traits::pointer pointer; typedef typename _Alloc_traits::const_pointer const_pointer; typedef typename _Alloc_traits::reference reference; typedef typename _Alloc_traits::const_reference const_reference; typedef typename _Rep_type::iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; typedef typename _Rep_type::reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; # 183 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 map() = default; explicit map(const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Pair_alloc_type(__a)) { } # 205 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 map(const map&) = default; map(map&&) = default; # 226 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 map(initializer_list<value_type> __l, const _Compare& __comp = _Compare(), const allocator_type& __a = allocator_type()) : _M_t(__comp, _Pair_alloc_type(__a)) { _M_t._M_insert_unique(__l.begin(), __l.end()); } explicit map(const allocator_type& __a) : _M_t(_Compare(), _Pair_alloc_type(__a)) { } map(const map& __m, const allocator_type& __a) : _M_t(__m._M_t, _Pair_alloc_type(__a)) { } map(map&& __m, const allocator_type& __a) noexcept(is_nothrow_copy_constructible<_Compare>::value && _Alloc_traits::_S_always_equal()) : _M_t(std::move(__m._M_t), _Pair_alloc_type(__a)) { } map(initializer_list<value_type> __l, const allocator_type& __a) : _M_t(_Compare(), _Pair_alloc_type(__a)) { _M_t._M_insert_unique(__l.begin(), __l.end()); } template<typename _InputIterator> map(_InputIterator __first, _InputIterator __last, const allocator_type& __a) : _M_t(_Compare(), _Pair_alloc_type(__a)) { _M_t._M_insert_unique(__first, __last); } # 270 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 template<typename _InputIterator> map(_InputIterator __first, _InputIterator __last) : _M_t() { _M_t._M_insert_unique(__first, __last); } # 287 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 template<typename _InputIterator> map(_InputIterator __first, _InputIterator __last, const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Pair_alloc_type(__a)) { _M_t._M_insert_unique(__first, __last); } ~map() = default; # 316 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 map& operator=(const map&) = default; map& operator=(map&&) = default; # 334 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 map& operator=(initializer_list<value_type> __l) { _M_t._M_assign_unique(__l.begin(), __l.end()); return *this; } allocator_type get_allocator() const noexcept { return allocator_type(_M_t.get_allocator()); } iterator begin() noexcept { return _M_t.begin(); } const_iterator begin() const noexcept { return _M_t.begin(); } iterator end() noexcept { return _M_t.end(); } const_iterator end() const noexcept { return _M_t.end(); } reverse_iterator rbegin() noexcept { return _M_t.rbegin(); } const_reverse_iterator rbegin() const noexcept { return _M_t.rbegin(); } reverse_iterator rend() noexcept { return _M_t.rend(); } const_reverse_iterator rend() const noexcept { return _M_t.rend(); } const_iterator cbegin() const noexcept { return _M_t.begin(); } const_iterator cend() const noexcept { return _M_t.end(); } const_reverse_iterator crbegin() const noexcept { return _M_t.rbegin(); } const_reverse_iterator crend() const noexcept { return _M_t.rend(); } bool empty() const noexcept { return _M_t.empty(); } size_type size() const noexcept { return _M_t.size(); } size_type max_size() const noexcept { return _M_t.max_size(); } # 489 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 mapped_type& operator[](const key_type& __k) { iterator __i = lower_bound(__k); if (__i == end() || key_comp()(__k, (*__i).first)) __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, std::tuple<const key_type&>(__k), std::tuple<>()); return (*__i).second; } mapped_type& operator[](key_type&& __k) { iterator __i = lower_bound(__k); if (__i == end() || key_comp()(__k, (*__i).first)) __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, std::forward_as_tuple(std::move(__k)), std::tuple<>()); return (*__i).second; } # 534 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 mapped_type& at(const key_type& __k) { iterator __i = lower_bound(__k); if (__i == end() || key_comp()(__k, (*__i).first)) __throw_out_of_range(("map::at")); return (*__i).second; } const mapped_type& at(const key_type& __k) const { const_iterator __i = lower_bound(__k); if (__i == end() || key_comp()(__k, (*__i).first)) __throw_out_of_range(("map::at")); return (*__i).second; } # 572 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 template<typename... _Args> std::pair<iterator, bool> emplace(_Args&&... __args) { return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); } # 602 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 template<typename... _Args> iterator emplace_hint(const_iterator __pos, _Args&&... __args) { return _M_t._M_emplace_hint_unique(__pos, std::forward<_Args>(__args)...); } # 800 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 std::pair<iterator, bool> insert(const value_type& __x) { return _M_t._M_insert_unique(__x); } std::pair<iterator, bool> insert(value_type&& __x) { return _M_t._M_insert_unique(std::move(__x)); } template<typename _Pair> __enable_if_t<is_constructible<value_type, _Pair>::value, pair<iterator, bool>> insert(_Pair&& __x) { return _M_t._M_emplace_unique(std::forward<_Pair>(__x)); } # 827 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 void insert(std::initializer_list<value_type> __list) { insert(__list.begin(), __list.end()); } # 856 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 iterator insert(const_iterator __position, const value_type& __x) { return _M_t._M_insert_unique_(__position, __x); } iterator insert(const_iterator __position, value_type&& __x) { return _M_t._M_insert_unique_(__position, std::move(__x)); } template<typename _Pair> __enable_if_t<is_constructible<value_type, _Pair>::value, iterator> insert(const_iterator __position, _Pair&& __x) { return _M_t._M_emplace_hint_unique(__position, std::forward<_Pair>(__x)); } # 889 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 template<typename _InputIterator> void insert(_InputIterator __first, _InputIterator __last) { _M_t._M_insert_unique(__first, __last); } # 1029 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 iterator erase(const_iterator __position) { return _M_t.erase(__position); } __attribute ((__abi_tag__ ("cxx11"))) iterator erase(iterator __position) { return _M_t.erase(__position); } # 1066 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 size_type erase(const key_type& __x) { return _M_t.erase(__x); } # 1086 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 iterator erase(const_iterator __first, const_iterator __last) { return _M_t.erase(__first, __last); } # 1120 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 void swap(map& __x) noexcept(__is_nothrow_swappable<_Compare>::value) { _M_t.swap(__x._M_t); } void clear() noexcept { _M_t.clear(); } key_compare key_comp() const { return _M_t.key_comp(); } value_compare value_comp() const { return value_compare(_M_t.key_comp()); } # 1167 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 iterator find(const key_type& __x) { return _M_t.find(__x); } template<typename _Kt> auto find(const _Kt& __x) -> decltype(_M_t._M_find_tr(__x)) { return _M_t._M_find_tr(__x); } # 1192 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 const_iterator find(const key_type& __x) const { return _M_t.find(__x); } template<typename _Kt> auto find(const _Kt& __x) const -> decltype(_M_t._M_find_tr(__x)) { return _M_t._M_find_tr(__x); } # 1213 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 size_type count(const key_type& __x) const { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } template<typename _Kt> auto count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x)) { return _M_t._M_count_tr(__x); } # 1237 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 iterator lower_bound(const key_type& __x) { return _M_t.lower_bound(__x); } template<typename _Kt> auto lower_bound(const _Kt& __x) -> decltype(iterator(_M_t._M_lower_bound_tr(__x))) { return iterator(_M_t._M_lower_bound_tr(__x)); } # 1262 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 const_iterator lower_bound(const key_type& __x) const { return _M_t.lower_bound(__x); } template<typename _Kt> auto lower_bound(const _Kt& __x) const -> decltype(const_iterator(_M_t._M_lower_bound_tr(__x))) { return const_iterator(_M_t._M_lower_bound_tr(__x)); } # 1282 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 iterator upper_bound(const key_type& __x) { return _M_t.upper_bound(__x); } template<typename _Kt> auto upper_bound(const _Kt& __x) -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) { return iterator(_M_t._M_upper_bound_tr(__x)); } # 1302 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 const_iterator upper_bound(const key_type& __x) const { return _M_t.upper_bound(__x); } template<typename _Kt> auto upper_bound(const _Kt& __x) const -> decltype(const_iterator(_M_t._M_upper_bound_tr(__x))) { return const_iterator(_M_t._M_upper_bound_tr(__x)); } # 1331 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 std::pair<iterator, iterator> equal_range(const key_type& __x) { return _M_t.equal_range(__x); } template<typename _Kt> auto equal_range(const _Kt& __x) -> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x))) { return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); } # 1360 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 std::pair<const_iterator, const_iterator> equal_range(const key_type& __x) const { return _M_t.equal_range(__x); } template<typename _Kt> auto equal_range(const _Kt& __x) const -> decltype(pair<const_iterator, const_iterator>( _M_t._M_equal_range_tr(__x))) { return pair<const_iterator, const_iterator>( _M_t._M_equal_range_tr(__x)); } template<typename _K1, typename _T1, typename _C1, typename _A1> friend bool operator==(const map<_K1, _T1, _C1, _A1>&, const map<_K1, _T1, _C1, _A1>&); template<typename _K1, typename _T1, typename _C1, typename _A1> friend bool operator<(const map<_K1, _T1, _C1, _A1>&, const map<_K1, _T1, _C1, _A1>&); }; # 1432 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> inline bool operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t == __y._M_t; } # 1449 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> inline bool operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t < __y._M_t; } template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> inline bool operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x == __y); } template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> inline bool operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return __y < __x; } template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> inline bool operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__y < __x); } template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> inline bool operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x < __y); } template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> inline void swap(map<_Key, _Tp, _Compare, _Alloc>& __x, map<_Key, _Tp, _Compare, _Alloc>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } # 1515 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_map.h" 3 } # 62 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/map" 2 3 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 1 3 # 64 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template <typename _Key, typename _Tp, typename _Compare, typename _Alloc> class map; # 96 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>, typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > > class multimap { public: typedef _Key key_type; typedef _Tp mapped_type; typedef std::pair<const _Key, _Tp> value_type; typedef _Compare key_compare; typedef _Alloc allocator_type; private: # 121 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 static_assert(is_same<typename _Alloc::value_type, value_type>::value, "std::multimap must have the same value_type as its allocator"); public: class value_compare : public std::binary_function<value_type, value_type, bool> { friend class multimap<_Key, _Tp, _Compare, _Alloc>; protected: _Compare comp; value_compare(_Compare __c) : comp(__c) { } public: bool operator()(const value_type& __x, const value_type& __y) const { return comp(__x.first, __y.first); } }; private: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<value_type>::other _Pair_alloc_type; typedef _Rb_tree<key_type, value_type, _Select1st<value_type>, key_compare, _Pair_alloc_type> _Rep_type; _Rep_type _M_t; typedef __gnu_cxx::__alloc_traits<_Pair_alloc_type> _Alloc_traits; public: typedef typename _Alloc_traits::pointer pointer; typedef typename _Alloc_traits::const_pointer const_pointer; typedef typename _Alloc_traits::reference reference; typedef typename _Alloc_traits::const_reference const_reference; typedef typename _Rep_type::iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; typedef typename _Rep_type::reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; # 180 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 multimap() = default; explicit multimap(const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Pair_alloc_type(__a)) { } # 202 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 multimap(const multimap&) = default; # 211 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 multimap(multimap&&) = default; # 223 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 multimap(initializer_list<value_type> __l, const _Compare& __comp = _Compare(), const allocator_type& __a = allocator_type()) : _M_t(__comp, _Pair_alloc_type(__a)) { _M_t._M_insert_equal(__l.begin(), __l.end()); } explicit multimap(const allocator_type& __a) : _M_t(_Compare(), _Pair_alloc_type(__a)) { } multimap(const multimap& __m, const allocator_type& __a) : _M_t(__m._M_t, _Pair_alloc_type(__a)) { } multimap(multimap&& __m, const allocator_type& __a) noexcept(is_nothrow_copy_constructible<_Compare>::value && _Alloc_traits::_S_always_equal()) : _M_t(std::move(__m._M_t), _Pair_alloc_type(__a)) { } multimap(initializer_list<value_type> __l, const allocator_type& __a) : _M_t(_Compare(), _Pair_alloc_type(__a)) { _M_t._M_insert_equal(__l.begin(), __l.end()); } template<typename _InputIterator> multimap(_InputIterator __first, _InputIterator __last, const allocator_type& __a) : _M_t(_Compare(), _Pair_alloc_type(__a)) { _M_t._M_insert_equal(__first, __last); } # 266 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 template<typename _InputIterator> multimap(_InputIterator __first, _InputIterator __last) : _M_t() { _M_t._M_insert_equal(__first, __last); } # 282 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 template<typename _InputIterator> multimap(_InputIterator __first, _InputIterator __last, const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Pair_alloc_type(__a)) { _M_t._M_insert_equal(__first, __last); } ~multimap() = default; # 311 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 multimap& operator=(const multimap&) = default; multimap& operator=(multimap&&) = default; # 329 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 multimap& operator=(initializer_list<value_type> __l) { _M_t._M_assign_equal(__l.begin(), __l.end()); return *this; } allocator_type get_allocator() const noexcept { return allocator_type(_M_t.get_allocator()); } iterator begin() noexcept { return _M_t.begin(); } const_iterator begin() const noexcept { return _M_t.begin(); } iterator end() noexcept { return _M_t.end(); } const_iterator end() const noexcept { return _M_t.end(); } reverse_iterator rbegin() noexcept { return _M_t.rbegin(); } const_reverse_iterator rbegin() const noexcept { return _M_t.rbegin(); } reverse_iterator rend() noexcept { return _M_t.rend(); } const_reverse_iterator rend() const noexcept { return _M_t.rend(); } const_iterator cbegin() const noexcept { return _M_t.begin(); } const_iterator cend() const noexcept { return _M_t.end(); } const_reverse_iterator crbegin() const noexcept { return _M_t.rbegin(); } const_reverse_iterator crend() const noexcept { return _M_t.rend(); } bool empty() const noexcept { return _M_t.empty(); } size_type size() const noexcept { return _M_t.size(); } size_type max_size() const noexcept { return _M_t.max_size(); } # 487 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 template<typename... _Args> iterator emplace(_Args&&... __args) { return _M_t._M_emplace_equal(std::forward<_Args>(__args)...); } # 514 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 template<typename... _Args> iterator emplace_hint(const_iterator __pos, _Args&&... __args) { return _M_t._M_emplace_hint_equal(__pos, std::forward<_Args>(__args)...); } # 536 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 iterator insert(const value_type& __x) { return _M_t._M_insert_equal(__x); } iterator insert(value_type&& __x) { return _M_t._M_insert_equal(std::move(__x)); } template<typename _Pair> __enable_if_t<is_constructible<value_type, _Pair>::value, iterator> insert(_Pair&& __x) { return _M_t._M_emplace_equal(std::forward<_Pair>(__x)); } # 575 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 iterator insert(const_iterator __position, const value_type& __x) { return _M_t._M_insert_equal_(__position, __x); } iterator insert(const_iterator __position, value_type&& __x) { return _M_t._M_insert_equal_(__position, std::move(__x)); } template<typename _Pair> __enable_if_t<is_constructible<value_type, _Pair&&>::value, iterator> insert(const_iterator __position, _Pair&& __x) { return _M_t._M_emplace_hint_equal(__position, std::forward<_Pair>(__x)); } # 609 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 template<typename _InputIterator> void insert(_InputIterator __first, _InputIterator __last) { _M_t._M_insert_equal(__first, __last); } # 622 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 void insert(initializer_list<value_type> __l) { this->insert(__l.begin(), __l.end()); } # 699 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 iterator erase(const_iterator __position) { return _M_t.erase(__position); } __attribute ((__abi_tag__ ("cxx11"))) iterator erase(iterator __position) { return _M_t.erase(__position); } # 736 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 size_type erase(const key_type& __x) { return _M_t.erase(__x); } # 757 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 iterator erase(const_iterator __first, const_iterator __last) { return _M_t.erase(__first, __last); } # 794 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 void swap(multimap& __x) noexcept(__is_nothrow_swappable<_Compare>::value) { _M_t.swap(__x._M_t); } void clear() noexcept { _M_t.clear(); } key_compare key_comp() const { return _M_t.key_comp(); } value_compare value_comp() const { return value_compare(_M_t.key_comp()); } # 840 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 iterator find(const key_type& __x) { return _M_t.find(__x); } template<typename _Kt> auto find(const _Kt& __x) -> decltype(_M_t._M_find_tr(__x)) { return _M_t._M_find_tr(__x); } # 864 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 const_iterator find(const key_type& __x) const { return _M_t.find(__x); } template<typename _Kt> auto find(const _Kt& __x) const -> decltype(_M_t._M_find_tr(__x)) { return _M_t._M_find_tr(__x); } # 882 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 size_type count(const key_type& __x) const { return _M_t.count(__x); } template<typename _Kt> auto count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x)) { return _M_t._M_count_tr(__x); } # 906 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 iterator lower_bound(const key_type& __x) { return _M_t.lower_bound(__x); } template<typename _Kt> auto lower_bound(const _Kt& __x) -> decltype(iterator(_M_t._M_lower_bound_tr(__x))) { return iterator(_M_t._M_lower_bound_tr(__x)); } # 931 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 const_iterator lower_bound(const key_type& __x) const { return _M_t.lower_bound(__x); } template<typename _Kt> auto lower_bound(const _Kt& __x) const -> decltype(const_iterator(_M_t._M_lower_bound_tr(__x))) { return const_iterator(_M_t._M_lower_bound_tr(__x)); } # 951 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 iterator upper_bound(const key_type& __x) { return _M_t.upper_bound(__x); } template<typename _Kt> auto upper_bound(const _Kt& __x) -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) { return iterator(_M_t._M_upper_bound_tr(__x)); } # 971 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 const_iterator upper_bound(const key_type& __x) const { return _M_t.upper_bound(__x); } template<typename _Kt> auto upper_bound(const _Kt& __x) const -> decltype(const_iterator(_M_t._M_upper_bound_tr(__x))) { return const_iterator(_M_t._M_upper_bound_tr(__x)); } # 998 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 std::pair<iterator, iterator> equal_range(const key_type& __x) { return _M_t.equal_range(__x); } template<typename _Kt> auto equal_range(const _Kt& __x) -> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x))) { return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); } # 1025 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 std::pair<const_iterator, const_iterator> equal_range(const key_type& __x) const { return _M_t.equal_range(__x); } template<typename _Kt> auto equal_range(const _Kt& __x) const -> decltype(pair<const_iterator, const_iterator>( _M_t._M_equal_range_tr(__x))) { return pair<const_iterator, const_iterator>( _M_t._M_equal_range_tr(__x)); } template<typename _K1, typename _T1, typename _C1, typename _A1> friend bool operator==(const multimap<_K1, _T1, _C1, _A1>&, const multimap<_K1, _T1, _C1, _A1>&); template<typename _K1, typename _T1, typename _C1, typename _A1> friend bool operator<(const multimap<_K1, _T1, _C1, _A1>&, const multimap<_K1, _T1, _C1, _A1>&); }; # 1096 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> inline bool operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t == __y._M_t; } # 1113 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> inline bool operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t < __y._M_t; } template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> inline bool operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x == __y); } template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> inline bool operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return __y < __x; } template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> inline bool operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__y < __x); } template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> inline bool operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x < __y); } template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> inline void swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, multimap<_Key, _Tp, _Compare, _Alloc>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } # 1179 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_multimap.h" 3 } # 63 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/map" 2 3 # 15 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/UniqueVector.h" 2 namespace llvm { template<class T> class UniqueVector { public: using VectorType = typename std::vector<T>; using iterator = typename VectorType::iterator; using const_iterator = typename VectorType::const_iterator; private: std::map<T, unsigned> Map; VectorType Vector; public: unsigned insert(const T &Entry) { unsigned &Val = Map[Entry]; if (Val) return Val; Val = static_cast<unsigned>(Vector.size()) + 1; Vector.push_back(Entry); return Val; } unsigned idFor(const T &Entry) const { typename std::map<T, unsigned>::const_iterator MI = Map.find(Entry); if (MI != Map.end()) return MI->second; return 0; } const T &operator[](unsigned ID) const { (static_cast<void> (0)); return Vector[ID - 1]; } iterator begin() { return Vector.begin(); } const_iterator begin() const { return Vector.begin(); } iterator end() { return Vector.end(); } const_iterator end() const { return Vector.end(); } size_t size() const { return Vector.size(); } bool empty() const { return Vector.empty(); } void reset() { Map.clear(); Vector.resize(0, 0); } }; } # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Attributes.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Attributes.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm-c/Types.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm-c/Types.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm-c/ExternC.h" 1 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm-c/Types.h" 2 extern "C" { # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm-c/Types.h" #pragma clang diagnostic push # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm-c/Types.h" #pragma clang diagnostic error "-Wstrict-prototypes" typedef int LLVMBool; # 48 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm-c/Types.h" typedef struct LLVMOpaqueMemoryBuffer *LLVMMemoryBufferRef; typedef struct LLVMOpaqueContext *LLVMContextRef; typedef struct LLVMOpaqueModule *LLVMModuleRef; typedef struct LLVMOpaqueType *LLVMTypeRef; typedef struct LLVMOpaqueValue *LLVMValueRef; typedef struct LLVMOpaqueBasicBlock *LLVMBasicBlockRef; typedef struct LLVMOpaqueMetadata *LLVMMetadataRef; typedef struct LLVMOpaqueNamedMDNode *LLVMNamedMDNodeRef; typedef struct LLVMOpaqueValueMetadataEntry LLVMValueMetadataEntry; typedef struct LLVMOpaqueBuilder *LLVMBuilderRef; typedef struct LLVMOpaqueDIBuilder *LLVMDIBuilderRef; typedef struct LLVMOpaqueModuleProvider *LLVMModuleProviderRef; typedef struct LLVMOpaquePassManager *LLVMPassManagerRef; typedef struct LLVMOpaquePassRegistry *LLVMPassRegistryRef; typedef struct LLVMOpaqueUse *LLVMUseRef; typedef struct LLVMOpaqueAttributeRef *LLVMAttributeRef; typedef struct LLVMOpaqueDiagnosticInfo *LLVMDiagnosticInfoRef; typedef struct LLVMComdat *LLVMComdatRef; typedef struct LLVMOpaqueModuleFlagEntry LLVMModuleFlagEntry; typedef struct LLVMOpaqueJITEventListener *LLVMJITEventListenerRef; typedef struct LLVMOpaqueBinary *LLVMBinaryRef; #pragma clang diagnostic pop # 174 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm-c/Types.h" } # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Attributes.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Alignment.h" 1 # 26 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Alignment.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 27 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Alignment.h" 2 namespace llvm { struct Align { private: uint8_t ShiftValue = 0; friend struct MaybeAlign; friend unsigned Log2(Align); friend bool operator==(Align Lhs, Align Rhs); friend bool operator!=(Align Lhs, Align Rhs); friend bool operator<=(Align Lhs, Align Rhs); friend bool operator>=(Align Lhs, Align Rhs); friend bool operator<(Align Lhs, Align Rhs); friend bool operator>(Align Lhs, Align Rhs); friend unsigned encode(struct MaybeAlign A); friend struct MaybeAlign decodeMaybeAlign(unsigned Value); # 62 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Alignment.h" struct LogValue { uint8_t Log; }; public: constexpr Align() = default; constexpr Align(const Align &Other) = default; constexpr Align(Align &&Other) = default; Align &operator=(const Align &Other) = default; Align &operator=(Align &&Other) = default; explicit Align(uint64_t Value) { (static_cast<void> (0)); (static_cast<void> (0)); ShiftValue = Log2_64(Value); (static_cast<void> (0)); } uint64_t value() const { return uint64_t(1) << ShiftValue; } constexpr static const Align None() __attribute__((deprecated("Use Align() or Align(1) instead"))) { return Align(); } template <size_t kValue> constexpr static LogValue Constant() { return LogValue{static_cast<uint8_t>(CTLog2<kValue>())}; } template <typename T> constexpr static LogValue Of() { return Constant<std::alignment_of<T>::value>(); } constexpr Align(LogValue CA) : ShiftValue(CA.Log) {} }; inline Align assumeAligned(uint64_t Value) { return Value ? Align(Value) : Align(); } struct MaybeAlign : public llvm::Optional<Align> { private: using UP = llvm::Optional<Align>; public: MaybeAlign() = default; MaybeAlign(const MaybeAlign &Other) = default; MaybeAlign &operator=(const MaybeAlign &Other) = default; MaybeAlign(MaybeAlign &&Other) = default; MaybeAlign &operator=(MaybeAlign &&Other) = default; using UP::UP; explicit MaybeAlign(uint64_t Value) { (static_cast<void> (0)); if (Value) emplace(Value); } Align valueOrOne() const { return hasValue() ? getValue() : Align(); } }; inline bool isAligned(Align Lhs, uint64_t SizeInBytes) { return SizeInBytes % Lhs.value() == 0; } inline bool isAddrAligned(Align Lhs, const void *Addr) { return isAligned(Lhs, reinterpret_cast<uintptr_t>(Addr)); } inline uint64_t alignTo(uint64_t Size, Align A) { const uint64_t Value = A.value(); # 169 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Alignment.h" return (Size + Value - 1) & ~(Value - 1U); } # 183 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Alignment.h" inline uint64_t alignTo(uint64_t Size, Align A, uint64_t Skew) { const uint64_t Value = A.value(); Skew %= Value; return ((Size + Value - 1 - Skew) & ~(Value - 1U)) + Skew; } inline uint64_t alignTo(uint64_t Size, MaybeAlign A) { return A ? alignTo(Size, A.getValue()) : Size; } inline uintptr_t alignAddr(const void *Addr, Align Alignment) { uintptr_t ArithAddr = reinterpret_cast<uintptr_t>(Addr); (static_cast<void> (0)); return alignTo(ArithAddr, Alignment); } inline uint64_t offsetToAlignment(uint64_t Value, Align Alignment) { return alignTo(Value, Alignment) - Value; } inline uint64_t offsetToAlignedAddr(const void *Addr, Align Alignment) { return offsetToAlignment(reinterpret_cast<uintptr_t>(Addr), Alignment); } inline unsigned Log2(Align A) { return A.ShiftValue; } inline Align commonAlignment(Align A, Align B) { return std::min(A, B); } inline Align commonAlignment(Align A, uint64_t Offset) { return Align(MinAlign(A.value(), Offset)); } inline MaybeAlign commonAlignment(MaybeAlign A, MaybeAlign B) { return A && B ? commonAlignment(*A, *B) : A ? A : B; } inline MaybeAlign commonAlignment(MaybeAlign A, uint64_t Offset) { return MaybeAlign(MinAlign((*A).value(), Offset)); } inline unsigned encode(MaybeAlign A) { return A ? A->ShiftValue + 1 : 0; } inline MaybeAlign decodeMaybeAlign(unsigned Value) { if (Value == 0) return MaybeAlign(); Align Out; Out.ShiftValue = Value - 1; return Out; } inline unsigned encode(Align A) { return encode(MaybeAlign(A)); } inline bool operator==(Align Lhs, uint64_t Rhs) { (static_cast<void> (0)); return Lhs.value() == Rhs; } inline bool operator!=(Align Lhs, uint64_t Rhs) { (static_cast<void> (0)); return Lhs.value() != Rhs; } inline bool operator<=(Align Lhs, uint64_t Rhs) { (static_cast<void> (0)); return Lhs.value() <= Rhs; } inline bool operator>=(Align Lhs, uint64_t Rhs) { (static_cast<void> (0)); return Lhs.value() >= Rhs; } inline bool operator<(Align Lhs, uint64_t Rhs) { (static_cast<void> (0)); return Lhs.value() < Rhs; } inline bool operator>(Align Lhs, uint64_t Rhs) { (static_cast<void> (0)); return Lhs.value() > Rhs; } inline bool operator==(MaybeAlign Lhs, uint64_t Rhs) { return Lhs ? (*Lhs).value() == Rhs : Rhs == 0; } inline bool operator!=(MaybeAlign Lhs, uint64_t Rhs) { return Lhs ? (*Lhs).value() != Rhs : Rhs != 0; } inline bool operator==(Align Lhs, Align Rhs) { return Lhs.ShiftValue == Rhs.ShiftValue; } inline bool operator!=(Align Lhs, Align Rhs) { return Lhs.ShiftValue != Rhs.ShiftValue; } inline bool operator<=(Align Lhs, Align Rhs) { return Lhs.ShiftValue <= Rhs.ShiftValue; } inline bool operator>=(Align Lhs, Align Rhs) { return Lhs.ShiftValue >= Rhs.ShiftValue; } inline bool operator<(Align Lhs, Align Rhs) { return Lhs.ShiftValue < Rhs.ShiftValue; } inline bool operator>(Align Lhs, Align Rhs) { return Lhs.ShiftValue > Rhs.ShiftValue; } bool operator<=(Align Lhs, MaybeAlign Rhs) = delete; bool operator>=(Align Lhs, MaybeAlign Rhs) = delete; bool operator<(Align Lhs, MaybeAlign Rhs) = delete; bool operator>(Align Lhs, MaybeAlign Rhs) = delete; bool operator<=(MaybeAlign Lhs, Align Rhs) = delete; bool operator>=(MaybeAlign Lhs, Align Rhs) = delete; bool operator<(MaybeAlign Lhs, Align Rhs) = delete; bool operator>(MaybeAlign Lhs, Align Rhs) = delete; bool operator<=(MaybeAlign Lhs, MaybeAlign Rhs) = delete; bool operator>=(MaybeAlign Lhs, MaybeAlign Rhs) = delete; bool operator<(MaybeAlign Lhs, MaybeAlign Rhs) = delete; bool operator>(MaybeAlign Lhs, MaybeAlign Rhs) = delete; inline Align operator*(Align Lhs, uint64_t Rhs) { (static_cast<void> (0)); return Align(Lhs.value() * Rhs); } inline MaybeAlign operator*(MaybeAlign Lhs, uint64_t Rhs) { (static_cast<void> (0)); return Lhs ? Lhs.getValue() * Rhs : MaybeAlign(); } inline Align operator/(Align Lhs, uint64_t Divisor) { (static_cast<void> (0)); (static_cast<void> (0)); return Align(Lhs.value() / Divisor); } inline MaybeAlign operator/(MaybeAlign Lhs, uint64_t Divisor) { (static_cast<void> (0)); return Lhs ? Lhs.getValue() / Divisor : MaybeAlign(); } inline Align max(MaybeAlign Lhs, Align Rhs) { return Lhs && *Lhs > Rhs ? *Lhs : Rhs; } inline Align max(Align Lhs, MaybeAlign Rhs) { return Rhs && *Rhs > Lhs ? *Rhs : Lhs; } # 373 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Alignment.h" } # 25 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Attributes.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 1 3 # 46 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 # 64 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 74 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 template<size_t _Nw> struct _Base_bitset { typedef unsigned long _WordT; _WordT _M_w[_Nw]; constexpr _Base_bitset() noexcept : _M_w() { } constexpr _Base_bitset(unsigned long long __val) noexcept : _M_w{ _WordT(__val) } { } static constexpr size_t _S_whichword(size_t __pos) noexcept { return __pos / (8 * 8); } static constexpr size_t _S_whichbyte(size_t __pos) noexcept { return (__pos % (8 * 8)) / 8; } static constexpr size_t _S_whichbit(size_t __pos) noexcept { return __pos % (8 * 8); } static constexpr _WordT _S_maskbit(size_t __pos) noexcept { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } _WordT& _M_getword(size_t __pos) noexcept { return _M_w[_S_whichword(__pos)]; } constexpr _WordT _M_getword(size_t __pos) const noexcept { return _M_w[_S_whichword(__pos)]; } const _WordT* _M_getdata() const noexcept { return _M_w; } _WordT& _M_hiword() noexcept { return _M_w[_Nw - 1]; } constexpr _WordT _M_hiword() const noexcept { return _M_w[_Nw - 1]; } void _M_do_and(const _Base_bitset<_Nw>& __x) noexcept { for (size_t __i = 0; __i < _Nw; __i++) _M_w[__i] &= __x._M_w[__i]; } void _M_do_or(const _Base_bitset<_Nw>& __x) noexcept { for (size_t __i = 0; __i < _Nw; __i++) _M_w[__i] |= __x._M_w[__i]; } void _M_do_xor(const _Base_bitset<_Nw>& __x) noexcept { for (size_t __i = 0; __i < _Nw; __i++) _M_w[__i] ^= __x._M_w[__i]; } void _M_do_left_shift(size_t __shift) noexcept; void _M_do_right_shift(size_t __shift) noexcept; void _M_do_flip() noexcept { for (size_t __i = 0; __i < _Nw; __i++) _M_w[__i] = ~_M_w[__i]; } void _M_do_set() noexcept { for (size_t __i = 0; __i < _Nw; __i++) _M_w[__i] = ~static_cast<_WordT>(0); } void _M_do_reset() noexcept { __builtin_memset(_M_w, 0, _Nw * sizeof(_WordT)); } bool _M_is_equal(const _Base_bitset<_Nw>& __x) const noexcept { for (size_t __i = 0; __i < _Nw; ++__i) if (_M_w[__i] != __x._M_w[__i]) return false; return true; } template<size_t _Nb> bool _M_are_all() const noexcept { for (size_t __i = 0; __i < _Nw - 1; __i++) if (_M_w[__i] != ~static_cast<_WordT>(0)) return false; return _M_hiword() == (~static_cast<_WordT>(0) >> (_Nw * (8 * 8) - _Nb)); } bool _M_is_any() const noexcept { for (size_t __i = 0; __i < _Nw; __i++) if (_M_w[__i] != static_cast<_WordT>(0)) return true; return false; } size_t _M_do_count() const noexcept { size_t __result = 0; for (size_t __i = 0; __i < _Nw; __i++) __result += __builtin_popcountl(_M_w[__i]); return __result; } unsigned long _M_do_to_ulong() const; unsigned long long _M_do_to_ullong() const; size_t _M_do_find_first(size_t) const noexcept; size_t _M_do_find_next(size_t, size_t) const noexcept; }; template<size_t _Nw> void _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift) noexcept { if (__builtin_expect(__shift != 0, 1)) { const size_t __wshift = __shift / (8 * 8); const size_t __offset = __shift % (8 * 8); if (__offset == 0) for (size_t __n = _Nw - 1; __n >= __wshift; --__n) _M_w[__n] = _M_w[__n - __wshift]; else { const size_t __sub_offset = ((8 * 8) - __offset); for (size_t __n = _Nw - 1; __n > __wshift; --__n) _M_w[__n] = ((_M_w[__n - __wshift] << __offset) | (_M_w[__n - __wshift - 1] >> __sub_offset)); _M_w[__wshift] = _M_w[0] << __offset; } std::fill(_M_w + 0, _M_w + __wshift, static_cast<_WordT>(0)); } } template<size_t _Nw> void _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift) noexcept { if (__builtin_expect(__shift != 0, 1)) { const size_t __wshift = __shift / (8 * 8); const size_t __offset = __shift % (8 * 8); const size_t __limit = _Nw - __wshift - 1; if (__offset == 0) for (size_t __n = 0; __n <= __limit; ++__n) _M_w[__n] = _M_w[__n + __wshift]; else { const size_t __sub_offset = ((8 * 8) - __offset); for (size_t __n = 0; __n < __limit; ++__n) _M_w[__n] = ((_M_w[__n + __wshift] >> __offset) | (_M_w[__n + __wshift + 1] << __sub_offset)); _M_w[__limit] = _M_w[_Nw-1] >> __offset; } std::fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0)); } } template<size_t _Nw> unsigned long _Base_bitset<_Nw>::_M_do_to_ulong() const { for (size_t __i = 1; __i < _Nw; ++__i) if (_M_w[__i]) __throw_overflow_error(("_Base_bitset::_M_do_to_ulong")); return _M_w[0]; } template<size_t _Nw> unsigned long long _Base_bitset<_Nw>::_M_do_to_ullong() const { const bool __dw = sizeof(unsigned long long) > sizeof(unsigned long); for (size_t __i = 1 + __dw; __i < _Nw; ++__i) if (_M_w[__i]) __throw_overflow_error(("_Base_bitset::_M_do_to_ullong")); if (__dw) return _M_w[0] + (static_cast<unsigned long long>(_M_w[1]) << (8 * 8)); return _M_w[0]; } template<size_t _Nw> size_t _Base_bitset<_Nw>:: _M_do_find_first(size_t __not_found) const noexcept { for (size_t __i = 0; __i < _Nw; __i++) { _WordT __thisword = _M_w[__i]; if (__thisword != static_cast<_WordT>(0)) return (__i * (8 * 8) + __builtin_ctzl(__thisword)); } return __not_found; } template<size_t _Nw> size_t _Base_bitset<_Nw>:: _M_do_find_next(size_t __prev, size_t __not_found) const noexcept { ++__prev; if (__prev >= _Nw * (8 * 8)) return __not_found; size_t __i = _S_whichword(__prev); _WordT __thisword = _M_w[__i]; __thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev); if (__thisword != static_cast<_WordT>(0)) return (__i * (8 * 8) + __builtin_ctzl(__thisword)); __i++; for (; __i < _Nw; __i++) { __thisword = _M_w[__i]; if (__thisword != static_cast<_WordT>(0)) return (__i * (8 * 8) + __builtin_ctzl(__thisword)); } return __not_found; } template<> struct _Base_bitset<1> { typedef unsigned long _WordT; _WordT _M_w; constexpr _Base_bitset() noexcept : _M_w(0) { } constexpr _Base_bitset(unsigned long long __val) noexcept : _M_w(__val) { } static constexpr size_t _S_whichword(size_t __pos) noexcept { return __pos / (8 * 8); } static constexpr size_t _S_whichbyte(size_t __pos) noexcept { return (__pos % (8 * 8)) / 8; } static constexpr size_t _S_whichbit(size_t __pos) noexcept { return __pos % (8 * 8); } static constexpr _WordT _S_maskbit(size_t __pos) noexcept { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } _WordT& _M_getword(size_t) noexcept { return _M_w; } constexpr _WordT _M_getword(size_t) const noexcept { return _M_w; } const _WordT* _M_getdata() const noexcept { return &_M_w; } _WordT& _M_hiword() noexcept { return _M_w; } constexpr _WordT _M_hiword() const noexcept { return _M_w; } void _M_do_and(const _Base_bitset<1>& __x) noexcept { _M_w &= __x._M_w; } void _M_do_or(const _Base_bitset<1>& __x) noexcept { _M_w |= __x._M_w; } void _M_do_xor(const _Base_bitset<1>& __x) noexcept { _M_w ^= __x._M_w; } void _M_do_left_shift(size_t __shift) noexcept { _M_w <<= __shift; } void _M_do_right_shift(size_t __shift) noexcept { _M_w >>= __shift; } void _M_do_flip() noexcept { _M_w = ~_M_w; } void _M_do_set() noexcept { _M_w = ~static_cast<_WordT>(0); } void _M_do_reset() noexcept { _M_w = 0; } bool _M_is_equal(const _Base_bitset<1>& __x) const noexcept { return _M_w == __x._M_w; } template<size_t _Nb> bool _M_are_all() const noexcept { return _M_w == (~static_cast<_WordT>(0) >> ((8 * 8) - _Nb)); } bool _M_is_any() const noexcept { return _M_w != 0; } size_t _M_do_count() const noexcept { return __builtin_popcountl(_M_w); } unsigned long _M_do_to_ulong() const noexcept { return _M_w; } unsigned long long _M_do_to_ullong() const noexcept { return _M_w; } size_t _M_do_find_first(size_t __not_found) const noexcept { if (_M_w != 0) return __builtin_ctzl(_M_w); else return __not_found; } size_t _M_do_find_next(size_t __prev, size_t __not_found) const noexcept { ++__prev; if (__prev >= ((size_t) (8 * 8))) return __not_found; _WordT __x = _M_w >> __prev; if (__x != 0) return __builtin_ctzl(__x) + __prev; else return __not_found; } }; template<> struct _Base_bitset<0> { typedef unsigned long _WordT; constexpr _Base_bitset() noexcept { } constexpr _Base_bitset(unsigned long long) noexcept { } static constexpr size_t _S_whichword(size_t __pos) noexcept { return __pos / (8 * 8); } static constexpr size_t _S_whichbyte(size_t __pos) noexcept { return (__pos % (8 * 8)) / 8; } static constexpr size_t _S_whichbit(size_t __pos) noexcept { return __pos % (8 * 8); } static constexpr _WordT _S_maskbit(size_t __pos) noexcept { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } # 560 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 _WordT& _M_getword(size_t) noexcept { __throw_out_of_range(("_Base_bitset::_M_getword")); return *new _WordT; } constexpr _WordT _M_getword(size_t) const noexcept { return 0; } constexpr _WordT _M_hiword() const noexcept { return 0; } void _M_do_and(const _Base_bitset<0>&) noexcept { } void _M_do_or(const _Base_bitset<0>&) noexcept { } void _M_do_xor(const _Base_bitset<0>&) noexcept { } void _M_do_left_shift(size_t) noexcept { } void _M_do_right_shift(size_t) noexcept { } void _M_do_flip() noexcept { } void _M_do_set() noexcept { } void _M_do_reset() noexcept { } bool _M_is_equal(const _Base_bitset<0>&) const noexcept { return true; } template<size_t _Nb> bool _M_are_all() const noexcept { return true; } bool _M_is_any() const noexcept { return false; } size_t _M_do_count() const noexcept { return 0; } unsigned long _M_do_to_ulong() const noexcept { return 0; } unsigned long long _M_do_to_ullong() const noexcept { return 0; } size_t _M_do_find_first(size_t) const noexcept { return 0; } size_t _M_do_find_next(size_t, size_t) const noexcept { return 0; } }; template<size_t _Extrabits> struct _Sanitize { typedef unsigned long _WordT; static void _S_do_sanitize(_WordT& __val) noexcept { __val &= ~((~static_cast<_WordT>(0)) << _Extrabits); } }; template<> struct _Sanitize<0> { typedef unsigned long _WordT; static void _S_do_sanitize(_WordT) noexcept { } }; template<size_t _Nb, bool = (_Nb < (8 * 8))> struct _Sanitize_val { static constexpr unsigned long long _S_do_sanitize_val(unsigned long long __val) { return __val; } }; template<size_t _Nb> struct _Sanitize_val<_Nb, true> { static constexpr unsigned long long _S_do_sanitize_val(unsigned long long __val) { return __val & ~((~static_cast<unsigned long long>(0)) << _Nb); } }; # 750 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 template<size_t _Nb> class bitset : private _Base_bitset<((_Nb) / (8 * 8) + ((_Nb) % (8 * 8) == 0 ? 0 : 1))> { private: typedef _Base_bitset<((_Nb) / (8 * 8) + ((_Nb) % (8 * 8) == 0 ? 0 : 1))> _Base; typedef unsigned long _WordT; template<class _CharT, class _Traits, class _Alloc> void _M_check_initial_position(const std::basic_string<_CharT, _Traits, _Alloc>& __s, size_t __position) const { if (__position > __s.size()) __throw_out_of_range_fmt(("bitset::bitset: __position " "(which is %zu) > __s.size() " "(which is %zu)"), __position, __s.size()); } void _M_check(size_t __position, const char *__s) const { if (__position >= _Nb) __throw_out_of_range_fmt(("%s: __position (which is %zu) " ">= _Nb (which is %zu)"), __s, __position, _Nb); } void _M_do_sanitize() noexcept { typedef _Sanitize<_Nb % (8 * 8)> __sanitize_type; __sanitize_type::_S_do_sanitize(this->_M_hiword()); } friend struct std::hash<bitset>; public: # 802 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 class reference { friend class bitset; _WordT* _M_wp; size_t _M_bpos; reference(); public: reference(bitset& __b, size_t __pos) noexcept { _M_wp = &__b._M_getword(__pos); _M_bpos = _Base::_S_whichbit(__pos); } ~reference() noexcept { } reference& operator=(bool __x) noexcept { if (__x) *_M_wp |= _Base::_S_maskbit(_M_bpos); else *_M_wp &= ~_Base::_S_maskbit(_M_bpos); return *this; } reference& operator=(const reference& __j) noexcept { if ((*(__j._M_wp) & _Base::_S_maskbit(__j._M_bpos))) *_M_wp |= _Base::_S_maskbit(_M_bpos); else *_M_wp &= ~_Base::_S_maskbit(_M_bpos); return *this; } bool operator~() const noexcept { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) == 0; } operator bool() const noexcept { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) != 0; } reference& flip() noexcept { *_M_wp ^= _Base::_S_maskbit(_M_bpos); return *this; } }; friend class reference; constexpr bitset() noexcept { } constexpr bitset(unsigned long long __val) noexcept : _Base(_Sanitize_val<_Nb>::_S_do_sanitize_val(__val)) { } # 887 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 template<class _CharT, class _Traits, class _Alloc> explicit bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, size_t __position = 0) : _Base() { _M_check_initial_position(__s, __position); _M_copy_from_string(__s, __position, std::basic_string<_CharT, _Traits, _Alloc>::npos, _CharT('0'), _CharT('1')); } # 909 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 template<class _CharT, class _Traits, class _Alloc> bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, size_t __position, size_t __n) : _Base() { _M_check_initial_position(__s, __position); _M_copy_from_string(__s, __position, __n, _CharT('0'), _CharT('1')); } template<class _CharT, class _Traits, class _Alloc> bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, size_t __position, size_t __n, _CharT __zero, _CharT __one = _CharT('1')) : _Base() { _M_check_initial_position(__s, __position); _M_copy_from_string(__s, __position, __n, __zero, __one); } # 940 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 template<typename _CharT> explicit bitset(const _CharT* __str, typename std::basic_string<_CharT>::size_type __n = std::basic_string<_CharT>::npos, _CharT __zero = _CharT('0'), _CharT __one = _CharT('1')) : _Base() { if (!__str) __throw_logic_error(("bitset::bitset(const _CharT*, ...)")); if (__n == std::basic_string<_CharT>::npos) __n = std::char_traits<_CharT>::length(__str); _M_copy_from_ptr<_CharT, std::char_traits<_CharT>>(__str, __n, 0, __n, __zero, __one); } # 967 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 bitset<_Nb>& operator&=(const bitset<_Nb>& __rhs) noexcept { this->_M_do_and(__rhs); return *this; } bitset<_Nb>& operator|=(const bitset<_Nb>& __rhs) noexcept { this->_M_do_or(__rhs); return *this; } bitset<_Nb>& operator^=(const bitset<_Nb>& __rhs) noexcept { this->_M_do_xor(__rhs); return *this; } # 996 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 bitset<_Nb>& operator<<=(size_t __position) noexcept { if (__builtin_expect(__position < _Nb, 1)) { this->_M_do_left_shift(__position); this->_M_do_sanitize(); } else this->_M_do_reset(); return *this; } bitset<_Nb>& operator>>=(size_t __position) noexcept { if (__builtin_expect(__position < _Nb, 1)) { this->_M_do_right_shift(__position); this->_M_do_sanitize(); } else this->_M_do_reset(); return *this; } # 1029 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 bitset<_Nb>& _Unchecked_set(size_t __pos) noexcept { this->_M_getword(__pos) |= _Base::_S_maskbit(__pos); return *this; } bitset<_Nb>& _Unchecked_set(size_t __pos, int __val) noexcept { if (__val) this->_M_getword(__pos) |= _Base::_S_maskbit(__pos); else this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos); return *this; } bitset<_Nb>& _Unchecked_reset(size_t __pos) noexcept { this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos); return *this; } bitset<_Nb>& _Unchecked_flip(size_t __pos) noexcept { this->_M_getword(__pos) ^= _Base::_S_maskbit(__pos); return *this; } constexpr bool _Unchecked_test(size_t __pos) const noexcept { return ((this->_M_getword(__pos) & _Base::_S_maskbit(__pos)) != static_cast<_WordT>(0)); } bitset<_Nb>& set() noexcept { this->_M_do_set(); this->_M_do_sanitize(); return *this; } bitset<_Nb>& set(size_t __position, bool __val = true) { this->_M_check(__position, ("bitset::set")); return _Unchecked_set(__position, __val); } bitset<_Nb>& reset() noexcept { this->_M_do_reset(); return *this; } # 1108 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 bitset<_Nb>& reset(size_t __position) { this->_M_check(__position, ("bitset::reset")); return _Unchecked_reset(__position); } bitset<_Nb>& flip() noexcept { this->_M_do_flip(); this->_M_do_sanitize(); return *this; } bitset<_Nb>& flip(size_t __position) { this->_M_check(__position, ("bitset::flip")); return _Unchecked_flip(__position); } bitset<_Nb> operator~() const noexcept { return bitset<_Nb>(*this).flip(); } # 1158 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 reference operator[](size_t __position) { return reference(*this, __position); } constexpr bool operator[](size_t __position) const { return _Unchecked_test(__position); } # 1173 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 unsigned long to_ulong() const { return this->_M_do_to_ulong(); } unsigned long long to_ullong() const { return this->_M_do_to_ullong(); } # 1191 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> to_string() const { std::basic_string<_CharT, _Traits, _Alloc> __result; _M_copy_to_string(__result, _CharT('0'), _CharT('1')); return __result; } template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> to_string(_CharT __zero, _CharT __one = _CharT('1')) const { std::basic_string<_CharT, _Traits, _Alloc> __result; _M_copy_to_string(__result, __zero, __one); return __result; } template<class _CharT, class _Traits> std::basic_string<_CharT, _Traits, std::allocator<_CharT> > to_string() const { return to_string<_CharT, _Traits, std::allocator<_CharT> >(); } template<class _CharT, class _Traits> std::basic_string<_CharT, _Traits, std::allocator<_CharT> > to_string(_CharT __zero, _CharT __one = _CharT('1')) const { return to_string<_CharT, _Traits, std::allocator<_CharT> >(__zero, __one); } template<class _CharT> std::basic_string<_CharT, std::char_traits<_CharT>, std::allocator<_CharT> > to_string() const { return to_string<_CharT, std::char_traits<_CharT>, std::allocator<_CharT> >(); } template<class _CharT> std::basic_string<_CharT, std::char_traits<_CharT>, std::allocator<_CharT> > to_string(_CharT __zero, _CharT __one = _CharT('1')) const { return to_string<_CharT, std::char_traits<_CharT>, std::allocator<_CharT> >(__zero, __one); } std::basic_string<char, std::char_traits<char>, std::allocator<char> > to_string() const { return to_string<char, std::char_traits<char>, std::allocator<char> >(); } std::basic_string<char, std::char_traits<char>, std::allocator<char> > to_string(char __zero, char __one = '1') const { return to_string<char, std::char_traits<char>, std::allocator<char> >(__zero, __one); } template<class _CharT, class _Traits> void _M_copy_from_ptr(const _CharT*, size_t, size_t, size_t, _CharT, _CharT); template<class _CharT, class _Traits, class _Alloc> void _M_copy_from_string(const std::basic_string<_CharT, _Traits, _Alloc>& __s, size_t __pos, size_t __n, _CharT __zero, _CharT __one) { _M_copy_from_ptr<_CharT, _Traits>(__s.data(), __s.size(), __pos, __n, __zero, __one); } template<class _CharT, class _Traits, class _Alloc> void _M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>&, _CharT, _CharT) const; template<class _CharT, class _Traits, class _Alloc> void _M_copy_from_string(const std::basic_string<_CharT, _Traits, _Alloc>& __s, size_t __pos, size_t __n) { _M_copy_from_string(__s, __pos, __n, _CharT('0'), _CharT('1')); } template<class _CharT, class _Traits, class _Alloc> void _M_copy_to_string(std::basic_string<_CharT, _Traits,_Alloc>& __s) const { _M_copy_to_string(__s, _CharT('0'), _CharT('1')); } size_t count() const noexcept { return this->_M_do_count(); } constexpr size_t size() const noexcept { return _Nb; } bool operator==(const bitset<_Nb>& __rhs) const noexcept { return this->_M_is_equal(__rhs); } bool operator!=(const bitset<_Nb>& __rhs) const noexcept { return !this->_M_is_equal(__rhs); } # 1316 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 bool test(size_t __position) const { this->_M_check(__position, ("bitset::test")); return _Unchecked_test(__position); } bool all() const noexcept { return this->template _M_are_all<_Nb>(); } bool any() const noexcept { return this->_M_is_any(); } bool none() const noexcept { return !this->_M_is_any(); } bitset<_Nb> operator<<(size_t __position) const noexcept { return bitset<_Nb>(*this) <<= __position; } bitset<_Nb> operator>>(size_t __position) const noexcept { return bitset<_Nb>(*this) >>= __position; } # 1366 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 size_t _Find_first() const noexcept { return this->_M_do_find_first(_Nb); } # 1377 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 size_t _Find_next(size_t __prev) const noexcept { return this->_M_do_find_next(__prev, _Nb); } }; template<size_t _Nb> template<class _CharT, class _Traits> void bitset<_Nb>:: _M_copy_from_ptr(const _CharT* __s, size_t __len, size_t __pos, size_t __n, _CharT __zero, _CharT __one) { reset(); const size_t __nbits = std::min(_Nb, std::min(__n, size_t(__len - __pos))); for (size_t __i = __nbits; __i > 0; --__i) { const _CharT __c = __s[__pos + __nbits - __i]; if (_Traits::eq(__c, __zero)) ; else if (_Traits::eq(__c, __one)) _Unchecked_set(__i - 1); else __throw_invalid_argument(("bitset::_M_copy_from_ptr")); } } template<size_t _Nb> template<class _CharT, class _Traits, class _Alloc> void bitset<_Nb>:: _M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>& __s, _CharT __zero, _CharT __one) const { __s.assign(_Nb, __zero); for (size_t __i = _Nb; __i > 0; --__i) if (_Unchecked_test(__i - 1)) _Traits::assign(__s[_Nb - __i], __one); } # 1427 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 template<size_t _Nb> inline bitset<_Nb> operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept { bitset<_Nb> __result(__x); __result &= __y; return __result; } template<size_t _Nb> inline bitset<_Nb> operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept { bitset<_Nb> __result(__x); __result |= __y; return __result; } template <size_t _Nb> inline bitset<_Nb> operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept { bitset<_Nb> __result(__x); __result ^= __y; return __result; } # 1464 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bitset" 3 template<class _CharT, class _Traits, size_t _Nb> std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) { typedef typename _Traits::char_type char_type; typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; std::basic_string<_CharT, _Traits> __tmp; __tmp.reserve(_Nb); const char_type __zero = __is.widen('0'); const char_type __one = __is.widen('1'); typename __ios_base::iostate __state = __ios_base::goodbit; typename __istream_type::sentry __sentry(__is); if (__sentry) { if (true) { for (size_t __i = _Nb; __i > 0; --__i) { static typename _Traits::int_type __eof = _Traits::eof(); typename _Traits::int_type __c1 = __is.rdbuf()->sbumpc(); if (_Traits::eq_int_type(__c1, __eof)) { __state |= __ios_base::eofbit; break; } else { const char_type __c2 = _Traits::to_char_type(__c1); if (_Traits::eq(__c2, __zero)) __tmp.push_back(__zero); else if (_Traits::eq(__c2, __one)) __tmp.push_back(__one); else if (_Traits:: eq_int_type(__is.rdbuf()->sputbackc(__c2), __eof)) { __state |= __ios_base::failbit; break; } } } } if (false) { __is._M_setstate(__ios_base::badbit); ; } if (false) { __is._M_setstate(__ios_base::badbit); } } if (__tmp.empty() && _Nb) __state |= __ios_base::failbit; else __x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb, __zero, __one); if (__state) __is.setstate(__state); return __is; } template <class _CharT, class _Traits, size_t _Nb> std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x) { std::basic_string<_CharT, _Traits> __tmp; const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__os.getloc()); __x._M_copy_to_string(__tmp, __ct.widen('0'), __ct.widen('1')); return __os << __tmp; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<size_t _Nb> struct hash<std::bitset<_Nb>> : public __hash_base<size_t, std::bitset<_Nb>> { size_t operator()(const std::bitset<_Nb>& __b) const noexcept { const size_t __clength = (_Nb + 8 - 1) / 8; return std::_Hash_impl::hash(__b._M_getdata(), __clength); } }; template<> struct hash<std::bitset<0>> : public __hash_base<size_t, std::bitset<0>> { size_t operator()(const std::bitset<0>&) const noexcept { return 0; } }; } # 27 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Attributes.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 28 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Attributes.h" 2 namespace llvm { class AttrBuilder; class AttributeImpl; class AttributeListImpl; class AttributeSetNode; template<typename T> struct DenseMapInfo; class FoldingSetNodeID; class Function; class LLVMContext; class Type; class Attribute { public: # 70 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Attributes.h" enum AttrKind { None, # 1 "include/llvm/IR/Attributes.inc" 1 # 11 "include/llvm/IR/Attributes.inc" AlwaysInline, ArgMemOnly, Builtin, Cold, Convergent, ImmArg, InAlloca, InReg, InaccessibleMemOnly, InaccessibleMemOrArgMemOnly, InlineHint, JumpTable, MinSize, Naked, Nest, NoAlias, NoBuiltin, NoCapture, NoCfCheck, NoDuplicate, NoFree, NoImplicitFloat, NoInline, NoMerge, NoRecurse, NoRedZone, NoReturn, NoSync, NoUndef, NoUnwind, NonLazyBind, NonNull, NullPointerIsValid, OptForFuzzing, OptimizeForSize, OptimizeNone, ReadNone, ReadOnly, Returned, ReturnsTwice, SExt, SafeStack, SanitizeAddress, SanitizeHWAddress, SanitizeMemTag, SanitizeMemory, SanitizeThread, ShadowCallStack, Speculatable, SpeculativeLoadHardening, StackProtect, StackProtectReq, StackProtectStrong, StrictFP, StructRet, SwiftError, SwiftSelf, UWTable, WillReturn, WriteOnly, ZExt, ByVal, Preallocated, Alignment, AllocSize, Dereferenceable, DereferenceableOrNull, StackAlignment, # 76 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Attributes.h" 2 EndAttrKinds, EmptyKey, TombstoneKey, }; private: AttributeImpl *pImpl = nullptr; Attribute(AttributeImpl *A) : pImpl(A) {} public: Attribute() = default; static Attribute get(LLVMContext &Context, AttrKind Kind, uint64_t Val = 0); static Attribute get(LLVMContext &Context, StringRef Kind, StringRef Val = StringRef()); static Attribute get(LLVMContext &Context, AttrKind Kind, Type *Ty); static Attribute getWithAlignment(LLVMContext &Context, Align Alignment); static Attribute getWithStackAlignment(LLVMContext &Context, Align Alignment); static Attribute getWithDereferenceableBytes(LLVMContext &Context, uint64_t Bytes); static Attribute getWithDereferenceableOrNullBytes(LLVMContext &Context, uint64_t Bytes); static Attribute getWithAllocSizeArgs(LLVMContext &Context, unsigned ElemSizeArg, const Optional<unsigned> &NumElemsArg); static Attribute getWithByValType(LLVMContext &Context, Type *Ty); static Attribute getWithPreallocatedType(LLVMContext &Context, Type *Ty); static Attribute::AttrKind getAttrKindFromName(StringRef AttrName); static StringRef getNameFromAttrKind(Attribute::AttrKind AttrKind); static bool doesAttrKindHaveArgument(Attribute::AttrKind AttrKind); static bool isExistingAttribute(StringRef Name); bool isEnumAttribute() const; bool isIntAttribute() const; bool isStringAttribute() const; bool isTypeAttribute() const; bool hasAttribute(AttrKind Val) const; bool hasAttribute(StringRef Val) const; Attribute::AttrKind getKindAsEnum() const; uint64_t getValueAsInt() const; StringRef getKindAsString() const; StringRef getValueAsString() const; Type *getValueAsType() const; MaybeAlign getAlignment() const; MaybeAlign getStackAlignment() const; uint64_t getDereferenceableBytes() const; uint64_t getDereferenceableOrNullBytes() const; std::pair<unsigned, Optional<unsigned>> getAllocSizeArgs() const; std::string getAsString(bool InAttrGrp = false) const; bool operator==(Attribute A) const { return pImpl == A.pImpl; } bool operator!=(Attribute A) const { return pImpl != A.pImpl; } bool operator<(Attribute A) const; void Profile(FoldingSetNodeID &ID) const; void *getRawPointer() const { return pImpl; } static Attribute fromRawPointer(void *RawPtr) { return Attribute(reinterpret_cast<AttributeImpl*>(RawPtr)); } }; inline LLVMAttributeRef wrap(Attribute Attr) { return reinterpret_cast<LLVMAttributeRef>(Attr.getRawPointer()); } inline Attribute unwrap(LLVMAttributeRef Attr) { return Attribute::fromRawPointer(Attr); } class AttributeSet { friend AttributeListImpl; template <typename Ty> friend struct DenseMapInfo; AttributeSetNode *SetNode = nullptr; private: explicit AttributeSet(AttributeSetNode *ASN) : SetNode(ASN) {} public: AttributeSet() = default; AttributeSet(const AttributeSet &) = default; ~AttributeSet() = default; static AttributeSet get(LLVMContext &C, const AttrBuilder &B); static AttributeSet get(LLVMContext &C, ArrayRef<Attribute> Attrs); bool operator==(const AttributeSet &O) const { return SetNode == O.SetNode; } bool operator!=(const AttributeSet &O) const { return !(*this == O); } [[clang::warn_unused_result]] AttributeSet addAttribute(LLVMContext &C, Attribute::AttrKind Kind) const; [[clang::warn_unused_result]] AttributeSet addAttribute(LLVMContext &C, StringRef Kind, StringRef Value = StringRef()) const; [[clang::warn_unused_result]] AttributeSet addAttributes(LLVMContext &C, AttributeSet AS) const; [[clang::warn_unused_result]] AttributeSet removeAttribute(LLVMContext &C, Attribute::AttrKind Kind) const; [[clang::warn_unused_result]] AttributeSet removeAttribute(LLVMContext &C, StringRef Kind) const; [[clang::warn_unused_result]] AttributeSet removeAttributes(LLVMContext &C, const AttrBuilder &AttrsToRemove) const; unsigned getNumAttributes() const; bool hasAttributes() const { return SetNode != nullptr; } bool hasAttribute(Attribute::AttrKind Kind) const; bool hasAttribute(StringRef Kind) const; Attribute getAttribute(Attribute::AttrKind Kind) const; Attribute getAttribute(StringRef Kind) const; MaybeAlign getAlignment() const; MaybeAlign getStackAlignment() const; uint64_t getDereferenceableBytes() const; uint64_t getDereferenceableOrNullBytes() const; Type *getByValType() const; Type *getPreallocatedType() const; std::pair<unsigned, Optional<unsigned>> getAllocSizeArgs() const; std::string getAsString(bool InAttrGrp = false) const; using iterator = const Attribute *; iterator begin() const; iterator end() const; }; template <> struct DenseMapInfo<AttributeSet> { static AttributeSet getEmptyKey() { auto Val = static_cast<uintptr_t>(-1); Val <<= PointerLikeTypeTraits<void *>::NumLowBitsAvailable; return AttributeSet(reinterpret_cast<AttributeSetNode *>(Val)); } static AttributeSet getTombstoneKey() { auto Val = static_cast<uintptr_t>(-2); Val <<= PointerLikeTypeTraits<void *>::NumLowBitsAvailable; return AttributeSet(reinterpret_cast<AttributeSetNode *>(Val)); } static unsigned getHashValue(AttributeSet AS) { return (unsigned((uintptr_t)AS.SetNode) >> 4) ^ (unsigned((uintptr_t)AS.SetNode) >> 9); } static bool isEqual(AttributeSet LHS, AttributeSet RHS) { return LHS == RHS; } }; # 351 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Attributes.h" class AttributeList { public: enum AttrIndex : unsigned { ReturnIndex = 0U, FunctionIndex = ~0U, FirstArgIndex = 1, }; private: friend class AttrBuilder; friend class AttributeListImpl; friend class AttributeSet; friend class AttributeSetNode; template <typename Ty> friend struct DenseMapInfo; AttributeListImpl *pImpl = nullptr; public: static AttributeList get(LLVMContext &C, ArrayRef<std::pair<unsigned, Attribute>> Attrs); static AttributeList get(LLVMContext &C, ArrayRef<std::pair<unsigned, AttributeSet>> Attrs); static AttributeList get(LLVMContext &C, AttributeSet FnAttrs, AttributeSet RetAttrs, ArrayRef<AttributeSet> ArgAttrs); private: explicit AttributeList(AttributeListImpl *LI) : pImpl(LI) {} static AttributeList getImpl(LLVMContext &C, ArrayRef<AttributeSet> AttrSets); public: AttributeList() = default; static AttributeList get(LLVMContext &C, ArrayRef<AttributeList> Attrs); static AttributeList get(LLVMContext &C, unsigned Index, ArrayRef<Attribute::AttrKind> Kinds); static AttributeList get(LLVMContext &C, unsigned Index, ArrayRef<Attribute::AttrKind> Kinds, ArrayRef<uint64_t> Values); static AttributeList get(LLVMContext &C, unsigned Index, ArrayRef<StringRef> Kind); static AttributeList get(LLVMContext &C, unsigned Index, const AttrBuilder &B); [[clang::warn_unused_result]] AttributeList addAttribute(LLVMContext &C, unsigned Index, Attribute::AttrKind Kind) const; [[clang::warn_unused_result]] AttributeList addAttribute(LLVMContext &C, unsigned Index, StringRef Kind, StringRef Value = StringRef()) const; [[clang::warn_unused_result]] AttributeList addAttribute(LLVMContext &C, unsigned Index, Attribute A) const; [[clang::warn_unused_result]] AttributeList addAttributes(LLVMContext &C, unsigned Index, const AttrBuilder &B) const; [[clang::warn_unused_result]] AttributeList addParamAttribute( LLVMContext &C, unsigned ArgNo, Attribute::AttrKind Kind) const { return addAttribute(C, ArgNo + FirstArgIndex, Kind); } [[clang::warn_unused_result]] AttributeList addParamAttribute(LLVMContext &C, unsigned ArgNo, StringRef Kind, StringRef Value = StringRef()) const { return addAttribute(C, ArgNo + FirstArgIndex, Kind, Value); } [[clang::warn_unused_result]] AttributeList addParamAttribute(LLVMContext &C, ArrayRef<unsigned> ArgNos, Attribute A) const; [[clang::warn_unused_result]] AttributeList addParamAttributes(LLVMContext &C, unsigned ArgNo, const AttrBuilder &B) const { return addAttributes(C, ArgNo + FirstArgIndex, B); } [[clang::warn_unused_result]] AttributeList removeAttribute(LLVMContext &C, unsigned Index, Attribute::AttrKind Kind) const; [[clang::warn_unused_result]] AttributeList removeAttribute(LLVMContext &C, unsigned Index, StringRef Kind) const; [[clang::warn_unused_result]] AttributeList removeAttributes( LLVMContext &C, unsigned Index, const AttrBuilder &AttrsToRemove) const; [[clang::warn_unused_result]] AttributeList removeAttributes(LLVMContext &C, unsigned Index) const; [[clang::warn_unused_result]] AttributeList removeParamAttribute( LLVMContext &C, unsigned ArgNo, Attribute::AttrKind Kind) const { return removeAttribute(C, ArgNo + FirstArgIndex, Kind); } [[clang::warn_unused_result]] AttributeList removeParamAttribute(LLVMContext &C, unsigned ArgNo, StringRef Kind) const { return removeAttribute(C, ArgNo + FirstArgIndex, Kind); } [[clang::warn_unused_result]] AttributeList removeParamAttributes( LLVMContext &C, unsigned ArgNo, const AttrBuilder &AttrsToRemove) const { return removeAttributes(C, ArgNo + FirstArgIndex, AttrsToRemove); } [[clang::warn_unused_result]] AttributeList removeParamAttributes(LLVMContext &C, unsigned ArgNo) const { return removeAttributes(C, ArgNo + FirstArgIndex); } [[clang::warn_unused_result]] AttributeList addDereferenceableAttr(LLVMContext &C, unsigned Index, uint64_t Bytes) const; [[clang::warn_unused_result]] AttributeList addDereferenceableParamAttr( LLVMContext &C, unsigned ArgNo, uint64_t Bytes) const { return addDereferenceableAttr(C, ArgNo + FirstArgIndex, Bytes); } [[clang::warn_unused_result]] AttributeList addDereferenceableOrNullAttr( LLVMContext &C, unsigned Index, uint64_t Bytes) const; [[clang::warn_unused_result]] AttributeList addDereferenceableOrNullParamAttr( LLVMContext &C, unsigned ArgNo, uint64_t Bytes) const { return addDereferenceableOrNullAttr(C, ArgNo + FirstArgIndex, Bytes); } [[clang::warn_unused_result]] AttributeList addAllocSizeAttr(LLVMContext &C, unsigned Index, unsigned ElemSizeArg, const Optional<unsigned> &NumElemsArg); [[clang::warn_unused_result]] AttributeList addAllocSizeParamAttr(LLVMContext &C, unsigned ArgNo, unsigned ElemSizeArg, const Optional<unsigned> &NumElemsArg) { return addAllocSizeAttr(C, ArgNo + FirstArgIndex, ElemSizeArg, NumElemsArg); } AttributeSet getAttributes(unsigned Index) const; AttributeSet getParamAttributes(unsigned ArgNo) const; AttributeSet getRetAttributes() const; AttributeSet getFnAttributes() const; bool hasAttribute(unsigned Index, Attribute::AttrKind Kind) const; bool hasAttribute(unsigned Index, StringRef Kind) const; bool hasAttributes(unsigned Index) const; bool hasParamAttr(unsigned ArgNo, Attribute::AttrKind Kind) const { return hasAttribute(ArgNo + FirstArgIndex, Kind); } bool hasParamAttr(unsigned ArgNo, StringRef Kind) const { return hasAttribute(ArgNo + FirstArgIndex, Kind); } bool hasParamAttrs(unsigned ArgNo) const { return hasAttributes(ArgNo + FirstArgIndex); } bool hasFnAttribute(Attribute::AttrKind Kind) const; bool hasFnAttribute(StringRef Kind) const; bool hasParamAttribute(unsigned ArgNo, Attribute::AttrKind Kind) const; bool hasAttrSomewhere(Attribute::AttrKind Kind, unsigned *Index = nullptr) const; Attribute getAttribute(unsigned Index, Attribute::AttrKind Kind) const; Attribute getAttribute(unsigned Index, StringRef Kind) const; Attribute getParamAttr(unsigned ArgNo, Attribute::AttrKind Kind) const { return getAttribute(ArgNo + FirstArgIndex, Kind); } Attribute getParamAttr(unsigned ArgNo, StringRef Kind) const { return getAttribute(ArgNo + FirstArgIndex, Kind); } MaybeAlign getRetAlignment() const; MaybeAlign getParamAlignment(unsigned ArgNo) const; Type *getParamByValType(unsigned ArgNo) const; Type *getParamPreallocatedType(unsigned ArgNo) const; MaybeAlign getStackAlignment(unsigned Index) const; uint64_t getDereferenceableBytes(unsigned Index) const; uint64_t getParamDereferenceableBytes(unsigned ArgNo) const { return getDereferenceableBytes(ArgNo + FirstArgIndex); } uint64_t getDereferenceableOrNullBytes(unsigned Index) const; uint64_t getParamDereferenceableOrNullBytes(unsigned ArgNo) const { return getDereferenceableOrNullBytes(ArgNo + FirstArgIndex); } std::pair<unsigned, Optional<unsigned>> getAllocSizeArgs(unsigned Index) const; std::string getAsString(unsigned Index, bool InAttrGrp = false) const; using iterator = const AttributeSet *; iterator begin() const; iterator end() const; unsigned getNumAttrSets() const; unsigned index_begin() const { return AttributeList::FunctionIndex; } unsigned index_end() const { return getNumAttrSets() - 1; } bool operator==(const AttributeList &RHS) const { return pImpl == RHS.pImpl; } bool operator!=(const AttributeList &RHS) const { return pImpl != RHS.pImpl; } void *getRawPointer() const { return pImpl; } bool isEmpty() const { return pImpl == nullptr; } void dump() const; }; template <> struct DenseMapInfo<AttributeList> { static AttributeList getEmptyKey() { auto Val = static_cast<uintptr_t>(-1); Val <<= PointerLikeTypeTraits<void*>::NumLowBitsAvailable; return AttributeList(reinterpret_cast<AttributeListImpl *>(Val)); } static AttributeList getTombstoneKey() { auto Val = static_cast<uintptr_t>(-2); Val <<= PointerLikeTypeTraits<void*>::NumLowBitsAvailable; return AttributeList(reinterpret_cast<AttributeListImpl *>(Val)); } static unsigned getHashValue(AttributeList AS) { return (unsigned((uintptr_t)AS.pImpl) >> 4) ^ (unsigned((uintptr_t)AS.pImpl) >> 9); } static bool isEqual(AttributeList LHS, AttributeList RHS) { return LHS == RHS; } }; class AttrBuilder { std::bitset<Attribute::EndAttrKinds> Attrs; std::map<std::string, std::string, std::less<>> TargetDepAttrs; MaybeAlign Alignment; MaybeAlign StackAlignment; uint64_t DerefBytes = 0; uint64_t DerefOrNullBytes = 0; uint64_t AllocSizeArgs = 0; Type *ByValType = nullptr; Type *PreallocatedType = nullptr; public: AttrBuilder() = default; AttrBuilder(const Attribute &A) { addAttribute(A); } AttrBuilder(AttributeList AS, unsigned Idx); AttrBuilder(AttributeSet AS); void clear(); AttrBuilder &addAttribute(Attribute::AttrKind Val); AttrBuilder &addAttribute(Attribute A); AttrBuilder &addAttribute(StringRef A, StringRef V = StringRef()); AttrBuilder &removeAttribute(Attribute::AttrKind Val); AttrBuilder &removeAttributes(AttributeList A, uint64_t WithoutIndex); AttrBuilder &removeAttribute(StringRef A); AttrBuilder &merge(const AttrBuilder &B); AttrBuilder &remove(const AttrBuilder &B); bool overlaps(const AttrBuilder &B) const; bool contains(Attribute::AttrKind A) const { (static_cast<void> (0)); return Attrs[A]; } bool contains(StringRef A) const; bool hasAttributes() const; bool hasAttributes(AttributeList A, uint64_t Index) const; bool hasAlignmentAttr() const; MaybeAlign getAlignment() const { return Alignment; } MaybeAlign getStackAlignment() const { return StackAlignment; } uint64_t getDereferenceableBytes() const { return DerefBytes; } uint64_t getDereferenceableOrNullBytes() const { return DerefOrNullBytes; } Type *getByValType() const { return ByValType; } Type *getPreallocatedType() const { return PreallocatedType; } std::pair<unsigned, Optional<unsigned>> getAllocSizeArgs() const; AttrBuilder &addAlignmentAttr(MaybeAlign Align); inline AttrBuilder &addAlignmentAttr(unsigned Align) { return addAlignmentAttr(MaybeAlign(Align)); } AttrBuilder &addStackAlignmentAttr(MaybeAlign Align); inline AttrBuilder &addStackAlignmentAttr(unsigned Align) { return addStackAlignmentAttr(MaybeAlign(Align)); } AttrBuilder &addDereferenceableAttr(uint64_t Bytes); AttrBuilder &addDereferenceableOrNullAttr(uint64_t Bytes); AttrBuilder &addAllocSizeAttr(unsigned ElemSizeArg, const Optional<unsigned> &NumElemsArg); AttrBuilder &addByValAttr(Type *Ty); AttrBuilder &addPreallocatedAttr(Type *Ty); AttrBuilder &addAllocSizeAttrFromRawRepr(uint64_t RawAllocSizeRepr); bool empty() const { return Attrs.none(); } using td_type = std::pair<std::string, std::string>; using td_iterator = decltype(TargetDepAttrs)::iterator; using td_const_iterator = decltype(TargetDepAttrs)::const_iterator; using td_range = iterator_range<td_iterator>; using td_const_range = iterator_range<td_const_iterator>; td_iterator td_begin() { return TargetDepAttrs.begin(); } td_iterator td_end() { return TargetDepAttrs.end(); } td_const_iterator td_begin() const { return TargetDepAttrs.begin(); } td_const_iterator td_end() const { return TargetDepAttrs.end(); } td_range td_attrs() { return td_range(td_begin(), td_end()); } td_const_range td_attrs() const { return td_const_range(td_begin(), td_end()); } bool td_empty() const { return TargetDepAttrs.empty(); } bool operator==(const AttrBuilder &B); bool operator!=(const AttrBuilder &B) { return !(*this == B); } }; namespace AttributeFuncs { AttrBuilder typeIncompatible(Type *Ty); bool areInlineCompatible(const Function &Caller, const Function &Callee); void mergeAttributesForInlining(Function &Caller, const Function &Callee); } } # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/UseListOrder.h" 1 # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/UseListOrder.h" namespace llvm { class Function; class Value; struct UseListOrder { const Value *V = nullptr; const Function *F = nullptr; std::vector<unsigned> Shuffle; UseListOrder(const Value *V, const Function *F, size_t ShuffleSize) : V(V), F(F), Shuffle(ShuffleSize) {} UseListOrder() = default; UseListOrder(UseListOrder &&) = default; UseListOrder &operator=(UseListOrder &&) = default; }; using UseListOrderStack = std::vector<UseListOrder>; } # 21 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.h" 2 namespace llvm { class BasicBlock; class Comdat; class Function; class Instruction; class LocalAsMetadata; class MDNode; class Metadata; class Module; class NamedMDNode; class raw_ostream; class Type; class Value; class ValueSymbolTable; class ValueEnumerator { public: using TypeList = std::vector<Type *>; using ValueList = std::vector<std::pair<const Value *, unsigned>>; using IndexAndAttrSet = std::pair<unsigned, AttributeSet>; UseListOrderStack UseListOrders; private: using TypeMapType = DenseMap<Type *, unsigned>; TypeMapType TypeMap; TypeList Types; using ValueMapType = DenseMap<const Value *, unsigned>; ValueMapType ValueMap; ValueList Values; using ComdatSetType = UniqueVector<const Comdat *>; ComdatSetType Comdats; std::vector<const Metadata *> MDs; std::vector<const Metadata *> FunctionMDs; struct MDIndex { unsigned F = 0; unsigned ID = 0; MDIndex() = default; explicit MDIndex(unsigned F) : F(F) {} bool hasDifferentFunction(unsigned NewF) const { return F && F != NewF; } const Metadata *get(ArrayRef<const Metadata *> MDs) const { (static_cast<void> (0)); (static_cast<void> (0)); return MDs[ID - 1]; } }; using MetadataMapType = DenseMap<const Metadata *, MDIndex>; MetadataMapType MetadataMap; struct MDRange { unsigned First = 0; unsigned Last = 0; unsigned NumStrings = 0; MDRange() = default; explicit MDRange(unsigned First) : First(First) {} }; SmallDenseMap<unsigned, MDRange, 1> FunctionMDInfo; bool ShouldPreserveUseListOrder; using AttributeGroupMapType = DenseMap<IndexAndAttrSet, unsigned>; AttributeGroupMapType AttributeGroupMap; std::vector<IndexAndAttrSet> AttributeGroups; using AttributeListMapType = DenseMap<AttributeList, unsigned>; AttributeListMapType AttributeListMap; std::vector<AttributeList> AttributeLists; mutable DenseMap<const BasicBlock*, unsigned> GlobalBasicBlockIDs; using InstructionMapType = DenseMap<const Instruction *, unsigned>; InstructionMapType InstructionMap; unsigned InstructionCount; std::vector<const BasicBlock*> BasicBlocks; unsigned NumModuleValues; unsigned NumModuleMDs = 0; unsigned NumMDStrings = 0; unsigned FirstFuncConstantID; unsigned FirstInstID; public: ValueEnumerator(const Module &M, bool ShouldPreserveUseListOrder); ValueEnumerator(const ValueEnumerator &) = delete; ValueEnumerator &operator=(const ValueEnumerator &) = delete; void dump() const; void print(raw_ostream &OS, const ValueMapType &Map, const char *Name) const; void print(raw_ostream &OS, const MetadataMapType &Map, const char *Name) const; unsigned getValueID(const Value *V) const; unsigned getMetadataID(const Metadata *MD) const { auto ID = getMetadataOrNullID(MD); (static_cast<void> (0)); return ID - 1; } unsigned getMetadataOrNullID(const Metadata *MD) const { return MetadataMap.lookup(MD).ID; } unsigned numMDs() const { return MDs.size(); } bool shouldPreserveUseListOrder() const { return ShouldPreserveUseListOrder; } unsigned getTypeID(Type *T) const { TypeMapType::const_iterator I = TypeMap.find(T); (static_cast<void> (0)); return I->second-1; } unsigned getInstructionID(const Instruction *I) const; void setInstructionID(const Instruction *I); unsigned getAttributeListID(AttributeList PAL) const { if (PAL.isEmpty()) return 0; AttributeListMapType::const_iterator I = AttributeListMap.find(PAL); (static_cast<void> (0)); return I->second; } unsigned getAttributeGroupID(IndexAndAttrSet Group) const { if (!Group.second.hasAttributes()) return 0; AttributeGroupMapType::const_iterator I = AttributeGroupMap.find(Group); (static_cast<void> (0)); return I->second; } void getFunctionConstantRange(unsigned &Start, unsigned &End) const { Start = FirstFuncConstantID; End = FirstInstID; } const ValueList &getValues() const { return Values; } bool hasMDs() const { return NumModuleMDs < MDs.size(); } ArrayRef<const Metadata *> getMDStrings() const { return makeArrayRef(MDs).slice(NumModuleMDs, NumMDStrings); } ArrayRef<const Metadata *> getNonMDStrings() const { return makeArrayRef(MDs).slice(NumModuleMDs).slice(NumMDStrings); } const TypeList &getTypes() const { return Types; } const std::vector<const BasicBlock*> &getBasicBlocks() const { return BasicBlocks; } const std::vector<AttributeList> &getAttributeLists() const { return AttributeLists; } const std::vector<IndexAndAttrSet> &getAttributeGroups() const { return AttributeGroups; } const ComdatSetType &getComdats() const { return Comdats; } unsigned getComdatID(const Comdat *C) const; unsigned getGlobalBasicBlockID(const BasicBlock *BB) const; void incorporateFunction(const Function &F); void purgeFunction(); uint64_t computeBitsRequiredForTypeIndicies() const; private: void OptimizeConstants(unsigned CstStart, unsigned CstEnd); void organizeMetadata(); void dropFunctionFromMetadata(MetadataMapType::value_type &FirstMD); void incorporateFunctionMetadata(const Function &F); # 263 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.h" const MDNode *enumerateMetadataImpl(unsigned F, const Metadata *MD); unsigned getMetadataFunctionID(const Function *F) const; # 282 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.h" void EnumerateMetadata(const Function *F, const Metadata *MD); void EnumerateMetadata(unsigned F, const Metadata *MD); void EnumerateFunctionLocalMetadata(const Function &F, const LocalAsMetadata *Local); void EnumerateFunctionLocalMetadata(unsigned F, const LocalAsMetadata *Local); void EnumerateNamedMDNode(const NamedMDNode *NMD); void EnumerateValue(const Value *V); void EnumerateType(Type *T); void EnumerateOperandType(const Value *V); void EnumerateAttributes(AttributeList PAL); void EnumerateValueSymbolTable(const ValueSymbolTable &ST); void EnumerateNamedMetadata(const Module &M); }; } # 14 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Argument.h" 1 # 16 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Argument.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Twine.h" 1 # 15 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Twine.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 16 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Twine.h" 2 namespace llvm { class formatv_object_base; class raw_ostream; # 80 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Twine.h" class Twine { enum NodeKind : unsigned char { NullKind, EmptyKind, TwineKind, CStringKind, StdStringKind, StringRefKind, SmallStringKind, FormatvObjectKind, CharKind, DecUIKind, DecIKind, DecULKind, DecLKind, DecULLKind, DecLLKind, UHexKind }; union Child { const Twine *twine; const char *cString; const std::string *stdString; const StringRef *stringRef; const SmallVectorImpl<char> *smallString; const formatv_object_base *formatvObject; char character; unsigned int decUI; int decI; const unsigned long *decUL; const long *decL; const unsigned long long *decULL; const long long *decLL; const uint64_t *uHex; }; Child LHS; Child RHS; NodeKind LHSKind = EmptyKind; NodeKind RHSKind = EmptyKind; explicit Twine(NodeKind Kind) : LHSKind(Kind) { (static_cast<void> (0)); } explicit Twine(const Twine &LHS, const Twine &RHS) : LHSKind(TwineKind), RHSKind(TwineKind) { this->LHS.twine = &LHS; this->RHS.twine = &RHS; (static_cast<void> (0)); } explicit Twine(Child LHS, NodeKind LHSKind, Child RHS, NodeKind RHSKind) : LHS(LHS), RHS(RHS), LHSKind(LHSKind), RHSKind(RHSKind) { (static_cast<void> (0)); } bool isNull() const { return getLHSKind() == NullKind; } bool isEmpty() const { return getLHSKind() == EmptyKind; } bool isNullary() const { return isNull() || isEmpty(); } bool isUnary() const { return getRHSKind() == EmptyKind && !isNullary(); } bool isBinary() const { return getLHSKind() != NullKind && getRHSKind() != EmptyKind; } bool isValid() const { if (isNullary() && getRHSKind() != EmptyKind) return false; if (getRHSKind() == NullKind) return false; if (getRHSKind() != EmptyKind && getLHSKind() == EmptyKind) return false; if (getLHSKind() == TwineKind && !LHS.twine->isBinary()) return false; if (getRHSKind() == TwineKind && !RHS.twine->isBinary()) return false; return true; } NodeKind getLHSKind() const { return LHSKind; } NodeKind getRHSKind() const { return RHSKind; } void printOneChild(raw_ostream &OS, Child Ptr, NodeKind Kind) const; void printOneChildRepr(raw_ostream &OS, Child Ptr, NodeKind Kind) const; public: Twine() { (static_cast<void> (0)); } Twine(const Twine &) = default; Twine(const char *Str) { if (Str[0] != '\0') { LHS.cString = Str; LHSKind = CStringKind; } else LHSKind = EmptyKind; (static_cast<void> (0)); } Twine(std::nullptr_t) = delete; Twine(const std::string &Str) : LHSKind(StdStringKind) { LHS.stdString = &Str; (static_cast<void> (0)); } Twine(const StringRef &Str) : LHSKind(StringRefKind) { LHS.stringRef = &Str; (static_cast<void> (0)); } Twine(const SmallVectorImpl<char> &Str) : LHSKind(SmallStringKind) { LHS.smallString = &Str; (static_cast<void> (0)); } Twine(const formatv_object_base &Fmt) : LHSKind(FormatvObjectKind) { LHS.formatvObject = &Fmt; (static_cast<void> (0)); } explicit Twine(char Val) : LHSKind(CharKind) { LHS.character = Val; } explicit Twine(signed char Val) : LHSKind(CharKind) { LHS.character = static_cast<char>(Val); } explicit Twine(unsigned char Val) : LHSKind(CharKind) { LHS.character = static_cast<char>(Val); } explicit Twine(unsigned Val) : LHSKind(DecUIKind) { LHS.decUI = Val; } explicit Twine(int Val) : LHSKind(DecIKind) { LHS.decI = Val; } explicit Twine(const unsigned long &Val) : LHSKind(DecULKind) { LHS.decUL = &Val; } explicit Twine(const long &Val) : LHSKind(DecLKind) { LHS.decL = &Val; } explicit Twine(const unsigned long long &Val) : LHSKind(DecULLKind) { LHS.decULL = &Val; } explicit Twine(const long long &Val) : LHSKind(DecLLKind) { LHS.decLL = &Val; } Twine(const char *LHS, const StringRef &RHS) : LHSKind(CStringKind), RHSKind(StringRefKind) { this->LHS.cString = LHS; this->RHS.stringRef = &RHS; (static_cast<void> (0)); } Twine(const StringRef &LHS, const char *RHS) : LHSKind(StringRefKind), RHSKind(CStringKind) { this->LHS.stringRef = &LHS; this->RHS.cString = RHS; (static_cast<void> (0)); } Twine &operator=(const Twine &) = delete; static Twine createNull() { return Twine(NullKind); } static Twine utohexstr(const uint64_t &Val) { Child LHS, RHS; LHS.uHex = &Val; RHS.twine = nullptr; return Twine(LHS, UHexKind, RHS, EmptyKind); } bool isTriviallyEmpty() const { return isNullary(); } bool isSingleStringRef() const { if (getRHSKind() != EmptyKind) return false; switch (getLHSKind()) { case EmptyKind: case CStringKind: case StdStringKind: case StringRefKind: case SmallStringKind: return true; default: return false; } } Twine concat(const Twine &Suffix) const; std::string str() const; void toVector(SmallVectorImpl<char> &Out) const; StringRef getSingleStringRef() const { (static_cast<void> (0)); switch (getLHSKind()) { default: __builtin_unreachable(); case EmptyKind: return StringRef(); case CStringKind: return StringRef(LHS.cString); case StdStringKind: return StringRef(*LHS.stdString); case StringRefKind: return *LHS.stringRef; case SmallStringKind: return StringRef(LHS.smallString->data(), LHS.smallString->size()); } } StringRef toStringRef(SmallVectorImpl<char> &Out) const { if (isSingleStringRef()) return getSingleStringRef(); toVector(Out); return StringRef(Out.data(), Out.size()); } StringRef toNullTerminatedStringRef(SmallVectorImpl<char> &Out) const; void print(raw_ostream &OS) const; void dump() const; void printRepr(raw_ostream &OS) const; void dumpRepr() const; }; inline Twine Twine::concat(const Twine &Suffix) const { if (isNull() || Suffix.isNull()) return Twine(NullKind); if (isEmpty()) return Suffix; if (Suffix.isEmpty()) return *this; Child NewLHS, NewRHS; NewLHS.twine = this; NewRHS.twine = &Suffix; NodeKind NewLHSKind = TwineKind, NewRHSKind = TwineKind; if (isUnary()) { NewLHS = LHS; NewLHSKind = getLHSKind(); } if (Suffix.isUnary()) { NewRHS = Suffix.LHS; NewRHSKind = Suffix.getLHSKind(); } return Twine(NewLHS, NewLHSKind, NewRHS, NewRHSKind); } inline Twine operator+(const Twine &LHS, const Twine &RHS) { return LHS.concat(RHS); } inline Twine operator+(const char *LHS, const StringRef &RHS) { return Twine(LHS, RHS); } inline Twine operator+(const StringRef &LHS, const char *RHS) { return Twine(LHS, RHS); } inline raw_ostream &operator<<(raw_ostream &OS, const Twine &RHS) { RHS.print(OS); return OS; } } # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Argument.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_node.h" 1 # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_node.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_node_base.h" 1 # 12 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_node_base.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/PointerIntPair.h" 1 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/PointerIntPair.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/PointerIntPair.h" 2 namespace llvm { template <typename T> struct DenseMapInfo; template <typename PointerT, unsigned IntBits, typename PtrTraits> struct PointerIntPairInfo; # 42 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/PointerIntPair.h" template <typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>, typename Info = PointerIntPairInfo<PointerTy, IntBits, PtrTraits>> class PointerIntPair { using InfoTy = Info; intptr_t Value = 0; public: constexpr PointerIntPair() = default; PointerIntPair(PointerTy PtrVal, IntType IntVal) { setPointerAndInt(PtrVal, IntVal); } explicit PointerIntPair(PointerTy PtrVal) { initWithPointer(PtrVal); } PointerTy getPointer() const { return Info::getPointer(Value); } IntType getInt() const { return (IntType)Info::getInt(Value); } void setPointer(PointerTy PtrVal) & { Value = Info::updatePointer(Value, PtrVal); } void setInt(IntType IntVal) & { Value = Info::updateInt(Value, static_cast<intptr_t>(IntVal)); } void initWithPointer(PointerTy PtrVal) & { Value = Info::updatePointer(0, PtrVal); } void setPointerAndInt(PointerTy PtrVal, IntType IntVal) & { Value = Info::updateInt(Info::updatePointer(0, PtrVal), static_cast<intptr_t>(IntVal)); } PointerTy const *getAddrOfPointer() const { return const_cast<PointerIntPair *>(this)->getAddrOfPointer(); } PointerTy *getAddrOfPointer() { (static_cast<void> (0)); return reinterpret_cast<PointerTy *>(&Value); } void *getOpaqueValue() const { return reinterpret_cast<void *>(Value); } void setFromOpaqueValue(void *Val) & { Value = reinterpret_cast<intptr_t>(Val); } static PointerIntPair getFromOpaqueValue(void *V) { PointerIntPair P; P.setFromOpaqueValue(V); return P; } static PointerIntPair getFromOpaqueValue(const void *V) { (void)PtrTraits::getFromVoidPointer(V); return getFromOpaqueValue(const_cast<void *>(V)); } bool operator==(const PointerIntPair &RHS) const { return Value == RHS.Value; } bool operator!=(const PointerIntPair &RHS) const { return Value != RHS.Value; } bool operator<(const PointerIntPair &RHS) const { return Value < RHS.Value; } bool operator>(const PointerIntPair &RHS) const { return Value > RHS.Value; } bool operator<=(const PointerIntPair &RHS) const { return Value <= RHS.Value; } bool operator>=(const PointerIntPair &RHS) const { return Value >= RHS.Value; } }; template <typename PointerTy, unsigned IntBits, typename IntType, typename PtrTraits, typename Info> struct is_trivially_copyable<PointerIntPair<PointerTy, IntBits, IntType, PtrTraits, Info>> : std::true_type { }; template <typename PointerT, unsigned IntBits, typename PtrTraits> struct PointerIntPairInfo { static_assert(PtrTraits::NumLowBitsAvailable < std::numeric_limits<uintptr_t>::digits, "cannot use a pointer type that has all bits free"); static_assert(IntBits <= PtrTraits::NumLowBitsAvailable, "PointerIntPair with integer size too large for pointer"); enum MaskAndShiftConstants : uintptr_t { PointerBitMask = ~(uintptr_t)(((intptr_t)1 << PtrTraits::NumLowBitsAvailable) - 1), IntShift = (uintptr_t)PtrTraits::NumLowBitsAvailable - IntBits, IntMask = (uintptr_t)(((intptr_t)1 << IntBits) - 1), ShiftedIntMask = (uintptr_t)(IntMask << IntShift) }; static PointerT getPointer(intptr_t Value) { return PtrTraits::getFromVoidPointer( reinterpret_cast<void *>(Value & PointerBitMask)); } static intptr_t getInt(intptr_t Value) { return (Value >> IntShift) & IntMask; } static intptr_t updatePointer(intptr_t OrigValue, PointerT Ptr) { intptr_t PtrWord = reinterpret_cast<intptr_t>(PtrTraits::getAsVoidPointer(Ptr)); (static_cast<void> (0)); return PtrWord | (OrigValue & ~PointerBitMask); } static intptr_t updateInt(intptr_t OrigValue, intptr_t Int) { intptr_t IntWord = static_cast<intptr_t>(Int); (static_cast<void> (0)); return (OrigValue & ~ShiftedIntMask) | IntWord << IntShift; } }; template <typename PointerTy, unsigned IntBits, typename IntType> struct DenseMapInfo<PointerIntPair<PointerTy, IntBits, IntType>> { using Ty = PointerIntPair<PointerTy, IntBits, IntType>; static Ty getEmptyKey() { uintptr_t Val = static_cast<uintptr_t>(-1); Val <<= PointerLikeTypeTraits<Ty>::NumLowBitsAvailable; return Ty::getFromOpaqueValue(reinterpret_cast<void *>(Val)); } static Ty getTombstoneKey() { uintptr_t Val = static_cast<uintptr_t>(-2); Val <<= PointerLikeTypeTraits<PointerTy>::NumLowBitsAvailable; return Ty::getFromOpaqueValue(reinterpret_cast<void *>(Val)); } static unsigned getHashValue(Ty V) { uintptr_t IV = reinterpret_cast<uintptr_t>(V.getOpaqueValue()); return unsigned(IV) ^ unsigned(IV >> 9); } static bool isEqual(const Ty &LHS, const Ty &RHS) { return LHS == RHS; } }; template <typename PointerTy, unsigned IntBits, typename IntType, typename PtrTraits> struct PointerLikeTypeTraits< PointerIntPair<PointerTy, IntBits, IntType, PtrTraits>> { static inline void * getAsVoidPointer(const PointerIntPair<PointerTy, IntBits, IntType> &P) { return P.getOpaqueValue(); } static inline PointerIntPair<PointerTy, IntBits, IntType> getFromVoidPointer(void *P) { return PointerIntPair<PointerTy, IntBits, IntType>::getFromOpaqueValue(P); } static inline PointerIntPair<PointerTy, IntBits, IntType> getFromVoidPointer(const void *P) { return PointerIntPair<PointerTy, IntBits, IntType>::getFromOpaqueValue(P); } static constexpr int NumLowBitsAvailable = PtrTraits::NumLowBitsAvailable - IntBits; }; } # 13 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_node_base.h" 2 namespace llvm { template <bool EnableSentinelTracking> class ilist_node_base; template <> class ilist_node_base<false> { ilist_node_base *Prev = nullptr; ilist_node_base *Next = nullptr; public: void setPrev(ilist_node_base *Prev) { this->Prev = Prev; } void setNext(ilist_node_base *Next) { this->Next = Next; } ilist_node_base *getPrev() const { return Prev; } ilist_node_base *getNext() const { return Next; } bool isKnownSentinel() const { return false; } void initializeSentinel() {} }; template <> class ilist_node_base<true> { PointerIntPair<ilist_node_base *, 1> PrevAndSentinel; ilist_node_base *Next = nullptr; public: void setPrev(ilist_node_base *Prev) { PrevAndSentinel.setPointer(Prev); } void setNext(ilist_node_base *Next) { this->Next = Next; } ilist_node_base *getPrev() const { return PrevAndSentinel.getPointer(); } ilist_node_base *getNext() const { return Next; } bool isSentinel() const { return PrevAndSentinel.getInt(); } bool isKnownSentinel() const { return isSentinel(); } void initializeSentinel() { PrevAndSentinel.setInt(true); } }; } # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_node.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_node_options.h" 1 # 16 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_node_options.h" namespace llvm { template <bool EnableSentinelTracking> class ilist_node_base; template <bool EnableSentinelTracking> class ilist_base; template <bool EnableSentinelTracking> struct ilist_sentinel_tracking {}; template <class Tag> struct ilist_tag {}; namespace ilist_detail { template <bool IsExplicit> struct explicitness { static const bool is_explicit = IsExplicit; }; typedef explicitness<true> is_explicit; typedef explicitness<false> is_implicit; # 54 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_node_options.h" template <class Option> struct is_valid_option : std::false_type {}; template <class... Options> struct extract_sentinel_tracking; template <bool EnableSentinelTracking, class... Options> struct extract_sentinel_tracking< ilist_sentinel_tracking<EnableSentinelTracking>, Options...> : std::integral_constant<bool, EnableSentinelTracking>, is_explicit {}; template <class Option1, class... Options> struct extract_sentinel_tracking<Option1, Options...> : extract_sentinel_tracking<Options...> {}; template <> struct extract_sentinel_tracking<> : std::false_type, is_implicit {}; template <bool EnableSentinelTracking> struct is_valid_option<ilist_sentinel_tracking<EnableSentinelTracking>> : std::true_type {}; template <class... Options> struct extract_tag; template <class Tag, class... Options> struct extract_tag<ilist_tag<Tag>, Options...> { typedef Tag type; }; template <class Option1, class... Options> struct extract_tag<Option1, Options...> : extract_tag<Options...> {}; template <> struct extract_tag<> { typedef void type; }; template <class Tag> struct is_valid_option<ilist_tag<Tag>> : std::true_type {}; template <class... Options> struct check_options; template <> struct check_options<> : std::true_type {}; template <class Option1, class... Options> struct check_options<Option1, Options...> : std::integral_constant<bool, is_valid_option<Option1>::value && check_options<Options...>::value> {}; template <class T, bool EnableSentinelTracking, bool IsSentinelTrackingExplicit, class TagT> struct node_options { typedef T value_type; typedef T *pointer; typedef T &reference; typedef const T *const_pointer; typedef const T &const_reference; static const bool enable_sentinel_tracking = EnableSentinelTracking; static const bool is_sentinel_tracking_explicit = IsSentinelTrackingExplicit; typedef TagT tag; typedef ilist_node_base<enable_sentinel_tracking> node_base_type; typedef ilist_base<enable_sentinel_tracking> list_base_type; }; template <class T, class... Options> struct compute_node_options { typedef node_options<T, extract_sentinel_tracking<Options...>::value, extract_sentinel_tracking<Options...>::is_explicit, typename extract_tag<Options...>::type> type; }; } } # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_node.h" 2 namespace llvm { namespace ilist_detail { struct NodeAccess; } template <class OptionsT, bool IsReverse, bool IsConst> class ilist_iterator; template <class OptionsT> class ilist_sentinel; # 39 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_node.h" template <class OptionsT> class ilist_node_impl : OptionsT::node_base_type { using value_type = typename OptionsT::value_type; using node_base_type = typename OptionsT::node_base_type; using list_base_type = typename OptionsT::list_base_type; friend typename OptionsT::list_base_type; friend struct ilist_detail::NodeAccess; friend class ilist_sentinel<OptionsT>; friend class ilist_iterator<OptionsT, false, false>; friend class ilist_iterator<OptionsT, false, true>; friend class ilist_iterator<OptionsT, true, false>; friend class ilist_iterator<OptionsT, true, true>; protected: using self_iterator = ilist_iterator<OptionsT, false, false>; using const_self_iterator = ilist_iterator<OptionsT, false, true>; using reverse_self_iterator = ilist_iterator<OptionsT, true, false>; using const_reverse_self_iterator = ilist_iterator<OptionsT, true, true>; ilist_node_impl() = default; private: ilist_node_impl *getPrev() { return static_cast<ilist_node_impl *>(node_base_type::getPrev()); } ilist_node_impl *getNext() { return static_cast<ilist_node_impl *>(node_base_type::getNext()); } const ilist_node_impl *getPrev() const { return static_cast<ilist_node_impl *>(node_base_type::getPrev()); } const ilist_node_impl *getNext() const { return static_cast<ilist_node_impl *>(node_base_type::getNext()); } void setPrev(ilist_node_impl *N) { node_base_type::setPrev(N); } void setNext(ilist_node_impl *N) { node_base_type::setNext(N); } public: self_iterator getIterator() { return self_iterator(*this); } const_self_iterator getIterator() const { return const_self_iterator(*this); } reverse_self_iterator getReverseIterator() { return reverse_self_iterator(*this); } const_reverse_self_iterator getReverseIterator() const { return const_reverse_self_iterator(*this); } using node_base_type::isKnownSentinel; bool isSentinel() const { static_assert(OptionsT::is_sentinel_tracking_explicit, "Use ilist_sentinel_tracking<true> to enable isSentinel()"); return node_base_type::isSentinel(); } }; # 147 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_node.h" template <class T, class... Options> class ilist_node : public ilist_node_impl< typename ilist_detail::compute_node_options<T, Options...>::type> { static_assert(ilist_detail::check_options<Options...>::value, "Unrecognized node option!"); }; namespace ilist_detail { struct NodeAccess { protected: template <class OptionsT> static ilist_node_impl<OptionsT> *getNodePtr(typename OptionsT::pointer N) { return N; } template <class OptionsT> static const ilist_node_impl<OptionsT> * getNodePtr(typename OptionsT::const_pointer N) { return N; } template <class OptionsT> static typename OptionsT::pointer getValuePtr(ilist_node_impl<OptionsT> *N) { return static_cast<typename OptionsT::pointer>(N); } template <class OptionsT> static typename OptionsT::const_pointer getValuePtr(const ilist_node_impl<OptionsT> *N) { return static_cast<typename OptionsT::const_pointer>(N); } template <class OptionsT> static ilist_node_impl<OptionsT> *getPrev(ilist_node_impl<OptionsT> &N) { return N.getPrev(); } template <class OptionsT> static ilist_node_impl<OptionsT> *getNext(ilist_node_impl<OptionsT> &N) { return N.getNext(); } template <class OptionsT> static const ilist_node_impl<OptionsT> * getPrev(const ilist_node_impl<OptionsT> &N) { return N.getPrev(); } template <class OptionsT> static const ilist_node_impl<OptionsT> * getNext(const ilist_node_impl<OptionsT> &N) { return N.getNext(); } }; template <class OptionsT> struct SpecificNodeAccess : NodeAccess { protected: using pointer = typename OptionsT::pointer; using const_pointer = typename OptionsT::const_pointer; using node_type = ilist_node_impl<OptionsT>; static node_type *getNodePtr(pointer N) { return NodeAccess::getNodePtr<OptionsT>(N); } static const node_type *getNodePtr(const_pointer N) { return NodeAccess::getNodePtr<OptionsT>(N); } static pointer getValuePtr(node_type *N) { return NodeAccess::getValuePtr<OptionsT>(N); } static const_pointer getValuePtr(const node_type *N) { return NodeAccess::getValuePtr<OptionsT>(N); } }; } template <class OptionsT> class ilist_sentinel : public ilist_node_impl<OptionsT> { public: ilist_sentinel() { this->initializeSentinel(); reset(); } void reset() { this->setPrev(this); this->setNext(this); } bool empty() const { return this == this->getPrev(); } }; template <typename NodeTy, typename ParentTy, class... Options> class ilist_node_with_parent : public ilist_node<NodeTy, Options...> { protected: ilist_node_with_parent() = default; private: const ParentTy *getNodeParent() const { return static_cast<const NodeTy *>(this)->getParent(); } public: NodeTy *getPrevNode() { const auto &List = getNodeParent()->*(ParentTy::getSublistAccess((NodeTy *)nullptr)); return List.getPrevNode(*static_cast<NodeTy *>(this)); } const NodeTy *getPrevNode() const { return const_cast<ilist_node_with_parent *>(this)->getPrevNode(); } NodeTy *getNextNode() { const auto &List = getNodeParent()->*(ParentTy::getSublistAccess((NodeTy *)nullptr)); return List.getNextNode(*static_cast<NodeTy *>(this)); } const NodeTy *getNextNode() const { return const_cast<ilist_node_with_parent *>(this)->getNextNode(); } }; } # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Argument.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.h" 1 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Use.h" 1 # 29 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Use.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/CBindingWrapping.h" 1 # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/CBindingWrapping.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Casting.h" 1 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Casting.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Casting.h" 2 namespace llvm { # 33 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Casting.h" template<typename From> struct simplify_type { using SimpleType = From; static SimpleType &getSimplifiedValue(From &Val) { return Val; } }; template<typename From> struct simplify_type<const From> { using NonConstSimpleType = typename simplify_type<From>::SimpleType; using SimpleType = typename add_const_past_pointer<NonConstSimpleType>::type; using RetType = typename add_lvalue_reference_if_not_pointer<SimpleType>::type; static RetType getSimplifiedValue(const From& Val) { return simplify_type<From>::getSimplifiedValue(const_cast<From&>(Val)); } }; template <typename To, typename From, typename Enabler = void> struct isa_impl { static inline bool doit(const From &Val) { return To::classof(&Val); } }; template <typename To, typename From> struct isa_impl<To, From, std::enable_if_t<std::is_base_of<To, From>::value>> { static inline bool doit(const From &) { return true; } }; template <typename To, typename From> struct isa_impl_cl { static inline bool doit(const From &Val) { return isa_impl<To, From>::doit(Val); } }; template <typename To, typename From> struct isa_impl_cl<To, const From> { static inline bool doit(const From &Val) { return isa_impl<To, From>::doit(Val); } }; template <typename To, typename From> struct isa_impl_cl<To, const std::unique_ptr<From>> { static inline bool doit(const std::unique_ptr<From> &Val) { (static_cast<void> (0)); return isa_impl_cl<To, From>::doit(*Val); } }; template <typename To, typename From> struct isa_impl_cl<To, From*> { static inline bool doit(const From *Val) { (static_cast<void> (0)); return isa_impl<To, From>::doit(*Val); } }; template <typename To, typename From> struct isa_impl_cl<To, From*const> { static inline bool doit(const From *Val) { (static_cast<void> (0)); return isa_impl<To, From>::doit(*Val); } }; template <typename To, typename From> struct isa_impl_cl<To, const From*> { static inline bool doit(const From *Val) { (static_cast<void> (0)); return isa_impl<To, From>::doit(*Val); } }; template <typename To, typename From> struct isa_impl_cl<To, const From*const> { static inline bool doit(const From *Val) { (static_cast<void> (0)); return isa_impl<To, From>::doit(*Val); } }; template<typename To, typename From, typename SimpleFrom> struct isa_impl_wrap { static bool doit(const From &Val) { return isa_impl_wrap<To, SimpleFrom, typename simplify_type<SimpleFrom>::SimpleType>::doit( simplify_type<const From>::getSimplifiedValue(Val)); } }; template<typename To, typename FromTy> struct isa_impl_wrap<To, FromTy, FromTy> { static bool doit(const FromTy &Val) { return isa_impl_cl<To,FromTy>::doit(Val); } }; template <class X, class Y> [[clang::warn_unused_result]] inline bool isa(const Y &Val) { return isa_impl_wrap<X, const Y, typename simplify_type<const Y>::SimpleType>::doit(Val); } template <typename First, typename Second, typename... Rest, typename Y> [[clang::warn_unused_result]] inline bool isa(const Y &Val) { return isa<First>(Val) || isa<Second, Rest...>(Val); } template <typename... X, class Y> [[clang::warn_unused_result]] inline bool isa_and_nonnull(const Y &Val) { if (!Val) return false; return isa<X...>(Val); } template<class To, class From> struct cast_retty; template<class To, class From> struct cast_retty_impl { using ret_type = To &; }; template<class To, class From> struct cast_retty_impl<To, const From> { using ret_type = const To &; }; template<class To, class From> struct cast_retty_impl<To, From*> { using ret_type = To *; }; template<class To, class From> struct cast_retty_impl<To, const From*> { using ret_type = const To *; }; template<class To, class From> struct cast_retty_impl<To, const From*const> { using ret_type = const To *; }; template <class To, class From> struct cast_retty_impl<To, std::unique_ptr<From>> { private: using PointerType = typename cast_retty_impl<To, From *>::ret_type; using ResultType = std::remove_pointer_t<PointerType>; public: using ret_type = std::unique_ptr<ResultType>; }; template<class To, class From, class SimpleFrom> struct cast_retty_wrap { using ret_type = typename cast_retty<To, SimpleFrom>::ret_type; }; template<class To, class FromTy> struct cast_retty_wrap<To, FromTy, FromTy> { using ret_type = typename cast_retty_impl<To,FromTy>::ret_type; }; template<class To, class From> struct cast_retty { using ret_type = typename cast_retty_wrap< To, From, typename simplify_type<From>::SimpleType>::ret_type; }; template<class To, class From, class SimpleFrom> struct cast_convert_val { static typename cast_retty<To, From>::ret_type doit(From &Val) { return cast_convert_val<To, SimpleFrom, typename simplify_type<SimpleFrom>::SimpleType>::doit( simplify_type<From>::getSimplifiedValue(Val)); } }; template<class To, class FromTy> struct cast_convert_val<To,FromTy,FromTy> { static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) { typename cast_retty<To, FromTy>::ret_type Res2 = (typename cast_retty<To, FromTy>::ret_type)const_cast<FromTy&>(Val); return Res2; } }; template <class X> struct is_simple_type { static const bool value = std::is_same<X, typename simplify_type<X>::SimpleType>::value; }; # 251 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Casting.h" template <class X, class Y> inline std::enable_if_t<!is_simple_type<Y>::value, typename cast_retty<X, const Y>::ret_type> cast(const Y &Val) { (static_cast<void> (0)); return cast_convert_val< X, const Y, typename simplify_type<const Y>::SimpleType>::doit(Val); } template <class X, class Y> inline typename cast_retty<X, Y>::ret_type cast(Y &Val) { (static_cast<void> (0)); return cast_convert_val<X, Y, typename simplify_type<Y>::SimpleType>::doit(Val); } template <class X, class Y> inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) { (static_cast<void> (0)); return cast_convert_val<X, Y*, typename simplify_type<Y*>::SimpleType>::doit(Val); } template <class X, class Y> inline typename cast_retty<X, std::unique_ptr<Y>>::ret_type cast(std::unique_ptr<Y> &&Val) { (static_cast<void> (0)); using ret_type = typename cast_retty<X, std::unique_ptr<Y>>::ret_type; return ret_type( cast_convert_val<X, Y *, typename simplify_type<Y *>::SimpleType>::doit( Val.release())); } template <class X, class Y> [[clang::warn_unused_result]] inline std::enable_if_t< !is_simple_type<Y>::value, typename cast_retty<X, const Y>::ret_type> cast_or_null(const Y &Val) { if (!Val) return nullptr; (static_cast<void> (0)); return cast<X>(Val); } template <class X, class Y> [[clang::warn_unused_result]] inline std::enable_if_t<!is_simple_type<Y>::value, typename cast_retty<X, Y>::ret_type> cast_or_null(Y &Val) { if (!Val) return nullptr; (static_cast<void> (0)); return cast<X>(Val); } template <class X, class Y> [[clang::warn_unused_result]] inline typename cast_retty<X, Y *>::ret_type cast_or_null(Y *Val) { if (!Val) return nullptr; (static_cast<void> (0)); return cast<X>(Val); } template <class X, class Y> inline typename cast_retty<X, std::unique_ptr<Y>>::ret_type cast_or_null(std::unique_ptr<Y> &&Val) { if (!Val) return nullptr; return cast<X>(std::move(Val)); } # 331 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Casting.h" template <class X, class Y> [[clang::warn_unused_result]] inline std::enable_if_t< !is_simple_type<Y>::value, typename cast_retty<X, const Y>::ret_type> dyn_cast(const Y &Val) { return isa<X>(Val) ? cast<X>(Val) : nullptr; } template <class X, class Y> [[clang::warn_unused_result]] inline typename cast_retty<X, Y>::ret_type dyn_cast(Y &Val) { return isa<X>(Val) ? cast<X>(Val) : nullptr; } template <class X, class Y> [[clang::warn_unused_result]] inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) { return isa<X>(Val) ? cast<X>(Val) : nullptr; } template <class X, class Y> [[clang::warn_unused_result]] inline std::enable_if_t< !is_simple_type<Y>::value, typename cast_retty<X, const Y>::ret_type> dyn_cast_or_null(const Y &Val) { return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr; } template <class X, class Y> [[clang::warn_unused_result]] inline std::enable_if_t<!is_simple_type<Y>::value, typename cast_retty<X, Y>::ret_type> dyn_cast_or_null(Y &Val) { return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr; } template <class X, class Y> [[clang::warn_unused_result]] inline typename cast_retty<X, Y *>::ret_type dyn_cast_or_null(Y *Val) { return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr; } template <class X, class Y> [[clang::warn_unused_result]] inline auto unique_dyn_cast(std::unique_ptr<Y> &Val) -> decltype(cast<X>(Val)) { if (!isa<X>(Val)) return nullptr; return cast<X>(std::move(Val)); } template <class X, class Y> [[clang::warn_unused_result]] inline auto unique_dyn_cast(std::unique_ptr<Y> &&Val) { return unique_dyn_cast<X, Y>(Val); } template <class X, class Y> [[clang::warn_unused_result]] inline auto unique_dyn_cast_or_null(std::unique_ptr<Y> &Val) -> decltype(cast<X>(Val)) { if (!Val) return nullptr; return unique_dyn_cast<X, Y>(Val); } template <class X, class Y> [[clang::warn_unused_result]] inline auto unique_dyn_cast_or_null(std::unique_ptr<Y> &&Val) { return unique_dyn_cast_or_null<X, Y>(Val); } } # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/CBindingWrapping.h" 2 # 30 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Use.h" 2 namespace llvm { template <typename> struct simplify_type; class User; class Value; class Use { public: Use(const Use &U) = delete; void swap(Use &RHS); private: ~Use() { if (Val) removeFromList(); } Use(User *Parent) : Parent(Parent) {} public: friend class Value; friend class User; operator Value *() const { return Val; } Value *get() const { return Val; } User *getUser() const { return Parent; }; inline void set(Value *Val); inline Value *operator=(Value *RHS); inline const Use &operator=(const Use &RHS); Value *operator->() { return Val; } const Value *operator->() const { return Val; } Use *getNext() const { return Next; } unsigned getOperandNo() const; static void zap(Use *Start, const Use *Stop, bool del = false); private: Value *Val = nullptr; Use *Next = nullptr; Use **Prev = nullptr; User *Parent = nullptr; void addToList(Use **List) { Next = *List; if (Next) Next->Prev = &Next; Prev = List; *Prev = this; } void removeFromList() { *Prev = Next; if (Next) Next->Prev = Prev; } }; template <> struct simplify_type<Use> { using SimpleType = Value *; static SimpleType getSimplifiedValue(Use &Val) { return Val.get(); } }; template <> struct simplify_type<const Use> { using SimpleType = Value *; static SimpleType getSimplifiedValue(const Use &Val) { return Val.get(); } }; inline Use *unwrap(LLVMUseRef P) { return reinterpret_cast<Use*>(P); } inline LLVMUseRef wrap(const Use *P) { return reinterpret_cast<LLVMUseRef>(const_cast<Use*>(P)); } } # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 24 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.h" 2 namespace llvm { class APInt; class Argument; class BasicBlock; class Constant; class ConstantData; class ConstantAggregate; class DataLayout; class Function; class GlobalAlias; class GlobalIFunc; class GlobalIndirectSymbol; class GlobalObject; class GlobalValue; class GlobalVariable; class InlineAsm; class Instruction; class LLVMContext; class Module; class ModuleSlotTracker; class raw_ostream; template<typename ValueTy> class StringMapEntry; class StringRef; class Twine; class Type; class User; using ValueName = StringMapEntry<Value *>; # 74 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.h" class Value { Type *VTy; Use *UseList; friend class ValueAsMetadata; friend class ValueHandleBase; const unsigned char SubclassID; unsigned char HasValueHandle : 1; protected: unsigned char SubclassOptionalData : 7; private: unsigned short SubclassData; protected: # 113 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.h" enum : unsigned { NumUserOperandsBits = 28 }; unsigned NumUserOperands : NumUserOperandsBits; unsigned IsUsedByMD : 1; unsigned HasName : 1; unsigned HasHungOffUses : 1; unsigned HasDescriptor : 1; private: template <typename UseT> class use_iterator_impl : public std::iterator<std::forward_iterator_tag, UseT *> { friend class Value; UseT *U; explicit use_iterator_impl(UseT *u) : U(u) {} public: use_iterator_impl() : U() {} bool operator==(const use_iterator_impl &x) const { return U == x.U; } bool operator!=(const use_iterator_impl &x) const { return !operator==(x); } use_iterator_impl &operator++() { (static_cast<void> (0)); U = U->getNext(); return *this; } use_iterator_impl operator++(int) { auto tmp = *this; ++*this; return tmp; } UseT &operator*() const { (static_cast<void> (0)); return *U; } UseT *operator->() const { return &operator*(); } operator use_iterator_impl<const UseT>() const { return use_iterator_impl<const UseT>(U); } }; template <typename UserTy> class user_iterator_impl : public std::iterator<std::forward_iterator_tag, UserTy *> { use_iterator_impl<Use> UI; explicit user_iterator_impl(Use *U) : UI(U) {} friend class Value; public: user_iterator_impl() = default; bool operator==(const user_iterator_impl &x) const { return UI == x.UI; } bool operator!=(const user_iterator_impl &x) const { return !operator==(x); } bool atEnd() const { return *this == user_iterator_impl(); } user_iterator_impl &operator++() { ++UI; return *this; } user_iterator_impl operator++(int) { auto tmp = *this; ++*this; return tmp; } UserTy *operator*() const { return UI->getUser(); } UserTy *operator->() const { return operator*(); } operator user_iterator_impl<const UserTy>() const { return user_iterator_impl<const UserTy>(*UI); } Use &getUse() const { return *UI; } }; protected: Value(Type *Ty, unsigned scid); ~Value(); public: Value(const Value &) = delete; Value &operator=(const Value &) = delete; void deleteValue(); void dump() const; void print(raw_ostream &O, bool IsForDebug = false) const; void print(raw_ostream &O, ModuleSlotTracker &MST, bool IsForDebug = false) const; # 237 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.h" void printAsOperand(raw_ostream &O, bool PrintType = true, const Module *M = nullptr) const; void printAsOperand(raw_ostream &O, bool PrintType, ModuleSlotTracker &MST) const; Type *getType() const { return VTy; } LLVMContext &getContext() const; bool hasName() const { return HasName; } ValueName *getValueName() const; void setValueName(ValueName *VN); private: void destroyValueName(); enum class ReplaceMetadataUses { No, Yes }; void doRAUW(Value *New, ReplaceMetadataUses); void setNameImpl(const Twine &Name); public: StringRef getName() const; void setName(const Twine &Name); void takeName(Value *V); void replaceAllUsesWith(Value *V); void replaceNonMetadataUsesWith(Value *V); void replaceUsesWithIf(Value *New, llvm::function_ref<bool(Use &U)> ShouldReplace) { (static_cast<void> (0)); (static_cast<void> (0)); for (use_iterator UI = use_begin(), E = use_end(); UI != E;) { Use &U = *UI; ++UI; if (!ShouldReplace(U)) continue; U.set(New); } } void replaceUsesOutsideBlock(Value *V, BasicBlock *BB); # 331 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.h" void assertModuleIsMaterializedImpl() const; void assertModuleIsMaterialized() const { } bool use_empty() const { assertModuleIsMaterialized(); return UseList == nullptr; } bool materialized_use_empty() const { return UseList == nullptr; } using use_iterator = use_iterator_impl<Use>; using const_use_iterator = use_iterator_impl<const Use>; use_iterator materialized_use_begin() { return use_iterator(UseList); } const_use_iterator materialized_use_begin() const { return const_use_iterator(UseList); } use_iterator use_begin() { assertModuleIsMaterialized(); return materialized_use_begin(); } const_use_iterator use_begin() const { assertModuleIsMaterialized(); return materialized_use_begin(); } use_iterator use_end() { return use_iterator(); } const_use_iterator use_end() const { return const_use_iterator(); } iterator_range<use_iterator> materialized_uses() { return make_range(materialized_use_begin(), use_end()); } iterator_range<const_use_iterator> materialized_uses() const { return make_range(materialized_use_begin(), use_end()); } iterator_range<use_iterator> uses() { assertModuleIsMaterialized(); return materialized_uses(); } iterator_range<const_use_iterator> uses() const { assertModuleIsMaterialized(); return materialized_uses(); } bool user_empty() const { assertModuleIsMaterialized(); return UseList == nullptr; } using user_iterator = user_iterator_impl<User>; using const_user_iterator = user_iterator_impl<const User>; user_iterator materialized_user_begin() { return user_iterator(UseList); } const_user_iterator materialized_user_begin() const { return const_user_iterator(UseList); } user_iterator user_begin() { assertModuleIsMaterialized(); return materialized_user_begin(); } const_user_iterator user_begin() const { assertModuleIsMaterialized(); return materialized_user_begin(); } user_iterator user_end() { return user_iterator(); } const_user_iterator user_end() const { return const_user_iterator(); } User *user_back() { assertModuleIsMaterialized(); return *materialized_user_begin(); } const User *user_back() const { assertModuleIsMaterialized(); return *materialized_user_begin(); } iterator_range<user_iterator> materialized_users() { return make_range(materialized_user_begin(), user_end()); } iterator_range<const_user_iterator> materialized_users() const { return make_range(materialized_user_begin(), user_end()); } iterator_range<user_iterator> users() { assertModuleIsMaterialized(); return materialized_users(); } iterator_range<const_user_iterator> users() const { assertModuleIsMaterialized(); return materialized_users(); } bool hasOneUse() const { const_use_iterator I = use_begin(), E = use_end(); if (I == E) return false; return ++I == E; } bool hasNUses(unsigned N) const; bool hasNUsesOrMore(unsigned N) const; Use *getSingleUndroppableUse(); bool hasNUndroppableUses(unsigned N) const; bool hasNUndroppableUsesOrMore(unsigned N) const; # 470 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.h" void dropDroppableUses(llvm::function_ref<bool(const Use *)> ShouldDrop = [](const Use *) { return true; }); bool isUsedInBasicBlock(const BasicBlock *BB) const; unsigned getNumUses() const; void addUse(Use &U) { U.addToList(&UseList); } enum ValueTy { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.def" 1 # 62 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.def" FunctionVal, GlobalAliasVal, GlobalIFuncVal, GlobalVariableVal, BlockAddressVal, ConstantExprVal, ConstantArrayVal, ConstantStructVal, ConstantVectorVal, UndefValueVal, ConstantAggregateZeroVal, ConstantDataArrayVal, ConstantDataVectorVal, ConstantIntVal, ConstantFPVal, ConstantPointerNullVal, ConstantTokenNoneVal, # 91 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.def" ArgumentVal, BasicBlockVal, MetadataAsValueVal, InlineAsmVal, MemoryUseVal, MemoryDefVal, MemoryPhiVal, InstructionVal, # 494 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.def" 1 # 84 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.def" ConstantFirstVal = FunctionVal, ConstantLastVal = ConstantTokenNoneVal, ConstantDataFirstVal = UndefValueVal, ConstantDataLastVal = ConstantTokenNoneVal, ConstantAggregateFirstVal = ConstantArrayVal, ConstantAggregateLastVal = ConstantVectorVal, # 498 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.h" 2 }; # 510 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.h" unsigned getValueID() const { return SubclassID; } unsigned getRawSubclassOptionalData() const { return SubclassOptionalData; } void clearSubclassOptionalData() { SubclassOptionalData = 0; } bool hasSameSubclassOptionalData(const Value *V) const { return SubclassOptionalData == V->SubclassOptionalData; } bool hasValueHandle() const { return HasValueHandle; } bool isUsedByMetadata() const { return IsUsedByMD; } bool isSwiftError() const; const Value *stripPointerCasts() const; Value *stripPointerCasts() { return const_cast<Value *>( static_cast<const Value *>(this)->stripPointerCasts()); } const Value *stripPointerCastsAndAliases() const; Value *stripPointerCastsAndAliases() { return const_cast<Value *>( static_cast<const Value *>(this)->stripPointerCastsAndAliases()); } const Value *stripPointerCastsSameRepresentation() const; Value *stripPointerCastsSameRepresentation() { return const_cast<Value *>(static_cast<const Value *>(this) ->stripPointerCastsSameRepresentation()); } const Value *stripPointerCastsAndInvariantGroups() const; Value *stripPointerCastsAndInvariantGroups() { return const_cast<Value *>(static_cast<const Value *>(this) ->stripPointerCastsAndInvariantGroups()); } const Value *stripInBoundsConstantOffsets() const; Value *stripInBoundsConstantOffsets() { return const_cast<Value *>( static_cast<const Value *>(this)->stripInBoundsConstantOffsets()); } # 621 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.h" const Value *stripAndAccumulateConstantOffsets( const DataLayout &DL, APInt &Offset, bool AllowNonInbounds, function_ref<bool(Value &Value, APInt &Offset)> ExternalAnalysis = nullptr) const; Value *stripAndAccumulateConstantOffsets(const DataLayout &DL, APInt &Offset, bool AllowNonInbounds) { return const_cast<Value *>( static_cast<const Value *>(this)->stripAndAccumulateConstantOffsets( DL, Offset, AllowNonInbounds)); } const Value *stripAndAccumulateInBoundsConstantOffsets(const DataLayout &DL, APInt &Offset) const { return stripAndAccumulateConstantOffsets(DL, Offset, false); } Value *stripAndAccumulateInBoundsConstantOffsets(const DataLayout &DL, APInt &Offset) { return stripAndAccumulateConstantOffsets(DL, Offset, false); } const Value *stripInBoundsOffsets(function_ref<void(const Value *)> Func = [](const Value *) {}) const; inline Value *stripInBoundsOffsets(function_ref<void(const Value *)> Func = [](const Value *) {}) { return const_cast<Value *>( static_cast<const Value *>(this)->stripInBoundsOffsets(Func)); } uint64_t getPointerDereferenceableBytes(const DataLayout &DL, bool &CanBeNull) const; Align getPointerAlignment(const DataLayout &DL) const; const Value *DoPHITranslation(const BasicBlock *CurBB, const BasicBlock *PredBB) const; Value *DoPHITranslation(const BasicBlock *CurBB, const BasicBlock *PredBB) { return const_cast<Value *>( static_cast<const Value *>(this)->DoPHITranslation(CurBB, PredBB)); } static const unsigned MaxAlignmentExponent = 29; static const unsigned MaximumAlignment = 1u << MaxAlignmentExponent; void mutateType(Type *Ty) { VTy = Ty; } template <class Compare> void sortUseList(Compare Cmp); void reverseUseList(); private: # 719 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Value.h" template <class Compare> static Use *mergeUseLists(Use *L, Use *R, Compare Cmp) { Use *Merged; Use **Next = &Merged; while (true) { if (!L) { *Next = R; break; } if (!R) { *Next = L; break; } if (Cmp(*R, *L)) { *Next = R; Next = &R->Next; R = R->Next; } else { *Next = L; Next = &L->Next; L = L->Next; } } return Merged; } protected: unsigned short getSubclassDataFromValue() const { return SubclassData; } void setValueSubclassData(unsigned short D) { SubclassData = D; } }; struct ValueDeleter { void operator()(Value *V) { V->deleteValue(); } }; using unique_value = std::unique_ptr<Value, ValueDeleter>; inline raw_ostream &operator<<(raw_ostream &OS, const Value &V) { V.print(OS); return OS; } void Use::set(Value *V) { if (Val) removeFromList(); Val = V; if (V) V->addUse(*this); } Value *Use::operator=(Value *RHS) { set(RHS); return RHS; } const Use &Use::operator=(const Use &RHS) { set(RHS.Val); return *this; } template <class Compare> void Value::sortUseList(Compare Cmp) { if (!UseList || !UseList->Next) return; const unsigned MaxSlots = 32; Use *Slots[MaxSlots]; Use *Next = UseList->Next; UseList->Next = nullptr; unsigned NumSlots = 1; Slots[0] = UseList; while (Next->Next) { Use *Current = Next; Next = Current->Next; Current->Next = nullptr; unsigned I; for (I = 0; I < NumSlots; ++I) { if (!Slots[I]) break; Current = mergeUseLists(Slots[I], Current, Cmp); Slots[I] = nullptr; } if (I == NumSlots) { ++NumSlots; (static_cast<void> (0)); } Slots[I] = Current; } (static_cast<void> (0)); (static_cast<void> (0)); UseList = Next; for (unsigned I = 0; I < NumSlots; ++I) if (Slots[I]) UseList = mergeUseLists(Slots[I], UseList, Cmp); for (Use *I = UseList, **Prev = &UseList; I; I = I->Next) { I->Prev = Prev; Prev = &I->Next; } } template <> struct isa_impl<Constant, Value> { static inline bool doit(const Value &Val) { static_assert(Value::ConstantFirstVal == 0, "Val.getValueID() >= Value::ConstantFirstVal"); return Val.getValueID() <= Value::ConstantLastVal; } }; template <> struct isa_impl<ConstantData, Value> { static inline bool doit(const Value &Val) { return Val.getValueID() >= Value::ConstantDataFirstVal && Val.getValueID() <= Value::ConstantDataLastVal; } }; template <> struct isa_impl<ConstantAggregate, Value> { static inline bool doit(const Value &Val) { return Val.getValueID() >= Value::ConstantAggregateFirstVal && Val.getValueID() <= Value::ConstantAggregateLastVal; } }; template <> struct isa_impl<Argument, Value> { static inline bool doit (const Value &Val) { return Val.getValueID() == Value::ArgumentVal; } }; template <> struct isa_impl<InlineAsm, Value> { static inline bool doit(const Value &Val) { return Val.getValueID() == Value::InlineAsmVal; } }; template <> struct isa_impl<Instruction, Value> { static inline bool doit(const Value &Val) { return Val.getValueID() >= Value::InstructionVal; } }; template <> struct isa_impl<BasicBlock, Value> { static inline bool doit(const Value &Val) { return Val.getValueID() == Value::BasicBlockVal; } }; template <> struct isa_impl<Function, Value> { static inline bool doit(const Value &Val) { return Val.getValueID() == Value::FunctionVal; } }; template <> struct isa_impl<GlobalVariable, Value> { static inline bool doit(const Value &Val) { return Val.getValueID() == Value::GlobalVariableVal; } }; template <> struct isa_impl<GlobalAlias, Value> { static inline bool doit(const Value &Val) { return Val.getValueID() == Value::GlobalAliasVal; } }; template <> struct isa_impl<GlobalIFunc, Value> { static inline bool doit(const Value &Val) { return Val.getValueID() == Value::GlobalIFuncVal; } }; template <> struct isa_impl<GlobalIndirectSymbol, Value> { static inline bool doit(const Value &Val) { return isa<GlobalAlias>(Val) || isa<GlobalIFunc>(Val); } }; template <> struct isa_impl<GlobalValue, Value> { static inline bool doit(const Value &Val) { return isa<GlobalObject>(Val) || isa<GlobalIndirectSymbol>(Val); } }; template <> struct isa_impl<GlobalObject, Value> { static inline bool doit(const Value &Val) { return isa<GlobalVariable>(Val) || isa<Function>(Val); } }; inline Value *unwrap(LLVMValueRef P) { return reinterpret_cast<Value*>(P); } inline LLVMValueRef wrap(const Value *P) { return reinterpret_cast<LLVMValueRef>(const_cast<Value*>(P)); } template<typename T> inline T *unwrap(LLVMValueRef P) { return cast<T>(unwrap(P)); } inline Value **unwrap(LLVMValueRef *Vals) { return reinterpret_cast<Value**>(Vals); } template<typename T> inline T **unwrap(LLVMValueRef *Vals, unsigned Length) { (void)Length; return reinterpret_cast<T**>(Vals); } inline LLVMValueRef *wrap(const Value **Vals) { return reinterpret_cast<LLVMValueRef*>(const_cast<Value**>(Vals)); } } # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Argument.h" 2 namespace llvm { class Argument final : public Value { Function *Parent; unsigned ArgNo; friend class Function; void setParent(Function *parent); public: explicit Argument(Type *Ty, const Twine &Name = "", Function *F = nullptr, unsigned ArgNo = 0); inline const Function *getParent() const { return Parent; } inline Function *getParent() { return Parent; } unsigned getArgNo() const { (static_cast<void> (0)); return ArgNo; } bool hasNonNullAttr() const; uint64_t getDereferenceableBytes() const; uint64_t getDereferenceableOrNullBytes() const; bool hasByValAttr() const; bool hasSwiftSelfAttr() const; bool hasSwiftErrorAttr() const; bool hasPassPointeeByValueAttr() const; uint64_t getPassPointeeByValueCopySize(const DataLayout &DL) const; unsigned getParamAlignment() const; MaybeAlign getParamAlign() const; Type *getParamByValType() const; bool hasNestAttr() const; bool hasNoAliasAttr() const; bool hasNoCaptureAttr() const; bool hasStructRetAttr() const; bool hasInRegAttr() const; bool hasReturnedAttr() const; bool onlyReadsMemory() const; bool hasInAllocaAttr() const; bool hasPreallocatedAttr() const; bool hasZExtAttr() const; bool hasSExtAttr() const; void addAttrs(AttrBuilder &B); void addAttr(Attribute::AttrKind Kind); void addAttr(Attribute Attr); void removeAttr(Attribute::AttrKind Kind); bool hasAttribute(Attribute::AttrKind Kind) const; Attribute getAttribute(Attribute::AttrKind Kind) const; static bool classof(const Value *V) { return V->getValueID() == ArgumentVal; } }; } # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/BasicBlock.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/BasicBlock.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist.h" 1 # 26 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/simple_ilist.h" 1 # 12 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/simple_ilist.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_base.h" 1 # 13 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_base.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 14 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_base.h" 2 namespace llvm { template <bool EnableSentinelTracking> class ilist_base { public: using node_base_type = ilist_node_base<EnableSentinelTracking>; static void insertBeforeImpl(node_base_type &Next, node_base_type &N) { node_base_type &Prev = *Next.getPrev(); N.setNext(&Next); N.setPrev(&Prev); Prev.setNext(&N); Next.setPrev(&N); } static void removeImpl(node_base_type &N) { node_base_type *Prev = N.getPrev(); node_base_type *Next = N.getNext(); Next->setPrev(Prev); Prev->setNext(Next); N.setPrev(nullptr); N.setNext(nullptr); } static void removeRangeImpl(node_base_type &First, node_base_type &Last) { node_base_type *Prev = First.getPrev(); node_base_type *Final = Last.getPrev(); Last.setPrev(Prev); Prev->setNext(&Last); First.setPrev(nullptr); Final->setNext(nullptr); } static void transferBeforeImpl(node_base_type &Next, node_base_type &First, node_base_type &Last) { if (&Next == &Last || &First == &Last) return; (static_cast<void> (0)); node_base_type &Final = *Last.getPrev(); First.getPrev()->setNext(&Last); Last.setPrev(First.getPrev()); node_base_type &Prev = *Next.getPrev(); Final.setNext(&Next); First.setPrev(&Prev); Prev.setNext(&First); Next.setPrev(&Final); } template <class T> static void insertBefore(T &Next, T &N) { insertBeforeImpl(Next, N); } template <class T> static void remove(T &N) { removeImpl(N); } template <class T> static void removeRange(T &First, T &Last) { removeRangeImpl(First, Last); } template <class T> static void transferBefore(T &Next, T &First, T &Last) { transferBeforeImpl(Next, First, Last); } }; } # 13 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/simple_ilist.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_iterator.h" 1 # 13 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_iterator.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 14 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_iterator.h" 2 namespace llvm { namespace ilist_detail { template <class OptionsT, bool IsConst> struct IteratorTraits; template <class OptionsT> struct IteratorTraits<OptionsT, false> { using value_type = typename OptionsT::value_type; using pointer = typename OptionsT::pointer; using reference = typename OptionsT::reference; using node_pointer = ilist_node_impl<OptionsT> *; using node_reference = ilist_node_impl<OptionsT> &; }; template <class OptionsT> struct IteratorTraits<OptionsT, true> { using value_type = const typename OptionsT::value_type; using pointer = typename OptionsT::const_pointer; using reference = typename OptionsT::const_reference; using node_pointer = const ilist_node_impl<OptionsT> *; using node_reference = const ilist_node_impl<OptionsT> &; }; template <bool IsReverse> struct IteratorHelper; template <> struct IteratorHelper<false> : ilist_detail::NodeAccess { using Access = ilist_detail::NodeAccess; template <class T> static void increment(T *&I) { I = Access::getNext(*I); } template <class T> static void decrement(T *&I) { I = Access::getPrev(*I); } }; template <> struct IteratorHelper<true> : ilist_detail::NodeAccess { using Access = ilist_detail::NodeAccess; template <class T> static void increment(T *&I) { I = Access::getPrev(*I); } template <class T> static void decrement(T *&I) { I = Access::getNext(*I); } }; } template <class OptionsT, bool IsReverse, bool IsConst> class ilist_iterator : ilist_detail::SpecificNodeAccess<OptionsT> { friend ilist_iterator<OptionsT, IsReverse, !IsConst>; friend ilist_iterator<OptionsT, !IsReverse, IsConst>; friend ilist_iterator<OptionsT, !IsReverse, !IsConst>; using Traits = ilist_detail::IteratorTraits<OptionsT, IsConst>; using Access = ilist_detail::SpecificNodeAccess<OptionsT>; public: using value_type = typename Traits::value_type; using pointer = typename Traits::pointer; using reference = typename Traits::reference; using difference_type = ptrdiff_t; using iterator_category = std::bidirectional_iterator_tag; using const_pointer = typename OptionsT::const_pointer; using const_reference = typename OptionsT::const_reference; private: using node_pointer = typename Traits::node_pointer; using node_reference = typename Traits::node_reference; node_pointer NodePtr = nullptr; public: explicit ilist_iterator(node_reference N) : NodePtr(&N) {} explicit ilist_iterator(pointer NP) : NodePtr(Access::getNodePtr(NP)) {} explicit ilist_iterator(reference NR) : NodePtr(Access::getNodePtr(&NR)) {} ilist_iterator() = default; template <bool RHSIsConst> ilist_iterator(const ilist_iterator<OptionsT, IsReverse, RHSIsConst> &RHS, std::enable_if_t<IsConst || !RHSIsConst, void *> = nullptr) : NodePtr(RHS.NodePtr) {} template <bool RHSIsConst> std::enable_if_t<IsConst || !RHSIsConst, ilist_iterator &> operator=(const ilist_iterator<OptionsT, IsReverse, RHSIsConst> &RHS) { NodePtr = RHS.NodePtr; return *this; } # 112 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist_iterator.h" explicit ilist_iterator( const ilist_iterator<OptionsT, !IsReverse, IsConst> &RHS) : ilist_iterator(++RHS.getReverse()) {} ilist_iterator<OptionsT, !IsReverse, IsConst> getReverse() const { if (NodePtr) return ilist_iterator<OptionsT, !IsReverse, IsConst>(*NodePtr); return ilist_iterator<OptionsT, !IsReverse, IsConst>(); } ilist_iterator<OptionsT, IsReverse, false> getNonConst() const { if (NodePtr) return ilist_iterator<OptionsT, IsReverse, false>( const_cast<typename ilist_iterator<OptionsT, IsReverse, false>::node_reference>(*NodePtr)); return ilist_iterator<OptionsT, IsReverse, false>(); } reference operator*() const { (static_cast<void> (0)); return *Access::getValuePtr(NodePtr); } pointer operator->() const { return &operator*(); } friend bool operator==(const ilist_iterator &LHS, const ilist_iterator &RHS) { return LHS.NodePtr == RHS.NodePtr; } friend bool operator!=(const ilist_iterator &LHS, const ilist_iterator &RHS) { return LHS.NodePtr != RHS.NodePtr; } ilist_iterator &operator--() { NodePtr = IsReverse ? NodePtr->getNext() : NodePtr->getPrev(); return *this; } ilist_iterator &operator++() { NodePtr = IsReverse ? NodePtr->getPrev() : NodePtr->getNext(); return *this; } ilist_iterator operator--(int) { ilist_iterator tmp = *this; --*this; return tmp; } ilist_iterator operator++(int) { ilist_iterator tmp = *this; ++*this; return tmp; } node_pointer getNodePtr() const { return static_cast<node_pointer>(NodePtr); } bool isEnd() const { return NodePtr ? NodePtr->isSentinel() : false; } }; template <typename From> struct simplify_type; template <class OptionsT, bool IsConst> struct simplify_type<ilist_iterator<OptionsT, false, IsConst>> { using iterator = ilist_iterator<OptionsT, false, IsConst>; using SimpleType = typename iterator::pointer; static SimpleType getSimplifiedValue(const iterator &Node) { return &*Node; } }; template <class OptionsT, bool IsConst> struct simplify_type<const ilist_iterator<OptionsT, false, IsConst>> : simplify_type<ilist_iterator<OptionsT, false, IsConst>> {}; } # 14 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/simple_ilist.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/simple_ilist.h" 2 namespace llvm { # 77 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/simple_ilist.h" template <typename T, class... Options> class simple_ilist : ilist_detail::compute_node_options<T, Options...>::type::list_base_type, ilist_detail::SpecificNodeAccess< typename ilist_detail::compute_node_options<T, Options...>::type> { static_assert(ilist_detail::check_options<Options...>::value, "Unrecognized node option!"); using OptionsT = typename ilist_detail::compute_node_options<T, Options...>::type; using list_base_type = typename OptionsT::list_base_type; ilist_sentinel<OptionsT> Sentinel; public: using value_type = typename OptionsT::value_type; using pointer = typename OptionsT::pointer; using reference = typename OptionsT::reference; using const_pointer = typename OptionsT::const_pointer; using const_reference = typename OptionsT::const_reference; using iterator = ilist_iterator<OptionsT, false, false>; using const_iterator = ilist_iterator<OptionsT, false, true>; using reverse_iterator = ilist_iterator<OptionsT, true, false>; using const_reverse_iterator = ilist_iterator<OptionsT, true, true>; using size_type = size_t; using difference_type = ptrdiff_t; simple_ilist() = default; ~simple_ilist() = default; simple_ilist(const simple_ilist &) = delete; simple_ilist &operator=(const simple_ilist &) = delete; simple_ilist(simple_ilist &&X) { splice(end(), X); } simple_ilist &operator=(simple_ilist &&X) { clear(); splice(end(), X); return *this; } iterator begin() { return ++iterator(Sentinel); } const_iterator begin() const { return ++const_iterator(Sentinel); } iterator end() { return iterator(Sentinel); } const_iterator end() const { return const_iterator(Sentinel); } reverse_iterator rbegin() { return ++reverse_iterator(Sentinel); } const_reverse_iterator rbegin() const { return ++const_reverse_iterator(Sentinel); } reverse_iterator rend() { return reverse_iterator(Sentinel); } const_reverse_iterator rend() const { return const_reverse_iterator(Sentinel); } [[clang::warn_unused_result]] bool empty() const { return Sentinel.empty(); } [[clang::warn_unused_result]] size_type size() const { return std::distance(begin(), end()); } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { return *rbegin(); } const_reference back() const { return *rbegin(); } void push_front(reference Node) { insert(begin(), Node); } void push_back(reference Node) { insert(end(), Node); } void pop_front() { erase(begin()); } void pop_back() { erase(--end()); } void swap(simple_ilist &X) { std::swap(*this, X); } iterator insert(iterator I, reference Node) { list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node)); return iterator(&Node); } template <class Iterator> void insert(iterator I, Iterator First, Iterator Last) { for (; First != Last; ++First) insert(I, *First); } template <class Cloner, class Disposer> void cloneFrom(const simple_ilist &L2, Cloner clone, Disposer dispose) { clearAndDispose(dispose); for (const_reference V : L2) push_back(*clone(V)); } void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); } template <class Disposer> void removeAndDispose(reference N, Disposer dispose) { remove(N); dispose(&N); } iterator erase(iterator I) { (static_cast<void> (0)); remove(*I++); return I; } iterator erase(iterator First, iterator Last) { list_base_type::removeRange(*First.getNodePtr(), *Last.getNodePtr()); return Last; } template <class Disposer> iterator eraseAndDispose(iterator I, Disposer dispose) { auto Next = std::next(I); erase(I); dispose(&*I); return Next; } template <class Disposer> iterator eraseAndDispose(iterator First, iterator Last, Disposer dispose) { while (First != Last) First = eraseAndDispose(First, dispose); return Last; } void clear() { Sentinel.reset(); } template <class Disposer> void clearAndDispose(Disposer dispose) { eraseAndDispose(begin(), end(), dispose); } void splice(iterator I, simple_ilist &L2) { splice(I, L2, L2.begin(), L2.end()); } void splice(iterator I, simple_ilist &L2, iterator Node) { splice(I, L2, Node, std::next(Node)); } void splice(iterator I, simple_ilist &, iterator First, iterator Last) { list_base_type::transferBefore(*I.getNodePtr(), *First.getNodePtr(), *Last.getNodePtr()); } void merge(simple_ilist &RHS) { merge(RHS, std::less<T>()); } template <class Compare> void merge(simple_ilist &RHS, Compare comp); void sort() { sort(std::less<T>()); } template <class Compare> void sort(Compare comp); }; template <class T, class... Options> template <class Compare> void simple_ilist<T, Options...>::merge(simple_ilist &RHS, Compare comp) { if (this == &RHS || RHS.empty()) return; iterator LI = begin(), LE = end(); iterator RI = RHS.begin(), RE = RHS.end(); while (LI != LE) { if (comp(*RI, *LI)) { iterator RunStart = RI++; RI = std::find_if(RI, RE, [&](reference RV) { return !comp(RV, *LI); }); splice(LI, RHS, RunStart, RI); if (RI == RE) return; } ++LI; } splice(LE, RHS, RI, RE); } template <class T, class... Options> template <class Compare> void simple_ilist<T, Options...>::sort(Compare comp) { if (empty() || std::next(begin()) == end()) return; iterator Center = begin(), End = begin(); while (End != end() && ++End != end()) { ++Center; ++End; } simple_ilist RHS; RHS.splice(RHS.end(), *this, Center, end()); sort(comp); RHS.sort(comp); merge(RHS, comp); } } # 27 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 28 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist.h" 2 namespace llvm { # 40 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist.h" template <typename NodeTy> struct ilist_alloc_traits { static void deleteNode(NodeTy *V) { delete V; } }; # 56 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist.h" template <typename NodeTy> struct ilist_noalloc_traits { static void deleteNode(NodeTy *V) {} }; template <typename NodeTy> struct ilist_callback_traits { void addNodeToList(NodeTy *) {} void removeNodeFromList(NodeTy *) {} template <class Iterator> void transferNodesFromList(ilist_callback_traits &OldList, Iterator , Iterator ) { (void)OldList; } }; template <typename NodeTy> struct ilist_node_traits : ilist_alloc_traits<NodeTy>, ilist_callback_traits<NodeTy> {}; template <typename NodeTy> struct ilist_traits : public ilist_node_traits<NodeTy> {}; template <typename Ty> struct ilist_traits<const Ty> {}; namespace ilist_detail { template <class T> T &make(); template <class TraitsT, class NodeT> struct HasGetNext { typedef char Yes[1]; typedef char No[2]; template <size_t N> struct SFINAE {}; template <class U> static Yes &test(U *I, decltype(I->getNext(&make<NodeT>())) * = 0); template <class> static No &test(...); public: static const bool value = sizeof(test<TraitsT>(nullptr)) == sizeof(Yes); }; template <class TraitsT> struct HasCreateSentinel { typedef char Yes[1]; typedef char No[2]; template <class U> static Yes &test(U *I, decltype(I->createSentinel()) * = 0); template <class> static No &test(...); public: static const bool value = sizeof(test<TraitsT>(nullptr)) == sizeof(Yes); }; template <class TraitsT, class NodeT> struct HasCreateNode { typedef char Yes[1]; typedef char No[2]; template <size_t N> struct SFINAE {}; template <class U> static Yes &test(U *I, decltype(I->createNode(make<NodeT>())) * = 0); template <class> static No &test(...); public: static const bool value = sizeof(test<TraitsT>(nullptr)) == sizeof(Yes); }; template <class TraitsT, class NodeT> struct HasObsoleteCustomization { static const bool value = HasGetNext<TraitsT, NodeT>::value || HasCreateSentinel<TraitsT>::value || HasCreateNode<TraitsT, NodeT>::value; }; } # 165 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/ilist.h" template <class IntrusiveListT, class TraitsT> class iplist_impl : public TraitsT, IntrusiveListT { typedef IntrusiveListT base_list_type; public: typedef typename base_list_type::pointer pointer; typedef typename base_list_type::const_pointer const_pointer; typedef typename base_list_type::reference reference; typedef typename base_list_type::const_reference const_reference; typedef typename base_list_type::value_type value_type; typedef typename base_list_type::size_type size_type; typedef typename base_list_type::difference_type difference_type; typedef typename base_list_type::iterator iterator; typedef typename base_list_type::const_iterator const_iterator; typedef typename base_list_type::reverse_iterator reverse_iterator; typedef typename base_list_type::const_reverse_iterator const_reverse_iterator; private: static_assert( !ilist_detail::HasObsoleteCustomization<TraitsT, value_type>::value, "ilist customization points have changed!"); static bool op_less(const_reference L, const_reference R) { return L < R; } static bool op_equal(const_reference L, const_reference R) { return L == R; } public: iplist_impl() = default; iplist_impl(const iplist_impl &) = delete; iplist_impl &operator=(const iplist_impl &) = delete; iplist_impl(iplist_impl &&X) : TraitsT(std::move(static_cast<TraitsT &>(X))), IntrusiveListT(std::move(static_cast<IntrusiveListT &>(X))) {} iplist_impl &operator=(iplist_impl &&X) { *static_cast<TraitsT *>(this) = std::move(static_cast<TraitsT &>(X)); *static_cast<IntrusiveListT *>(this) = std::move(static_cast<IntrusiveListT &>(X)); return *this; } ~iplist_impl() { clear(); } size_type max_size() const { return size_type(-1); } using base_list_type::begin; using base_list_type::end; using base_list_type::rbegin; using base_list_type::rend; using base_list_type::empty; using base_list_type::front; using base_list_type::back; void swap(iplist_impl &RHS) { (static_cast<void> (0)); base_list_type::swap(RHS); } iterator insert(iterator where, pointer New) { this->addNodeToList(New); return base_list_type::insert(where, *New); } iterator insert(iterator where, const_reference New) { return this->insert(where, new value_type(New)); } iterator insertAfter(iterator where, pointer New) { if (empty()) return insert(begin(), New); else return insert(++where, New); } template <class Cloner> void cloneFrom(const iplist_impl &L2, Cloner clone) { clear(); for (const_reference V : L2) push_back(clone(V)); } pointer remove(iterator &IT) { pointer Node = &*IT++; this->removeNodeFromList(Node); base_list_type::remove(*Node); return Node; } pointer remove(const iterator &IT) { iterator MutIt = IT; return remove(MutIt); } pointer remove(pointer IT) { return remove(iterator(IT)); } pointer remove(reference IT) { return remove(iterator(IT)); } iterator erase(iterator where) { this->deleteNode(remove(where)); return where; } iterator erase(pointer IT) { return erase(iterator(IT)); } iterator erase(reference IT) { return erase(iterator(IT)); } void clearAndLeakNodesUnsafely() { base_list_type::clear(); } private: void transfer(iterator position, iplist_impl &L2, iterator first, iterator last) { if (position == last) return; this->transferNodesFromList(L2, first, last); base_list_type::splice(position, L2, first, last); } public: using base_list_type::size; iterator erase(iterator first, iterator last) { while (first != last) first = erase(first); return last; } void clear() { erase(begin(), end()); } void push_front(pointer val) { insert(begin(), val); } void push_back(pointer val) { insert(end(), val); } void pop_front() { (static_cast<void> (0)); erase(begin()); } void pop_back() { (static_cast<void> (0)); iterator t = end(); erase(--t); } template<class InIt> void insert(iterator where, InIt first, InIt last) { for (; first != last; ++first) insert(where, *first); } void splice(iterator where, iplist_impl &L2) { if (!L2.empty()) transfer(where, L2, L2.begin(), L2.end()); } void splice(iterator where, iplist_impl &L2, iterator first) { iterator last = first; ++last; if (where == first || where == last) return; transfer(where, L2, first, last); } void splice(iterator where, iplist_impl &L2, iterator first, iterator last) { if (first != last) transfer(where, L2, first, last); } void splice(iterator where, iplist_impl &L2, reference N) { splice(where, L2, iterator(N)); } void splice(iterator where, iplist_impl &L2, pointer N) { splice(where, L2, iterator(N)); } template <class Compare> void merge(iplist_impl &Right, Compare comp) { if (this == &Right) return; this->transferNodesFromList(Right, Right.begin(), Right.end()); base_list_type::merge(Right, comp); } void merge(iplist_impl &Right) { return merge(Right, op_less); } using base_list_type::sort; pointer getPrevNode(reference N) const { auto I = N.getIterator(); if (I == begin()) return nullptr; return &*std::prev(I); } const_pointer getPrevNode(const_reference N) const { return getPrevNode(const_cast<reference >(N)); } pointer getNextNode(reference N) const { auto Next = std::next(N.getIterator()); if (Next == end()) return nullptr; return &*Next; } const_pointer getNextNode(const_reference N) const { return getNextNode(const_cast<reference >(N)); } }; template <class T, class... Options> class iplist : public iplist_impl<simple_ilist<T, Options...>, ilist_traits<T>> { using iplist_impl_type = typename iplist::iplist_impl; public: iplist() = default; iplist(const iplist &X) = delete; iplist &operator=(const iplist &X) = delete; iplist(iplist &&X) : iplist_impl_type(std::move(X)) {} iplist &operator=(iplist &&X) { *static_cast<iplist_impl_type *>(this) = std::move(X); return *this; } }; template <class T, class... Options> using ilist = iplist<T, Options...>; } namespace std { template<class Ty> void swap(llvm::iplist<Ty> &Left, llvm::iplist<Ty> &Right) { Left.swap(Right); } } # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/BasicBlock.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Bitfields.h" 1 # 82 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Bitfields.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 83 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Bitfields.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/climits" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/climits" 3 # 84 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Bitfields.h" 2 namespace llvm { namespace bitfields_details { template <typename T, unsigned Bits> struct BitPatterns { using Unsigned = typename std::make_unsigned<T>::type; static_assert(sizeof(Unsigned) == sizeof(T), "Types must have same size"); static constexpr unsigned TypeBits = sizeof(Unsigned) * 8; static_assert(TypeBits >= Bits, "n-bit must fit in T"); static constexpr Unsigned AllZeros = Unsigned(0); static constexpr Unsigned AllOnes = ~Unsigned(0); static constexpr Unsigned Umin = AllZeros; static constexpr Unsigned Umax = AllOnes >> (TypeBits - Bits); static constexpr Unsigned SignBitMask = Unsigned(1) << (Bits - 1); static constexpr Unsigned Smax = Umax >> 1U; static constexpr Unsigned Smin = ~Smax; static constexpr Unsigned SignExtend = Unsigned(Smin << 1U); }; template <typename T, unsigned Bits, bool = std::is_unsigned<T>::value> struct Compressor { static_assert(std::is_unsigned<T>::value, "T is unsigned"); using BP = BitPatterns<T, Bits>; static T pack(T UserValue, T UserMaxValue) { (static_cast<void> (0)); (static_cast<void> (0)); return UserValue; } static T unpack(T StorageValue) { return StorageValue; } }; template <typename T, unsigned Bits> struct Compressor<T, Bits, false> { static_assert(std::is_signed<T>::value, "T is signed"); using BP = BitPatterns<T, Bits>; static T pack(T UserValue, T UserMaxValue) { (static_cast<void> (0)); (static_cast<void> (0)); (static_cast<void> (0)); if (UserValue < 0) UserValue &= ~BP::SignExtend; return UserValue; } static T unpack(T StorageValue) { if (StorageValue >= T(BP::SignBitMask)) StorageValue |= BP::SignExtend; return StorageValue; } }; template <typename Bitfield, typename StorageType> struct Impl { static_assert(std::is_unsigned<StorageType>::value, "Storage must be unsigned"); using IntegerType = typename Bitfield::IntegerType; using C = Compressor<IntegerType, Bitfield::Bits>; using BP = BitPatterns<StorageType, Bitfield::Bits>; static constexpr size_t StorageBits = sizeof(StorageType) * 8; static_assert(Bitfield::FirstBit <= StorageBits, "Data must fit in mask"); static_assert(Bitfield::LastBit <= StorageBits, "Data must fit in mask"); static constexpr StorageType Mask = BP::Umax << Bitfield::Shift; static void update(StorageType &Packed, IntegerType UserValue) { const StorageType StorageValue = C::pack(UserValue, Bitfield::UserMaxValue); Packed &= ~Mask; Packed |= StorageValue << Bitfield::Shift; } static IntegerType extract(StorageType Packed) { const StorageType StorageValue = (Packed & Mask) >> Bitfield::Shift; return C::unpack(StorageValue); } static StorageType test(StorageType Packed) { return Packed & Mask; } }; # 196 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Bitfields.h" template <typename T, bool = std::is_enum<T>::value> struct ResolveUnderlyingType { using type = typename std::underlying_type<T>::type; }; template <typename T> struct ResolveUnderlyingType<T, false> { using type = T; }; template <> struct ResolveUnderlyingType<bool, false> { using type = std::conditional<sizeof(bool) == 1, uint8_t, void>::type; }; } struct Bitfield { template <typename T, unsigned Offset, unsigned Size, T MaxValue = std::is_enum<T>::value ? T(0) : std::numeric_limits<T>::max()> struct Element { using Type = T; using IntegerType = typename bitfields_details::ResolveUnderlyingType<T>::type; static constexpr unsigned Shift = Offset; static constexpr unsigned Bits = Size; static constexpr unsigned FirstBit = Offset; static constexpr unsigned LastBit = Shift + Bits - 1; static constexpr unsigned NextBit = Shift + Bits; private: template <typename, typename> friend struct bitfields_details::Impl; static_assert(Bits > 0, "Bits must be non zero"); static constexpr size_t TypeBits = sizeof(IntegerType) * 8; static_assert(Bits <= TypeBits, "Bits may not be greater than T size"); static_assert(!std::is_enum<T>::value || MaxValue != T(0), "Enum Bitfields must provide a MaxValue"); static_assert(!std::is_enum<T>::value || std::is_unsigned<IntegerType>::value, "Enum must be unsigned"); static_assert(std::is_integral<IntegerType>::value && std::numeric_limits<IntegerType>::is_integer, "IntegerType must be an integer type"); static constexpr IntegerType UserMaxValue = static_cast<IntegerType>(MaxValue); }; template <typename Bitfield, typename StorageType> static typename Bitfield::Type get(StorageType Packed) { using I = bitfields_details::Impl<Bitfield, StorageType>; return static_cast<typename Bitfield::Type>(I::extract(Packed)); } template <typename Bitfield, typename StorageType> static StorageType test(StorageType Packed) { using I = bitfields_details::Impl<Bitfield, StorageType>; return I::test(Packed); } template <typename Bitfield, typename StorageType> static void set(StorageType &Packed, typename Bitfield::Type Value) { using I = bitfields_details::Impl<Bitfield, StorageType>; I::update(Packed, static_cast<typename Bitfield::IntegerType>(Value)); } template <typename A, typename B> static constexpr bool isOverlapping() { return A::LastBit >= B::FirstBit && B::LastBit >= A::FirstBit; } template <typename A> static constexpr bool areContiguous() { return true; } template <typename A, typename B, typename... Others> static constexpr bool areContiguous() { return A::NextBit == B::FirstBit && areContiguous<B, Others...>(); } }; } # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugLoc.h" 1 # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugLoc.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/TrackingMDRef.h" 1 # 16 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/TrackingMDRef.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" 1 # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/PointerUnion.h" 1 # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/PointerUnion.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 21 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/PointerUnion.h" 2 namespace llvm { template <typename T> struct PointerUnionTypeSelectorReturn { using Return = T; }; # 39 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/PointerUnion.h" template <typename T1, typename T2, typename RET_EQ, typename RET_NE> struct PointerUnionTypeSelector { using Return = typename PointerUnionTypeSelectorReturn<RET_NE>::Return; }; template <typename T, typename RET_EQ, typename RET_NE> struct PointerUnionTypeSelector<T, T, RET_EQ, RET_NE> { using Return = typename PointerUnionTypeSelectorReturn<RET_EQ>::Return; }; template <typename T1, typename T2, typename RET_EQ, typename RET_NE> struct PointerUnionTypeSelectorReturn< PointerUnionTypeSelector<T1, T2, RET_EQ, RET_NE>> { using Return = typename PointerUnionTypeSelector<T1, T2, RET_EQ, RET_NE>::Return; }; namespace pointer_union_detail { constexpr int bitsRequired(unsigned n) { return n > 1 ? 1 + bitsRequired((n + 1) / 2) : 0; } template <typename... Ts> constexpr int lowBitsAvailable() { return std::min<int>({PointerLikeTypeTraits<Ts>::NumLowBitsAvailable...}); } template <typename T, typename ...Us> struct TypeIndex; template <typename T, typename ...Us> struct TypeIndex<T, T, Us...> { static constexpr int Index = 0; }; template <typename T, typename U, typename... Us> struct TypeIndex<T, U, Us...> { static constexpr int Index = 1 + TypeIndex<T, Us...>::Index; }; template <typename T> struct TypeIndex<T> { static constexpr int Index = 0; }; template <typename T, typename...> struct GetFirstType { using type = T; }; template <typename ...PTs> class PointerUnionUIntTraits { public: static inline void *getAsVoidPointer(void *P) { return P; } static inline void *getFromVoidPointer(void *P) { return P; } static constexpr int NumLowBitsAvailable = lowBitsAvailable<PTs...>(); }; template <typename Derived, typename T> struct AssignableFrom { Derived &operator=(T t) { return static_cast<Derived &>(*this) = Derived(t); } }; template <typename Derived, typename ValTy, int I, typename ...Types> class PointerUnionMembers; template <typename Derived, typename ValTy, int I> class PointerUnionMembers<Derived, ValTy, I> { protected: ValTy Val; PointerUnionMembers() = default; PointerUnionMembers(ValTy Val) : Val(Val) {} friend struct PointerLikeTypeTraits<Derived>; }; template <typename Derived, typename ValTy, int I, typename Type, typename ...Types> class PointerUnionMembers<Derived, ValTy, I, Type, Types...> : public PointerUnionMembers<Derived, ValTy, I + 1, Types...> { using Base = PointerUnionMembers<Derived, ValTy, I + 1, Types...>; public: using Base::Base; PointerUnionMembers() = default; PointerUnionMembers(Type V) : Base(ValTy(const_cast<void *>( PointerLikeTypeTraits<Type>::getAsVoidPointer(V)), I)) {} using Base::operator=; Derived &operator=(Type V) { this->Val = ValTy( const_cast<void *>(PointerLikeTypeTraits<Type>::getAsVoidPointer(V)), I); return static_cast<Derived &>(*this); }; }; } # 155 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/PointerUnion.h" template <typename... PTs> class PointerUnion : public pointer_union_detail::PointerUnionMembers< PointerUnion<PTs...>, PointerIntPair< void *, pointer_union_detail::bitsRequired(sizeof...(PTs)), int, pointer_union_detail::PointerUnionUIntTraits<PTs...>>, 0, PTs...> { using First = typename pointer_union_detail::GetFirstType<PTs...>::type; using Base = typename PointerUnion::PointerUnionMembers; public: PointerUnion() = default; PointerUnion(std::nullptr_t) : PointerUnion() {} using Base::Base; bool isNull() const { return !this->Val.getPointer(); } explicit operator bool() const { return !isNull(); } template <typename T> bool is() const { constexpr int Index = pointer_union_detail::TypeIndex<T, PTs...>::Index; static_assert(Index < sizeof...(PTs), "PointerUnion::is<T> given type not in the union"); return this->Val.getInt() == Index; } template <typename T> T get() const { (static_cast<void> (0)); return PointerLikeTypeTraits<T>::getFromVoidPointer(this->Val.getPointer()); } template <typename T> T dyn_cast() const { if (is<T>()) return get<T>(); return T(); } First const *getAddrOfPtr1() const { return const_cast<PointerUnion *>(this)->getAddrOfPtr1(); } First *getAddrOfPtr1() { (static_cast<void> (0)); (static_cast<void> (0)); return const_cast<First *>( reinterpret_cast<const First *>(this->Val.getAddrOfPointer())); } const PointerUnion &operator=(std::nullptr_t) { this->Val.initWithPointer(nullptr); return *this; } using Base::operator=; void *getOpaqueValue() const { return this->Val.getOpaqueValue(); } static inline PointerUnion getFromOpaqueValue(void *VP) { PointerUnion V; V.Val = decltype(V.Val)::getFromOpaqueValue(VP); return V; } }; template <typename ...PTs> bool operator==(PointerUnion<PTs...> lhs, PointerUnion<PTs...> rhs) { return lhs.getOpaqueValue() == rhs.getOpaqueValue(); } template <typename ...PTs> bool operator!=(PointerUnion<PTs...> lhs, PointerUnion<PTs...> rhs) { return lhs.getOpaqueValue() != rhs.getOpaqueValue(); } template <typename ...PTs> bool operator<(PointerUnion<PTs...> lhs, PointerUnion<PTs...> rhs) { return lhs.getOpaqueValue() < rhs.getOpaqueValue(); } template <typename ...PTs> struct PointerLikeTypeTraits<PointerUnion<PTs...>> { static inline void *getAsVoidPointer(const PointerUnion<PTs...> &P) { return P.getOpaqueValue(); } static inline PointerUnion<PTs...> getFromVoidPointer(void *P) { return PointerUnion<PTs...>::getFromOpaqueValue(P); } static constexpr int NumLowBitsAvailable = PointerLikeTypeTraits<decltype( PointerUnion<PTs...>::Val)>::NumLowBitsAvailable; }; template <typename ...PTs> struct DenseMapInfo<PointerUnion<PTs...>> { using Union = PointerUnion<PTs...>; using FirstInfo = DenseMapInfo<typename pointer_union_detail::GetFirstType<PTs...>::type>; static inline Union getEmptyKey() { return Union(FirstInfo::getEmptyKey()); } static inline Union getTombstoneKey() { return Union(FirstInfo::getTombstoneKey()); } static unsigned getHashValue(const Union &UnionVal) { intptr_t key = (intptr_t)UnionVal.getOpaqueValue(); return DenseMapInfo<intptr_t>::getHashValue(key); } static bool isEqual(const Union &LHS, const Union &RHS) { return LHS == RHS; } }; } # 23 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringMap.h" 1 # 16 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringMap.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringMapEntry.h" 1 # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringMapEntry.h" namespace llvm { class StringMapEntryBase { size_t keyLength; public: explicit StringMapEntryBase(size_t keyLength) : keyLength(keyLength) {} size_t getKeyLength() const { return keyLength; } }; template <typename ValueTy> class StringMapEntryStorage : public StringMapEntryBase { public: ValueTy second; explicit StringMapEntryStorage(size_t keyLength) : StringMapEntryBase(keyLength), second() {} template <typename... InitTy> StringMapEntryStorage(size_t keyLength, InitTy &&... initVals) : StringMapEntryBase(keyLength), second(std::forward<InitTy>(initVals)...) {} StringMapEntryStorage(StringMapEntryStorage &e) = delete; const ValueTy &getValue() const { return second; } ValueTy &getValue() { return second; } void setValue(const ValueTy &V) { second = V; } }; template <> class StringMapEntryStorage<NoneType> : public StringMapEntryBase { public: explicit StringMapEntryStorage(size_t keyLength, NoneType none = None) : StringMapEntryBase(keyLength) {} StringMapEntryStorage(StringMapEntryStorage &entry) = delete; NoneType getValue() const { return None; } }; template <typename ValueTy> class StringMapEntry final : public StringMapEntryStorage<ValueTy> { public: using StringMapEntryStorage<ValueTy>::StringMapEntryStorage; StringRef getKey() const { return StringRef(getKeyData(), this->getKeyLength()); } const char *getKeyData() const { return reinterpret_cast<const char *>(this + 1); } StringRef first() const { return StringRef(getKeyData(), this->getKeyLength()); } template <typename AllocatorTy, typename... InitTy> static StringMapEntry *Create(StringRef key, AllocatorTy &allocator, InitTy &&... initVals) { size_t keyLength = key.size(); size_t allocSize = sizeof(StringMapEntry) + keyLength + 1; size_t alignment = alignof(StringMapEntry); StringMapEntry *newItem = static_cast<StringMapEntry *>(allocator.Allocate(allocSize, alignment)); (static_cast<void> (0)); new (newItem) StringMapEntry(keyLength, std::forward<InitTy>(initVals)...); char *strBuffer = const_cast<char *>(newItem->getKeyData()); if (keyLength > 0) memcpy(strBuffer, key.data(), keyLength); strBuffer[keyLength] = 0; return newItem; } static StringMapEntry &GetStringMapEntryFromKeyData(const char *keyData) { char *ptr = const_cast<char *>(keyData) - sizeof(StringMapEntry<ValueTy>); return *reinterpret_cast<StringMapEntry *>(ptr); } template <typename AllocatorTy> void Destroy(AllocatorTy &allocator) { size_t AllocSize = sizeof(StringMapEntry) + this->getKeyLength() + 1; this->~StringMapEntry(); allocator.Deallocate(static_cast<void *>(this), AllocSize, alignof(StringMapEntry)); } }; } # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringMap.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/AllocatorBase.h" 1 # 25 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/AllocatorBase.h" namespace llvm { template <typename DerivedT> class AllocatorBase { public: void *Allocate(size_t Size, size_t Alignment) { static_assert(static_cast<void *(AllocatorBase::*)(size_t, size_t)>( &AllocatorBase::Allocate) != static_cast<void *(DerivedT::*)(size_t, size_t)>( &DerivedT::Allocate), "Class derives from AllocatorBase without implementing the " "core Allocate(size_t, size_t) overload!"); return static_cast<DerivedT *>(this)->Allocate(Size, Alignment); } void Deallocate(const void *Ptr, size_t Size, size_t Alignment) { static_assert( static_cast<void (AllocatorBase::*)(const void *, size_t, size_t)>( &AllocatorBase::Deallocate) != static_cast<void (DerivedT::*)(const void *, size_t, size_t)>( &DerivedT::Deallocate), "Class derives from AllocatorBase without implementing the " "core Deallocate(void *) overload!"); return static_cast<DerivedT *>(this)->Deallocate(Ptr, Size, Alignment); } template <typename T> T *Allocate(size_t Num = 1) { return static_cast<T *>(Allocate(Num * sizeof(T), alignof(T))); } template <typename T> std::enable_if_t<!std::is_same<std::remove_cv_t<T>, void>::value, void> Deallocate(T *Ptr, size_t Num = 1) { Deallocate(static_cast<const void *>(Ptr), Num * sizeof(T), alignof(T)); } }; class MallocAllocator : public AllocatorBase<MallocAllocator> { public: void Reset() {} __attribute__((returns_nonnull)) void *Allocate(size_t Size, size_t Alignment) { return allocate_buffer(Size, Alignment); } using AllocatorBase<MallocAllocator>::Allocate; void Deallocate(const void *Ptr, size_t Size, size_t Alignment) { deallocate_buffer(const_cast<void *>(Ptr), Size, Alignment); } using AllocatorBase<MallocAllocator>::Deallocate; void PrintStats() const {} }; } # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringMap.h" 2 namespace llvm { template <typename ValueTy> class StringMapConstIterator; template <typename ValueTy> class StringMapIterator; template <typename ValueTy> class StringMapKeyIterator; class StringMapImpl { protected: StringMapEntryBase **TheTable = nullptr; unsigned NumBuckets = 0; unsigned NumItems = 0; unsigned NumTombstones = 0; unsigned ItemSize; protected: explicit StringMapImpl(unsigned itemSize) : ItemSize(itemSize) {} StringMapImpl(StringMapImpl &&RHS) : TheTable(RHS.TheTable), NumBuckets(RHS.NumBuckets), NumItems(RHS.NumItems), NumTombstones(RHS.NumTombstones), ItemSize(RHS.ItemSize) { RHS.TheTable = nullptr; RHS.NumBuckets = 0; RHS.NumItems = 0; RHS.NumTombstones = 0; } StringMapImpl(unsigned InitSize, unsigned ItemSize); unsigned RehashTable(unsigned BucketNo = 0); unsigned LookupBucketFor(StringRef Key); int FindKey(StringRef Key) const; void RemoveKey(StringMapEntryBase *V); StringMapEntryBase *RemoveKey(StringRef Key); void init(unsigned Size); public: static StringMapEntryBase *getTombstoneVal() { uintptr_t Val = static_cast<uintptr_t>(-1); Val <<= PointerLikeTypeTraits<StringMapEntryBase *>::NumLowBitsAvailable; return reinterpret_cast<StringMapEntryBase *>(Val); } unsigned getNumBuckets() const { return NumBuckets; } unsigned getNumItems() const { return NumItems; } bool empty() const { return NumItems == 0; } unsigned size() const { return NumItems; } void swap(StringMapImpl &Other) { std::swap(TheTable, Other.TheTable); std::swap(NumBuckets, Other.NumBuckets); std::swap(NumItems, Other.NumItems); std::swap(NumTombstones, Other.NumTombstones); } }; template <typename ValueTy, typename AllocatorTy = MallocAllocator> class StringMap : public StringMapImpl { AllocatorTy Allocator; public: using MapEntryTy = StringMapEntry<ValueTy>; StringMap() : StringMapImpl(static_cast<unsigned>(sizeof(MapEntryTy))) {} explicit StringMap(unsigned InitialSize) : StringMapImpl(InitialSize, static_cast<unsigned>(sizeof(MapEntryTy))) {} explicit StringMap(AllocatorTy A) : StringMapImpl(static_cast<unsigned>(sizeof(MapEntryTy))), Allocator(A) { } StringMap(unsigned InitialSize, AllocatorTy A) : StringMapImpl(InitialSize, static_cast<unsigned>(sizeof(MapEntryTy))), Allocator(A) {} StringMap(std::initializer_list<std::pair<StringRef, ValueTy>> List) : StringMapImpl(List.size(), static_cast<unsigned>(sizeof(MapEntryTy))) { for (const auto &P : List) { insert(P); } } StringMap(StringMap &&RHS) : StringMapImpl(std::move(RHS)), Allocator(std::move(RHS.Allocator)) {} StringMap(const StringMap &RHS) : StringMapImpl(static_cast<unsigned>(sizeof(MapEntryTy))), Allocator(RHS.Allocator) { if (RHS.empty()) return; init(RHS.NumBuckets); unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1), *RHSHashTable = (unsigned *)(RHS.TheTable + NumBuckets + 1); NumItems = RHS.NumItems; NumTombstones = RHS.NumTombstones; for (unsigned I = 0, E = NumBuckets; I != E; ++I) { StringMapEntryBase *Bucket = RHS.TheTable[I]; if (!Bucket || Bucket == getTombstoneVal()) { TheTable[I] = Bucket; continue; } TheTable[I] = MapEntryTy::Create( static_cast<MapEntryTy *>(Bucket)->getKey(), Allocator, static_cast<MapEntryTy *>(Bucket)->getValue()); HashTable[I] = RHSHashTable[I]; } } StringMap &operator=(StringMap RHS) { StringMapImpl::swap(RHS); std::swap(Allocator, RHS.Allocator); return *this; } ~StringMap() { if (!empty()) { for (unsigned I = 0, E = NumBuckets; I != E; ++I) { StringMapEntryBase *Bucket = TheTable[I]; if (Bucket && Bucket != getTombstoneVal()) { static_cast<MapEntryTy *>(Bucket)->Destroy(Allocator); } } } free(TheTable); } AllocatorTy &getAllocator() { return Allocator; } const AllocatorTy &getAllocator() const { return Allocator; } using key_type = const char *; using mapped_type = ValueTy; using value_type = StringMapEntry<ValueTy>; using size_type = size_t; using const_iterator = StringMapConstIterator<ValueTy>; using iterator = StringMapIterator<ValueTy>; iterator begin() { return iterator(TheTable, NumBuckets == 0); } iterator end() { return iterator(TheTable + NumBuckets, true); } const_iterator begin() const { return const_iterator(TheTable, NumBuckets == 0); } const_iterator end() const { return const_iterator(TheTable + NumBuckets, true); } iterator_range<StringMapKeyIterator<ValueTy>> keys() const { return make_range(StringMapKeyIterator<ValueTy>(begin()), StringMapKeyIterator<ValueTy>(end())); } iterator find(StringRef Key) { int Bucket = FindKey(Key); if (Bucket == -1) return end(); return iterator(TheTable + Bucket, true); } const_iterator find(StringRef Key) const { int Bucket = FindKey(Key); if (Bucket == -1) return end(); return const_iterator(TheTable + Bucket, true); } ValueTy lookup(StringRef Key) const { const_iterator it = find(Key); if (it != end()) return it->second; return ValueTy(); } ValueTy &operator[](StringRef Key) { return try_emplace(Key).first->second; } size_type count(StringRef Key) const { return find(Key) == end() ? 0 : 1; } template <typename InputTy> size_type count(const StringMapEntry<InputTy> &MapEntry) const { return count(MapEntry.getKey()); } bool operator==(const StringMap &RHS) const { if (size() != RHS.size()) return false; for (const auto &KeyValue : *this) { auto FindInRHS = RHS.find(KeyValue.getKey()); if (FindInRHS == RHS.end()) return false; if (!(KeyValue.getValue() == FindInRHS->getValue())) return false; } return true; } bool operator!=(const StringMap &RHS) const { return !(*this == RHS); } bool insert(MapEntryTy *KeyValue) { unsigned BucketNo = LookupBucketFor(KeyValue->getKey()); StringMapEntryBase *&Bucket = TheTable[BucketNo]; if (Bucket && Bucket != getTombstoneVal()) return false; if (Bucket == getTombstoneVal()) --NumTombstones; Bucket = KeyValue; ++NumItems; (static_cast<void> (0)); RehashTable(); return true; } std::pair<iterator, bool> insert(std::pair<StringRef, ValueTy> KV) { return try_emplace(KV.first, std::move(KV.second)); } template <typename V> std::pair<iterator, bool> insert_or_assign(StringRef Key, V &&Val) { auto Ret = try_emplace(Key, std::forward<V>(Val)); if (!Ret.second) Ret.first->second = std::forward<V>(Val); return Ret; } template <typename... ArgsTy> std::pair<iterator, bool> try_emplace(StringRef Key, ArgsTy &&... Args) { unsigned BucketNo = LookupBucketFor(Key); StringMapEntryBase *&Bucket = TheTable[BucketNo]; if (Bucket && Bucket != getTombstoneVal()) return std::make_pair(iterator(TheTable + BucketNo, false), false); if (Bucket == getTombstoneVal()) --NumTombstones; Bucket = MapEntryTy::Create(Key, Allocator, std::forward<ArgsTy>(Args)...); ++NumItems; (static_cast<void> (0)); BucketNo = RehashTable(BucketNo); return std::make_pair(iterator(TheTable + BucketNo, false), true); } void clear() { if (empty()) return; for (unsigned I = 0, E = NumBuckets; I != E; ++I) { StringMapEntryBase *&Bucket = TheTable[I]; if (Bucket && Bucket != getTombstoneVal()) { static_cast<MapEntryTy *>(Bucket)->Destroy(Allocator); } Bucket = nullptr; } NumItems = 0; NumTombstones = 0; } void remove(MapEntryTy *KeyValue) { RemoveKey(KeyValue); } void erase(iterator I) { MapEntryTy &V = *I; remove(&V); V.Destroy(Allocator); } bool erase(StringRef Key) { iterator I = find(Key); if (I == end()) return false; erase(I); return true; } }; template <typename DerivedTy, typename ValueTy> class StringMapIterBase : public iterator_facade_base<DerivedTy, std::forward_iterator_tag, ValueTy> { protected: StringMapEntryBase **Ptr = nullptr; public: StringMapIterBase() = default; explicit StringMapIterBase(StringMapEntryBase **Bucket, bool NoAdvance = false) : Ptr(Bucket) { if (!NoAdvance) AdvancePastEmptyBuckets(); } DerivedTy &operator=(const DerivedTy &Other) { Ptr = Other.Ptr; return static_cast<DerivedTy &>(*this); } bool operator==(const DerivedTy &RHS) const { return Ptr == RHS.Ptr; } DerivedTy &operator++() { ++Ptr; AdvancePastEmptyBuckets(); return static_cast<DerivedTy &>(*this); } DerivedTy operator++(int) { DerivedTy Tmp(Ptr); ++*this; return Tmp; } private: void AdvancePastEmptyBuckets() { while (*Ptr == nullptr || *Ptr == StringMapImpl::getTombstoneVal()) ++Ptr; } }; template <typename ValueTy> class StringMapConstIterator : public StringMapIterBase<StringMapConstIterator<ValueTy>, const StringMapEntry<ValueTy>> { using base = StringMapIterBase<StringMapConstIterator<ValueTy>, const StringMapEntry<ValueTy>>; public: StringMapConstIterator() = default; explicit StringMapConstIterator(StringMapEntryBase **Bucket, bool NoAdvance = false) : base(Bucket, NoAdvance) {} const StringMapEntry<ValueTy> &operator*() const { return *static_cast<const StringMapEntry<ValueTy> *>(*this->Ptr); } }; template <typename ValueTy> class StringMapIterator : public StringMapIterBase<StringMapIterator<ValueTy>, StringMapEntry<ValueTy>> { using base = StringMapIterBase<StringMapIterator<ValueTy>, StringMapEntry<ValueTy>>; public: StringMapIterator() = default; explicit StringMapIterator(StringMapEntryBase **Bucket, bool NoAdvance = false) : base(Bucket, NoAdvance) {} StringMapEntry<ValueTy> &operator*() const { return *static_cast<StringMapEntry<ValueTy> *>(*this->Ptr); } operator StringMapConstIterator<ValueTy>() const { return StringMapConstIterator<ValueTy>(this->Ptr, true); } }; template <typename ValueTy> class StringMapKeyIterator : public iterator_adaptor_base<StringMapKeyIterator<ValueTy>, StringMapConstIterator<ValueTy>, std::forward_iterator_tag, StringRef> { using base = iterator_adaptor_base<StringMapKeyIterator<ValueTy>, StringMapConstIterator<ValueTy>, std::forward_iterator_tag, StringRef>; public: StringMapKeyIterator() = default; explicit StringMapKeyIterator(StringMapConstIterator<ValueTy> Iter) : base(std::move(Iter)) {} StringRef &operator*() { Key = this->wrapped()->getKey(); return Key; } private: StringRef Key; }; } # 26 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constant.h" 1 # 16 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constant.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/User.h" 1 # 28 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/User.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 29 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/User.h" 2 namespace llvm { template <typename T> class ArrayRef; template <typename T> class MutableArrayRef; template <class> struct OperandTraits; class User : public Value { template <unsigned> friend struct HungoffOperandTraits; __attribute__((always_inline)) inline static void * allocateFixedOperandUser(size_t, unsigned, unsigned); protected: void *operator new(size_t Size); void *operator new(size_t Size, unsigned Us); # 71 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/User.h" void *operator new(size_t Size, unsigned Us, unsigned DescBytes); User(Type *ty, unsigned vty, Use *, unsigned NumOps) : Value(ty, vty) { (static_cast<void> (0)); NumUserOperands = NumOps; (static_cast<void> (0)); } void allocHungoffUses(unsigned N, bool IsPhi = false); void growHungoffUses(unsigned N, bool IsPhi = false); protected: ~User() = default; public: User(const User &) = delete; void operator delete(void *Usr); void operator delete(void *Usr, unsigned) { User::operator delete(Usr); __builtin_unreachable(); } void operator delete(void *Usr, unsigned, unsigned) { User::operator delete(Usr); __builtin_unreachable(); } protected: template <int Idx, typename U> static Use &OpFrom(const U *that) { return Idx < 0 ? OperandTraits<U>::op_end(const_cast<U*>(that))[Idx] : OperandTraits<U>::op_begin(const_cast<U*>(that))[Idx]; } template <int Idx> Use &Op() { return OpFrom<Idx>(this); } template <int Idx> const Use &Op() const { return OpFrom<Idx>(this); } private: const Use *getHungOffOperands() const { return *(reinterpret_cast<const Use *const *>(this) - 1); } Use *&getHungOffOperands() { return *(reinterpret_cast<Use **>(this) - 1); } const Use *getIntrusiveOperands() const { return reinterpret_cast<const Use *>(this) - NumUserOperands; } Use *getIntrusiveOperands() { return reinterpret_cast<Use *>(this) - NumUserOperands; } void setOperandList(Use *NewList) { (static_cast<void> (0)); getHungOffOperands() = NewList; } public: const Use *getOperandList() const { return HasHungOffUses ? getHungOffOperands() : getIntrusiveOperands(); } Use *getOperandList() { return const_cast<Use *>(static_cast<const User *>(this)->getOperandList()); } Value *getOperand(unsigned i) const { (static_cast<void> (0)); return getOperandList()[i]; } void setOperand(unsigned i, Value *Val) { (static_cast<void> (0)); (static_cast<void> (0)); getOperandList()[i] = Val; } const Use &getOperandUse(unsigned i) const { (static_cast<void> (0)); return getOperandList()[i]; } Use &getOperandUse(unsigned i) { (static_cast<void> (0)); return getOperandList()[i]; } unsigned getNumOperands() const { return NumUserOperands; } ArrayRef<const uint8_t> getDescriptor() const; MutableArrayRef<uint8_t> getDescriptor(); # 207 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/User.h" void setGlobalVariableNumOperands(unsigned NumOps) { (static_cast<void> (0)); NumUserOperands = NumOps; } void setNumHungOffUseOperands(unsigned NumOps) { (static_cast<void> (0)); (static_cast<void> (0)); NumUserOperands = NumOps; } bool isDroppable() const; using op_iterator = Use*; using const_op_iterator = const Use*; using op_range = iterator_range<op_iterator>; using const_op_range = iterator_range<const_op_iterator>; op_iterator op_begin() { return getOperandList(); } const_op_iterator op_begin() const { return getOperandList(); } op_iterator op_end() { return getOperandList() + NumUserOperands; } const_op_iterator op_end() const { return getOperandList() + NumUserOperands; } op_range operands() { return op_range(op_begin(), op_end()); } const_op_range operands() const { return const_op_range(op_begin(), op_end()); } struct value_op_iterator : iterator_adaptor_base<value_op_iterator, op_iterator, std::random_access_iterator_tag, Value *, ptrdiff_t, Value *, Value *> { explicit value_op_iterator(Use *U = nullptr) : iterator_adaptor_base(U) {} Value *operator*() const { return *I; } Value *operator->() const { return operator*(); } }; value_op_iterator value_op_begin() { return value_op_iterator(op_begin()); } value_op_iterator value_op_end() { return value_op_iterator(op_end()); } iterator_range<value_op_iterator> operand_values() { return make_range(value_op_begin(), value_op_end()); } struct const_value_op_iterator : iterator_adaptor_base<const_value_op_iterator, const_op_iterator, std::random_access_iterator_tag, const Value *, ptrdiff_t, const Value *, const Value *> { explicit const_value_op_iterator(const Use *U = nullptr) : iterator_adaptor_base(U) {} const Value *operator*() const { return *I; } const Value *operator->() const { return operator*(); } }; const_value_op_iterator value_op_begin() const { return const_value_op_iterator(op_begin()); } const_value_op_iterator value_op_end() const { return const_value_op_iterator(op_end()); } iterator_range<const_value_op_iterator> operand_values() const { return make_range(value_op_begin(), value_op_end()); } # 299 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/User.h" void dropAllReferences() { for (Use &U : operands()) U.set(nullptr); } void replaceUsesOfWith(Value *From, Value *To); static bool classof(const Value *V) { return isa<Instruction>(V) || isa<Constant>(V); } }; static_assert(alignof(Use) >= alignof(User), "Alignment is insufficient after objects prepended to User"); static_assert(alignof(Use *) >= alignof(User), "Alignment is insufficient after objects prepended to User"); template<> struct simplify_type<User::op_iterator> { using SimpleType = Value*; static SimpleType getSimplifiedValue(User::op_iterator &Val) { return Val->get(); } }; template<> struct simplify_type<User::const_op_iterator> { using SimpleType = Value*; static SimpleType getSimplifiedValue(User::const_op_iterator &Val) { return Val->get(); } }; } # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constant.h" 2 namespace llvm { class APInt; # 41 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constant.h" class Constant : public User { protected: Constant(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps) : User(ty, vty, Ops, NumOps) {} ~Constant() = default; public: void operator=(const Constant &) = delete; Constant(const Constant &) = delete; bool isNullValue() const; bool isOneValue() const; bool isNotOneValue() const; bool isAllOnesValue() const; bool isNegativeZeroValue() const; bool isZeroValue() const; bool isNotMinSignedValue() const; bool isMinSignedValue() const; bool isFiniteNonZeroFP() const; bool isNormalFP() const; bool hasExactInverseFP() const; bool isNaN() const; bool isElementWiseEqual(Value *Y) const; bool containsUndefElement() const; bool containsConstantExpression() const; bool canTrap() const; bool isThreadDependent() const; bool isDLLImportDependent() const; bool isConstantUsed() const; bool needsRelocation() const; Constant *getAggregateElement(unsigned Elt) const; Constant *getAggregateElement(Constant *Elt) const; Constant *getSplatValue(bool AllowUndefs = false) const; const APInt &getUniqueInteger() const; # 154 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constant.h" void destroyConstant(); static bool classof(const Value *V) { static_assert(ConstantFirstVal == 0, "V->getValueID() >= ConstantFirstVal always succeeds"); return V->getValueID() <= ConstantLastVal; } # 172 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constant.h" void handleOperandChange(Value *, Value *); static Constant *getNullValue(Type* Ty); static Constant *getAllOnesValue(Type* Ty); static Constant *getIntegerValue(Type *Ty, const APInt &V); void removeDeadConstantUsers() const; const Constant *stripPointerCasts() const { return cast<Constant>(Value::stripPointerCasts()); } Constant *stripPointerCasts() { return const_cast<Constant*>( static_cast<const Constant *>(this)->stripPointerCasts()); } static Constant *replaceUndefsWith(Constant *C, Constant *Replacement); }; } # 30 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/LLVMContext.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/LLVMContext.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DiagnosticHandler.h" 1 # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DiagnosticHandler.h" namespace llvm { class DiagnosticInfo; struct DiagnosticHandler { void *DiagnosticContext = nullptr; DiagnosticHandler(void *DiagContext = nullptr) : DiagnosticContext(DiagContext) {} virtual ~DiagnosticHandler() = default; using DiagnosticHandlerTy = void (*)(const DiagnosticInfo &DI, void *Context); DiagnosticHandlerTy DiagHandlerCallback = nullptr; virtual bool handleDiagnostics(const DiagnosticInfo &DI) { if (DiagHandlerCallback) { DiagHandlerCallback(DI, DiagnosticContext); return true; } return false; } virtual bool isAnalysisRemarkEnabled(StringRef PassName) const; virtual bool isMissedOptRemarkEnabled(StringRef PassName) const; virtual bool isPassedOptRemarkEnabled(StringRef PassName) const; bool isAnyRemarkEnabled(StringRef PassName) const { return (isMissedOptRemarkEnabled(PassName) || isPassedOptRemarkEnabled(PassName) || isAnalysisRemarkEnabled(PassName)); } virtual bool isAnyRemarkEnabled() const; }; } # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/LLVMContext.h" 2 namespace llvm { class DiagnosticInfo; enum DiagnosticSeverity : char; class Function; class Instruction; class LLVMContextImpl; class Module; class OptPassGate; template <typename T> class SmallVectorImpl; template <typename T> class StringMapEntry; class SMDiagnostic; class StringRef; class Twine; class LLVMRemarkStreamer; class raw_ostream; namespace remarks { class RemarkStreamer; } namespace SyncScope { typedef uint8_t ID; enum { SingleThread = 0, System = 1 }; } class LLVMContext { public: LLVMContextImpl *const pImpl; LLVMContext(); LLVMContext(LLVMContext &) = delete; LLVMContext &operator=(const LLVMContext &) = delete; ~LLVMContext(); enum : unsigned { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/FixedMetadataKinds.def" 1 # 13 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/FixedMetadataKinds.def" MD_dbg = 0, MD_tbaa = 1, MD_prof = 2, MD_fpmath = 3, MD_range = 4, MD_tbaa_struct = 5, MD_invariant_load = 6, MD_alias_scope = 7, MD_noalias = 8, MD_nontemporal = 9, MD_mem_parallel_loop_access = 10, MD_nonnull = 11, MD_dereferenceable = 12, MD_dereferenceable_or_null = 13, MD_make_implicit = 14, MD_unpredictable = 15, MD_invariant_group = 16, MD_align = 17, MD_loop = 18, MD_type = 19, MD_section_prefix = 20, MD_absolute_symbol = 21, MD_associated = 22, MD_callees = 23, MD_irr_loop = 24, MD_access_group = 25, MD_callback = 26, MD_preserve_access_index = 27, MD_misexpect = 28, MD_vcall_visibility = 29, # 81 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/LLVMContext.h" 2 }; enum : unsigned { OB_deopt = 0, OB_funclet = 1, OB_gc_transition = 2, OB_cfguardtarget = 3, OB_preallocated = 4, OB_gc_live = 5, }; unsigned getMDKindID(StringRef Name) const; void getMDKindNames(SmallVectorImpl<StringRef> &Result) const; void getOperandBundleTags(SmallVectorImpl<StringRef> &Result) const; StringMapEntry<uint32_t> *getOrInsertBundleTag(StringRef TagName) const; uint32_t getOperandBundleTagID(StringRef Tag) const; SyncScope::ID getOrInsertSyncScopeID(StringRef SSN); void getSyncScopeNames(SmallVectorImpl<StringRef> &SSNs) const; void setGC(const Function &Fn, std::string GCName); const std::string &getGC(const Function &Fn); void deleteGC(const Function &Fn); bool shouldDiscardValueNames() const; void setDiscardValueNames(bool Discard); bool isODRUniquingDebugTypes() const; void enableDebugTypeODRUniquing(); void disableDebugTypeODRUniquing(); using InlineAsmDiagHandlerTy = void (*)(const SMDiagnostic&, void *Context, unsigned LocCookie); using YieldCallbackTy = void (*)(LLVMContext *Context, void *OpaqueHandle); # 169 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/LLVMContext.h" void setInlineAsmDiagnosticHandler(InlineAsmDiagHandlerTy DiagHandler, void *DiagContext = nullptr); InlineAsmDiagHandlerTy getInlineAsmDiagnosticHandler() const; void *getInlineAsmDiagnosticContext() const; # 188 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/LLVMContext.h" void setDiagnosticHandlerCallBack( DiagnosticHandler::DiagnosticHandlerTy DiagHandler, void *DiagContext = nullptr, bool RespectFilters = false); void setDiagnosticHandler(std::unique_ptr<DiagnosticHandler> &&DH, bool RespectFilters = false); DiagnosticHandler::DiagnosticHandlerTy getDiagnosticHandlerCallBack() const; void *getDiagnosticContext() const; const DiagnosticHandler *getDiagHandlerPtr() const; std::unique_ptr<DiagnosticHandler> getDiagnosticHandler(); bool getDiagnosticsHotnessRequested() const; void setDiagnosticsHotnessRequested(bool Requested); uint64_t getDiagnosticsHotnessThreshold() const; void setDiagnosticsHotnessThreshold(uint64_t Threshold); # 240 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/LLVMContext.h" remarks::RemarkStreamer *getMainRemarkStreamer(); const remarks::RemarkStreamer *getMainRemarkStreamer() const; void setMainRemarkStreamer( std::unique_ptr<remarks::RemarkStreamer> MainRemarkStreamer); LLVMRemarkStreamer *getLLVMRemarkStreamer(); const LLVMRemarkStreamer *getLLVMRemarkStreamer() const; void setLLVMRemarkStreamer(std::unique_ptr<LLVMRemarkStreamer> RemarkStreamer); static const char *getDiagnosticMessagePrefix(DiagnosticSeverity Severity); # 269 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/LLVMContext.h" void diagnose(const DiagnosticInfo &DI); # 288 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/LLVMContext.h" void setYieldCallback(YieldCallbackTy Callback, void *OpaqueHandle); void yield(); void emitError(unsigned LocCookie, const Twine &ErrorStr); void emitError(const Instruction *I, const Twine &ErrorStr); void emitError(const Twine &ErrorStr); OptPassGate &getOptPassGate() const; void setOptPassGate(OptPassGate&); private: friend class Module; void addModule(Module*); void removeModule(Module*); }; inline LLVMContext *unwrap(LLVMContextRef P) { return reinterpret_cast<LLVMContext*>(P); } inline LLVMContextRef wrap(const LLVMContext *P) { return reinterpret_cast<LLVMContextRef>(const_cast<LLVMContext*>(P)); } inline LLVMContext **unwrap(LLVMContextRef* Tys) { return reinterpret_cast<LLVMContext**>(Tys); } inline LLVMContextRef *wrap(const LLVMContext **Tys) { return reinterpret_cast<LLVMContextRef*>(const_cast<LLVMContext**>(Tys)); } } # 31 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 36 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" 2 namespace llvm { class Module; class ModuleSlotTracker; class raw_ostream; class Type; enum LLVMConstants : uint32_t { DEBUG_METADATA_VERSION = 3 }; class Metadata { friend class ReplaceableMetadataImpl; const unsigned char SubclassID; protected: enum StorageType { Uniqued, Distinct, Temporary }; unsigned char Storage : 7; unsigned char ImplicitCode : 1; unsigned short SubclassData16 = 0; unsigned SubclassData32 = 0; public: enum MetadataKind { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.def" 1 # 75 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.def" MDStringKind, ConstantAsMetadataKind, LocalAsMetadataKind, DistinctMDOperandPlaceholderKind, MDTupleKind, DILocationKind, DIExpressionKind, DIGlobalVariableExpressionKind, GenericDINodeKind, DISubrangeKind, DIEnumeratorKind, DIBasicTypeKind, DIDerivedTypeKind, DICompositeTypeKind, DISubroutineTypeKind, DIFileKind, DICompileUnitKind, DISubprogramKind, DILexicalBlockKind, DILexicalBlockFileKind, DINamespaceKind, DIModuleKind, DITemplateTypeParameterKind, DITemplateValueParameterKind, DIGlobalVariableKind, DILocalVariableKind, DILabelKind, DIObjCPropertyKind, DIImportedEntityKind, DIMacroKind, DIMacroFileKind, DICommonBlockKind, # 81 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" 2 }; protected: Metadata(unsigned ID, StorageType Storage) : SubclassID(ID), Storage(Storage), ImplicitCode(false) { static_assert(sizeof(*this) == 8, "Metadata fields poorly packed"); } ~Metadata() = default; void handleChangedOperand(void *, Metadata *) { __builtin_unreachable(); } public: unsigned getMetadataID() const { return SubclassID; } # 111 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" void dump() const; void dump(const Module *M) const; # 122 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" void print(raw_ostream &OS, const Module *M = nullptr, bool IsForDebug = false) const; void print(raw_ostream &OS, ModuleSlotTracker &MST, const Module *M = nullptr, bool IsForDebug = false) const; # 135 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" void printAsOperand(raw_ostream &OS, const Module *M = nullptr) const; void printAsOperand(raw_ostream &OS, ModuleSlotTracker &MST, const Module *M = nullptr) const; }; inline Metadata *unwrap(LLVMMetadataRef P) { return reinterpret_cast<Metadata*>(P); } inline LLVMMetadataRef wrap(const Metadata *P) { return reinterpret_cast<LLVMMetadataRef>(const_cast<Metadata*>(P)); } template<typename T> inline T *unwrap(LLVMMetadataRef P) { return cast<T>(unwrap(P)); } inline Metadata **unwrap(LLVMMetadataRef *MDs) { return reinterpret_cast<Metadata**>(MDs); } # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.def" 1 # 75 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.def" class MDString; class ValueAsMetadata; class ConstantAsMetadata; class LocalAsMetadata; class DistinctMDOperandPlaceholder; class MDNode; class MDTuple; class DILocation; class DIExpression; class DIGlobalVariableExpression; class DINode; class GenericDINode; class DISubrange; class DIEnumerator; class DIScope; class DIType; class DIBasicType; class DIDerivedType; class DICompositeType; class DISubroutineType; class DIFile; class DICompileUnit; class DILocalScope; class DISubprogram; class DILexicalBlockBase; class DILexicalBlock; class DILexicalBlockFile; class DINamespace; class DIModule; class DITemplateParameter; class DITemplateTypeParameter; class DITemplateValueParameter; class DIVariable; class DIGlobalVariable; class DILocalVariable; class DILabel; class DIObjCProperty; class DIImportedEntity; class DIMacroNode; class DIMacro; class DIMacroFile; class DICommonBlock; # 151 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" 2 # 160 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.def" 1 # 75 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.def" template <> struct isa_impl<MDString, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::MDStringKind; } }; template <> struct isa_impl<ConstantAsMetadata, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::ConstantAsMetadataKind; } }; template <> struct isa_impl<LocalAsMetadata, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::LocalAsMetadataKind; } }; template <> struct isa_impl<DistinctMDOperandPlaceholder, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DistinctMDOperandPlaceholderKind; } }; template <> struct isa_impl<MDTuple, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::MDTupleKind; } }; template <> struct isa_impl<DILocation, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DILocationKind; } }; template <> struct isa_impl<DIExpression, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DIExpressionKind; } }; template <> struct isa_impl<DIGlobalVariableExpression, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DIGlobalVariableExpressionKind; } }; template <> struct isa_impl<GenericDINode, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::GenericDINodeKind; } }; template <> struct isa_impl<DISubrange, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DISubrangeKind; } }; template <> struct isa_impl<DIEnumerator, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DIEnumeratorKind; } }; template <> struct isa_impl<DIBasicType, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DIBasicTypeKind; } }; template <> struct isa_impl<DIDerivedType, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DIDerivedTypeKind; } }; template <> struct isa_impl<DICompositeType, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DICompositeTypeKind; } }; template <> struct isa_impl<DISubroutineType, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DISubroutineTypeKind; } }; template <> struct isa_impl<DIFile, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DIFileKind; } }; template <> struct isa_impl<DICompileUnit, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DICompileUnitKind; } }; template <> struct isa_impl<DISubprogram, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DISubprogramKind; } }; template <> struct isa_impl<DILexicalBlock, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DILexicalBlockKind; } }; template <> struct isa_impl<DILexicalBlockFile, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DILexicalBlockFileKind; } }; template <> struct isa_impl<DINamespace, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DINamespaceKind; } }; template <> struct isa_impl<DIModule, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DIModuleKind; } }; template <> struct isa_impl<DITemplateTypeParameter, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DITemplateTypeParameterKind; } }; template <> struct isa_impl<DITemplateValueParameter, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DITemplateValueParameterKind; } }; template <> struct isa_impl<DIGlobalVariable, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DIGlobalVariableKind; } }; template <> struct isa_impl<DILocalVariable, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DILocalVariableKind; } }; template <> struct isa_impl<DILabel, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DILabelKind; } }; template <> struct isa_impl<DIObjCProperty, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DIObjCPropertyKind; } }; template <> struct isa_impl<DIImportedEntity, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DIImportedEntityKind; } }; template <> struct isa_impl<DIMacro, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DIMacroKind; } }; template <> struct isa_impl<DIMacroFile, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DIMacroFileKind; } }; template <> struct isa_impl<DICommonBlock, Metadata> { static inline bool doit(const Metadata &MD) { return MD.getMetadataID() == Metadata::DICommonBlockKind; } }; # 161 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" 2 inline raw_ostream &operator<<(raw_ostream &OS, const Metadata &MD) { MD.print(OS); return OS; } # 174 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" class MetadataAsValue : public Value { friend class ReplaceableMetadataImpl; friend class LLVMContextImpl; Metadata *MD; MetadataAsValue(Type *Ty, Metadata *MD); void dropUse() { MD = nullptr; } public: ~MetadataAsValue(); static MetadataAsValue *get(LLVMContext &Context, Metadata *MD); static MetadataAsValue *getIfExists(LLVMContext &Context, Metadata *MD); Metadata *getMetadata() const { return MD; } static bool classof(const Value *V) { return V->getValueID() == MetadataAsValueVal; } private: void handleChangedMetadata(Metadata *MD); void track(); void untrack(); }; # 210 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" class MetadataTracking { public: # 221 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" static bool track(Metadata *&MD) { return track(&MD, *MD, static_cast<Metadata *>(nullptr)); } static bool track(void *Ref, Metadata &MD, Metadata &Owner) { return track(Ref, MD, &Owner); } static bool track(void *Ref, Metadata &MD, MetadataAsValue &Owner) { return track(Ref, MD, &Owner); } static void untrack(Metadata *&MD) { untrack(&MD, *MD); } static void untrack(void *Ref, Metadata &MD); # 257 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" static bool retrack(Metadata *&MD, Metadata *&New) { return retrack(&MD, *MD, &New); } static bool retrack(void *Ref, Metadata &MD, void *New); static bool isReplaceable(const Metadata &MD); using OwnerTy = PointerUnion<MetadataAsValue *, Metadata *>; private: static bool track(void *Ref, Metadata &MD, OwnerTy Owner); }; class ReplaceableMetadataImpl { friend class MetadataTracking; public: using OwnerTy = MetadataTracking::OwnerTy; private: LLVMContext &Context; uint64_t NextIndex = 0; SmallDenseMap<void *, std::pair<OwnerTy, uint64_t>, 4> UseMap; public: ReplaceableMetadataImpl(LLVMContext &Context) : Context(Context) {} ~ReplaceableMetadataImpl() { (static_cast<void> (0)); } LLVMContext &getContext() const { return Context; } void replaceAllUsesWith(Metadata *MD); void resolveAllUses(bool ResolveUsers = true); private: void addRef(void *Ref, OwnerTy Owner); void dropRef(void *Ref); void moveRef(void *Ref, void *New, const Metadata &MD); static ReplaceableMetadataImpl *getOrCreate(Metadata &MD); static ReplaceableMetadataImpl *getIfExists(Metadata &MD); static bool isReplaceable(const Metadata &MD); }; # 339 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" class ValueAsMetadata : public Metadata, ReplaceableMetadataImpl { friend class ReplaceableMetadataImpl; friend class LLVMContextImpl; Value *V; void dropUsers() { ReplaceableMetadataImpl::resolveAllUses( false); } protected: ValueAsMetadata(unsigned ID, Value *V) : Metadata(ID, Uniqued), ReplaceableMetadataImpl(V->getContext()), V(V) { (static_cast<void> (0)); } ~ValueAsMetadata() = default; public: static ValueAsMetadata *get(Value *V); static ConstantAsMetadata *getConstant(Value *C) { return cast<ConstantAsMetadata>(get(C)); } static LocalAsMetadata *getLocal(Value *Local) { return cast<LocalAsMetadata>(get(Local)); } static ValueAsMetadata *getIfExists(Value *V); static ConstantAsMetadata *getConstantIfExists(Value *C) { return cast_or_null<ConstantAsMetadata>(getIfExists(C)); } static LocalAsMetadata *getLocalIfExists(Value *Local) { return cast_or_null<LocalAsMetadata>(getIfExists(Local)); } Value *getValue() const { return V; } Type *getType() const { return V->getType(); } LLVMContext &getContext() const { return V->getContext(); } static void handleDeletion(Value *V); static void handleRAUW(Value *From, Value *To); protected: void replaceAllUsesWith(Metadata *MD) { ReplaceableMetadataImpl::replaceAllUsesWith(MD); } public: static bool classof(const Metadata *MD) { return MD->getMetadataID() == LocalAsMetadataKind || MD->getMetadataID() == ConstantAsMetadataKind; } }; class ConstantAsMetadata : public ValueAsMetadata { friend class ValueAsMetadata; ConstantAsMetadata(Constant *C) : ValueAsMetadata(ConstantAsMetadataKind, C) {} public: static ConstantAsMetadata *get(Constant *C) { return ValueAsMetadata::getConstant(C); } static ConstantAsMetadata *getIfExists(Constant *C) { return ValueAsMetadata::getConstantIfExists(C); } Constant *getValue() const { return cast<Constant>(ValueAsMetadata::getValue()); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == ConstantAsMetadataKind; } }; class LocalAsMetadata : public ValueAsMetadata { friend class ValueAsMetadata; LocalAsMetadata(Value *Local) : ValueAsMetadata(LocalAsMetadataKind, Local) { (static_cast<void> (0)); } public: static LocalAsMetadata *get(Value *Local) { return ValueAsMetadata::getLocal(Local); } static LocalAsMetadata *getIfExists(Value *Local) { return ValueAsMetadata::getLocalIfExists(Local); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == LocalAsMetadataKind; } }; # 497 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" namespace mdconst { namespace detail { template <class T> T &make(); template <class T, class Result> struct HasDereference { using Yes = char[1]; using No = char[2]; template <size_t N> struct SFINAE {}; template <class U, class V> static Yes &hasDereference(SFINAE<sizeof(static_cast<V>(*make<U>()))> * = 0); template <class U, class V> static No &hasDereference(...); static const bool value = sizeof(hasDereference<T, Result>(nullptr)) == sizeof(Yes); }; template <class V, class M> struct IsValidPointer { static const bool value = std::is_base_of<Constant, V>::value && HasDereference<M, const Metadata &>::value; }; template <class V, class M> struct IsValidReference { static const bool value = std::is_base_of<Constant, V>::value && std::is_convertible<M, const Metadata &>::value; }; } template <class X, class Y> inline std::enable_if_t<detail::IsValidPointer<X, Y>::value, bool> hasa(Y &&MD) { (static_cast<void> (0)); if (auto *V = dyn_cast<ConstantAsMetadata>(MD)) return isa<X>(V->getValue()); return false; } template <class X, class Y> inline std::enable_if_t<detail::IsValidReference<X, Y &>::value, bool> hasa(Y &MD) { return hasa(&MD); } template <class X, class Y> inline std::enable_if_t<detail::IsValidPointer<X, Y>::value, X *> extract(Y &&MD) { return cast<X>(cast<ConstantAsMetadata>(MD)->getValue()); } template <class X, class Y> inline std::enable_if_t<detail::IsValidReference<X, Y &>::value, X *> extract(Y &MD) { return extract(&MD); } template <class X, class Y> inline std::enable_if_t<detail::IsValidPointer<X, Y>::value, X *> extract_or_null(Y &&MD) { if (auto *V = cast_or_null<ConstantAsMetadata>(MD)) return cast<X>(V->getValue()); return nullptr; } template <class X, class Y> inline std::enable_if_t<detail::IsValidPointer<X, Y>::value, X *> dyn_extract(Y &&MD) { if (auto *V = dyn_cast<ConstantAsMetadata>(MD)) return dyn_cast<X>(V->getValue()); return nullptr; } template <class X, class Y> inline std::enable_if_t<detail::IsValidPointer<X, Y>::value, X *> dyn_extract_or_null(Y &&MD) { if (auto *V = dyn_cast_or_null<ConstantAsMetadata>(MD)) return dyn_cast<X>(V->getValue()); return nullptr; } } class MDString : public Metadata { friend class StringMapEntryStorage<MDString>; StringMapEntry<MDString> *Entry = nullptr; MDString() : Metadata(MDStringKind, Uniqued) {} public: MDString(const MDString &) = delete; MDString &operator=(MDString &&) = delete; MDString &operator=(const MDString &) = delete; static MDString *get(LLVMContext &Context, StringRef Str); static MDString *get(LLVMContext &Context, const char *Str) { return get(Context, Str ? StringRef(Str) : StringRef()); } StringRef getString() const; unsigned getLength() const { return (unsigned)getString().size(); } using iterator = StringRef::iterator; iterator begin() const { return getString().begin(); } iterator end() const { return getString().end(); } const unsigned char *bytes_begin() const { return getString().bytes_begin(); } const unsigned char *bytes_end() const { return getString().bytes_end(); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == MDStringKind; } }; struct AAMDNodes { explicit AAMDNodes() = default; explicit AAMDNodes(MDNode *T, MDNode *TS, MDNode *S, MDNode *N) : TBAA(T), TBAAStruct(TS), Scope(S), NoAlias(N) {} bool operator==(const AAMDNodes &A) const { return TBAA == A.TBAA && TBAAStruct == A.TBAAStruct && Scope == A.Scope && NoAlias == A.NoAlias; } bool operator!=(const AAMDNodes &A) const { return !(*this == A); } explicit operator bool() const { return TBAA || TBAAStruct || Scope || NoAlias; } MDNode *TBAA = nullptr; MDNode *TBAAStruct = nullptr; MDNode *Scope = nullptr; MDNode *NoAlias = nullptr; AAMDNodes intersect(const AAMDNodes &Other) { AAMDNodes Result; Result.TBAA = Other.TBAA == TBAA ? TBAA : nullptr; Result.TBAAStruct = Other.TBAAStruct == TBAAStruct ? TBAAStruct : nullptr; Result.Scope = Other.Scope == Scope ? Scope : nullptr; Result.NoAlias = Other.NoAlias == NoAlias ? NoAlias : nullptr; return Result; } }; template<> struct DenseMapInfo<AAMDNodes> { static inline AAMDNodes getEmptyKey() { return AAMDNodes(DenseMapInfo<MDNode *>::getEmptyKey(), nullptr, nullptr, nullptr); } static inline AAMDNodes getTombstoneKey() { return AAMDNodes(DenseMapInfo<MDNode *>::getTombstoneKey(), nullptr, nullptr, nullptr); } static unsigned getHashValue(const AAMDNodes &Val) { return DenseMapInfo<MDNode *>::getHashValue(Val.TBAA) ^ DenseMapInfo<MDNode *>::getHashValue(Val.TBAAStruct) ^ DenseMapInfo<MDNode *>::getHashValue(Val.Scope) ^ DenseMapInfo<MDNode *>::getHashValue(Val.NoAlias); } static bool isEqual(const AAMDNodes &LHS, const AAMDNodes &RHS) { return LHS == RHS; } }; # 717 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" class MDOperand { Metadata *MD = nullptr; public: MDOperand() = default; MDOperand(MDOperand &&) = delete; MDOperand(const MDOperand &) = delete; MDOperand &operator=(MDOperand &&) = delete; MDOperand &operator=(const MDOperand &) = delete; ~MDOperand() { untrack(); } Metadata *get() const { return MD; } operator Metadata *() const { return get(); } Metadata *operator->() const { return get(); } Metadata &operator*() const { return *get(); } void reset() { untrack(); MD = nullptr; } void reset(Metadata *MD, Metadata *Owner) { untrack(); this->MD = MD; track(Owner); } private: void track(Metadata *Owner) { if (MD) { if (Owner) MetadataTracking::track(this, *MD, *Owner); else MetadataTracking::track(MD); } } void untrack() { (static_cast<void> (0)); if (MD) MetadataTracking::untrack(MD); } }; template <> struct simplify_type<MDOperand> { using SimpleType = Metadata *; static SimpleType getSimplifiedValue(MDOperand &MD) { return MD.get(); } }; template <> struct simplify_type<const MDOperand> { using SimpleType = Metadata *; static SimpleType getSimplifiedValue(const MDOperand &MD) { return MD.get(); } }; class ContextAndReplaceableUses { PointerUnion<LLVMContext *, ReplaceableMetadataImpl *> Ptr; public: ContextAndReplaceableUses(LLVMContext &Context) : Ptr(&Context) {} ContextAndReplaceableUses( std::unique_ptr<ReplaceableMetadataImpl> ReplaceableUses) : Ptr(ReplaceableUses.release()) { (static_cast<void> (0)); } ContextAndReplaceableUses() = delete; ContextAndReplaceableUses(ContextAndReplaceableUses &&) = delete; ContextAndReplaceableUses(const ContextAndReplaceableUses &) = delete; ContextAndReplaceableUses &operator=(ContextAndReplaceableUses &&) = delete; ContextAndReplaceableUses & operator=(const ContextAndReplaceableUses &) = delete; ~ContextAndReplaceableUses() { delete getReplaceableUses(); } operator LLVMContext &() { return getContext(); } bool hasReplaceableUses() const { return Ptr.is<ReplaceableMetadataImpl *>(); } LLVMContext &getContext() const { if (hasReplaceableUses()) return getReplaceableUses()->getContext(); return *Ptr.get<LLVMContext *>(); } ReplaceableMetadataImpl *getReplaceableUses() const { if (hasReplaceableUses()) return Ptr.get<ReplaceableMetadataImpl *>(); return nullptr; } ReplaceableMetadataImpl *getOrCreateReplaceableUses() { if (!hasReplaceableUses()) makeReplaceable(std::make_unique<ReplaceableMetadataImpl>(getContext())); return getReplaceableUses(); } void makeReplaceable(std::unique_ptr<ReplaceableMetadataImpl> ReplaceableUses) { (static_cast<void> (0)); (static_cast<void> (0)); delete getReplaceableUses(); Ptr = ReplaceableUses.release(); } std::unique_ptr<ReplaceableMetadataImpl> takeReplaceableUses() { (static_cast<void> (0)); std::unique_ptr<ReplaceableMetadataImpl> ReplaceableUses( getReplaceableUses()); Ptr = &ReplaceableUses->getContext(); return ReplaceableUses; } }; struct TempMDNodeDeleter { inline void operator()(MDNode *Node) const; }; # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.def" 1 # 80 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.def" using TempMDNode = std::unique_ptr<MDNode, TempMDNodeDeleter>; using TempMDTuple = std::unique_ptr<MDTuple, TempMDNodeDeleter>; using TempDILocation = std::unique_ptr<DILocation, TempMDNodeDeleter>; using TempDIExpression = std::unique_ptr<DIExpression, TempMDNodeDeleter>; using TempDIGlobalVariableExpression = std::unique_ptr<DIGlobalVariableExpression, TempMDNodeDeleter>; using TempDINode = std::unique_ptr<DINode, TempMDNodeDeleter>; using TempGenericDINode = std::unique_ptr<GenericDINode, TempMDNodeDeleter>; using TempDISubrange = std::unique_ptr<DISubrange, TempMDNodeDeleter>; using TempDIEnumerator = std::unique_ptr<DIEnumerator, TempMDNodeDeleter>; using TempDIScope = std::unique_ptr<DIScope, TempMDNodeDeleter>; using TempDIType = std::unique_ptr<DIType, TempMDNodeDeleter>; using TempDIBasicType = std::unique_ptr<DIBasicType, TempMDNodeDeleter>; using TempDIDerivedType = std::unique_ptr<DIDerivedType, TempMDNodeDeleter>; using TempDICompositeType = std::unique_ptr<DICompositeType, TempMDNodeDeleter>; using TempDISubroutineType = std::unique_ptr<DISubroutineType, TempMDNodeDeleter>; using TempDIFile = std::unique_ptr<DIFile, TempMDNodeDeleter>; using TempDICompileUnit = std::unique_ptr<DICompileUnit, TempMDNodeDeleter>; using TempDILocalScope = std::unique_ptr<DILocalScope, TempMDNodeDeleter>; using TempDISubprogram = std::unique_ptr<DISubprogram, TempMDNodeDeleter>; using TempDILexicalBlockBase = std::unique_ptr<DILexicalBlockBase, TempMDNodeDeleter>; using TempDILexicalBlock = std::unique_ptr<DILexicalBlock, TempMDNodeDeleter>; using TempDILexicalBlockFile = std::unique_ptr<DILexicalBlockFile, TempMDNodeDeleter>; using TempDINamespace = std::unique_ptr<DINamespace, TempMDNodeDeleter>; using TempDIModule = std::unique_ptr<DIModule, TempMDNodeDeleter>; using TempDITemplateParameter = std::unique_ptr<DITemplateParameter, TempMDNodeDeleter>; using TempDITemplateTypeParameter = std::unique_ptr<DITemplateTypeParameter, TempMDNodeDeleter>; using TempDITemplateValueParameter = std::unique_ptr<DITemplateValueParameter, TempMDNodeDeleter>; using TempDIVariable = std::unique_ptr<DIVariable, TempMDNodeDeleter>; using TempDIGlobalVariable = std::unique_ptr<DIGlobalVariable, TempMDNodeDeleter>; using TempDILocalVariable = std::unique_ptr<DILocalVariable, TempMDNodeDeleter>; using TempDILabel = std::unique_ptr<DILabel, TempMDNodeDeleter>; using TempDIObjCProperty = std::unique_ptr<DIObjCProperty, TempMDNodeDeleter>; using TempDIImportedEntity = std::unique_ptr<DIImportedEntity, TempMDNodeDeleter>; using TempDIMacroNode = std::unique_ptr<DIMacroNode, TempMDNodeDeleter>; using TempDIMacro = std::unique_ptr<DIMacro, TempMDNodeDeleter>; using TempDIMacroFile = std::unique_ptr<DIMacroFile, TempMDNodeDeleter>; using TempDICommonBlock = std::unique_ptr<DICommonBlock, TempMDNodeDeleter>; # 853 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" 2 # 870 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" class MDNode : public Metadata { friend class ReplaceableMetadataImpl; friend class LLVMContextImpl; unsigned NumOperands; unsigned NumUnresolved; ContextAndReplaceableUses Context; protected: MDNode(LLVMContext &Context, unsigned ID, StorageType Storage, ArrayRef<Metadata *> Ops1, ArrayRef<Metadata *> Ops2 = None); ~MDNode() = default; void *operator new(size_t Size, unsigned NumOps); void operator delete(void *Mem); void operator delete(void *, unsigned) { __builtin_unreachable(); } void operator delete(void *, unsigned, bool) { __builtin_unreachable(); } void dropAllReferences(); MDOperand *mutable_begin() { return mutable_end() - NumOperands; } MDOperand *mutable_end() { return reinterpret_cast<MDOperand *>(this); } using mutable_op_range = iterator_range<MDOperand *>; mutable_op_range mutable_operands() { return mutable_op_range(mutable_begin(), mutable_end()); } public: MDNode(const MDNode &) = delete; void operator=(const MDNode &) = delete; void *operator new(size_t) = delete; static inline MDTuple *get(LLVMContext &Context, ArrayRef<Metadata *> MDs); static inline MDTuple *getIfExists(LLVMContext &Context, ArrayRef<Metadata *> MDs); static inline MDTuple *getDistinct(LLVMContext &Context, ArrayRef<Metadata *> MDs); static inline TempMDTuple getTemporary(LLVMContext &Context, ArrayRef<Metadata *> MDs); TempMDNode clone() const; static void deleteTemporary(MDNode *N); LLVMContext &getContext() const { return Context.getContext(); } void replaceOperandWith(unsigned I, Metadata *New); # 946 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" bool isResolved() const { return !isTemporary() && !NumUnresolved; } bool isUniqued() const { return Storage == Uniqued; } bool isDistinct() const { return Storage == Distinct; } bool isTemporary() const { return Storage == Temporary; } void replaceAllUsesWith(Metadata *MD) { (static_cast<void> (0)); if (Context.hasReplaceableUses()) Context.getReplaceableUses()->replaceAllUsesWith(MD); } void resolveCycles(); void resolve(); template <class T> static std::enable_if_t<std::is_base_of<MDNode, T>::value, T *> replaceWithPermanent(std::unique_ptr<T, TempMDNodeDeleter> N) { return cast<T>(N.release()->replaceWithPermanentImpl()); } template <class T> static std::enable_if_t<std::is_base_of<MDNode, T>::value, T *> replaceWithUniqued(std::unique_ptr<T, TempMDNodeDeleter> N) { return cast<T>(N.release()->replaceWithUniquedImpl()); } template <class T> static std::enable_if_t<std::is_base_of<MDNode, T>::value, T *> replaceWithDistinct(std::unique_ptr<T, TempMDNodeDeleter> N) { return cast<T>(N.release()->replaceWithDistinctImpl()); } private: MDNode *replaceWithPermanentImpl(); MDNode *replaceWithUniquedImpl(); MDNode *replaceWithDistinctImpl(); protected: void setOperand(unsigned I, Metadata *New); void storeDistinctInContext(); template <class T, class StoreT> static T *storeImpl(T *N, StorageType Storage, StoreT &Store); template <class T> static T *storeImpl(T *N, StorageType Storage); private: void handleChangedOperand(void *Ref, Metadata *New); void dropReplaceableUses(); void resolveAfterOperandChange(Metadata *Old, Metadata *New); void decrementUnresolvedOperandCount(); void countUnresolvedOperands(); void makeUniqued(); void makeDistinct(); void deleteAsSubclass(); MDNode *uniquify(); void eraseFromStore(); template <class NodeTy> struct HasCachedHash; template <class NodeTy> static void dispatchRecalculateHash(NodeTy *N, std::true_type) { N->recalculateHash(); } template <class NodeTy> static void dispatchRecalculateHash(NodeTy *, std::false_type) {} template <class NodeTy> static void dispatchResetHash(NodeTy *N, std::true_type) { N->setHash(0); } template <class NodeTy> static void dispatchResetHash(NodeTy *, std::false_type) {} public: using op_iterator = const MDOperand *; using op_range = iterator_range<op_iterator>; op_iterator op_begin() const { return const_cast<MDNode *>(this)->mutable_begin(); } op_iterator op_end() const { return const_cast<MDNode *>(this)->mutable_end(); } op_range operands() const { return op_range(op_begin(), op_end()); } const MDOperand &getOperand(unsigned I) const { (static_cast<void> (0)); return op_begin()[I]; } unsigned getNumOperands() const { return NumOperands; } static bool classof(const Metadata *MD) { switch (MD->getMetadataID()) { default: return false; # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.def" 1 # 81 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.def" case MDTupleKind: return true; case DILocationKind: return true; case DIExpressionKind: return true; case DIGlobalVariableExpressionKind: return true; case GenericDINodeKind: return true; case DISubrangeKind: return true; case DIEnumeratorKind: return true; case DIBasicTypeKind: return true; case DIDerivedTypeKind: return true; case DICompositeTypeKind: return true; case DISubroutineTypeKind: return true; case DIFileKind: return true; case DICompileUnitKind: return true; case DISubprogramKind: return true; case DILexicalBlockKind: return true; case DILexicalBlockFileKind: return true; case DINamespaceKind: return true; case DIModuleKind: return true; case DITemplateTypeParameterKind: return true; case DITemplateValueParameterKind: return true; case DIGlobalVariableKind: return true; case DILocalVariableKind: return true; case DILabelKind: return true; case DIObjCPropertyKind: return true; case DIImportedEntityKind: return true; case DIMacroKind: return true; case DIMacroFileKind: return true; case DICommonBlockKind: return true; # 1092 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" 2 } } bool isTBAAVtableAccess() const; static MDNode *concatenate(MDNode *A, MDNode *B); static MDNode *intersect(MDNode *A, MDNode *B); static MDNode *getMostGenericTBAA(MDNode *A, MDNode *B); static MDNode *getMostGenericFPMath(MDNode *A, MDNode *B); static MDNode *getMostGenericRange(MDNode *A, MDNode *B); static MDNode *getMostGenericAliasScope(MDNode *A, MDNode *B); static MDNode *getMostGenericAlignmentOrDereferenceable(MDNode *A, MDNode *B); }; class MDTuple : public MDNode { friend class LLVMContextImpl; friend class MDNode; MDTuple(LLVMContext &C, StorageType Storage, unsigned Hash, ArrayRef<Metadata *> Vals) : MDNode(C, MDTupleKind, Storage, Vals) { setHash(Hash); } ~MDTuple() { dropAllReferences(); } void setHash(unsigned Hash) { SubclassData32 = Hash; } void recalculateHash(); static MDTuple *getImpl(LLVMContext &Context, ArrayRef<Metadata *> MDs, StorageType Storage, bool ShouldCreate = true); TempMDTuple cloneImpl() const { return getTemporary(getContext(), SmallVector<Metadata *, 4>(op_begin(), op_end())); } public: unsigned getHash() const { return SubclassData32; } static MDTuple *get(LLVMContext &Context, ArrayRef<Metadata *> MDs) { return getImpl(Context, MDs, Uniqued); } static MDTuple *getIfExists(LLVMContext &Context, ArrayRef<Metadata *> MDs) { return getImpl(Context, MDs, Uniqued, false); } static MDTuple *getDistinct(LLVMContext &Context, ArrayRef<Metadata *> MDs) { return getImpl(Context, MDs, Distinct); } static TempMDTuple getTemporary(LLVMContext &Context, ArrayRef<Metadata *> MDs) { return TempMDTuple(getImpl(Context, MDs, Temporary)); } TempMDTuple clone() const { return cloneImpl(); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == MDTupleKind; } }; MDTuple *MDNode::get(LLVMContext &Context, ArrayRef<Metadata *> MDs) { return MDTuple::get(Context, MDs); } MDTuple *MDNode::getIfExists(LLVMContext &Context, ArrayRef<Metadata *> MDs) { return MDTuple::getIfExists(Context, MDs); } MDTuple *MDNode::getDistinct(LLVMContext &Context, ArrayRef<Metadata *> MDs) { return MDTuple::getDistinct(Context, MDs); } TempMDTuple MDNode::getTemporary(LLVMContext &Context, ArrayRef<Metadata *> MDs) { return MDTuple::getTemporary(Context, MDs); } void TempMDNodeDeleter::operator()(MDNode *Node) const { MDNode::deleteTemporary(Node); } template <class T> class TypedMDOperandIterator : public std::iterator<std::input_iterator_tag, T *, std::ptrdiff_t, void, T *> { MDNode::op_iterator I = nullptr; public: TypedMDOperandIterator() = default; explicit TypedMDOperandIterator(MDNode::op_iterator I) : I(I) {} T *operator*() const { return cast_or_null<T>(*I); } TypedMDOperandIterator &operator++() { ++I; return *this; } TypedMDOperandIterator operator++(int) { TypedMDOperandIterator Temp(*this); ++I; return Temp; } bool operator==(const TypedMDOperandIterator &X) const { return I == X.I; } bool operator!=(const TypedMDOperandIterator &X) const { return I != X.I; } }; template <class T> class MDTupleTypedArrayWrapper { const MDTuple *N = nullptr; public: MDTupleTypedArrayWrapper() = default; MDTupleTypedArrayWrapper(const MDTuple *N) : N(N) {} template <class U> MDTupleTypedArrayWrapper( const MDTupleTypedArrayWrapper<U> &Other, std::enable_if_t<std::is_convertible<U *, T *>::value> * = nullptr) : N(Other.get()) {} template <class U> explicit MDTupleTypedArrayWrapper( const MDTupleTypedArrayWrapper<U> &Other, std::enable_if_t<!std::is_convertible<U *, T *>::value> * = nullptr) : N(Other.get()) {} explicit operator bool() const { return get(); } explicit operator MDTuple *() const { return get(); } MDTuple *get() const { return const_cast<MDTuple *>(N); } MDTuple *operator->() const { return get(); } MDTuple &operator*() const { return *get(); } unsigned size() const { return N ? N->getNumOperands() : 0u; } bool empty() const { return N ? N->getNumOperands() == 0 : true; } T *operator[](unsigned I) const { return cast_or_null<T>(N->getOperand(I)); } using iterator = TypedMDOperandIterator<T>; iterator begin() const { return N ? iterator(N->op_begin()) : iterator(); } iterator end() const { return N ? iterator(N->op_end()) : iterator(); } }; # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.def" 1 # 75 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.def" using MDStringArray = MDTupleTypedArrayWrapper<MDString>; using ValueAsMetadataArray = MDTupleTypedArrayWrapper<ValueAsMetadata>; using ConstantAsMetadataArray = MDTupleTypedArrayWrapper<ConstantAsMetadata>; using LocalAsMetadataArray = MDTupleTypedArrayWrapper<LocalAsMetadata>; using DistinctMDOperandPlaceholderArray = MDTupleTypedArrayWrapper<DistinctMDOperandPlaceholder>; using MDNodeArray = MDTupleTypedArrayWrapper<MDNode>; using MDTupleArray = MDTupleTypedArrayWrapper<MDTuple>; using DILocationArray = MDTupleTypedArrayWrapper<DILocation>; using DIExpressionArray = MDTupleTypedArrayWrapper<DIExpression>; using DIGlobalVariableExpressionArray = MDTupleTypedArrayWrapper<DIGlobalVariableExpression>; using DINodeArray = MDTupleTypedArrayWrapper<DINode>; using GenericDINodeArray = MDTupleTypedArrayWrapper<GenericDINode>; using DISubrangeArray = MDTupleTypedArrayWrapper<DISubrange>; using DIEnumeratorArray = MDTupleTypedArrayWrapper<DIEnumerator>; using DIScopeArray = MDTupleTypedArrayWrapper<DIScope>; using DITypeArray = MDTupleTypedArrayWrapper<DIType>; using DIBasicTypeArray = MDTupleTypedArrayWrapper<DIBasicType>; using DIDerivedTypeArray = MDTupleTypedArrayWrapper<DIDerivedType>; using DICompositeTypeArray = MDTupleTypedArrayWrapper<DICompositeType>; using DISubroutineTypeArray = MDTupleTypedArrayWrapper<DISubroutineType>; using DIFileArray = MDTupleTypedArrayWrapper<DIFile>; using DICompileUnitArray = MDTupleTypedArrayWrapper<DICompileUnit>; using DILocalScopeArray = MDTupleTypedArrayWrapper<DILocalScope>; using DISubprogramArray = MDTupleTypedArrayWrapper<DISubprogram>; using DILexicalBlockBaseArray = MDTupleTypedArrayWrapper<DILexicalBlockBase>; using DILexicalBlockArray = MDTupleTypedArrayWrapper<DILexicalBlock>; using DILexicalBlockFileArray = MDTupleTypedArrayWrapper<DILexicalBlockFile>; using DINamespaceArray = MDTupleTypedArrayWrapper<DINamespace>; using DIModuleArray = MDTupleTypedArrayWrapper<DIModule>; using DITemplateParameterArray = MDTupleTypedArrayWrapper<DITemplateParameter>; using DITemplateTypeParameterArray = MDTupleTypedArrayWrapper<DITemplateTypeParameter>; using DITemplateValueParameterArray = MDTupleTypedArrayWrapper<DITemplateValueParameter>; using DIVariableArray = MDTupleTypedArrayWrapper<DIVariable>; using DIGlobalVariableArray = MDTupleTypedArrayWrapper<DIGlobalVariable>; using DILocalVariableArray = MDTupleTypedArrayWrapper<DILocalVariable>; using DILabelArray = MDTupleTypedArrayWrapper<DILabel>; using DIObjCPropertyArray = MDTupleTypedArrayWrapper<DIObjCProperty>; using DIImportedEntityArray = MDTupleTypedArrayWrapper<DIImportedEntity>; using DIMacroNodeArray = MDTupleTypedArrayWrapper<DIMacroNode>; using DIMacroArray = MDTupleTypedArrayWrapper<DIMacro>; using DIMacroFileArray = MDTupleTypedArrayWrapper<DIMacroFile>; using DICommonBlockArray = MDTupleTypedArrayWrapper<DICommonBlock>; # 1269 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" 2 # 1285 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" class DistinctMDOperandPlaceholder : public Metadata { friend class MetadataTracking; Metadata **Use = nullptr; public: explicit DistinctMDOperandPlaceholder(unsigned ID) : Metadata(DistinctMDOperandPlaceholderKind, Distinct) { SubclassData32 = ID; } DistinctMDOperandPlaceholder() = delete; DistinctMDOperandPlaceholder(DistinctMDOperandPlaceholder &&) = delete; DistinctMDOperandPlaceholder(const DistinctMDOperandPlaceholder &) = delete; ~DistinctMDOperandPlaceholder() { if (Use) *Use = nullptr; } unsigned getID() const { return SubclassData32; } void replaceUseWith(Metadata *MD) { if (!Use) return; *Use = MD; if (*Use) MetadataTracking::track(*Use); Metadata *T = cast<Metadata>(this); MetadataTracking::untrack(T); (static_cast<void> (0)); } }; # 1330 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Metadata.h" class NamedMDNode : public ilist_node<NamedMDNode> { friend class LLVMContextImpl; friend class Module; std::string Name; Module *Parent = nullptr; void *Operands; void setParent(Module *M) { Parent = M; } explicit NamedMDNode(const Twine &N); template<class T1, class T2> class op_iterator_impl : public std::iterator<std::bidirectional_iterator_tag, T2> { friend class NamedMDNode; const NamedMDNode *Node = nullptr; unsigned Idx = 0; op_iterator_impl(const NamedMDNode *N, unsigned i) : Node(N), Idx(i) {} public: op_iterator_impl() = default; bool operator==(const op_iterator_impl &o) const { return Idx == o.Idx; } bool operator!=(const op_iterator_impl &o) const { return Idx != o.Idx; } op_iterator_impl &operator++() { ++Idx; return *this; } op_iterator_impl operator++(int) { op_iterator_impl tmp(*this); operator++(); return tmp; } op_iterator_impl &operator--() { --Idx; return *this; } op_iterator_impl operator--(int) { op_iterator_impl tmp(*this); operator--(); return tmp; } T1 operator*() const { return Node->getOperand(Idx); } }; public: NamedMDNode(const NamedMDNode &) = delete; ~NamedMDNode(); void eraseFromParent(); void dropAllReferences() { clearOperands(); } void clearOperands(); inline Module *getParent() { return Parent; } inline const Module *getParent() const { return Parent; } MDNode *getOperand(unsigned i) const; unsigned getNumOperands() const; void addOperand(MDNode *M); void setOperand(unsigned I, MDNode *New); StringRef getName() const; void print(raw_ostream &ROS, bool IsForDebug = false) const; void print(raw_ostream &ROS, ModuleSlotTracker &MST, bool IsForDebug = false) const; void dump() const; using op_iterator = op_iterator_impl<MDNode *, MDNode>; op_iterator op_begin() { return op_iterator(this, 0); } op_iterator op_end() { return op_iterator(this, getNumOperands()); } using const_op_iterator = op_iterator_impl<const MDNode *, MDNode>; const_op_iterator op_begin() const { return const_op_iterator(this, 0); } const_op_iterator op_end() const { return const_op_iterator(this, getNumOperands()); } inline iterator_range<op_iterator> operands() { return make_range(op_begin(), op_end()); } inline iterator_range<const_op_iterator> operands() const { return make_range(op_begin(), op_end()); } }; inline NamedMDNode *unwrap(LLVMNamedMDNodeRef P) { return reinterpret_cast<NamedMDNode*>(P); } inline LLVMNamedMDNodeRef wrap(const NamedMDNode *P) { return reinterpret_cast<LLVMNamedMDNodeRef>(const_cast<NamedMDNode*>(P)); } template<typename T> inline T *unwrap(LLVMNamedMDNodeRef P) { return cast<T>(unwrap(P)); } } # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/TrackingMDRef.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/TrackingMDRef.h" 2 namespace llvm { class TrackingMDRef { Metadata *MD = nullptr; public: TrackingMDRef() = default; explicit TrackingMDRef(Metadata *MD) : MD(MD) { track(); } TrackingMDRef(TrackingMDRef &&X) : MD(X.MD) { retrack(X); } TrackingMDRef(const TrackingMDRef &X) : MD(X.MD) { track(); } TrackingMDRef &operator=(TrackingMDRef &&X) { if (&X == this) return *this; untrack(); MD = X.MD; retrack(X); return *this; } TrackingMDRef &operator=(const TrackingMDRef &X) { if (&X == this) return *this; untrack(); MD = X.MD; track(); return *this; } ~TrackingMDRef() { untrack(); } Metadata *get() const { return MD; } operator Metadata *() const { return get(); } Metadata *operator->() const { return get(); } Metadata &operator*() const { return *get(); } void reset() { untrack(); MD = nullptr; } void reset(Metadata *MD) { untrack(); this->MD = MD; track(); } bool hasTrivialDestructor() const { return !MD || !MetadataTracking::isReplaceable(*MD); } bool operator==(const TrackingMDRef &X) const { return MD == X.MD; } bool operator!=(const TrackingMDRef &X) const { return MD != X.MD; } private: void track() { if (MD) MetadataTracking::track(MD); } void untrack() { if (MD) MetadataTracking::untrack(MD); } void retrack(TrackingMDRef &X) { (static_cast<void> (0)); if (X.MD) { MetadataTracking::retrack(X.MD, MD); X.MD = nullptr; } } }; template <class T> class TypedTrackingMDRef { TrackingMDRef Ref; public: TypedTrackingMDRef() = default; explicit TypedTrackingMDRef(T *MD) : Ref(static_cast<Metadata *>(MD)) {} TypedTrackingMDRef(TypedTrackingMDRef &&X) : Ref(std::move(X.Ref)) {} TypedTrackingMDRef(const TypedTrackingMDRef &X) : Ref(X.Ref) {} TypedTrackingMDRef &operator=(TypedTrackingMDRef &&X) { Ref = std::move(X.Ref); return *this; } TypedTrackingMDRef &operator=(const TypedTrackingMDRef &X) { Ref = X.Ref; return *this; } T *get() const { return (T *)Ref.get(); } operator T *() const { return get(); } T *operator->() const { return get(); } T &operator*() const { return *get(); } bool operator==(const TypedTrackingMDRef &X) const { return Ref == X.Ref; } bool operator!=(const TypedTrackingMDRef &X) const { return Ref != X.Ref; } void reset() { Ref.reset(); } void reset(T *MD) { Ref.reset(static_cast<Metadata *>(MD)); } bool hasTrivialDestructor() const { return Ref.hasTrivialDestructor(); } }; using TrackingMDNodeRef = TypedTrackingMDRef<MDNode>; using TrackingValueAsMetadataRef = TypedTrackingMDRef<ValueAsMetadata>; template <> struct simplify_type<TrackingMDRef> { using SimpleType = Metadata *; static SimpleType getSimplifiedValue(TrackingMDRef &MD) { return MD.get(); } }; template <> struct simplify_type<const TrackingMDRef> { using SimpleType = Metadata *; static SimpleType getSimplifiedValue(const TrackingMDRef &MD) { return MD.get(); } }; template <class T> struct simplify_type<TypedTrackingMDRef<T>> { using SimpleType = T *; static SimpleType getSimplifiedValue(TypedTrackingMDRef<T> &MD) { return MD.get(); } }; template <class T> struct simplify_type<const TypedTrackingMDRef<T>> { using SimpleType = T *; static SimpleType getSimplifiedValue(const TypedTrackingMDRef<T> &MD) { return MD.get(); } }; } # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugLoc.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/DataTypes.h" 1 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugLoc.h" 2 namespace llvm { class LLVMContext; class raw_ostream; class DILocation; # 33 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugLoc.h" class DebugLoc { TrackingMDNodeRef Loc; public: DebugLoc() = default; DebugLoc(const DILocation *L); explicit DebugLoc(const MDNode *N); DILocation *get() const; operator DILocation *() const { return get(); } DILocation *operator->() const { return get(); } DILocation &operator*() const { return *get(); } # 66 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugLoc.h" explicit operator bool() const { return Loc; } bool hasTrivialDestructor() const { return Loc.hasTrivialDestructor(); } # 79 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugLoc.h" static DebugLoc get(unsigned Line, unsigned Col, const MDNode *Scope, const MDNode *InlinedAt = nullptr, bool ImplicitCode = false); enum { ReplaceLastInlinedAt = true }; static DebugLoc appendInlinedAt(const DebugLoc &DL, DILocation *InlinedAt, LLVMContext &Ctx, DenseMap<const MDNode *, MDNode *> &Cache, bool ReplaceLast = false); unsigned getLine() const; unsigned getCol() const; MDNode *getScope() const; DILocation *getInlinedAt() const; MDNode *getInlinedAtScope() const; # 110 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugLoc.h" DebugLoc getFnDebugLoc() const; MDNode *getAsMDNode() const { return Loc; } bool isImplicitCode() const; void setImplicitCode(bool ImplicitCode); bool operator==(const DebugLoc &DL) const { return Loc == DL.Loc; } bool operator!=(const DebugLoc &DL) const { return Loc != DL.Loc; } void dump() const; void print(raw_ostream &OS) const; }; } # 23 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/SymbolTableListTraits.h" 1 # 31 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/SymbolTableListTraits.h" namespace llvm { class Argument; class BasicBlock; class Function; class GlobalAlias; class GlobalIFunc; class GlobalVariable; class Instruction; class Module; class ValueSymbolTable; template <typename NodeTy> struct SymbolTableListParentType {}; template <> struct SymbolTableListParentType<Instruction> { using type = BasicBlock; }; template <> struct SymbolTableListParentType<BasicBlock> { using type = Function; }; template <> struct SymbolTableListParentType<Argument> { using type = Function; }; template <> struct SymbolTableListParentType<Function> { using type = Module; }; template <> struct SymbolTableListParentType<GlobalVariable> { using type = Module; }; template <> struct SymbolTableListParentType<GlobalAlias> { using type = Module; }; template <> struct SymbolTableListParentType<GlobalIFunc> { using type = Module; }; template <typename NodeTy> class SymbolTableList; template <typename ValueSubClass> class SymbolTableListTraits : public ilist_alloc_traits<ValueSubClass> { using ListTy = SymbolTableList<ValueSubClass>; using iterator = typename simple_ilist<ValueSubClass>::iterator; using ItemParentClass = typename SymbolTableListParentType<ValueSubClass>::type; public: SymbolTableListTraits() = default; private: ItemParentClass *getListOwner() { size_t Offset(size_t(&((ItemParentClass*)nullptr->*ItemParentClass:: getSublistAccess(static_cast<ValueSubClass*>(nullptr))))); ListTy *Anchor(static_cast<ListTy *>(this)); return reinterpret_cast<ItemParentClass*>(reinterpret_cast<char*>(Anchor)- Offset); } static ListTy &getList(ItemParentClass *Par) { return Par->*(Par->getSublistAccess((ValueSubClass*)nullptr)); } static ValueSymbolTable *getSymTab(ItemParentClass *Par) { return Par ? toPtr(Par->getValueSymbolTable()) : nullptr; } public: void addNodeToList(ValueSubClass *V); void removeNodeFromList(ValueSubClass *V); void transferNodesFromList(SymbolTableListTraits &L2, iterator first, iterator last); template<typename TPtr> void setSymTabObject(TPtr *, TPtr); static ValueSymbolTable *toPtr(ValueSymbolTable *P) { return P; } static ValueSymbolTable *toPtr(ValueSymbolTable &R) { return &R; } }; template <class T> class SymbolTableList : public iplist_impl<simple_ilist<T>, SymbolTableListTraits<T>> {}; } # 24 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/AtomicOrdering.h" 1 # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/AtomicOrdering.h" namespace llvm { enum class AtomicOrderingCABI { relaxed = 0, consume = 1, acquire = 2, release = 3, acq_rel = 4, seq_cst = 5, }; bool operator<(AtomicOrderingCABI, AtomicOrderingCABI) = delete; bool operator>(AtomicOrderingCABI, AtomicOrderingCABI) = delete; bool operator<=(AtomicOrderingCABI, AtomicOrderingCABI) = delete; bool operator>=(AtomicOrderingCABI, AtomicOrderingCABI) = delete; template <typename Int> inline bool isValidAtomicOrderingCABI(Int I) { return (Int)AtomicOrderingCABI::relaxed <= I && I <= (Int)AtomicOrderingCABI::seq_cst; } # 56 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/AtomicOrdering.h" enum class AtomicOrdering : unsigned { NotAtomic = 0, Unordered = 1, Monotonic = 2, Acquire = 4, Release = 5, AcquireRelease = 6, SequentiallyConsistent = 7, LAST = SequentiallyConsistent }; bool operator<(AtomicOrdering, AtomicOrdering) = delete; bool operator>(AtomicOrdering, AtomicOrdering) = delete; bool operator<=(AtomicOrdering, AtomicOrdering) = delete; bool operator>=(AtomicOrdering, AtomicOrdering) = delete; template <typename Int> inline bool isValidAtomicOrdering(Int I) { return static_cast<Int>(AtomicOrdering::NotAtomic) <= I && I <= static_cast<Int>(AtomicOrdering::SequentiallyConsistent); } inline const char *toIRString(AtomicOrdering ao) { static const char *names[8] = {"not_atomic", "unordered", "monotonic", "consume", "acquire", "release", "acq_rel", "seq_cst"}; return names[static_cast<size_t>(ao)]; } inline bool isStrongerThan(AtomicOrdering ao, AtomicOrdering other) { static const bool lookup[8][8] = { {false, false, false, false, false, false, false, false}, { true, false, false, false, false, false, false, false}, { true, true, false, false, false, false, false, false}, { true, true, true, false, false, false, false, false}, { true, true, true, true, false, false, false, false}, { true, true, true, false, false, false, false, false}, { true, true, true, true, true, true, false, false}, { true, true, true, true, true, true, true, false}, }; return lookup[static_cast<size_t>(ao)][static_cast<size_t>(other)]; } inline bool isAtLeastOrStrongerThan(AtomicOrdering ao, AtomicOrdering other) { static const bool lookup[8][8] = { { true, false, false, false, false, false, false, false}, { true, true, false, false, false, false, false, false}, { true, true, true, false, false, false, false, false}, { true, true, true, true, false, false, false, false}, { true, true, true, true, true, false, false, false}, { true, true, true, false, false, true, false, false}, { true, true, true, true, true, true, true, false}, { true, true, true, true, true, true, true, true}, }; return lookup[static_cast<size_t>(ao)][static_cast<size_t>(other)]; } inline bool isStrongerThanUnordered(AtomicOrdering ao) { return isStrongerThan(ao, AtomicOrdering::Unordered); } inline bool isStrongerThanMonotonic(AtomicOrdering ao) { return isStrongerThan(ao, AtomicOrdering::Monotonic); } inline bool isAcquireOrStronger(AtomicOrdering ao) { return isAtLeastOrStrongerThan(ao, AtomicOrdering::Acquire); } inline bool isReleaseOrStronger(AtomicOrdering ao) { return isAtLeastOrStrongerThan(ao, AtomicOrdering::Release); } inline AtomicOrderingCABI toCABI(AtomicOrdering ao) { static const AtomicOrderingCABI lookup[8] = { AtomicOrderingCABI::relaxed, AtomicOrderingCABI::relaxed, AtomicOrderingCABI::relaxed, AtomicOrderingCABI::consume, AtomicOrderingCABI::acquire, AtomicOrderingCABI::release, AtomicOrderingCABI::acq_rel, AtomicOrderingCABI::seq_cst, }; return lookup[static_cast<size_t>(ao)]; } } # 27 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 30 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" 2 namespace llvm { class BasicBlock; class FastMathFlags; class MDNode; class Module; struct AAMDNodes; template <> struct ilist_alloc_traits<Instruction> { static inline void deleteNode(Instruction *V); }; class Instruction : public User, public ilist_node_with_parent<Instruction, BasicBlock> { BasicBlock *Parent; DebugLoc DbgLoc; mutable unsigned Order = 0; protected: using OpaqueField = Bitfield::Element<uint16_t, 0, 15>; template <unsigned Offset> using AlignmentBitfieldElementT = typename Bitfield::Element<unsigned, Offset, 5, Value::MaxAlignmentExponent>; template <unsigned Offset> using BoolBitfieldElementT = typename Bitfield::Element<bool, Offset, 1>; template <unsigned Offset> using AtomicOrderingBitfieldElementT = typename Bitfield::Element<AtomicOrdering, Offset, 3, AtomicOrdering::LAST>; private: using HasMetadataField = Bitfield::Element<bool, 15, 1>; protected: ~Instruction(); public: Instruction(const Instruction &) = delete; Instruction &operator=(const Instruction &) = delete; Instruction *user_back() { return cast<Instruction>(*user_begin());} const Instruction *user_back() const { return cast<Instruction>(*user_begin());} inline const BasicBlock *getParent() const { return Parent; } inline BasicBlock *getParent() { return Parent; } const Module *getModule() const; Module *getModule() { return const_cast<Module *>( static_cast<const Instruction *>(this)->getModule()); } const Function *getFunction() const; Function *getFunction() { return const_cast<Function *>( static_cast<const Instruction *>(this)->getFunction()); } void removeFromParent(); SymbolTableList<Instruction>::iterator eraseFromParent(); void insertBefore(Instruction *InsertPos); void insertAfter(Instruction *InsertPos); void moveBefore(Instruction *MovePos); void moveBefore(BasicBlock &BB, SymbolTableList<Instruction>::iterator I); void moveAfter(Instruction *MovePos); bool comesBefore(const Instruction *Other) const; unsigned getOpcode() const { return getValueID() - InstructionVal; } const char *getOpcodeName() const { return getOpcodeName(getOpcode()); } bool isTerminator() const { return isTerminator(getOpcode()); } bool isUnaryOp() const { return isUnaryOp(getOpcode()); } bool isBinaryOp() const { return isBinaryOp(getOpcode()); } bool isIntDivRem() const { return isIntDivRem(getOpcode()); } bool isShift() const { return isShift(getOpcode()); } bool isCast() const { return isCast(getOpcode()); } bool isFuncletPad() const { return isFuncletPad(getOpcode()); } bool isExceptionalTerminator() const { return isExceptionalTerminator(getOpcode()); } bool isIndirectTerminator() const { return isIndirectTerminator(getOpcode()); } static const char* getOpcodeName(unsigned OpCode); static inline bool isTerminator(unsigned OpCode) { return OpCode >= TermOpsBegin && OpCode < TermOpsEnd; } static inline bool isUnaryOp(unsigned Opcode) { return Opcode >= UnaryOpsBegin && Opcode < UnaryOpsEnd; } static inline bool isBinaryOp(unsigned Opcode) { return Opcode >= BinaryOpsBegin && Opcode < BinaryOpsEnd; } static inline bool isIntDivRem(unsigned Opcode) { return Opcode == UDiv || Opcode == SDiv || Opcode == URem || Opcode == SRem; } static inline bool isShift(unsigned Opcode) { return Opcode >= Shl && Opcode <= AShr; } inline bool isLogicalShift() const { return getOpcode() == Shl || getOpcode() == LShr; } inline bool isArithmeticShift() const { return getOpcode() == AShr; } static inline bool isBitwiseLogicOp(unsigned Opcode) { return Opcode == And || Opcode == Or || Opcode == Xor; } inline bool isBitwiseLogicOp() const { return isBitwiseLogicOp(getOpcode()); } static inline bool isCast(unsigned OpCode) { return OpCode >= CastOpsBegin && OpCode < CastOpsEnd; } static inline bool isFuncletPad(unsigned OpCode) { return OpCode >= FuncletPadOpsBegin && OpCode < FuncletPadOpsEnd; } static inline bool isExceptionalTerminator(unsigned OpCode) { switch (OpCode) { case Instruction::CatchSwitch: case Instruction::CatchRet: case Instruction::CleanupRet: case Instruction::Invoke: case Instruction::Resume: return true; default: return false; } } static inline bool isIndirectTerminator(unsigned OpCode) { switch (OpCode) { case Instruction::IndirectBr: case Instruction::CallBr: return true; default: return false; } } bool hasMetadata() const { return DbgLoc || hasMetadataHashEntry(); } bool hasMetadataOtherThanDebugLoc() const { return hasMetadataHashEntry(); } bool hasMetadata(unsigned KindID) const { return getMetadata(KindID) != nullptr; } bool hasMetadata(StringRef Kind) const { return getMetadata(Kind) != nullptr; } MDNode *getMetadata(unsigned KindID) const { if (!hasMetadata()) return nullptr; return getMetadataImpl(KindID); } MDNode *getMetadata(StringRef Kind) const { if (!hasMetadata()) return nullptr; return getMetadataImpl(Kind); } void getAllMetadata(SmallVectorImpl<std::pair<unsigned, MDNode *>> &MDs) const { if (hasMetadata()) getAllMetadataImpl(MDs); } void getAllMetadataOtherThanDebugLoc( SmallVectorImpl<std::pair<unsigned, MDNode *>> &MDs) const { if (hasMetadataOtherThanDebugLoc()) getAllMetadataOtherThanDebugLocImpl(MDs); } void getAAMetadata(AAMDNodes &N, bool Merge = false) const; void setMetadata(unsigned KindID, MDNode *Node); void setMetadata(StringRef Kind, MDNode *Node); void copyMetadata(const Instruction &SrcInst, ArrayRef<unsigned> WL = ArrayRef<unsigned>()); void swapProfMetadata(); void dropUnknownNonDebugMetadata(ArrayRef<unsigned> KnownIDs); void dropUnknownNonDebugMetadata() { return dropUnknownNonDebugMetadata(None); } void dropUnknownNonDebugMetadata(unsigned ID1) { return dropUnknownNonDebugMetadata(makeArrayRef(ID1)); } void dropUnknownNonDebugMetadata(unsigned ID1, unsigned ID2) { unsigned IDs[] = {ID1, ID2}; return dropUnknownNonDebugMetadata(IDs); } void setAAMetadata(const AAMDNodes &N); bool extractProfMetadata(uint64_t &TrueVal, uint64_t &FalseVal) const; bool extractProfTotalWeight(uint64_t &TotalVal) const; void setDebugLoc(DebugLoc Loc) { DbgLoc = std::move(Loc); } const DebugLoc &getDebugLoc() const { return DbgLoc; } void setHasNoUnsignedWrap(bool b = true); void setHasNoSignedWrap(bool b = true); void setIsExact(bool b = true); bool hasNoUnsignedWrap() const; bool hasNoSignedWrap() const; void dropPoisonGeneratingFlags(); bool isExact() const; void setFast(bool B); void setHasAllowReassoc(bool B); void setHasNoNaNs(bool B); void setHasNoInfs(bool B); void setHasNoSignedZeros(bool B); void setHasAllowReciprocal(bool B); void setHasAllowContract(bool B); void setHasApproxFunc(bool B); void setFastMathFlags(FastMathFlags FMF); void copyFastMathFlags(FastMathFlags FMF); bool isFast() const; bool hasAllowReassoc() const; bool hasNoNaNs() const; bool hasNoInfs() const; bool hasNoSignedZeros() const; bool hasAllowReciprocal() const; bool hasAllowContract() const; bool hasApproxFunc() const; FastMathFlags getFastMathFlags() const; void copyFastMathFlags(const Instruction *I); void copyIRFlags(const Value *V, bool IncludeWrapFlags = true); void andIRFlags(const Value *V); # 493 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" void applyMergedLocation(const DILocation *LocA, const DILocation *LocB); private: bool hasMetadataHashEntry() const { return Bitfield::test<HasMetadataField>(getSubclassDataFromValue()); } MDNode *getMetadataImpl(unsigned KindID) const; MDNode *getMetadataImpl(StringRef Kind) const; void getAllMetadataImpl(SmallVectorImpl<std::pair<unsigned, MDNode *>> &) const; void getAllMetadataOtherThanDebugLocImpl( SmallVectorImpl<std::pair<unsigned, MDNode *>> &) const; void clearMetadataHashEntries(); public: # 522 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" bool isAssociative() const __attribute__((__pure__)); static bool isAssociative(unsigned Opcode) { return Opcode == And || Opcode == Or || Opcode == Xor || Opcode == Add || Opcode == Mul; } # 535 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" bool isCommutative() const { return isCommutative(getOpcode()); } static bool isCommutative(unsigned Opcode) { switch (Opcode) { case Add: case FAdd: case Mul: case FMul: case And: case Or: case Xor: return true; default: return false; } } bool isIdempotent() const { return isIdempotent(getOpcode()); } static bool isIdempotent(unsigned Opcode) { return Opcode == And || Opcode == Or; } # 567 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" bool isNilpotent() const { return isNilpotent(getOpcode()); } static bool isNilpotent(unsigned Opcode) { return Opcode == Xor; } bool mayWriteToMemory() const; bool mayReadFromMemory() const; bool mayReadOrWriteMemory() const { return mayReadFromMemory() || mayWriteToMemory(); } bool isAtomic() const; bool hasAtomicLoad() const; bool hasAtomicStore() const; bool mayThrow() const; bool isFenceLike() const { switch (getOpcode()) { default: return false; case Instruction::Fence: case Instruction::CatchPad: case Instruction::CatchRet: case Instruction::Call: case Instruction::Invoke: return true; } } bool mayHaveSideEffects() const { return mayWriteToMemory() || mayThrow(); } bool isSafeToRemove() const; bool isEHPad() const { switch (getOpcode()) { case Instruction::CatchSwitch: case Instruction::CatchPad: case Instruction::CleanupPad: case Instruction::LandingPad: return true; default: return false; } } bool isLifetimeStartOrEnd() const; const Instruction *getNextNonDebugInstruction() const; Instruction *getNextNonDebugInstruction() { return const_cast<Instruction *>( static_cast<const Instruction *>(this)->getNextNonDebugInstruction()); } const Instruction *getPrevNonDebugInstruction() const; Instruction *getPrevNonDebugInstruction() { return const_cast<Instruction *>( static_cast<const Instruction *>(this)->getPrevNonDebugInstruction()); } Instruction *clone() const; bool isIdenticalTo(const Instruction *I) const; bool isIdenticalToWhenDefined(const Instruction *I) const; enum OperationEquivalenceFlags { CompareIgnoringAlignment = 1<<0, CompareUsingScalarTypes = 1<<1 }; # 697 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" bool isSameOperationAs(const Instruction *I, unsigned flags = 0) const; bool isUsedOutsideOfBlock(const BasicBlock *BB) const; unsigned getNumSuccessors() const; BasicBlock *getSuccessor(unsigned Idx) const; void setSuccessor(unsigned Idx, BasicBlock *BB); void replaceSuccessorWith(BasicBlock *OldBB, BasicBlock *NewBB); static bool classof(const Value *V) { return V->getValueID() >= Value::InstructionVal; } enum TermOps { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" 1 # 126 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" TermOpsBegin = 1, Ret = 1, Br = 2, Switch = 3, IndirectBr = 4, Invoke = 5, Resume = 6, Unreachable = 7, CleanupRet = 8, CatchRet = 9, CatchSwitch = 10, CallBr = 11, TermOpsEnd = 11 +1 # 732 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" 2 }; enum UnaryOps { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" 1 # 141 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" UnaryOpsBegin = 12, FNeg = 12, UnaryOpsEnd = 12 +1 # 739 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" 2 }; enum BinaryOps { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" 1 # 146 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" BinaryOpsBegin = 13, Add = 13, FAdd = 14, Sub = 15, FSub = 16, Mul = 17, FMul = 18, UDiv = 19, SDiv = 20, FDiv = 21, URem = 22, SRem = 23, FRem = 24, Shl = 25, LShr = 26, AShr = 27, And = 28, Or = 29, Xor = 30, BinaryOpsEnd = 30 +1 # 746 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" 2 }; enum MemoryOps { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" 1 # 170 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" MemoryOpsBegin = 31, Alloca = 31, Load = 32, Store = 33, GetElementPtr = 34, Fence = 35, AtomicCmpXchg = 36, AtomicRMW = 37, MemoryOpsEnd = 37 +1 # 753 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" 2 }; enum CastOps { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" 1 # 183 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" CastOpsBegin = 38, Trunc = 38, ZExt = 39, SExt = 40, FPToUI = 41, FPToSI = 42, UIToFP = 43, SIToFP = 44, FPTrunc = 45, FPExt = 46, PtrToInt = 47, IntToPtr = 48, BitCast = 49, AddrSpaceCast = 50, CastOpsEnd = 50 +1 # 760 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" 2 }; enum FuncletPadOps { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" 1 # 199 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" FuncletPadOpsBegin = 51, CleanupPad = 51, CatchPad = 52, FuncletPadOpsEnd = 52 +1 # 767 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" 2 }; enum OtherOps { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" 1 # 205 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" OtherOpsBegin = 53, ICmp = 53, FCmp = 54, PHI = 55, Call = 56, Select = 57, UserOp1 = 58, UserOp2 = 59, VAArg = 60, ExtractElement = 61, InsertElement = 62, ShuffleVector = 63, ExtractValue = 64, InsertValue = 65, LandingPad = 66, Freeze = 67, OtherOpsEnd = 67 +1 # 774 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.h" 2 }; private: friend class SymbolTableListTraits<Instruction>; friend class BasicBlock; void setValueSubclassData(unsigned short D) { Value::setValueSubclassData(D); } unsigned short getSubclassDataFromValue() const { return Value::getSubclassDataFromValue(); } void setHasMetadataHashEntry(bool V) { setSubclassData<HasMetadataField>(V); } void setParent(BasicBlock *P); protected: template <typename BitfieldElement> typename BitfieldElement::Type getSubclassData() const { static_assert( std::is_same<BitfieldElement, HasMetadataField>::value || !Bitfield::isOverlapping<BitfieldElement, HasMetadataField>(), "Must not overlap with the metadata bit"); return Bitfield::get<BitfieldElement>(getSubclassDataFromValue()); } template <typename BitfieldElement> void setSubclassData(typename BitfieldElement::Type Value) { static_assert( std::is_same<BitfieldElement, HasMetadataField>::value || !Bitfield::isOverlapping<BitfieldElement, HasMetadataField>(), "Must not overlap with the metadata bit"); auto Storage = getSubclassDataFromValue(); Bitfield::set<BitfieldElement>(Storage, Value); setValueSubclassData(Storage); } Instruction(Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, Instruction *InsertBefore = nullptr); Instruction(Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, BasicBlock *InsertAtEnd); private: Instruction *cloneImpl() const; }; inline void ilist_alloc_traits<Instruction>::deleteNode(Instruction *V) { V->deleteValue(); } } # 23 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/BasicBlock.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 29 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/BasicBlock.h" 2 namespace llvm { class AssemblyAnnotationWriter; class CallInst; class Function; class LandingPadInst; class LLVMContext; class Module; class PHINode; class ValueSymbolTable; # 58 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/BasicBlock.h" class BasicBlock final : public Value, public ilist_node_with_parent<BasicBlock, Function> { public: using InstListType = SymbolTableList<Instruction>; private: friend class BlockAddress; friend class SymbolTableListTraits<BasicBlock>; InstListType InstList; Function *Parent; void setParent(Function *parent); explicit BasicBlock(LLVMContext &C, const Twine &Name = "", Function *Parent = nullptr, BasicBlock *InsertBefore = nullptr); public: BasicBlock(const BasicBlock &) = delete; BasicBlock &operator=(const BasicBlock &) = delete; ~BasicBlock(); LLVMContext &getContext() const; using iterator = InstListType::iterator; using const_iterator = InstListType::const_iterator; using reverse_iterator = InstListType::reverse_iterator; using const_reverse_iterator = InstListType::const_reverse_iterator; static BasicBlock *Create(LLVMContext &Context, const Twine &Name = "", Function *Parent = nullptr, BasicBlock *InsertBefore = nullptr) { return new BasicBlock(Context, Name, Parent, InsertBefore); } const Function *getParent() const { return Parent; } Function *getParent() { return Parent; } const Module *getModule() const; Module *getModule() { return const_cast<Module *>( static_cast<const BasicBlock *>(this)->getModule()); } const Instruction *getTerminator() const __attribute__((__pure__)); Instruction *getTerminator() { return const_cast<Instruction *>( static_cast<const BasicBlock *>(this)->getTerminator()); } const CallInst *getTerminatingDeoptimizeCall() const; CallInst *getTerminatingDeoptimizeCall() { return const_cast<CallInst *>( static_cast<const BasicBlock *>(this)->getTerminatingDeoptimizeCall()); } const CallInst *getPostdominatingDeoptimizeCall() const; CallInst *getPostdominatingDeoptimizeCall() { return const_cast<CallInst *>( static_cast<const BasicBlock *>(this)->getPostdominatingDeoptimizeCall()); } const CallInst *getTerminatingMustTailCall() const; CallInst *getTerminatingMustTailCall() { return const_cast<CallInst *>( static_cast<const BasicBlock *>(this)->getTerminatingMustTailCall()); } const Instruction* getFirstNonPHI() const; Instruction* getFirstNonPHI() { return const_cast<Instruction *>( static_cast<const BasicBlock *>(this)->getFirstNonPHI()); } const Instruction* getFirstNonPHIOrDbg() const; Instruction* getFirstNonPHIOrDbg() { return const_cast<Instruction *>( static_cast<const BasicBlock *>(this)->getFirstNonPHIOrDbg()); } const Instruction* getFirstNonPHIOrDbgOrLifetime() const; Instruction* getFirstNonPHIOrDbgOrLifetime() { return const_cast<Instruction *>( static_cast<const BasicBlock *>(this)->getFirstNonPHIOrDbgOrLifetime()); } const_iterator getFirstInsertionPt() const; iterator getFirstInsertionPt() { return static_cast<const BasicBlock *>(this) ->getFirstInsertionPt().getNonConst(); } iterator_range<filter_iterator<BasicBlock::const_iterator, std::function<bool(const Instruction &)>>> instructionsWithoutDebug() const; iterator_range<filter_iterator<BasicBlock::iterator, std::function<bool(Instruction &)>>> instructionsWithoutDebug(); filter_iterator<BasicBlock::const_iterator, std::function<bool(const Instruction &)>>::difference_type sizeWithoutDebug() const; void removeFromParent(); SymbolTableList<BasicBlock>::iterator eraseFromParent(); void moveBefore(BasicBlock *MovePos); void moveAfter(BasicBlock *MovePos); void insertInto(Function *Parent, BasicBlock *InsertBefore = nullptr); const BasicBlock *getSinglePredecessor() const; BasicBlock *getSinglePredecessor() { return const_cast<BasicBlock *>( static_cast<const BasicBlock *>(this)->getSinglePredecessor()); } const BasicBlock *getUniquePredecessor() const; BasicBlock *getUniquePredecessor() { return const_cast<BasicBlock *>( static_cast<const BasicBlock *>(this)->getUniquePredecessor()); } bool hasNPredecessors(unsigned N) const; bool hasNPredecessorsOrMore(unsigned N) const; const BasicBlock *getSingleSuccessor() const; BasicBlock *getSingleSuccessor() { return const_cast<BasicBlock *>( static_cast<const BasicBlock *>(this)->getSingleSuccessor()); } const BasicBlock *getUniqueSuccessor() const; BasicBlock *getUniqueSuccessor() { return const_cast<BasicBlock *>( static_cast<const BasicBlock *>(this)->getUniqueSuccessor()); } void print(raw_ostream &OS, AssemblyAnnotationWriter *AAW = nullptr, bool ShouldPreserveUseListOrder = false, bool IsForDebug = false) const; inline iterator begin() { return InstList.begin(); } inline const_iterator begin() const { return InstList.begin(); } inline iterator end () { return InstList.end(); } inline const_iterator end () const { return InstList.end(); } inline reverse_iterator rbegin() { return InstList.rbegin(); } inline const_reverse_iterator rbegin() const { return InstList.rbegin(); } inline reverse_iterator rend () { return InstList.rend(); } inline const_reverse_iterator rend () const { return InstList.rend(); } inline size_t size() const { return InstList.size(); } inline bool empty() const { return InstList.empty(); } inline const Instruction &front() const { return InstList.front(); } inline Instruction &front() { return InstList.front(); } inline const Instruction &back() const { return InstList.back(); } inline Instruction &back() { return InstList.back(); } template <typename PHINodeT = PHINode, typename BBIteratorT = iterator> class phi_iterator_impl : public iterator_facade_base<phi_iterator_impl<PHINodeT, BBIteratorT>, std::forward_iterator_tag, PHINodeT> { friend BasicBlock; PHINodeT *PN; phi_iterator_impl(PHINodeT *PN) : PN(PN) {} public: phi_iterator_impl() = default; template <typename PHINodeU, typename BBIteratorU> phi_iterator_impl(const phi_iterator_impl<PHINodeU, BBIteratorU> &Arg) : PN(Arg.PN) {} bool operator==(const phi_iterator_impl &Arg) const { return PN == Arg.PN; } PHINodeT &operator*() const { return *PN; } using phi_iterator_impl::iterator_facade_base::operator++; phi_iterator_impl &operator++() { (static_cast<void> (0)); PN = dyn_cast<PHINodeT>(std::next(BBIteratorT(PN))); return *this; } }; using phi_iterator = phi_iterator_impl<>; using const_phi_iterator = phi_iterator_impl<const PHINode, BasicBlock::const_iterator>; iterator_range<const_phi_iterator> phis() const { return const_cast<BasicBlock *>(this)->phis(); } iterator_range<phi_iterator> phis(); const InstListType &getInstList() const { return InstList; } InstListType &getInstList() { return InstList; } static InstListType BasicBlock::*getSublistAccess(Instruction*) { return &BasicBlock::InstList; } ValueSymbolTable *getValueSymbolTable(); static bool classof(const Value *V) { return V->getValueID() == Value::BasicBlockVal; } # 378 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/BasicBlock.h" void dropAllReferences(); void removePredecessor(BasicBlock *Pred, bool KeepOneInputPHIs = false); bool canSplitPredecessors() const; # 405 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/BasicBlock.h" BasicBlock *splitBasicBlock(iterator I, const Twine &BBName = ""); BasicBlock *splitBasicBlock(Instruction *I, const Twine &BBName = "") { return splitBasicBlock(I->getIterator(), BBName); } bool hasAddressTaken() const { return getBasicBlockBits().BlockAddressRefCount != 0; } void replacePhiUsesWith(BasicBlock *Old, BasicBlock *New); void replaceSuccessorsPhiUsesWith(BasicBlock *Old, BasicBlock *New); void replaceSuccessorsPhiUsesWith(BasicBlock *New); bool isEHPad() const { return getFirstNonPHI()->isEHPad(); } bool isLandingPad() const; const LandingPadInst *getLandingPadInst() const; LandingPadInst *getLandingPadInst() { return const_cast<LandingPadInst *>( static_cast<const BasicBlock *>(this)->getLandingPadInst()); } bool isLegalToHoistInto() const; Optional<uint64_t> getIrrLoopHeaderWeight() const; bool isInstrOrderValid() const { return getBasicBlockBits().InstrOrderValid; } void invalidateOrders() { validateInstrOrdering(); BasicBlockBits Bits = getBasicBlockBits(); Bits.InstrOrderValid = false; setBasicBlockBits(Bits); } void renumberInstructions(); # 473 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/BasicBlock.h" void validateInstrOrdering() const; private: # 488 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/BasicBlock.h" struct BasicBlockBits { unsigned short BlockAddressRefCount : 15; unsigned short InstrOrderValid : 1; }; BasicBlockBits getBasicBlockBits() const { static_assert(sizeof(BasicBlockBits) == sizeof(unsigned short), "too many bits for Value::SubclassData"); unsigned short ValueData = getSubclassDataFromValue(); BasicBlockBits AsBits; memcpy(&AsBits, &ValueData, sizeof(AsBits)); return AsBits; } void setBasicBlockBits(BasicBlockBits AsBits) { unsigned short D; memcpy(&D, &AsBits, sizeof(D)); Value::setValueSubclassData(D); } void AdjustBlockAddressRefCount(int Amt) { BasicBlockBits Bits = getBasicBlockBits(); Bits.BlockAddressRefCount += Amt; setBasicBlockBits(Bits); (static_cast<void> (0)); } void setValueSubclassData(unsigned short D) { Value::setValueSubclassData(D); } }; inline BasicBlock *unwrap(LLVMBasicBlockRef P) { return reinterpret_cast<BasicBlock*>(P); } inline LLVMBasicBlockRef wrap(const BasicBlock *P) { return reinterpret_cast<LLVMBasicBlockRef>(const_cast<BasicBlock*>(P)); } BasicBlock::iterator skipDebugIntrinsics(BasicBlock::iterator It); inline void BasicBlock::validateInstrOrdering() const {} } # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" 1 # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/BitmaskEnum.h" 1 # 12 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/BitmaskEnum.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 13 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/BitmaskEnum.h" 2 # 65 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/BitmaskEnum.h" namespace llvm { template <typename E, typename Enable = void> struct is_bitmask_enum : std::false_type {}; template <typename E> struct is_bitmask_enum< E, std::enable_if_t<sizeof(E::LLVM_BITMASK_LARGEST_ENUMERATOR) >= 0>> : std::true_type {}; namespace BitmaskEnumDetail { template <typename E> std::underlying_type_t<E> Mask() { return NextPowerOf2(static_cast<std::underlying_type_t<E>>( E::LLVM_BITMASK_LARGEST_ENUMERATOR)) - 1; } template <typename E> std::underlying_type_t<E> Underlying(E Val) { auto U = static_cast<std::underlying_type_t<E>>(Val); (static_cast<void> (0)); (static_cast<void> (0)); return U; } constexpr unsigned bitWidth(uint64_t Value) { return Value ? 1 + bitWidth(Value >> 1) : 0; } template <typename E, typename = std::enable_if_t<is_bitmask_enum<E>::value>> E operator~(E Val) { return static_cast<E>(~Underlying(Val) & Mask<E>()); } template <typename E, typename = std::enable_if_t<is_bitmask_enum<E>::value>> E operator|(E LHS, E RHS) { return static_cast<E>(Underlying(LHS) | Underlying(RHS)); } template <typename E, typename = std::enable_if_t<is_bitmask_enum<E>::value>> E operator&(E LHS, E RHS) { return static_cast<E>(Underlying(LHS) & Underlying(RHS)); } template <typename E, typename = std::enable_if_t<is_bitmask_enum<E>::value>> E operator^(E LHS, E RHS) { return static_cast<E>(Underlying(LHS) ^ Underlying(RHS)); } template <typename E, typename = std::enable_if_t<is_bitmask_enum<E>::value>> E &operator|=(E &LHS, E RHS) { LHS = LHS | RHS; return LHS; } template <typename E, typename = std::enable_if_t<is_bitmask_enum<E>::value>> E &operator&=(E &LHS, E RHS) { LHS = LHS & RHS; return LHS; } template <typename E, typename = std::enable_if_t<is_bitmask_enum<E>::value>> E &operator^=(E &LHS, E RHS) { LHS = LHS ^ RHS; return LHS; } } using ::llvm::BitmaskEnumDetail::operator~; using ::llvm::BitmaskEnumDetail::operator|; using ::llvm::BitmaskEnumDetail::operator&; using ::llvm::BitmaskEnumDetail::operator^; using ::llvm::BitmaskEnumDetail::operator|=; using ::llvm::BitmaskEnumDetail::operator&=; using ::llvm::BitmaskEnumDetail::operator^=; template <typename E, typename = std::enable_if_t<is_bitmask_enum<E>::value>> constexpr unsigned BitWidth = BitmaskEnumDetail::bitWidth(uint64_t{ static_cast<std::underlying_type_t<E>>( E::LLVM_BITMASK_LARGEST_ENUMERATOR)}); } # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 1 # 24 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/DataTypes.h" 1 # 25 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Format.h" 1 # 28 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Format.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/DataTypes.h" 1 # 29 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Format.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 30 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Format.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdio" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdio" 3 # 31 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Format.h" 2 namespace llvm { class format_object_base { protected: const char *Fmt; ~format_object_base() = default; format_object_base(const format_object_base &) = default; virtual void home(); virtual int snprint(char *Buffer, unsigned BufferSize) const = 0; public: format_object_base(const char *fmt) : Fmt(fmt) {} unsigned print(char *Buffer, unsigned BufferSize) const { (static_cast<void> (0)); int N = snprint(Buffer, BufferSize); if (N < 0) return BufferSize * 2; if (unsigned(N) >= BufferSize) return N + 1; return N; } }; template <typename... Args> struct validate_format_parameters; template <typename Arg, typename... Args> struct validate_format_parameters<Arg, Args...> { static_assert(std::is_scalar<Arg>::value, "format can't be used with non fundamental / non pointer type"); validate_format_parameters() { validate_format_parameters<Args...>(); } }; template <> struct validate_format_parameters<> {}; template <typename... Ts> class format_object final : public format_object_base { std::tuple<Ts...> Vals; template <std::size_t... Is> int snprint_tuple(char *Buffer, unsigned BufferSize, std::index_sequence<Is...>) const { return snprintf(Buffer, BufferSize, Fmt, std::get<Is>(Vals)...); } public: format_object(const char *fmt, const Ts &... vals) : format_object_base(fmt), Vals(vals...) { validate_format_parameters<Ts...>(); } int snprint(char *Buffer, unsigned BufferSize) const override { return snprint_tuple(Buffer, BufferSize, std::index_sequence_for<Ts...>()); } }; # 123 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Format.h" template <typename... Ts> inline format_object<Ts...> format(const char *Fmt, const Ts &... Vals) { return format_object<Ts...>(Fmt, Vals...); } class FormattedString { public: enum Justification { JustifyNone, JustifyLeft, JustifyRight, JustifyCenter }; FormattedString(StringRef S, unsigned W, Justification J) : Str(S), Width(W), Justify(J) {} private: StringRef Str; unsigned Width; Justification Justify; friend class raw_ostream; }; inline FormattedString left_justify(StringRef Str, unsigned Width) { return FormattedString(Str, Width, FormattedString::JustifyLeft); } inline FormattedString right_justify(StringRef Str, unsigned Width) { return FormattedString(Str, Width, FormattedString::JustifyRight); } inline FormattedString center_justify(StringRef Str, unsigned Width) { return FormattedString(Str, Width, FormattedString::JustifyCenter); } class FormattedNumber { uint64_t HexValue; int64_t DecValue; unsigned Width; bool Hex; bool Upper; bool HexPrefix; friend class raw_ostream; public: FormattedNumber(uint64_t HV, int64_t DV, unsigned W, bool H, bool U, bool Prefix) : HexValue(HV), DecValue(DV), Width(W), Hex(H), Upper(U), HexPrefix(Prefix) {} }; inline FormattedNumber format_hex(uint64_t N, unsigned Width, bool Upper = false) { (static_cast<void> (0)); return FormattedNumber(N, 0, Width, true, Upper, true); } # 199 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Format.h" inline FormattedNumber format_hex_no_prefix(uint64_t N, unsigned Width, bool Upper = false) { (static_cast<void> (0)); return FormattedNumber(N, 0, Width, true, Upper, false); } inline FormattedNumber format_decimal(int64_t N, unsigned Width) { return FormattedNumber(0, N, Width, false, false, false); } class FormattedBytes { ArrayRef<uint8_t> Bytes; Optional<uint64_t> FirstByteOffset; uint32_t IndentLevel; uint32_t NumPerLine; uint8_t ByteGroupSize; bool Upper; bool ASCII; friend class raw_ostream; public: FormattedBytes(ArrayRef<uint8_t> B, uint32_t IL, Optional<uint64_t> O, uint32_t NPL, uint8_t BGS, bool U, bool A) : Bytes(B), FirstByteOffset(O), IndentLevel(IL), NumPerLine(NPL), ByteGroupSize(BGS), Upper(U), ASCII(A) { if (ByteGroupSize > NumPerLine) ByteGroupSize = NumPerLine; } }; inline FormattedBytes format_bytes(ArrayRef<uint8_t> Bytes, Optional<uint64_t> FirstByteOffset = None, uint32_t NumPerLine = 16, uint8_t ByteGroupSize = 4, uint32_t IndentLevel = 0, bool Upper = false) { return FormattedBytes(Bytes, IndentLevel, FirstByteOffset, NumPerLine, ByteGroupSize, Upper, false); } inline FormattedBytes format_bytes_with_ascii(ArrayRef<uint8_t> Bytes, Optional<uint64_t> FirstByteOffset = None, uint32_t NumPerLine = 16, uint8_t ByteGroupSize = 4, uint32_t IndentLevel = 0, bool Upper = false) { return FormattedBytes(Bytes, IndentLevel, FirstByteOffset, NumPerLine, ByteGroupSize, Upper, true); } } # 27 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/FormatVariadicDetails.h" 1 # 13 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/FormatVariadicDetails.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/raw_ostream.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/raw_ostream.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/raw_ostream.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 3 # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/raw_ostream.h" 2 namespace llvm { class formatv_object_base; class format_object_base; class FormattedString; class FormattedNumber; class FormattedBytes; namespace sys { namespace fs { enum FileAccess : unsigned; enum OpenFlags : unsigned; enum CreationDisposition : unsigned; } } class raw_ostream { private: # 66 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/raw_ostream.h" char *OutBufStart, *OutBufEnd, *OutBufCur; bool ColorEnabled = false; raw_ostream *TiedStream = nullptr; enum class BufferKind { Unbuffered = 0, InternalBuffer, ExternalBuffer } BufferMode; public: enum class Colors { BLACK = 0, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, SAVEDCOLOR, RESET, }; static constexpr Colors BLACK = Colors::BLACK; static constexpr Colors RED = Colors::RED; static constexpr Colors GREEN = Colors::GREEN; static constexpr Colors YELLOW = Colors::YELLOW; static constexpr Colors BLUE = Colors::BLUE; static constexpr Colors MAGENTA = Colors::MAGENTA; static constexpr Colors CYAN = Colors::CYAN; static constexpr Colors WHITE = Colors::WHITE; static constexpr Colors SAVEDCOLOR = Colors::SAVEDCOLOR; static constexpr Colors RESET = Colors::RESET; explicit raw_ostream(bool unbuffered = false) : BufferMode(unbuffered ? BufferKind::Unbuffered : BufferKind::InternalBuffer) { OutBufStart = OutBufEnd = OutBufCur = nullptr; } raw_ostream(const raw_ostream &) = delete; void operator=(const raw_ostream &) = delete; virtual ~raw_ostream(); uint64_t tell() const { return current_pos() + GetNumBytesInBuffer(); } void SetBuffered(); void SetBufferSize(size_t Size) { flush(); SetBufferAndMode(new char[Size], Size, BufferKind::InternalBuffer); } size_t GetBufferSize() const { if (BufferMode != BufferKind::Unbuffered && OutBufStart == nullptr) return preferred_buffer_size(); return OutBufEnd - OutBufStart; } void SetUnbuffered() { flush(); SetBufferAndMode(nullptr, 0, BufferKind::Unbuffered); } size_t GetNumBytesInBuffer() const { return OutBufCur - OutBufStart; } void flush() { if (OutBufCur != OutBufStart) flush_nonempty(); } raw_ostream &operator<<(char C) { if (OutBufCur >= OutBufEnd) return write(C); *OutBufCur++ = C; return *this; } raw_ostream &operator<<(unsigned char C) { if (OutBufCur >= OutBufEnd) return write(C); *OutBufCur++ = C; return *this; } raw_ostream &operator<<(signed char C) { if (OutBufCur >= OutBufEnd) return write(C); *OutBufCur++ = C; return *this; } raw_ostream &operator<<(StringRef Str) { size_t Size = Str.size(); if (Size > (size_t)(OutBufEnd - OutBufCur)) return write(Str.data(), Size); if (Size) { memcpy(OutBufCur, Str.data(), Size); OutBufCur += Size; } return *this; } raw_ostream &operator<<(const char *Str) { return this->operator<<(StringRef(Str)); } raw_ostream &operator<<(const std::string &Str) { return write(Str.data(), Str.length()); } raw_ostream &operator<<(const SmallVectorImpl<char> &Str) { return write(Str.data(), Str.size()); } raw_ostream &operator<<(unsigned long N); raw_ostream &operator<<(long N); raw_ostream &operator<<(unsigned long long N); raw_ostream &operator<<(long long N); raw_ostream &operator<<(const void *P); raw_ostream &operator<<(unsigned int N) { return this->operator<<(static_cast<unsigned long>(N)); } raw_ostream &operator<<(int N) { return this->operator<<(static_cast<long>(N)); } raw_ostream &operator<<(double N); raw_ostream &write_hex(unsigned long long N); raw_ostream &operator<<(Colors C); using uuid_t = uint8_t[16]; raw_ostream &write_uuid(const uuid_t UUID); raw_ostream &write_escaped(StringRef Str, bool UseHexEscapes = false); raw_ostream &write(unsigned char C); raw_ostream &write(const char *Ptr, size_t Size); raw_ostream &operator<<(const format_object_base &Fmt); raw_ostream &operator<<(const FormattedString &); raw_ostream &operator<<(const FormattedNumber &); raw_ostream &operator<<(const formatv_object_base &); raw_ostream &operator<<(const FormattedBytes &); raw_ostream &indent(unsigned NumSpaces); raw_ostream &write_zeros(unsigned NumZeros); # 278 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/raw_ostream.h" virtual raw_ostream &changeColor(enum Colors Color, bool Bold = false, bool BG = false); virtual raw_ostream &resetColor(); virtual raw_ostream &reverseColor(); virtual bool is_displayed() const { return false; } virtual bool has_colors() const { return is_displayed(); } virtual void enable_colors(bool enable) { ColorEnabled = enable; } void tie(raw_ostream *TieTo) { TiedStream = TieTo; } private: # 323 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/raw_ostream.h" virtual void write_impl(const char *Ptr, size_t Size) = 0; virtual uint64_t current_pos() const = 0; protected: void SetBuffer(char *BufferStart, size_t Size) { SetBufferAndMode(BufferStart, Size, BufferKind::ExternalBuffer); } virtual size_t preferred_buffer_size() const; const char *getBufferStart() const { return OutBufStart; } private: void SetBufferAndMode(char *BufferStart, size_t Size, BufferKind Mode); void flush_nonempty(); void copy_to_buffer(const char *Ptr, size_t Size); bool prepare_colors(); void flush_tied_then_write(const char *Ptr, size_t Size); virtual void anchor(); }; template <typename OStream, typename T> std::enable_if_t<!std::is_reference<OStream>::value && std::is_base_of<raw_ostream, OStream>::value, OStream &&> operator<<(OStream &&OS, const T &Value) { OS << Value; return std::move(OS); } class raw_pwrite_stream : public raw_ostream { virtual void pwrite_impl(const char *Ptr, size_t Size, uint64_t Offset) = 0; void anchor() override; public: explicit raw_pwrite_stream(bool Unbuffered = false) : raw_ostream(Unbuffered) {} void pwrite(const char *Ptr, size_t Size, uint64_t Offset) { pwrite_impl(Ptr, Size, Offset); } }; class raw_fd_ostream : public raw_pwrite_stream { int FD; bool ShouldClose; bool SupportsSeeking = false; std::error_code EC; uint64_t pos = 0; void write_impl(const char *Ptr, size_t Size) override; void pwrite_impl(const char *Ptr, size_t Size, uint64_t Offset) override; uint64_t current_pos() const override { return pos; } size_t preferred_buffer_size() const override; void error_detected(std::error_code EC) { this->EC = EC; } void anchor() override; public: # 449 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/raw_ostream.h" raw_fd_ostream(StringRef Filename, std::error_code &EC); raw_fd_ostream(StringRef Filename, std::error_code &EC, sys::fs::CreationDisposition Disp); raw_fd_ostream(StringRef Filename, std::error_code &EC, sys::fs::FileAccess Access); raw_fd_ostream(StringRef Filename, std::error_code &EC, sys::fs::OpenFlags Flags); raw_fd_ostream(StringRef Filename, std::error_code &EC, sys::fs::CreationDisposition Disp, sys::fs::FileAccess Access, sys::fs::OpenFlags Flags); raw_fd_ostream(int fd, bool shouldClose, bool unbuffered=false); ~raw_fd_ostream() override; void close(); bool supportsSeeking() { return SupportsSeeking; } uint64_t seek(uint64_t off); bool is_displayed() const override; bool has_colors() const override; std::error_code error() const { return EC; } bool has_error() const { return bool(EC); } # 498 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/raw_ostream.h" void clear_error() { EC = std::error_code(); } }; raw_fd_ostream &outs(); raw_fd_ostream &errs(); raw_ostream &nulls(); class raw_string_ostream : public raw_ostream { std::string &OS; void write_impl(const char *Ptr, size_t Size) override; uint64_t current_pos() const override { return OS.size(); } public: explicit raw_string_ostream(std::string &O) : OS(O) { SetUnbuffered(); } ~raw_string_ostream() override; std::string& str() { flush(); return OS; } }; class raw_svector_ostream : public raw_pwrite_stream { SmallVectorImpl<char> &OS; void write_impl(const char *Ptr, size_t Size) override; void pwrite_impl(const char *Ptr, size_t Size, uint64_t Offset) override; uint64_t current_pos() const override; public: explicit raw_svector_ostream(SmallVectorImpl<char> &O) : OS(O) { SetUnbuffered(); } ~raw_svector_ostream() override = default; void flush() = delete; StringRef str() const { return StringRef(OS.data(), OS.size()); } }; class raw_null_ostream : public raw_pwrite_stream { void write_impl(const char *Ptr, size_t size) override; void pwrite_impl(const char *Ptr, size_t Size, uint64_t Offset) override; uint64_t current_pos() const override; public: explicit raw_null_ostream() = default; ~raw_null_ostream() override; }; class buffer_ostream : public raw_svector_ostream { raw_ostream &OS; SmallVector<char, 0> Buffer; virtual void anchor() override; public: buffer_ostream(raw_ostream &OS) : raw_svector_ostream(Buffer), OS(OS) {} ~buffer_ostream() override { OS << str(); } }; } # 14 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/FormatVariadicDetails.h" 2 namespace llvm { template <typename T, typename Enable = void> struct format_provider {}; class Error; namespace detail { class format_adapter { virtual void anchor(); protected: virtual ~format_adapter() {} public: virtual void format(raw_ostream &S, StringRef Options) = 0; }; template <typename T> class provider_format_adapter : public format_adapter { T Item; public: explicit provider_format_adapter(T &&Item) : Item(std::forward<T>(Item)) {} void format(llvm::raw_ostream &S, StringRef Options) override { format_provider<std::decay_t<T>>::format(Item, S, Options); } }; template <typename T> class stream_operator_format_adapter : public format_adapter { T Item; public: explicit stream_operator_format_adapter(T &&Item) : Item(std::forward<T>(Item)) {} void format(llvm::raw_ostream &S, StringRef Options) override { S << Item; } }; template <typename T> class missing_format_adapter; template <class T> class has_FormatProvider { public: using Decayed = std::decay_t<T>; typedef void (*Signature_format)(const Decayed &, llvm::raw_ostream &, StringRef); template <typename U> static char test(SameType<Signature_format, &U::format> *); template <typename U> static double test(...); static bool const value = (sizeof(test<llvm::format_provider<Decayed>>(nullptr)) == 1); }; template <class T> class has_StreamOperator { public: using ConstRefT = const std::decay_t<T> &; template <typename U> static char test( std::enable_if_t<std::is_same<decltype(std::declval<llvm::raw_ostream &>() << std::declval<U>()), llvm::raw_ostream &>::value, int *>); template <typename U> static double test(...); static bool const value = (sizeof(test<ConstRefT>(nullptr)) == 1); }; template <typename T> struct uses_format_member : public std::integral_constant< bool, std::is_base_of<format_adapter, std::remove_reference_t<T>>::value> { }; template <typename T> struct uses_format_provider : public std::integral_constant< bool, !uses_format_member<T>::value && has_FormatProvider<T>::value> { }; template <typename T> struct uses_stream_operator : public std::integral_constant<bool, !uses_format_member<T>::value && !uses_format_provider<T>::value && has_StreamOperator<T>::value> {}; template <typename T> struct uses_missing_provider : public std::integral_constant<bool, !uses_format_member<T>::value && !uses_format_provider<T>::value && !uses_stream_operator<T>::value> { }; template <typename T> std::enable_if_t<uses_format_member<T>::value, T> build_format_adapter(T &&Item) { return std::forward<T>(Item); } template <typename T> std::enable_if_t<uses_format_provider<T>::value, provider_format_adapter<T>> build_format_adapter(T &&Item) { return provider_format_adapter<T>(std::forward<T>(Item)); } template <typename T> std::enable_if_t<uses_stream_operator<T>::value, stream_operator_format_adapter<T>> build_format_adapter(T &&Item) { static_assert( !std::is_same<llvm::Error, std::remove_cv_t<T>>::value, "llvm::Error-by-value must be wrapped in fmt_consume() for formatv"); return stream_operator_format_adapter<T>(std::forward<T>(Item)); } template <typename T> std::enable_if_t<uses_missing_provider<T>::value, missing_format_adapter<T>> build_format_adapter(T &&Item) { return missing_format_adapter<T>(); } } } # 28 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Triple.h" 1 # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Triple.h" namespace llvm { class VersionTuple; # 45 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Triple.h" class Triple { public: enum ArchType { UnknownArch, arm, armeb, aarch64, aarch64_be, aarch64_32, arc, avr, bpfel, bpfeb, hexagon, mips, mipsel, mips64, mips64el, msp430, ppc, ppc64, ppc64le, r600, amdgcn, riscv32, riscv64, sparc, sparcv9, sparcel, systemz, tce, tcele, thumb, thumbeb, x86, x86_64, xcore, nvptx, nvptx64, le32, le64, amdil, amdil64, hsail, hsail64, spir, spir64, kalimba, shave, lanai, wasm32, wasm64, renderscript32, renderscript64, ve, LastArchType = ve }; enum SubArchType { NoSubArch, ARMSubArch_v8_6a, ARMSubArch_v8_5a, ARMSubArch_v8_4a, ARMSubArch_v8_3a, ARMSubArch_v8_2a, ARMSubArch_v8_1a, ARMSubArch_v8, ARMSubArch_v8r, ARMSubArch_v8m_baseline, ARMSubArch_v8m_mainline, ARMSubArch_v8_1m_mainline, ARMSubArch_v7, ARMSubArch_v7em, ARMSubArch_v7m, ARMSubArch_v7s, ARMSubArch_v7k, ARMSubArch_v7ve, ARMSubArch_v6, ARMSubArch_v6m, ARMSubArch_v6k, ARMSubArch_v6t2, ARMSubArch_v5, ARMSubArch_v5te, ARMSubArch_v4t, KalimbaSubArch_v3, KalimbaSubArch_v4, KalimbaSubArch_v5, MipsSubArch_r6, PPCSubArch_spe }; enum VendorType { UnknownVendor, Apple, PC, SCEI, BGP, BGQ, Freescale, IBM, ImaginationTechnologies, MipsTechnologies, NVIDIA, CSR, Myriad, AMD, Mesa, SUSE, OpenEmbedded, LastVendorType = OpenEmbedded }; enum OSType { UnknownOS, Ananas, CloudABI, Darwin, DragonFly, FreeBSD, Fuchsia, IOS, KFreeBSD, Linux, Lv2, MacOSX, NetBSD, OpenBSD, Solaris, Win32, Haiku, Minix, RTEMS, NaCl, CNK, AIX, CUDA, NVCL, AMDHSA, PS4, ELFIAMCU, TvOS, WatchOS, Mesa3D, Contiki, AMDPAL, HermitCore, Hurd, WASI, Emscripten, LastOSType = Emscripten }; enum EnvironmentType { UnknownEnvironment, GNU, GNUABIN32, GNUABI64, GNUEABI, GNUEABIHF, GNUX32, CODE16, EABI, EABIHF, Android, Musl, MuslEABI, MuslEABIHF, MSVC, Itanium, Cygnus, CoreCLR, Simulator, MacABI, LastEnvironmentType = MacABI }; enum ObjectFormatType { UnknownObjectFormat, COFF, ELF, MachO, Wasm, XCOFF, }; private: std::string Data; ArchType Arch; SubArchType SubArch; VendorType Vendor; OSType OS; EnvironmentType Environment; ObjectFormatType ObjectFormat; public: Triple() : Data(), Arch(), SubArch(), Vendor(), OS(), Environment(), ObjectFormat() {} explicit Triple(const Twine &Str); Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr); Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr, const Twine &EnvironmentStr); bool operator==(const Triple &Other) const { return Arch == Other.Arch && SubArch == Other.SubArch && Vendor == Other.Vendor && OS == Other.OS && Environment == Other.Environment && ObjectFormat == Other.ObjectFormat; } bool operator!=(const Triple &Other) const { return !(*this == Other); } # 290 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Triple.h" static std::string normalize(StringRef Str); std::string normalize() const { return normalize(Data); } ArchType getArch() const { return Arch; } SubArchType getSubArch() const { return SubArch; } VendorType getVendor() const { return Vendor; } OSType getOS() const { return OS; } bool hasEnvironment() const { return getEnvironmentName() != ""; } EnvironmentType getEnvironment() const { return Environment; } void getEnvironmentVersion(unsigned &Major, unsigned &Minor, unsigned &Micro) const; ObjectFormatType getObjectFormat() const { return ObjectFormat; } void getOSVersion(unsigned &Major, unsigned &Minor, unsigned &Micro) const; unsigned getOSMajorVersion() const { unsigned Maj, Min, Micro; getOSVersion(Maj, Min, Micro); return Maj; } bool getMacOSXVersion(unsigned &Major, unsigned &Minor, unsigned &Micro) const; void getiOSVersion(unsigned &Major, unsigned &Minor, unsigned &Micro) const; void getWatchOSVersion(unsigned &Major, unsigned &Minor, unsigned &Micro) const; const std::string &str() const { return Data; } const std::string &getTriple() const { return Data; } StringRef getArchName() const; StringRef getVendorName() const; StringRef getOSName() const; StringRef getEnvironmentName() const; StringRef getOSAndEnvironmentName() const; # 404 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Triple.h" bool isArch64Bit() const; bool isArch32Bit() const; bool isArch16Bit() const; bool isOSVersionLT(unsigned Major, unsigned Minor = 0, unsigned Micro = 0) const { unsigned LHS[3]; getOSVersion(LHS[0], LHS[1], LHS[2]); if (LHS[0] != Major) return LHS[0] < Major; if (LHS[1] != Minor) return LHS[1] < Minor; if (LHS[2] != Micro) return LHS[2] < Micro; return false; } bool isOSVersionLT(const Triple &Other) const { unsigned RHS[3]; Other.getOSVersion(RHS[0], RHS[1], RHS[2]); return isOSVersionLT(RHS[0], RHS[1], RHS[2]); } bool isMacOSXVersionLT(unsigned Major, unsigned Minor = 0, unsigned Micro = 0) const; bool isMacOSX() const { return getOS() == Triple::Darwin || getOS() == Triple::MacOSX; } bool isiOS() const { return getOS() == Triple::IOS || isTvOS(); } bool isTvOS() const { return getOS() == Triple::TvOS; } bool isWatchOS() const { return getOS() == Triple::WatchOS; } bool isWatchABI() const { return getSubArch() == Triple::ARMSubArch_v7k; } bool isOSDarwin() const { return isMacOSX() || isiOS() || isWatchOS(); } bool isSimulatorEnvironment() const { return getEnvironment() == Triple::Simulator; } bool isMacCatalystEnvironment() const { return getEnvironment() == Triple::MacABI; } bool isOSNetBSD() const { return getOS() == Triple::NetBSD; } bool isOSOpenBSD() const { return getOS() == Triple::OpenBSD; } bool isOSFreeBSD() const { return getOS() == Triple::FreeBSD; } bool isOSFuchsia() const { return getOS() == Triple::Fuchsia; } bool isOSDragonFly() const { return getOS() == Triple::DragonFly; } bool isOSSolaris() const { return getOS() == Triple::Solaris; } bool isOSIAMCU() const { return getOS() == Triple::ELFIAMCU; } bool isOSUnknown() const { return getOS() == Triple::UnknownOS; } bool isGNUEnvironment() const { EnvironmentType Env = getEnvironment(); return Env == Triple::GNU || Env == Triple::GNUABIN32 || Env == Triple::GNUABI64 || Env == Triple::GNUEABI || Env == Triple::GNUEABIHF || Env == Triple::GNUX32; } bool isOSContiki() const { return getOS() == Triple::Contiki; } bool isOSHaiku() const { return getOS() == Triple::Haiku; } bool isOSWindows() const { return getOS() == Triple::Win32; } bool isKnownWindowsMSVCEnvironment() const { return isOSWindows() && getEnvironment() == Triple::MSVC; } bool isWindowsMSVCEnvironment() const { return isKnownWindowsMSVCEnvironment() || (isOSWindows() && getEnvironment() == Triple::UnknownEnvironment); } bool isWindowsCoreCLREnvironment() const { return isOSWindows() && getEnvironment() == Triple::CoreCLR; } bool isWindowsItaniumEnvironment() const { return isOSWindows() && getEnvironment() == Triple::Itanium; } bool isWindowsCygwinEnvironment() const { return isOSWindows() && getEnvironment() == Triple::Cygnus; } bool isWindowsGNUEnvironment() const { return isOSWindows() && getEnvironment() == Triple::GNU; } bool isOSCygMing() const { return isWindowsCygwinEnvironment() || isWindowsGNUEnvironment(); } bool isOSMSVCRT() const { return isWindowsMSVCEnvironment() || isWindowsGNUEnvironment() || isWindowsItaniumEnvironment(); } bool isOSNaCl() const { return getOS() == Triple::NaCl; } bool isOSLinux() const { return getOS() == Triple::Linux; } bool isOSKFreeBSD() const { return getOS() == Triple::KFreeBSD; } bool isOSHurd() const { return getOS() == Triple::Hurd; } bool isOSWASI() const { return getOS() == Triple::WASI; } bool isOSEmscripten() const { return getOS() == Triple::Emscripten; } bool isOSGlibc() const { return (getOS() == Triple::Linux || getOS() == Triple::KFreeBSD || getOS() == Triple::Hurd) && !isAndroid(); } bool isOSAIX() const { return getOS() == Triple::AIX; } bool isOSBinFormatELF() const { return getObjectFormat() == Triple::ELF; } bool isOSBinFormatCOFF() const { return getObjectFormat() == Triple::COFF; } bool isOSBinFormatMachO() const { return getObjectFormat() == Triple::MachO; } bool isOSBinFormatWasm() const { return getObjectFormat() == Triple::Wasm; } bool isOSBinFormatXCOFF() const { return getObjectFormat() == Triple::XCOFF; } bool isPS4CPU() const { return getArch() == Triple::x86_64 && getVendor() == Triple::SCEI && getOS() == Triple::PS4; } bool isPS4() const { return getVendor() == Triple::SCEI && getOS() == Triple::PS4; } bool isAndroid() const { return getEnvironment() == Triple::Android; } bool isAndroidVersionLT(unsigned Major) const { (static_cast<void> (0)); unsigned Env[3]; getEnvironmentVersion(Env[0], Env[1], Env[2]); if (isArch64Bit() && Env[0] < 21) Env[0] = 21; return Env[0] < Major; } bool isMusl() const { return getEnvironment() == Triple::Musl || getEnvironment() == Triple::MuslEABI || getEnvironment() == Triple::MuslEABIHF; } bool isSPIR() const { return getArch() == Triple::spir || getArch() == Triple::spir64; } bool isNVPTX() const { return getArch() == Triple::nvptx || getArch() == Triple::nvptx64; } bool isAMDGCN() const { return getArch() == Triple::amdgcn; } bool isAMDGPU() const { return getArch() == Triple::r600 || getArch() == Triple::amdgcn; } bool isThumb() const { return getArch() == Triple::thumb || getArch() == Triple::thumbeb; } bool isARM() const { return getArch() == Triple::arm || getArch() == Triple::armeb; } bool isAArch64() const { return getArch() == Triple::aarch64 || getArch() == Triple::aarch64_be; } bool isMIPS32() const { return getArch() == Triple::mips || getArch() == Triple::mipsel; } bool isMIPS64() const { return getArch() == Triple::mips64 || getArch() == Triple::mips64el; } bool isMIPS() const { return isMIPS32() || isMIPS64(); } bool isPPC64() const { return getArch() == Triple::ppc64 || getArch() == Triple::ppc64le; } bool isRISCV() const { return getArch() == Triple::riscv32 || getArch() == Triple::riscv64; } bool isSystemZ() const { return getArch() == Triple::systemz; } bool isX86() const { return getArch() == Triple::x86 || getArch() == Triple::x86_64; } bool isVE() const { return getArch() == Triple::ve; } bool isWasm() const { return getArch() == Triple::wasm32 || getArch() == Triple::wasm64; } bool supportsCOMDAT() const { return !(isOSBinFormatMachO() || isOSBinFormatXCOFF()); } bool hasDefaultEmulatedTLS() const { return isAndroid() || isOSOpenBSD() || isWindowsCygwinEnvironment(); } void setArch(ArchType Kind); void setVendor(VendorType Kind); void setOS(OSType Kind); void setEnvironment(EnvironmentType Kind); void setObjectFormat(ObjectFormatType Kind); void setTriple(const Twine &Str); void setArchName(StringRef Str); void setVendorName(StringRef Str); void setOSName(StringRef Str); void setEnvironmentName(StringRef Str); void setOSAndEnvironmentName(StringRef Str); # 820 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/Triple.h" llvm::Triple get32BitArchVariant() const; llvm::Triple get64BitArchVariant() const; llvm::Triple getBigEndianArchVariant() const; llvm::Triple getLittleEndianArchVariant() const; StringRef getARMCPUForArch(StringRef Arch = StringRef()) const; bool isLittleEndian() const; bool isCompatibleWith(const Triple &Other) const; std::string merge(const Triple &Other) const; VersionTuple getMinimumSupportedOSVersion() const; static StringRef getArchTypeName(ArchType Kind); static StringRef getArchTypePrefix(ArchType Kind); static StringRef getVendorTypeName(VendorType Kind); static StringRef getOSTypeName(OSType Kind); static StringRef getEnvironmentTypeName(EnvironmentType Kind); static ArchType getArchTypeForLLVMName(StringRef Str); static VersionTuple getCanonicalVersionForOS(OSType OSKind, const VersionTuple &Version); }; } # 29 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 namespace llvm { class StringRef; namespace dwarf { # 43 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" enum LLVMConstants : uint32_t { DW_TAG_invalid = ~0U, DW_VIRTUALITY_invalid = ~0U, DW_MACINFO_invalid = ~0U, DW_LENGTH_lo_reserved = 0xfffffff0, DW_LENGTH_DWARF64 = 0xffffffff, DW_LENGTH_hi_reserved = 0xffffffff, DWARF_VERSION = 4, DW_PUBTYPES_VERSION = 2, DW_PUBNAMES_VERSION = 2, DW_ARANGES_VERSION = 2, DWARF_VENDOR_DWARF = 0, DWARF_VENDOR_APPLE = 1, DWARF_VENDOR_BORLAND = 2, DWARF_VENDOR_GNU = 3, DWARF_VENDOR_GOOGLE = 4, DWARF_VENDOR_LLVM = 5, DWARF_VENDOR_MIPS = 6, DWARF_VENDOR_WASM = 7 }; enum DwarfFormat : uint8_t { DWARF32, DWARF64 }; const uint32_t DW_CIE_ID = (4294967295U); const uint64_t DW64_CIE_ID = (18446744073709551615UL); const uint32_t DW_INVALID_OFFSET = (4294967295U); enum Tag : uint16_t { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 135 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_TAG_null = 0x0000, DW_TAG_array_type = 0x0001, DW_TAG_class_type = 0x0002, DW_TAG_entry_point = 0x0003, DW_TAG_enumeration_type = 0x0004, DW_TAG_formal_parameter = 0x0005, DW_TAG_imported_declaration = 0x0008, DW_TAG_label = 0x000a, DW_TAG_lexical_block = 0x000b, DW_TAG_member = 0x000d, DW_TAG_pointer_type = 0x000f, DW_TAG_reference_type = 0x0010, DW_TAG_compile_unit = 0x0011, DW_TAG_string_type = 0x0012, DW_TAG_structure_type = 0x0013, DW_TAG_subroutine_type = 0x0015, DW_TAG_typedef = 0x0016, DW_TAG_union_type = 0x0017, DW_TAG_unspecified_parameters = 0x0018, DW_TAG_variant = 0x0019, DW_TAG_common_block = 0x001a, DW_TAG_common_inclusion = 0x001b, DW_TAG_inheritance = 0x001c, DW_TAG_inlined_subroutine = 0x001d, DW_TAG_module = 0x001e, DW_TAG_ptr_to_member_type = 0x001f, DW_TAG_set_type = 0x0020, DW_TAG_subrange_type = 0x0021, DW_TAG_with_stmt = 0x0022, DW_TAG_access_declaration = 0x0023, DW_TAG_base_type = 0x0024, DW_TAG_catch_block = 0x0025, DW_TAG_const_type = 0x0026, DW_TAG_constant = 0x0027, DW_TAG_enumerator = 0x0028, DW_TAG_file_type = 0x0029, DW_TAG_friend = 0x002a, DW_TAG_namelist = 0x002b, DW_TAG_namelist_item = 0x002c, DW_TAG_packed_type = 0x002d, DW_TAG_subprogram = 0x002e, DW_TAG_template_type_parameter = 0x002f, DW_TAG_template_value_parameter = 0x0030, DW_TAG_thrown_type = 0x0031, DW_TAG_try_block = 0x0032, DW_TAG_variant_part = 0x0033, DW_TAG_variable = 0x0034, DW_TAG_volatile_type = 0x0035, DW_TAG_dwarf_procedure = 0x0036, DW_TAG_restrict_type = 0x0037, DW_TAG_interface_type = 0x0038, DW_TAG_namespace = 0x0039, DW_TAG_imported_module = 0x003a, DW_TAG_unspecified_type = 0x003b, DW_TAG_partial_unit = 0x003c, DW_TAG_imported_unit = 0x003d, DW_TAG_condition = 0x003f, DW_TAG_shared_type = 0x0040, DW_TAG_type_unit = 0x0041, DW_TAG_rvalue_reference_type = 0x0042, DW_TAG_template_alias = 0x0043, DW_TAG_coarray_type = 0x0044, DW_TAG_generic_subrange = 0x0045, DW_TAG_dynamic_type = 0x0046, DW_TAG_atomic_type = 0x0047, DW_TAG_call_site = 0x0048, DW_TAG_call_site_parameter = 0x0049, DW_TAG_skeleton_unit = 0x004a, DW_TAG_immutable_type = 0x004b, DW_TAG_MIPS_loop = 0x4081, DW_TAG_format_label = 0x4101, DW_TAG_function_template = 0x4102, DW_TAG_class_template = 0x4103, DW_TAG_GNU_template_template_param = 0x4106, DW_TAG_GNU_template_parameter_pack = 0x4107, DW_TAG_GNU_formal_parameter_pack = 0x4108, DW_TAG_GNU_call_site = 0x4109, DW_TAG_GNU_call_site_parameter = 0x410a, DW_TAG_APPLE_property = 0x4200, DW_TAG_BORLAND_property = 0xb000, DW_TAG_BORLAND_Delphi_string = 0xb001, DW_TAG_BORLAND_Delphi_dynamic_array = 0xb002, DW_TAG_BORLAND_Delphi_set = 0xb003, DW_TAG_BORLAND_Delphi_variant = 0xb004, # 86 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_TAG_lo_user = 0x4080, DW_TAG_hi_user = 0xffff, DW_TAG_user_base = 0x1000 }; inline bool isType(Tag T) { switch (T) { default: return false; # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 135 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" case DW_TAG_null: return (0 == 1); case DW_TAG_array_type: return (1 == 1); case DW_TAG_class_type: return (1 == 1); case DW_TAG_entry_point: return (0 == 1); case DW_TAG_enumeration_type: return (1 == 1); case DW_TAG_formal_parameter: return (0 == 1); case DW_TAG_imported_declaration: return (0 == 1); case DW_TAG_label: return (0 == 1); case DW_TAG_lexical_block: return (0 == 1); case DW_TAG_member: return (0 == 1); case DW_TAG_pointer_type: return (1 == 1); case DW_TAG_reference_type: return (1 == 1); case DW_TAG_compile_unit: return (0 == 1); case DW_TAG_string_type: return (1 == 1); case DW_TAG_structure_type: return (1 == 1); case DW_TAG_subroutine_type: return (1 == 1); case DW_TAG_typedef: return (1 == 1); case DW_TAG_union_type: return (1 == 1); case DW_TAG_unspecified_parameters: return (0 == 1); case DW_TAG_variant: return (0 == 1); case DW_TAG_common_block: return (0 == 1); case DW_TAG_common_inclusion: return (0 == 1); case DW_TAG_inheritance: return (0 == 1); case DW_TAG_inlined_subroutine: return (0 == 1); case DW_TAG_module: return (0 == 1); case DW_TAG_ptr_to_member_type: return (1 == 1); case DW_TAG_set_type: return (0 == 1); case DW_TAG_subrange_type: return (1 == 1); case DW_TAG_with_stmt: return (0 == 1); case DW_TAG_access_declaration: return (0 == 1); case DW_TAG_base_type: return (1 == 1); case DW_TAG_catch_block: return (0 == 1); case DW_TAG_const_type: return (1 == 1); case DW_TAG_constant: return (0 == 1); case DW_TAG_enumerator: return (0 == 1); case DW_TAG_file_type: return (1 == 1); case DW_TAG_friend: return (0 == 1); case DW_TAG_namelist: return (0 == 1); case DW_TAG_namelist_item: return (0 == 1); case DW_TAG_packed_type: return (1 == 1); case DW_TAG_subprogram: return (0 == 1); case DW_TAG_template_type_parameter: return (0 == 1); case DW_TAG_template_value_parameter: return (0 == 1); case DW_TAG_thrown_type: return (1 == 1); case DW_TAG_try_block: return (0 == 1); case DW_TAG_variant_part: return (0 == 1); case DW_TAG_variable: return (0 == 1); case DW_TAG_volatile_type: return (1 == 1); case DW_TAG_dwarf_procedure: return (0 == 1); case DW_TAG_restrict_type: return (1 == 1); case DW_TAG_interface_type: return (1 == 1); case DW_TAG_namespace: return (0 == 1); case DW_TAG_imported_module: return (0 == 1); case DW_TAG_unspecified_type: return (1 == 1); case DW_TAG_partial_unit: return (0 == 1); case DW_TAG_imported_unit: return (0 == 1); case DW_TAG_condition: return (0 == 1); case DW_TAG_shared_type: return (1 == 1); case DW_TAG_type_unit: return (0 == 1); case DW_TAG_rvalue_reference_type: return (1 == 1); case DW_TAG_template_alias: return (0 == 1); case DW_TAG_coarray_type: return (1 == 1); case DW_TAG_generic_subrange: return (0 == 1); case DW_TAG_dynamic_type: return (1 == 1); case DW_TAG_atomic_type: return (1 == 1); case DW_TAG_call_site: return (0 == 1); case DW_TAG_call_site_parameter: return (0 == 1); case DW_TAG_skeleton_unit: return (0 == 1); case DW_TAG_immutable_type: return (1 == 1); case DW_TAG_MIPS_loop: return (0 == 1); case DW_TAG_format_label: return (0 == 1); case DW_TAG_function_template: return (0 == 1); case DW_TAG_class_template: return (0 == 1); case DW_TAG_GNU_template_template_param: return (0 == 1); case DW_TAG_GNU_template_parameter_pack: return (0 == 1); case DW_TAG_GNU_formal_parameter_pack: return (0 == 1); case DW_TAG_GNU_call_site: return (0 == 1); case DW_TAG_GNU_call_site_parameter: return (0 == 1); case DW_TAG_APPLE_property: return (0 == 1); case DW_TAG_BORLAND_property: return (0 == 1); case DW_TAG_BORLAND_Delphi_string: return (1 == 1); case DW_TAG_BORLAND_Delphi_dynamic_array: return (1 == 1); case DW_TAG_BORLAND_Delphi_set: return (1 == 1); case DW_TAG_BORLAND_Delphi_variant: return (1 == 1); # 99 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 } } enum Attribute : uint16_t { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 225 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_AT_sibling = 0x01, DW_AT_location = 0x02, DW_AT_name = 0x03, DW_AT_ordering = 0x09, DW_AT_byte_size = 0x0b, DW_AT_bit_offset = 0x0c, DW_AT_bit_size = 0x0d, DW_AT_stmt_list = 0x10, DW_AT_low_pc = 0x11, DW_AT_high_pc = 0x12, DW_AT_language = 0x13, DW_AT_discr = 0x15, DW_AT_discr_value = 0x16, DW_AT_visibility = 0x17, DW_AT_import = 0x18, DW_AT_string_length = 0x19, DW_AT_common_reference = 0x1a, DW_AT_comp_dir = 0x1b, DW_AT_const_value = 0x1c, DW_AT_containing_type = 0x1d, DW_AT_default_value = 0x1e, DW_AT_inline = 0x20, DW_AT_is_optional = 0x21, DW_AT_lower_bound = 0x22, DW_AT_producer = 0x25, DW_AT_prototyped = 0x27, DW_AT_return_addr = 0x2a, DW_AT_start_scope = 0x2c, DW_AT_bit_stride = 0x2e, DW_AT_upper_bound = 0x2f, DW_AT_abstract_origin = 0x31, DW_AT_accessibility = 0x32, DW_AT_address_class = 0x33, DW_AT_artificial = 0x34, DW_AT_base_types = 0x35, DW_AT_calling_convention = 0x36, DW_AT_count = 0x37, DW_AT_data_member_location = 0x38, DW_AT_decl_column = 0x39, DW_AT_decl_file = 0x3a, DW_AT_decl_line = 0x3b, DW_AT_declaration = 0x3c, DW_AT_discr_list = 0x3d, DW_AT_encoding = 0x3e, DW_AT_external = 0x3f, DW_AT_frame_base = 0x40, DW_AT_friend = 0x41, DW_AT_identifier_case = 0x42, DW_AT_macro_info = 0x43, DW_AT_namelist_item = 0x44, DW_AT_priority = 0x45, DW_AT_segment = 0x46, DW_AT_specification = 0x47, DW_AT_static_link = 0x48, DW_AT_type = 0x49, DW_AT_use_location = 0x4a, DW_AT_variable_parameter = 0x4b, DW_AT_virtuality = 0x4c, DW_AT_vtable_elem_location = 0x4d, DW_AT_allocated = 0x4e, DW_AT_associated = 0x4f, DW_AT_data_location = 0x50, DW_AT_byte_stride = 0x51, DW_AT_entry_pc = 0x52, DW_AT_use_UTF8 = 0x53, DW_AT_extension = 0x54, DW_AT_ranges = 0x55, DW_AT_trampoline = 0x56, DW_AT_call_column = 0x57, DW_AT_call_file = 0x58, DW_AT_call_line = 0x59, DW_AT_description = 0x5a, DW_AT_binary_scale = 0x5b, DW_AT_decimal_scale = 0x5c, DW_AT_small = 0x5d, DW_AT_decimal_sign = 0x5e, DW_AT_digit_count = 0x5f, DW_AT_picture_string = 0x60, DW_AT_mutable = 0x61, DW_AT_threads_scaled = 0x62, DW_AT_explicit = 0x63, DW_AT_object_pointer = 0x64, DW_AT_endianity = 0x65, DW_AT_elemental = 0x66, DW_AT_pure = 0x67, DW_AT_recursive = 0x68, DW_AT_signature = 0x69, DW_AT_main_subprogram = 0x6a, DW_AT_data_bit_offset = 0x6b, DW_AT_const_expr = 0x6c, DW_AT_enum_class = 0x6d, DW_AT_linkage_name = 0x6e, DW_AT_string_length_bit_size = 0x6f, DW_AT_string_length_byte_size = 0x70, DW_AT_rank = 0x71, DW_AT_str_offsets_base = 0x72, DW_AT_addr_base = 0x73, DW_AT_rnglists_base = 0x74, DW_AT_dwo_id = 0x75, DW_AT_dwo_name = 0x76, DW_AT_reference = 0x77, DW_AT_rvalue_reference = 0x78, DW_AT_macros = 0x79, DW_AT_call_all_calls = 0x7a, DW_AT_call_all_source_calls = 0x7b, DW_AT_call_all_tail_calls = 0x7c, DW_AT_call_return_pc = 0x7d, DW_AT_call_value = 0x7e, DW_AT_call_origin = 0x7f, DW_AT_call_parameter = 0x80, DW_AT_call_pc = 0x81, DW_AT_call_tail_call = 0x82, DW_AT_call_target = 0x83, DW_AT_call_target_clobbered = 0x84, DW_AT_call_data_location = 0x85, DW_AT_call_data_value = 0x86, DW_AT_noreturn = 0x87, DW_AT_alignment = 0x88, DW_AT_export_symbols = 0x89, DW_AT_deleted = 0x8a, DW_AT_defaulted = 0x8b, DW_AT_loclists_base = 0x8c, DW_AT_MIPS_loop_begin = 0x2002, DW_AT_MIPS_tail_loop_begin = 0x2003, DW_AT_MIPS_epilog_begin = 0x2004, DW_AT_MIPS_loop_unroll_factor = 0x2005, DW_AT_MIPS_software_pipeline_depth = 0x2006, DW_AT_MIPS_linkage_name = 0x2007, DW_AT_MIPS_stride = 0x2008, DW_AT_MIPS_abstract_name = 0x2009, DW_AT_MIPS_clone_origin = 0x200a, DW_AT_MIPS_has_inlines = 0x200b, DW_AT_MIPS_stride_byte = 0x200c, DW_AT_MIPS_stride_elem = 0x200d, DW_AT_MIPS_ptr_dopetype = 0x200e, DW_AT_MIPS_allocatable_dopetype = 0x200f, DW_AT_MIPS_assumed_shape_dopetype = 0x2010, DW_AT_MIPS_assumed_size = 0x2011, DW_AT_sf_names = 0x2101, DW_AT_src_info = 0x2102, DW_AT_mac_info = 0x2103, DW_AT_src_coords = 0x2104, DW_AT_body_begin = 0x2105, DW_AT_body_end = 0x2106, DW_AT_GNU_vector = 0x2107, DW_AT_GNU_template_name = 0x2110, DW_AT_GNU_odr_signature = 0x210f, DW_AT_GNU_call_site_value = 0x2111, DW_AT_GNU_call_site_data_value = 0x2112, DW_AT_GNU_call_site_target = 0x2113, DW_AT_GNU_call_site_target_clobbered = 0x2114, DW_AT_GNU_tail_call = 0x2115, DW_AT_GNU_all_tail_call_sites = 0x2116, DW_AT_GNU_all_call_sites = 0x2117, DW_AT_GNU_all_source_call_sites = 0x2118, DW_AT_GNU_macros = 0x2119, DW_AT_GNU_dwo_name = 0x2130, DW_AT_GNU_dwo_id = 0x2131, DW_AT_GNU_ranges_base = 0x2132, DW_AT_GNU_addr_base = 0x2133, DW_AT_GNU_pubnames = 0x2134, DW_AT_GNU_pubtypes = 0x2135, DW_AT_GNU_discriminator = 0x2136, DW_AT_BORLAND_property_read = 0x3b11, DW_AT_BORLAND_property_write = 0x3b12, DW_AT_BORLAND_property_implements = 0x3b13, DW_AT_BORLAND_property_index = 0x3b14, DW_AT_BORLAND_property_default = 0x3b15, DW_AT_BORLAND_Delphi_unit = 0x3b20, DW_AT_BORLAND_Delphi_class = 0x3b21, DW_AT_BORLAND_Delphi_record = 0x3b22, DW_AT_BORLAND_Delphi_metaclass = 0x3b23, DW_AT_BORLAND_Delphi_constructor = 0x3b24, DW_AT_BORLAND_Delphi_destructor = 0x3b25, DW_AT_BORLAND_Delphi_anonymous_method = 0x3b26, DW_AT_BORLAND_Delphi_interface = 0x3b27, DW_AT_BORLAND_Delphi_ABI = 0x3b28, DW_AT_BORLAND_Delphi_return = 0x3b29, DW_AT_BORLAND_Delphi_frameptr = 0x3b30, DW_AT_BORLAND_closure = 0x3b31, DW_AT_LLVM_include_path = 0x3e00, DW_AT_LLVM_config_macros = 0x3e01, DW_AT_LLVM_sysroot = 0x3e02, DW_AT_LLVM_tag_offset = 0x3e03, DW_AT_LLVM_apinotes = 0x3e07, DW_AT_APPLE_optimized = 0x3fe1, DW_AT_APPLE_flags = 0x3fe2, DW_AT_APPLE_isa = 0x3fe3, DW_AT_APPLE_block = 0x3fe4, DW_AT_APPLE_major_runtime_vers = 0x3fe5, DW_AT_APPLE_runtime_class = 0x3fe6, DW_AT_APPLE_omit_frame_ptr = 0x3fe7, DW_AT_APPLE_property_name = 0x3fe8, DW_AT_APPLE_property_getter = 0x3fe9, DW_AT_APPLE_property_setter = 0x3fea, DW_AT_APPLE_property_attribute = 0x3feb, DW_AT_APPLE_objc_complete_type = 0x3fec, DW_AT_APPLE_property = 0x3fed, DW_AT_APPLE_objc_direct = 0x3fee, DW_AT_APPLE_sdk = 0x3fef, # 106 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_AT_lo_user = 0x2000, DW_AT_hi_user = 0x3fff, }; enum Form : uint16_t { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 441 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_FORM_addr = 0x01, DW_FORM_block2 = 0x03, DW_FORM_block4 = 0x04, DW_FORM_data2 = 0x05, DW_FORM_data4 = 0x06, DW_FORM_data8 = 0x07, DW_FORM_string = 0x08, DW_FORM_block = 0x09, DW_FORM_block1 = 0x0a, DW_FORM_data1 = 0x0b, DW_FORM_flag = 0x0c, DW_FORM_sdata = 0x0d, DW_FORM_strp = 0x0e, DW_FORM_udata = 0x0f, DW_FORM_ref_addr = 0x10, DW_FORM_ref1 = 0x11, DW_FORM_ref2 = 0x12, DW_FORM_ref4 = 0x13, DW_FORM_ref8 = 0x14, DW_FORM_ref_udata = 0x15, DW_FORM_indirect = 0x16, DW_FORM_sec_offset = 0x17, DW_FORM_exprloc = 0x18, DW_FORM_flag_present = 0x19, DW_FORM_ref_sig8 = 0x20, DW_FORM_strx = 0x1a, DW_FORM_addrx = 0x1b, DW_FORM_ref_sup4 = 0x1c, DW_FORM_strp_sup = 0x1d, DW_FORM_data16 = 0x1e, DW_FORM_line_strp = 0x1f, DW_FORM_implicit_const = 0x21, DW_FORM_loclistx = 0x22, DW_FORM_rnglistx = 0x23, DW_FORM_ref_sup8 = 0x24, DW_FORM_strx1 = 0x25, DW_FORM_strx2 = 0x26, DW_FORM_strx3 = 0x27, DW_FORM_strx4 = 0x28, DW_FORM_addrx1 = 0x29, DW_FORM_addrx2 = 0x2a, DW_FORM_addrx3 = 0x2b, DW_FORM_addrx4 = 0x2c, DW_FORM_GNU_addr_index = 0x1f01, DW_FORM_GNU_str_index = 0x1f02, DW_FORM_GNU_ref_alt = 0x1f20, DW_FORM_GNU_strp_alt = 0x1f21, # 113 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_FORM_lo_user = 0x1f00, }; enum LocationAtom { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 495 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_OP_addr = 0x03, DW_OP_deref = 0x06, DW_OP_const1u = 0x08, DW_OP_const1s = 0x09, DW_OP_const2u = 0x0a, DW_OP_const2s = 0x0b, DW_OP_const4u = 0x0c, DW_OP_const4s = 0x0d, DW_OP_const8u = 0x0e, DW_OP_const8s = 0x0f, DW_OP_constu = 0x10, DW_OP_consts = 0x11, DW_OP_dup = 0x12, DW_OP_drop = 0x13, DW_OP_over = 0x14, DW_OP_pick = 0x15, DW_OP_swap = 0x16, DW_OP_rot = 0x17, DW_OP_xderef = 0x18, DW_OP_abs = 0x19, DW_OP_and = 0x1a, DW_OP_div = 0x1b, DW_OP_minus = 0x1c, DW_OP_mod = 0x1d, DW_OP_mul = 0x1e, DW_OP_neg = 0x1f, DW_OP_not = 0x20, DW_OP_or = 0x21, DW_OP_plus = 0x22, DW_OP_plus_uconst = 0x23, DW_OP_shl = 0x24, DW_OP_shr = 0x25, DW_OP_shra = 0x26, DW_OP_xor = 0x27, DW_OP_bra = 0x28, DW_OP_eq = 0x29, DW_OP_ge = 0x2a, DW_OP_gt = 0x2b, DW_OP_le = 0x2c, DW_OP_lt = 0x2d, DW_OP_ne = 0x2e, DW_OP_skip = 0x2f, DW_OP_lit0 = 0x30, DW_OP_lit1 = 0x31, DW_OP_lit2 = 0x32, DW_OP_lit3 = 0x33, DW_OP_lit4 = 0x34, DW_OP_lit5 = 0x35, DW_OP_lit6 = 0x36, DW_OP_lit7 = 0x37, DW_OP_lit8 = 0x38, DW_OP_lit9 = 0x39, DW_OP_lit10 = 0x3a, DW_OP_lit11 = 0x3b, DW_OP_lit12 = 0x3c, DW_OP_lit13 = 0x3d, DW_OP_lit14 = 0x3e, DW_OP_lit15 = 0x3f, DW_OP_lit16 = 0x40, DW_OP_lit17 = 0x41, DW_OP_lit18 = 0x42, DW_OP_lit19 = 0x43, DW_OP_lit20 = 0x44, DW_OP_lit21 = 0x45, DW_OP_lit22 = 0x46, DW_OP_lit23 = 0x47, DW_OP_lit24 = 0x48, DW_OP_lit25 = 0x49, DW_OP_lit26 = 0x4a, DW_OP_lit27 = 0x4b, DW_OP_lit28 = 0x4c, DW_OP_lit29 = 0x4d, DW_OP_lit30 = 0x4e, DW_OP_lit31 = 0x4f, DW_OP_reg0 = 0x50, DW_OP_reg1 = 0x51, DW_OP_reg2 = 0x52, DW_OP_reg3 = 0x53, DW_OP_reg4 = 0x54, DW_OP_reg5 = 0x55, DW_OP_reg6 = 0x56, DW_OP_reg7 = 0x57, DW_OP_reg8 = 0x58, DW_OP_reg9 = 0x59, DW_OP_reg10 = 0x5a, DW_OP_reg11 = 0x5b, DW_OP_reg12 = 0x5c, DW_OP_reg13 = 0x5d, DW_OP_reg14 = 0x5e, DW_OP_reg15 = 0x5f, DW_OP_reg16 = 0x60, DW_OP_reg17 = 0x61, DW_OP_reg18 = 0x62, DW_OP_reg19 = 0x63, DW_OP_reg20 = 0x64, DW_OP_reg21 = 0x65, DW_OP_reg22 = 0x66, DW_OP_reg23 = 0x67, DW_OP_reg24 = 0x68, DW_OP_reg25 = 0x69, DW_OP_reg26 = 0x6a, DW_OP_reg27 = 0x6b, DW_OP_reg28 = 0x6c, DW_OP_reg29 = 0x6d, DW_OP_reg30 = 0x6e, DW_OP_reg31 = 0x6f, DW_OP_breg0 = 0x70, DW_OP_breg1 = 0x71, DW_OP_breg2 = 0x72, DW_OP_breg3 = 0x73, DW_OP_breg4 = 0x74, DW_OP_breg5 = 0x75, DW_OP_breg6 = 0x76, DW_OP_breg7 = 0x77, DW_OP_breg8 = 0x78, DW_OP_breg9 = 0x79, DW_OP_breg10 = 0x7a, DW_OP_breg11 = 0x7b, DW_OP_breg12 = 0x7c, DW_OP_breg13 = 0x7d, DW_OP_breg14 = 0x7e, DW_OP_breg15 = 0x7f, DW_OP_breg16 = 0x80, DW_OP_breg17 = 0x81, DW_OP_breg18 = 0x82, DW_OP_breg19 = 0x83, DW_OP_breg20 = 0x84, DW_OP_breg21 = 0x85, DW_OP_breg22 = 0x86, DW_OP_breg23 = 0x87, DW_OP_breg24 = 0x88, DW_OP_breg25 = 0x89, DW_OP_breg26 = 0x8a, DW_OP_breg27 = 0x8b, DW_OP_breg28 = 0x8c, DW_OP_breg29 = 0x8d, DW_OP_breg30 = 0x8e, DW_OP_breg31 = 0x8f, DW_OP_regx = 0x90, DW_OP_fbreg = 0x91, DW_OP_bregx = 0x92, DW_OP_piece = 0x93, DW_OP_deref_size = 0x94, DW_OP_xderef_size = 0x95, DW_OP_nop = 0x96, DW_OP_push_object_address = 0x97, DW_OP_call2 = 0x98, DW_OP_call4 = 0x99, DW_OP_call_ref = 0x9a, DW_OP_form_tls_address = 0x9b, DW_OP_call_frame_cfa = 0x9c, DW_OP_bit_piece = 0x9d, DW_OP_implicit_value = 0x9e, DW_OP_stack_value = 0x9f, DW_OP_implicit_pointer = 0xa0, DW_OP_addrx = 0xa1, DW_OP_constx = 0xa2, DW_OP_entry_value = 0xa3, DW_OP_const_type = 0xa4, DW_OP_regval_type = 0xa5, DW_OP_deref_type = 0xa6, DW_OP_xderef_type = 0xa7, DW_OP_convert = 0xa8, DW_OP_reinterpret = 0xa9, DW_OP_GNU_push_tls_address = 0xe0, DW_OP_WASM_location = 0xed, DW_OP_WASM_location_int = 0xee, DW_OP_GNU_entry_value = 0xf3, DW_OP_GNU_addr_index = 0xfb, DW_OP_GNU_const_index = 0xfc, # 119 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_OP_lo_user = 0xe0, DW_OP_hi_user = 0xff, DW_OP_LLVM_fragment = 0x1000, DW_OP_LLVM_convert = 0x1001, DW_OP_LLVM_tag_offset = 0x1002, DW_OP_LLVM_entry_value = 0x1003, }; enum TypeKind : uint8_t { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 721 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_ATE_address = 0x01, DW_ATE_boolean = 0x02, DW_ATE_complex_float = 0x03, DW_ATE_float = 0x04, DW_ATE_signed = 0x05, DW_ATE_signed_char = 0x06, DW_ATE_unsigned = 0x07, DW_ATE_unsigned_char = 0x08, DW_ATE_imaginary_float = 0x09, DW_ATE_packed_decimal = 0x0a, DW_ATE_numeric_string = 0x0b, DW_ATE_edited = 0x0c, DW_ATE_signed_fixed = 0x0d, DW_ATE_unsigned_fixed = 0x0e, DW_ATE_decimal_float = 0x0f, DW_ATE_UTF = 0x10, DW_ATE_UCS = 0x11, DW_ATE_ASCII = 0x12, # 130 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_ATE_lo_user = 0x80, DW_ATE_hi_user = 0xff }; enum DecimalSignEncoding { DW_DS_unsigned = 0x01, DW_DS_leading_overpunch = 0x02, DW_DS_trailing_overpunch = 0x03, DW_DS_leading_separate = 0x04, DW_DS_trailing_separate = 0x05 }; enum EndianityEncoding { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 744 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_END_default = 0x00, DW_END_big = 0x01, DW_END_little = 0x02, # 147 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_END_lo_user = 0x40, DW_END_hi_user = 0xff }; enum AccessAttribute { DW_ACCESS_public = 0x01, DW_ACCESS_protected = 0x02, DW_ACCESS_private = 0x03 }; enum VisibilityAttribute { DW_VIS_local = 0x01, DW_VIS_exported = 0x02, DW_VIS_qualified = 0x03 }; enum VirtualityAttribute { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 749 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_VIRTUALITY_none = 0x00, DW_VIRTUALITY_virtual = 0x01, DW_VIRTUALITY_pure_virtual = 0x02, # 168 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_VIRTUALITY_max = 0x02 }; enum DefaultedMemberAttribute { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 754 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_DEFAULTED_no = 0x00, DW_DEFAULTED_in_class = 0x01, DW_DEFAULTED_out_of_class = 0x02, # 174 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_DEFAULTED_max = 0x02 }; enum SourceLanguage { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 675 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_LANG_C89 = 0x0001, DW_LANG_C = 0x0002, DW_LANG_Ada83 = 0x0003, DW_LANG_C_plus_plus = 0x0004, DW_LANG_Cobol74 = 0x0005, DW_LANG_Cobol85 = 0x0006, DW_LANG_Fortran77 = 0x0007, DW_LANG_Fortran90 = 0x0008, DW_LANG_Pascal83 = 0x0009, DW_LANG_Modula2 = 0x000a, DW_LANG_Java = 0x000b, DW_LANG_C99 = 0x000c, DW_LANG_Ada95 = 0x000d, DW_LANG_Fortran95 = 0x000e, DW_LANG_PLI = 0x000f, DW_LANG_ObjC = 0x0010, DW_LANG_ObjC_plus_plus = 0x0011, DW_LANG_UPC = 0x0012, DW_LANG_D = 0x0013, DW_LANG_Python = 0x0014, DW_LANG_OpenCL = 0x0015, DW_LANG_Go = 0x0016, DW_LANG_Modula3 = 0x0017, DW_LANG_Haskell = 0x0018, DW_LANG_C_plus_plus_03 = 0x0019, DW_LANG_C_plus_plus_11 = 0x001a, DW_LANG_OCaml = 0x001b, DW_LANG_Rust = 0x001c, DW_LANG_C11 = 0x001d, DW_LANG_Swift = 0x001e, DW_LANG_Julia = 0x001f, DW_LANG_Dylan = 0x0020, DW_LANG_C_plus_plus_14 = 0x0021, DW_LANG_Fortran03 = 0x0022, DW_LANG_Fortran08 = 0x0023, DW_LANG_RenderScript = 0x0024, DW_LANG_BLISS = 0x0025, DW_LANG_Mips_Assembler = 0x8001, DW_LANG_GOOGLE_RenderScript = 0x8e57, DW_LANG_BORLAND_Delphi = 0xb000, # 181 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_LANG_lo_user = 0x8000, DW_LANG_hi_user = 0xffff }; inline bool isCPlusPlus(SourceLanguage S) { switch (S) { case DW_LANG_C_plus_plus: case DW_LANG_C_plus_plus_03: case DW_LANG_C_plus_plus_11: case DW_LANG_C_plus_plus_14: return true; case DW_LANG_C89: case DW_LANG_C: case DW_LANG_Ada83: case DW_LANG_Cobol74: case DW_LANG_Cobol85: case DW_LANG_Fortran77: case DW_LANG_Fortran90: case DW_LANG_Pascal83: case DW_LANG_Modula2: case DW_LANG_Java: case DW_LANG_C99: case DW_LANG_Ada95: case DW_LANG_Fortran95: case DW_LANG_PLI: case DW_LANG_ObjC: case DW_LANG_ObjC_plus_plus: case DW_LANG_UPC: case DW_LANG_D: case DW_LANG_Python: case DW_LANG_OpenCL: case DW_LANG_Go: case DW_LANG_Modula3: case DW_LANG_Haskell: case DW_LANG_OCaml: case DW_LANG_Rust: case DW_LANG_C11: case DW_LANG_Swift: case DW_LANG_Julia: case DW_LANG_Dylan: case DW_LANG_Fortran03: case DW_LANG_Fortran08: case DW_LANG_RenderScript: case DW_LANG_BLISS: case DW_LANG_Mips_Assembler: case DW_LANG_GOOGLE_RenderScript: case DW_LANG_BORLAND_Delphi: case DW_LANG_lo_user: case DW_LANG_hi_user: return false; } __builtin_unreachable(); } enum CaseSensitivity { DW_ID_case_sensitive = 0x00, DW_ID_up_case = 0x01, DW_ID_down_case = 0x02, DW_ID_case_insensitive = 0x03 }; enum CallingConvention { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 759 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_CC_normal = 0x01, DW_CC_program = 0x02, DW_CC_nocall = 0x03, DW_CC_pass_by_reference = 0x04, DW_CC_pass_by_value = 0x05, DW_CC_GNU_renesas_sh = 0x40, DW_CC_GNU_borland_fastcall_i386 = 0x41, DW_CC_BORLAND_safecall = 0xb0, DW_CC_BORLAND_stdcall = 0xb1, DW_CC_BORLAND_pascal = 0xb2, DW_CC_BORLAND_msfastcall = 0xb3, DW_CC_BORLAND_msreturn = 0xb4, DW_CC_BORLAND_thiscall = 0xb5, DW_CC_BORLAND_fastcall = 0xb6, DW_CC_LLVM_vectorcall = 0xc0, DW_CC_LLVM_Win64 = 0xc1, DW_CC_LLVM_X86_64SysV = 0xc2, DW_CC_LLVM_AAPCS = 0xc3, DW_CC_LLVM_AAPCS_VFP = 0xc4, DW_CC_LLVM_IntelOclBicc = 0xc5, DW_CC_LLVM_SpirFunction = 0xc6, DW_CC_LLVM_OpenCLKernel = 0xc7, DW_CC_LLVM_Swift = 0xc8, DW_CC_LLVM_PreserveMost = 0xc9, DW_CC_LLVM_PreserveAll = 0xca, DW_CC_LLVM_X86RegCall = 0xcb, DW_CC_GDB_IBM_OpenCL = 0xff, # 250 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_CC_lo_user = 0x40, DW_CC_hi_user = 0xff }; enum InlineAttribute { DW_INL_not_inlined = 0x00, DW_INL_inlined = 0x01, DW_INL_declared_not_inlined = 0x02, DW_INL_declared_inlined = 0x03 }; enum ArrayDimensionOrdering { DW_ORD_row_major = 0x00, DW_ORD_col_major = 0x01 }; enum DiscriminantList { DW_DSC_label = 0x00, DW_DSC_range = 0x01 }; enum LineNumberOps : uint8_t { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 801 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_LNS_extended_op = 0x00, DW_LNS_copy = 0x01, DW_LNS_advance_pc = 0x02, DW_LNS_advance_line = 0x03, DW_LNS_set_file = 0x04, DW_LNS_set_column = 0x05, DW_LNS_negate_stmt = 0x06, DW_LNS_set_basic_block = 0x07, DW_LNS_const_add_pc = 0x08, DW_LNS_fixed_advance_pc = 0x09, DW_LNS_set_prologue_end = 0x0a, DW_LNS_set_epilogue_begin = 0x0b, DW_LNS_set_isa = 0x0c, # 278 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 }; enum LineNumberExtendedOps { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 794 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_LNE_end_sequence = 0x01, DW_LNE_set_address = 0x02, DW_LNE_define_file = 0x03, DW_LNE_set_discriminator = 0x04, # 284 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_LNE_lo_user = 0x80, DW_LNE_hi_user = 0xff }; enum LineNumberEntryFormat { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 817 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_LNCT_path = 0x01, DW_LNCT_directory_index = 0x02, DW_LNCT_timestamp = 0x03, DW_LNCT_size = 0x04, DW_LNCT_MD5 = 0x05, DW_LNCT_LLVM_source = 0x2001, # 291 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_LNCT_lo_user = 0x2000, DW_LNCT_hi_user = 0x3fff, }; enum MacinfoRecordType { DW_MACINFO_define = 0x01, DW_MACINFO_undef = 0x02, DW_MACINFO_start_file = 0x03, DW_MACINFO_end_file = 0x04, DW_MACINFO_vendor_ext = 0xff }; enum MacroEntryType { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 827 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_MACRO_define = 0x01, DW_MACRO_undef = 0x02, DW_MACRO_start_file = 0x03, DW_MACRO_end_file = 0x04, DW_MACRO_define_strp = 0x05, DW_MACRO_undef_strp = 0x06, DW_MACRO_import = 0x07, DW_MACRO_define_sup = 0x08, DW_MACRO_undef_sup = 0x09, DW_MACRO_import_sup = 0x0a, DW_MACRO_define_strx = 0x0b, DW_MACRO_undef_strx = 0x0c, # 308 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_MACRO_lo_user = 0xe0, DW_MACRO_hi_user = 0xff }; enum RnglistEntries { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 846 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_RLE_end_of_list = 0x00, DW_RLE_base_addressx = 0x01, DW_RLE_startx_endx = 0x02, DW_RLE_startx_length = 0x03, DW_RLE_offset_pair = 0x04, DW_RLE_base_address = 0x05, DW_RLE_start_end = 0x06, DW_RLE_start_length = 0x07, # 316 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 }; enum LoclistEntries { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 856 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_LLE_end_of_list = 0x00, DW_LLE_base_addressx = 0x01, DW_LLE_startx_endx = 0x02, DW_LLE_startx_length = 0x03, DW_LLE_offset_pair = 0x04, DW_LLE_default_location = 0x05, DW_LLE_base_address = 0x06, DW_LLE_start_end = 0x07, DW_LLE_start_length = 0x08, # 322 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 }; enum CallFrameInfo { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 867 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_CFA_nop = 0x00, DW_CFA_advance_loc = 0x40, DW_CFA_offset = 0x80, DW_CFA_restore = 0xc0, DW_CFA_set_loc = 0x01, DW_CFA_advance_loc1 = 0x02, DW_CFA_advance_loc2 = 0x03, DW_CFA_advance_loc4 = 0x04, DW_CFA_offset_extended = 0x05, DW_CFA_restore_extended = 0x06, DW_CFA_undefined = 0x07, DW_CFA_same_value = 0x08, DW_CFA_register = 0x09, DW_CFA_remember_state = 0x0a, DW_CFA_restore_state = 0x0b, DW_CFA_def_cfa = 0x0c, DW_CFA_def_cfa_register = 0x0d, DW_CFA_def_cfa_offset = 0x0e, DW_CFA_def_cfa_expression = 0x0f, DW_CFA_expression = 0x10, DW_CFA_offset_extended_sf = 0x11, DW_CFA_def_cfa_sf = 0x12, DW_CFA_def_cfa_offset_sf = 0x13, DW_CFA_val_offset = 0x14, DW_CFA_val_offset_sf = 0x15, DW_CFA_val_expression = 0x16, DW_CFA_MIPS_advance_loc8 = 0x1d, DW_CFA_GNU_window_save = 0x2d, DW_CFA_AARCH64_negate_ra_state = 0x2d, DW_CFA_GNU_args_size = 0x2e, # 329 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_CFA_extended = 0x00, DW_CFA_lo_user = 0x1c, DW_CFA_hi_user = 0x3f }; enum Constants { DW_CHILDREN_no = 0x00, DW_CHILDREN_yes = 0x01, DW_EH_PE_absptr = 0x00, DW_EH_PE_omit = 0xff, DW_EH_PE_uleb128 = 0x01, DW_EH_PE_udata2 = 0x02, DW_EH_PE_udata4 = 0x03, DW_EH_PE_udata8 = 0x04, DW_EH_PE_sleb128 = 0x09, DW_EH_PE_sdata2 = 0x0A, DW_EH_PE_sdata4 = 0x0B, DW_EH_PE_sdata8 = 0x0C, DW_EH_PE_signed = 0x08, DW_EH_PE_pcrel = 0x10, DW_EH_PE_textrel = 0x20, DW_EH_PE_datarel = 0x30, DW_EH_PE_funcrel = 0x40, DW_EH_PE_aligned = 0x50, DW_EH_PE_indirect = 0x80 }; enum ApplePropertyAttributes { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 903 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_APPLE_PROPERTY_readonly = 0x01, DW_APPLE_PROPERTY_getter = 0x02, DW_APPLE_PROPERTY_assign = 0x04, DW_APPLE_PROPERTY_readwrite = 0x08, DW_APPLE_PROPERTY_retain = 0x10, DW_APPLE_PROPERTY_copy = 0x20, DW_APPLE_PROPERTY_nonatomic = 0x40, DW_APPLE_PROPERTY_setter = 0x80, DW_APPLE_PROPERTY_atomic = 0x100, DW_APPLE_PROPERTY_weak = 0x200, DW_APPLE_PROPERTY_strong = 0x400, DW_APPLE_PROPERTY_unsafe_unretained = 0x800, DW_APPLE_PROPERTY_nullability = 0x1000, DW_APPLE_PROPERTY_null_resettable = 0x2000, DW_APPLE_PROPERTY_class = 0x4000, # 365 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 }; enum UnitType : unsigned char { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 920 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_UT_compile = 0x01, DW_UT_type = 0x02, DW_UT_partial = 0x03, DW_UT_skeleton = 0x04, DW_UT_split_compile = 0x05, DW_UT_split_type = 0x06, # 371 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_UT_lo_user = 0x80, DW_UT_hi_user = 0xff }; enum Index { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" 1 # 960 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.def" DW_IDX_compile_unit = 0x01, DW_IDX_type_unit = 0x02, DW_IDX_die_offset = 0x03, DW_IDX_parent = 0x04, DW_IDX_type_hash = 0x05, # 378 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" 2 DW_IDX_lo_user = 0x2000, DW_IDX_hi_user = 0x3fff }; inline bool isUnitType(uint8_t UnitType) { switch (UnitType) { case DW_UT_compile: case DW_UT_type: case DW_UT_partial: case DW_UT_skeleton: case DW_UT_split_compile: case DW_UT_split_type: return true; default: return false; } } inline bool isUnitType(dwarf::Tag T) { switch (T) { case DW_TAG_compile_unit: case DW_TAG_type_unit: case DW_TAG_partial_unit: case DW_TAG_skeleton_unit: return true; default: return false; } } enum AcceleratorTable { DW_ATOM_null = 0u, DW_ATOM_die_offset = 1u, DW_ATOM_cu_offset = 2u, DW_ATOM_die_tag = 3u, DW_ATOM_type_flags = 4u, DW_ATOM_type_type_flags = 5u, DW_ATOM_qual_name_hash = 6u, DW_FLAG_type_implementation = 2u, DW_hash_function_djb = 0u }; enum GDBIndexEntryKind { GIEK_NONE, GIEK_TYPE, GIEK_VARIABLE, GIEK_FUNCTION, GIEK_OTHER, GIEK_UNUSED5, GIEK_UNUSED6, GIEK_UNUSED7 }; enum GDBIndexEntryLinkage { GIEL_EXTERNAL, GIEL_STATIC }; # 454 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" StringRef TagString(unsigned Tag); StringRef ChildrenString(unsigned Children); StringRef AttributeString(unsigned Attribute); StringRef FormEncodingString(unsigned Encoding); StringRef OperationEncodingString(unsigned Encoding); StringRef AttributeEncodingString(unsigned Encoding); StringRef DecimalSignString(unsigned Sign); StringRef EndianityString(unsigned Endian); StringRef AccessibilityString(unsigned Access); StringRef DefaultedMemberString(unsigned DefaultedEncodings); StringRef VisibilityString(unsigned Visibility); StringRef VirtualityString(unsigned Virtuality); StringRef LanguageString(unsigned Language); StringRef CaseString(unsigned Case); StringRef ConventionString(unsigned Convention); StringRef InlineCodeString(unsigned Code); StringRef ArrayOrderString(unsigned Order); StringRef LNStandardString(unsigned Standard); StringRef LNExtendedString(unsigned Encoding); StringRef MacinfoString(unsigned Encoding); StringRef MacroString(unsigned Encoding); StringRef RangeListEncodingString(unsigned Encoding); StringRef LocListEncodingString(unsigned Encoding); StringRef CallFrameString(unsigned Encoding, Triple::ArchType Arch); StringRef ApplePropertyString(unsigned); StringRef UnitTypeString(unsigned); StringRef AtomTypeString(unsigned Atom); StringRef GDBIndexEntryKindString(GDBIndexEntryKind Kind); StringRef GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage); StringRef IndexString(unsigned Idx); StringRef FormatString(DwarfFormat Format); StringRef FormatString(bool IsDWARF64); # 498 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" unsigned getTag(StringRef TagString); unsigned getOperationEncoding(StringRef OperationEncodingString); unsigned getVirtuality(StringRef VirtualityString); unsigned getLanguage(StringRef LanguageString); unsigned getCallingConvention(StringRef LanguageString); unsigned getAttributeEncoding(StringRef EncodingString); unsigned getMacinfo(StringRef MacinfoString); unsigned getMacro(StringRef MacroString); # 516 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" unsigned TagVersion(Tag T); unsigned AttributeVersion(Attribute A); unsigned FormVersion(Form F); unsigned OperationVersion(LocationAtom O); unsigned AttributeEncodingVersion(TypeKind E); unsigned LanguageVersion(SourceLanguage L); # 530 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" unsigned TagVendor(Tag T); unsigned AttributeVendor(Attribute A); unsigned FormVendor(Form F); unsigned OperationVendor(LocationAtom O); unsigned AttributeEncodingVendor(TypeKind E); unsigned LanguageVendor(SourceLanguage L); Optional<unsigned> LanguageLowerBound(SourceLanguage L); inline uint8_t getDwarfOffsetByteSize(DwarfFormat Format) { switch (Format) { case DwarfFormat::DWARF32: return 4; case DwarfFormat::DWARF64: return 8; } __builtin_unreachable(); } struct FormParams { uint16_t Version; uint8_t AddrSize; DwarfFormat Format; uint8_t getRefAddrByteSize() const { if (Version == 2) return AddrSize; return getDwarfOffsetByteSize(); } uint8_t getDwarfOffsetByteSize() const { return dwarf::getDwarfOffsetByteSize(Format); } explicit operator bool() const { return Version && AddrSize; } }; inline uint8_t getUnitLengthFieldByteSize(DwarfFormat Format) { switch (Format) { case DwarfFormat::DWARF32: return 4; case DwarfFormat::DWARF64: return 12; } __builtin_unreachable(); } # 597 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" Optional<uint8_t> getFixedFormByteSize(dwarf::Form Form, FormParams Params); bool isValidFormForVersion(Form F, unsigned Version, bool ExtensionsOk = true); StringRef AttributeValueString(uint16_t Attr, unsigned Val); StringRef AtomValueString(uint16_t Atom, unsigned Val); # 621 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/BinaryFormat/Dwarf.h" struct PubIndexEntryDescriptor { GDBIndexEntryKind Kind; GDBIndexEntryLinkage Linkage; PubIndexEntryDescriptor(GDBIndexEntryKind Kind, GDBIndexEntryLinkage Linkage) : Kind(Kind), Linkage(Linkage) {} PubIndexEntryDescriptor(GDBIndexEntryKind Kind) : Kind(Kind), Linkage(GIEL_EXTERNAL) {} explicit PubIndexEntryDescriptor(uint8_t Value) : Kind( static_cast<GDBIndexEntryKind>((Value & KIND_MASK) >> KIND_OFFSET)), Linkage(static_cast<GDBIndexEntryLinkage>((Value & LINKAGE_MASK) >> LINKAGE_OFFSET)) {} uint8_t toBits() const { return Kind << KIND_OFFSET | Linkage << LINKAGE_OFFSET; } private: enum { KIND_OFFSET = 4, KIND_MASK = 7 << KIND_OFFSET, LINKAGE_OFFSET = 7, LINKAGE_MASK = 1 << LINKAGE_OFFSET }; }; template <typename Enum> struct EnumTraits : public std::false_type {}; template <> struct EnumTraits<Attribute> : public std::true_type { static constexpr char Type[3] = "AT"; static constexpr StringRef (*StringFn)(unsigned) = &AttributeString; }; template <> struct EnumTraits<Form> : public std::true_type { static constexpr char Type[5] = "FORM"; static constexpr StringRef (*StringFn)(unsigned) = &FormEncodingString; }; template <> struct EnumTraits<Index> : public std::true_type { static constexpr char Type[4] = "IDX"; static constexpr StringRef (*StringFn)(unsigned) = &IndexString; }; template <> struct EnumTraits<Tag> : public std::true_type { static constexpr char Type[4] = "TAG"; static constexpr StringRef (*StringFn)(unsigned) = &TagString; }; template <> struct EnumTraits<LineNumberOps> : public std::true_type { static constexpr char Type[4] = "LNS"; static constexpr StringRef (*StringFn)(unsigned) = &LNStandardString; }; template <> struct EnumTraits<LocationAtom> : public std::true_type { static constexpr char Type[3] = "OP"; static constexpr StringRef (*StringFn)(unsigned) = &OperationEncodingString; }; } template <typename Enum> struct format_provider<Enum, std::enable_if_t<dwarf::EnumTraits<Enum>::value>> { static void format(const Enum &E, raw_ostream &OS, StringRef Style) { StringRef Str = dwarf::EnumTraits<Enum>::StringFn(E); if (Str.empty()) { OS << "DW_" << dwarf::EnumTraits<Enum>::Type << "_unknown_" << llvm::format("%x", E); } else OS << Str; } }; } # 26 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constants.h" 1 # 23 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constants.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APFloat.h" 1 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APFloat.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" 1 # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 21 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/climits" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/climits" 3 # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 3 # 23 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" 2 namespace llvm { class FoldingSetNodeID; class StringRef; class hash_code; class raw_ostream; template <typename T> class SmallVectorImpl; template <typename T> class ArrayRef; template <typename T> class Optional; class APInt; inline APInt operator-(APInt); # 69 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" class [[clang::warn_unused_result]] APInt { public: typedef uint64_t WordType; enum : unsigned { APINT_WORD_SIZE = sizeof(WordType), APINT_BITS_PER_WORD = APINT_WORD_SIZE * 8 }; enum class Rounding { DOWN, TOWARD_ZERO, UP, }; static constexpr WordType WORDTYPE_MAX = ~WordType(0); private: union { uint64_t VAL; uint64_t *pVal; } U; unsigned BitWidth; friend struct DenseMapAPIntKeyInfo; friend class APSInt; APInt(uint64_t *val, unsigned bits) : BitWidth(bits) { U.pVal = val; } bool isSingleWord() const { return BitWidth <= APINT_BITS_PER_WORD; } static unsigned whichWord(unsigned bitPosition) { return bitPosition / APINT_BITS_PER_WORD; } static unsigned whichBit(unsigned bitPosition) { return bitPosition % APINT_BITS_PER_WORD; } static uint64_t maskBit(unsigned bitPosition) { return 1ULL << whichBit(bitPosition); } APInt &clearUnusedBits() { unsigned WordBits = ((BitWidth-1) % APINT_BITS_PER_WORD) + 1; uint64_t mask = WORDTYPE_MAX >> (APINT_BITS_PER_WORD - WordBits); if (isSingleWord()) U.VAL &= mask; else U.pVal[getNumWords() - 1] &= mask; return *this; } uint64_t getWord(unsigned bitPosition) const { return isSingleWord() ? U.VAL : U.pVal[whichWord(bitPosition)]; } void reallocate(unsigned NewBitWidth); # 183 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" void fromString(unsigned numBits, StringRef str, uint8_t radix); static void divide(const WordType *LHS, unsigned lhsWords, const WordType *RHS, unsigned rhsWords, WordType *Quotient, WordType *Remainder); void initSlowCase(uint64_t val, bool isSigned); void initFromArray(ArrayRef<uint64_t> array); void initSlowCase(const APInt &that); void shlSlowCase(unsigned ShiftAmt); void lshrSlowCase(unsigned ShiftAmt); void ashrSlowCase(unsigned ShiftAmt); void AssignSlowCase(const APInt &RHS); bool EqualSlowCase(const APInt &RHS) const __attribute__((__pure__)); unsigned countLeadingZerosSlowCase() const __attribute__((__pure__)); unsigned countLeadingOnesSlowCase() const __attribute__((__pure__)); unsigned countTrailingZerosSlowCase() const __attribute__((__pure__)); unsigned countTrailingOnesSlowCase() const __attribute__((__pure__)); unsigned countPopulationSlowCase() const __attribute__((__pure__)); bool intersectsSlowCase(const APInt &RHS) const __attribute__((__pure__)); bool isSubsetOfSlowCase(const APInt &RHS) const __attribute__((__pure__)); void setBitsSlowCase(unsigned loBit, unsigned hiBit); void flipAllBitsSlowCase(); void AndAssignSlowCase(const APInt& RHS); void OrAssignSlowCase(const APInt& RHS); void XorAssignSlowCase(const APInt& RHS); int compare(const APInt &RHS) const __attribute__((__pure__)); int compareSigned(const APInt &RHS) const __attribute__((__pure__)); public: # 277 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" APInt(unsigned numBits, uint64_t val, bool isSigned = false) : BitWidth(numBits) { (static_cast<void> (0)); if (isSingleWord()) { U.VAL = val; clearUnusedBits(); } else { initSlowCase(val, isSigned); } } # 295 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" APInt(unsigned numBits, ArrayRef<uint64_t> bigVal); # 304 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]); # 317 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" APInt(unsigned numBits, StringRef str, uint8_t radix); APInt(const APInt &that) : BitWidth(that.BitWidth) { if (isSingleWord()) U.VAL = that.U.VAL; else initSlowCase(that); } APInt(APInt &&that) : BitWidth(that.BitWidth) { memcpy(&U, &that.U, sizeof(U)); that.BitWidth = 0; } ~APInt() { if (needsCleanup()) delete[] U.pVal; } explicit APInt() : BitWidth(1) { U.VAL = 0; } bool needsCleanup() const { return !isSingleWord(); } void Profile(FoldingSetNodeID &id) const; # 363 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" bool isNegative() const { return (*this)[BitWidth - 1]; } bool isNonNegative() const { return !isNegative(); } bool isSignBitSet() const { return (*this)[BitWidth-1]; } bool isSignBitClear() const { return !isSignBitSet(); } bool isStrictlyPositive() const { return isNonNegative() && !isNullValue(); } bool isNonPositive() const { return !isStrictlyPositive(); } bool isAllOnesValue() const { if (isSingleWord()) return U.VAL == WORDTYPE_MAX >> (APINT_BITS_PER_WORD - BitWidth); return countTrailingOnesSlowCase() == BitWidth; } bool isNullValue() const { return !*this; } bool isOneValue() const { if (isSingleWord()) return U.VAL == 1; return countLeadingZerosSlowCase() == BitWidth - 1; } bool isMaxValue() const { return isAllOnesValue(); } bool isMaxSignedValue() const { if (isSingleWord()) return U.VAL == ((WordType(1) << (BitWidth - 1)) - 1); return !isNegative() && countTrailingOnesSlowCase() == BitWidth - 1; } bool isMinValue() const { return isNullValue(); } bool isMinSignedValue() const { if (isSingleWord()) return U.VAL == (WordType(1) << (BitWidth - 1)); return isNegative() && countTrailingZerosSlowCase() == BitWidth - 1; } bool isIntN(unsigned N) const { (static_cast<void> (0)); return getActiveBits() <= N; } bool isSignedIntN(unsigned N) const { (static_cast<void> (0)); return getMinSignedBits() <= N; } bool isPowerOf2() const { if (isSingleWord()) return isPowerOf2_64(U.VAL); return countPopulationSlowCase() == 1; } bool isSignMask() const { return isMinSignedValue(); } bool getBoolValue() const { return !!*this; } uint64_t getLimitedValue(uint64_t Limit = (18446744073709551615UL)) const { return ugt(Limit) ? Limit : getZExtValue(); } bool isSplat(unsigned SplatSizeInBits) const; bool isMask(unsigned numBits) const { (static_cast<void> (0)); (static_cast<void> (0)); if (isSingleWord()) return U.VAL == (WORDTYPE_MAX >> (APINT_BITS_PER_WORD - numBits)); unsigned Ones = countTrailingOnesSlowCase(); return (numBits == Ones) && ((Ones + countLeadingZerosSlowCase()) == BitWidth); } bool isMask() const { if (isSingleWord()) return isMask_64(U.VAL); unsigned Ones = countTrailingOnesSlowCase(); return (Ones > 0) && ((Ones + countLeadingZerosSlowCase()) == BitWidth); } bool isShiftedMask() const { if (isSingleWord()) return isShiftedMask_64(U.VAL); unsigned Ones = countPopulationSlowCase(); unsigned LeadZ = countLeadingZerosSlowCase(); return (Ones + LeadZ + countTrailingZeros()) == BitWidth; } static APInt getMaxValue(unsigned numBits) { return getAllOnesValue(numBits); } static APInt getSignedMaxValue(unsigned numBits) { APInt API = getAllOnesValue(numBits); API.clearBit(numBits - 1); return API; } static APInt getMinValue(unsigned numBits) { return APInt(numBits, 0); } static APInt getSignedMinValue(unsigned numBits) { APInt API(numBits, 0); API.setBit(numBits - 1); return API; } static APInt getSignMask(unsigned BitWidth) { return getSignedMinValue(BitWidth); } static APInt getAllOnesValue(unsigned numBits) { return APInt(numBits, WORDTYPE_MAX, true); } static APInt getNullValue(unsigned numBits) { return APInt(numBits, 0); } APInt getHiBits(unsigned numBits) const; APInt getLoBits(unsigned numBits) const; static APInt getOneBitSet(unsigned numBits, unsigned BitNo) { APInt Res(numBits, 0); Res.setBit(BitNo); return Res; } # 611 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" static APInt getBitsSet(unsigned numBits, unsigned loBit, unsigned hiBit) { (static_cast<void> (0)); APInt Res(numBits, 0); Res.setBits(loBit, hiBit); return Res; } static APInt getBitsSetWithWrap(unsigned numBits, unsigned loBit, unsigned hiBit) { APInt Res(numBits, 0); Res.setBitsWithWrap(loBit, hiBit); return Res; } # 642 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" static APInt getBitsSetFrom(unsigned numBits, unsigned loBit) { APInt Res(numBits, 0); Res.setBitsFrom(loBit); return Res; } static APInt getHighBitsSet(unsigned numBits, unsigned hiBitsSet) { APInt Res(numBits, 0); Res.setHighBits(hiBitsSet); return Res; } static APInt getLowBitsSet(unsigned numBits, unsigned loBitsSet) { APInt Res(numBits, 0); Res.setLowBits(loBitsSet); return Res; } static APInt getSplat(unsigned NewLen, const APInt &V); static bool isSameValue(const APInt &I1, const APInt &I2) { if (I1.getBitWidth() == I2.getBitWidth()) return I1 == I2; if (I1.getBitWidth() > I2.getBitWidth()) return I1 == I2.zext(I1.getBitWidth()); return I1.zext(I2.getBitWidth()) == I2; } friend hash_code hash_value(const APInt &Arg); const uint64_t *getRawData() const { if (isSingleWord()) return &U.VAL; return &U.pVal[0]; } # 708 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" const APInt operator++(int) { APInt API(*this); ++(*this); return API; } APInt &operator++(); const APInt operator--(int) { APInt API(*this); --(*this); return API; } APInt &operator--(); bool operator!() const { if (isSingleWord()) return U.VAL == 0; return countLeadingZerosSlowCase() == BitWidth; } # 753 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" APInt &operator=(const APInt &RHS) { if (isSingleWord() && RHS.isSingleWord()) { U.VAL = RHS.U.VAL; BitWidth = RHS.BitWidth; return clearUnusedBits(); } AssignSlowCase(RHS); return *this; } APInt &operator=(APInt &&that) { (static_cast<void> (0)); if (!isSingleWord()) delete[] U.pVal; memcpy(&U, &that.U, sizeof(U)); BitWidth = that.BitWidth; that.BitWidth = 0; return *this; } # 793 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" APInt &operator=(uint64_t RHS) { if (isSingleWord()) { U.VAL = RHS; clearUnusedBits(); } else { U.pVal[0] = RHS; memset(U.pVal+1, 0, (getNumWords() - 1) * APINT_WORD_SIZE); } return *this; } APInt &operator&=(const APInt &RHS) { (static_cast<void> (0)); if (isSingleWord()) U.VAL &= RHS.U.VAL; else AndAssignSlowCase(RHS); return *this; } APInt &operator&=(uint64_t RHS) { if (isSingleWord()) { U.VAL &= RHS; return *this; } U.pVal[0] &= RHS; memset(U.pVal+1, 0, (getNumWords() - 1) * APINT_WORD_SIZE); return *this; } APInt &operator|=(const APInt &RHS) { (static_cast<void> (0)); if (isSingleWord()) U.VAL |= RHS.U.VAL; else OrAssignSlowCase(RHS); return *this; } APInt &operator|=(uint64_t RHS) { if (isSingleWord()) { U.VAL |= RHS; clearUnusedBits(); } else { U.pVal[0] |= RHS; } return *this; } APInt &operator^=(const APInt &RHS) { (static_cast<void> (0)); if (isSingleWord()) U.VAL ^= RHS.U.VAL; else XorAssignSlowCase(RHS); return *this; } APInt &operator^=(uint64_t RHS) { if (isSingleWord()) { U.VAL ^= RHS; clearUnusedBits(); } else { U.pVal[0] ^= RHS; } return *this; } APInt &operator*=(const APInt &RHS); APInt &operator*=(uint64_t RHS); APInt &operator+=(const APInt &RHS); APInt &operator+=(uint64_t RHS); APInt &operator-=(const APInt &RHS); APInt &operator-=(uint64_t RHS); APInt &operator<<=(unsigned ShiftAmt) { (static_cast<void> (0)); if (isSingleWord()) { if (ShiftAmt == BitWidth) U.VAL = 0; else U.VAL <<= ShiftAmt; return clearUnusedBits(); } shlSlowCase(ShiftAmt); return *this; } APInt &operator<<=(const APInt &ShiftAmt); # 950 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" APInt operator*(const APInt &RHS) const; APInt operator<<(unsigned Bits) const { return shl(Bits); } APInt operator<<(const APInt &Bits) const { return shl(Bits); } APInt ashr(unsigned ShiftAmt) const { APInt R(*this); R.ashrInPlace(ShiftAmt); return R; } void ashrInPlace(unsigned ShiftAmt) { (static_cast<void> (0)); if (isSingleWord()) { int64_t SExtVAL = SignExtend64(U.VAL, BitWidth); if (ShiftAmt == BitWidth) U.VAL = SExtVAL >> (APINT_BITS_PER_WORD - 1); else U.VAL = SExtVAL >> ShiftAmt; clearUnusedBits(); return; } ashrSlowCase(ShiftAmt); } APInt lshr(unsigned shiftAmt) const { APInt R(*this); R.lshrInPlace(shiftAmt); return R; } void lshrInPlace(unsigned ShiftAmt) { (static_cast<void> (0)); if (isSingleWord()) { if (ShiftAmt == BitWidth) U.VAL = 0; else U.VAL >>= ShiftAmt; return; } lshrSlowCase(ShiftAmt); } APInt shl(unsigned shiftAmt) const { APInt R(*this); R <<= shiftAmt; return R; } APInt rotl(unsigned rotateAmt) const; APInt rotr(unsigned rotateAmt) const; APInt ashr(const APInt &ShiftAmt) const { APInt R(*this); R.ashrInPlace(ShiftAmt); return R; } void ashrInPlace(const APInt &shiftAmt); APInt lshr(const APInt &ShiftAmt) const { APInt R(*this); R.lshrInPlace(ShiftAmt); return R; } void lshrInPlace(const APInt &ShiftAmt); APInt shl(const APInt &ShiftAmt) const { APInt R(*this); R <<= ShiftAmt; return R; } APInt rotl(const APInt &rotateAmt) const; APInt rotr(const APInt &rotateAmt) const; # 1069 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" APInt udiv(const APInt &RHS) const; APInt udiv(uint64_t RHS) const; APInt sdiv(const APInt &RHS) const; APInt sdiv(int64_t RHS) const; # 1089 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" APInt urem(const APInt &RHS) const; uint64_t urem(uint64_t RHS) const; APInt srem(const APInt &RHS) const; int64_t srem(int64_t RHS) const; # 1105 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" static void udivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient, APInt &Remainder); static void udivrem(const APInt &LHS, uint64_t RHS, APInt &Quotient, uint64_t &Remainder); static void sdivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient, APInt &Remainder); static void sdivrem(const APInt &LHS, int64_t RHS, APInt &Quotient, int64_t &Remainder); APInt sadd_ov(const APInt &RHS, bool &Overflow) const; APInt uadd_ov(const APInt &RHS, bool &Overflow) const; APInt ssub_ov(const APInt &RHS, bool &Overflow) const; APInt usub_ov(const APInt &RHS, bool &Overflow) const; APInt sdiv_ov(const APInt &RHS, bool &Overflow) const; APInt smul_ov(const APInt &RHS, bool &Overflow) const; APInt umul_ov(const APInt &RHS, bool &Overflow) const; APInt sshl_ov(const APInt &Amt, bool &Overflow) const; APInt ushl_ov(const APInt &Amt, bool &Overflow) const; APInt sadd_sat(const APInt &RHS) const; APInt uadd_sat(const APInt &RHS) const; APInt ssub_sat(const APInt &RHS) const; APInt usub_sat(const APInt &RHS) const; APInt smul_sat(const APInt &RHS) const; APInt umul_sat(const APInt &RHS) const; APInt sshl_sat(const APInt &RHS) const; APInt ushl_sat(const APInt &RHS) const; bool operator[](unsigned bitPosition) const { (static_cast<void> (0)); return (maskBit(bitPosition) & getWord(bitPosition)) != 0; } # 1152 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" bool operator==(const APInt &RHS) const { (static_cast<void> (0)); if (isSingleWord()) return U.VAL == RHS.U.VAL; return EqualSlowCase(RHS); } bool operator==(uint64_t Val) const { return (isSingleWord() || getActiveBits() <= 64) && getZExtValue() == Val; } bool eq(const APInt &RHS) const { return (*this) == RHS; } bool operator!=(const APInt &RHS) const { return !((*this) == RHS); } bool operator!=(uint64_t Val) const { return !((*this) == Val); } bool ne(const APInt &RHS) const { return !((*this) == RHS); } bool ult(const APInt &RHS) const { return compare(RHS) < 0; } bool ult(uint64_t RHS) const { return (isSingleWord() || getActiveBits() <= 64) && getZExtValue() < RHS; } bool slt(const APInt &RHS) const { return compareSigned(RHS) < 0; } bool slt(int64_t RHS) const { return (!isSingleWord() && getMinSignedBits() > 64) ? isNegative() : getSExtValue() < RHS; } bool ule(const APInt &RHS) const { return compare(RHS) <= 0; } bool ule(uint64_t RHS) const { return !ugt(RHS); } bool sle(const APInt &RHS) const { return compareSigned(RHS) <= 0; } bool sle(uint64_t RHS) const { return !sgt(RHS); } bool ugt(const APInt &RHS) const { return !ule(RHS); } bool ugt(uint64_t RHS) const { return (!isSingleWord() && getActiveBits() > 64) || getZExtValue() > RHS; } bool sgt(const APInt &RHS) const { return !sle(RHS); } bool sgt(int64_t RHS) const { return (!isSingleWord() && getMinSignedBits() > 64) ? !isNegative() : getSExtValue() > RHS; } bool uge(const APInt &RHS) const { return !ult(RHS); } bool uge(uint64_t RHS) const { return !ult(RHS); } bool sge(const APInt &RHS) const { return !slt(RHS); } bool sge(int64_t RHS) const { return !slt(RHS); } bool intersects(const APInt &RHS) const { (static_cast<void> (0)); if (isSingleWord()) return (U.VAL & RHS.U.VAL) != 0; return intersectsSlowCase(RHS); } bool isSubsetOf(const APInt &RHS) const { (static_cast<void> (0)); if (isSingleWord()) return (U.VAL & ~RHS.U.VAL) == 0; return isSubsetOfSlowCase(RHS); } # 1366 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" APInt trunc(unsigned width) const; APInt truncUSat(unsigned width) const; APInt truncSSat(unsigned width) const; APInt sext(unsigned width) const; APInt zext(unsigned width) const; APInt sextOrTrunc(unsigned width) const; APInt zextOrTrunc(unsigned width) const; APInt sextOrSelf(unsigned width) const; APInt zextOrSelf(unsigned width) const; void setAllBits() { if (isSingleWord()) U.VAL = WORDTYPE_MAX; else memset(U.pVal, -1, getNumWords() * APINT_WORD_SIZE); clearUnusedBits(); } void setBit(unsigned BitPosition) { (static_cast<void> (0)); WordType Mask = maskBit(BitPosition); if (isSingleWord()) U.VAL |= Mask; else U.pVal[whichWord(BitPosition)] |= Mask; } void setSignBit() { setBit(BitWidth - 1); } void setBitsWithWrap(unsigned loBit, unsigned hiBit) { (static_cast<void> (0)); (static_cast<void> (0)); if (loBit < hiBit) { setBits(loBit, hiBit); return; } setLowBits(hiBit); setHighBits(BitWidth - loBit); } void setBits(unsigned loBit, unsigned hiBit) { (static_cast<void> (0)); (static_cast<void> (0)); (static_cast<void> (0)); if (loBit == hiBit) return; if (loBit < APINT_BITS_PER_WORD && hiBit <= APINT_BITS_PER_WORD) { uint64_t mask = WORDTYPE_MAX >> (APINT_BITS_PER_WORD - (hiBit - loBit)); mask <<= loBit; if (isSingleWord()) U.VAL |= mask; else U.pVal[0] |= mask; } else { setBitsSlowCase(loBit, hiBit); } } void setBitsFrom(unsigned loBit) { return setBits(loBit, BitWidth); } void setLowBits(unsigned loBits) { return setBits(0, loBits); } void setHighBits(unsigned hiBits) { return setBits(BitWidth - hiBits, BitWidth); } void clearAllBits() { if (isSingleWord()) U.VAL = 0; else memset(U.pVal, 0, getNumWords() * APINT_WORD_SIZE); } void clearBit(unsigned BitPosition) { (static_cast<void> (0)); WordType Mask = ~maskBit(BitPosition); if (isSingleWord()) U.VAL &= Mask; else U.pVal[whichWord(BitPosition)] &= Mask; } void clearLowBits(unsigned loBits) { (static_cast<void> (0)); APInt Keep = getHighBitsSet(BitWidth, BitWidth - loBits); *this &= Keep; } void clearSignBit() { clearBit(BitWidth - 1); } void flipAllBits() { if (isSingleWord()) { U.VAL ^= WORDTYPE_MAX; clearUnusedBits(); } else { flipAllBitsSlowCase(); } } void flipBit(unsigned bitPosition); void negate() { flipAllBits(); ++(*this); } void insertBits(const APInt &SubBits, unsigned bitPosition); void insertBits(uint64_t SubBits, unsigned bitPosition, unsigned numBits); APInt extractBits(unsigned numBits, unsigned bitPosition) const; uint64_t extractBitsAsZExtValue(unsigned numBits, unsigned bitPosition) const; unsigned getBitWidth() const { return BitWidth; } unsigned getNumWords() const { return getNumWords(BitWidth); } static unsigned getNumWords(unsigned BitWidth) { return ((uint64_t)BitWidth + APINT_BITS_PER_WORD - 1) / APINT_BITS_PER_WORD; } unsigned getActiveBits() const { return BitWidth - countLeadingZeros(); } unsigned getActiveWords() const { unsigned numActiveBits = getActiveBits(); return numActiveBits ? whichWord(numActiveBits - 1) + 1 : 1; } # 1612 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" unsigned getMinSignedBits() const { if (isNegative()) return BitWidth - countLeadingOnes() + 1; return getActiveBits() + 1; } uint64_t getZExtValue() const { if (isSingleWord()) return U.VAL; (static_cast<void> (0)); return U.pVal[0]; } int64_t getSExtValue() const { if (isSingleWord()) return SignExtend64(U.VAL, BitWidth); (static_cast<void> (0)); return int64_t(U.pVal[0]); } static unsigned getBitsNeeded(StringRef str, uint8_t radix); # 1656 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" unsigned countLeadingZeros() const { if (isSingleWord()) { unsigned unusedBits = APINT_BITS_PER_WORD - BitWidth; return llvm::countLeadingZeros(U.VAL) - unusedBits; } return countLeadingZerosSlowCase(); } # 1672 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" unsigned countLeadingOnes() const { if (isSingleWord()) return llvm::countLeadingOnes(U.VAL << (APINT_BITS_PER_WORD - BitWidth)); return countLeadingOnesSlowCase(); } unsigned getNumSignBits() const { return isNegative() ? countLeadingOnes() : countLeadingZeros(); } # 1692 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" unsigned countTrailingZeros() const { if (isSingleWord()) return std::min(unsigned(llvm::countTrailingZeros(U.VAL)), BitWidth); return countTrailingZerosSlowCase(); } # 1706 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" unsigned countTrailingOnes() const { if (isSingleWord()) return llvm::countTrailingOnes(U.VAL); return countTrailingOnesSlowCase(); } unsigned countPopulation() const { if (isSingleWord()) return llvm::countPopulation(U.VAL); return countPopulationSlowCase(); } void print(raw_ostream &OS, bool isSigned) const; void toString(SmallVectorImpl<char> &Str, unsigned Radix, bool Signed, bool formatAsCLiteral = false) const; void toStringUnsigned(SmallVectorImpl<char> &Str, unsigned Radix = 10) const { toString(Str, Radix, false, false); } void toStringSigned(SmallVectorImpl<char> &Str, unsigned Radix = 10) const { toString(Str, Radix, true, false); } std::string toString(unsigned Radix, bool Signed) const; APInt byteSwap() const; APInt reverseBits() const; double roundToDouble(bool isSigned) const; double roundToDouble() const { return roundToDouble(false); } double signedRoundToDouble() const { return roundToDouble(true); } double bitsToDouble() const { return BitsToDouble(getWord(0)); } float bitsToFloat() const { return BitsToFloat(static_cast<uint32_t>(getWord(0))); } static APInt doubleToBits(double V) { return APInt(sizeof(double) * 8, DoubleToBits(V)); } static APInt floatToBits(float V) { return APInt(sizeof(float) * 8, FloatToBits(V)); } unsigned logBase2() const { return getActiveBits() - 1; } unsigned ceilLogBase2() const { APInt temp(*this); --temp; return temp.getActiveBits(); } # 1826 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" unsigned nearestLogBase2() const { if (BitWidth == 1) return U.VAL - 1; if (isNullValue()) return (4294967295U); unsigned lg = logBase2(); return lg + unsigned((*this)[lg - 1]); } int32_t exactLogBase2() const { if (!isPowerOf2()) return -1; return logBase2(); } APInt sqrt() const; APInt abs() const { if (isNegative()) return -(*this); return *this; } APInt multiplicativeInverse(const APInt &modulo) const; struct ms; ms magic() const; struct mu; mu magicu(unsigned LeadingZeros = 0) const; # 1893 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" static void tcSet(WordType *, WordType, unsigned); static void tcAssign(WordType *, const WordType *, unsigned); static bool tcIsZero(const WordType *, unsigned); static int tcExtractBit(const WordType *, unsigned bit); static void tcExtract(WordType *, unsigned dstCount, const WordType *, unsigned srcBits, unsigned srcLSB); static void tcSetBit(WordType *, unsigned bit); static void tcClearBit(WordType *, unsigned bit); static unsigned tcLSB(const WordType *, unsigned n); static unsigned tcMSB(const WordType *parts, unsigned n); static void tcNegate(WordType *, unsigned); static WordType tcAdd(WordType *, const WordType *, WordType carry, unsigned); static WordType tcAddPart(WordType *, WordType, unsigned); static WordType tcSubtract(WordType *, const WordType *, WordType carry, unsigned); static WordType tcSubtractPart(WordType *, WordType, unsigned); # 1948 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" static int tcMultiplyPart(WordType *dst, const WordType *src, WordType multiplier, WordType carry, unsigned srcParts, unsigned dstParts, bool add); static int tcMultiply(WordType *, const WordType *, const WordType *, unsigned); static void tcFullMultiply(WordType *, const WordType *, const WordType *, unsigned, unsigned); # 1974 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" static int tcDivide(WordType *lhs, const WordType *rhs, WordType *remainder, WordType *scratch, unsigned parts); static void tcShiftLeft(WordType *, unsigned Words, unsigned Count); static void tcShiftRight(WordType *, unsigned Words, unsigned Count); static void tcAnd(WordType *, const WordType *, unsigned); static void tcOr(WordType *, const WordType *, unsigned); static void tcXor(WordType *, const WordType *, unsigned); static void tcComplement(WordType *, unsigned); static int tcCompare(const WordType *, const WordType *, unsigned); static WordType tcIncrement(WordType *dst, unsigned parts) { return tcAddPart(dst, 1, parts); } static WordType tcDecrement(WordType *dst, unsigned parts) { return tcSubtractPart(dst, 1, parts); } static void tcSetLeastSignificantBits(WordType *, unsigned, unsigned bits); void dump() const; }; struct APInt::ms { APInt m; unsigned s; }; struct APInt::mu { APInt m; bool a; unsigned s; }; inline bool operator==(uint64_t V1, const APInt &V2) { return V2 == V1; } inline bool operator!=(uint64_t V1, const APInt &V2) { return V2 != V1; } inline APInt operator~(APInt v) { v.flipAllBits(); return v; } inline APInt operator&(APInt a, const APInt &b) { a &= b; return a; } inline APInt operator&(const APInt &a, APInt &&b) { b &= a; return std::move(b); } inline APInt operator&(APInt a, uint64_t RHS) { a &= RHS; return a; } inline APInt operator&(uint64_t LHS, APInt b) { b &= LHS; return b; } inline APInt operator|(APInt a, const APInt &b) { a |= b; return a; } inline APInt operator|(const APInt &a, APInt &&b) { b |= a; return std::move(b); } inline APInt operator|(APInt a, uint64_t RHS) { a |= RHS; return a; } inline APInt operator|(uint64_t LHS, APInt b) { b |= LHS; return b; } inline APInt operator^(APInt a, const APInt &b) { a ^= b; return a; } inline APInt operator^(const APInt &a, APInt &&b) { b ^= a; return std::move(b); } inline APInt operator^(APInt a, uint64_t RHS) { a ^= RHS; return a; } inline APInt operator^(uint64_t LHS, APInt b) { b ^= LHS; return b; } inline raw_ostream &operator<<(raw_ostream &OS, const APInt &I) { I.print(OS, true); return OS; } inline APInt operator-(APInt v) { v.negate(); return v; } inline APInt operator+(APInt a, const APInt &b) { a += b; return a; } inline APInt operator+(const APInt &a, APInt &&b) { b += a; return std::move(b); } inline APInt operator+(APInt a, uint64_t RHS) { a += RHS; return a; } inline APInt operator+(uint64_t LHS, APInt b) { b += LHS; return b; } inline APInt operator-(APInt a, const APInt &b) { a -= b; return a; } inline APInt operator-(const APInt &a, APInt &&b) { b.negate(); b += a; return std::move(b); } inline APInt operator-(APInt a, uint64_t RHS) { a -= RHS; return a; } inline APInt operator-(uint64_t LHS, APInt b) { b.negate(); b += LHS; return b; } inline APInt operator*(APInt a, uint64_t RHS) { a *= RHS; return a; } inline APInt operator*(uint64_t LHS, APInt b) { b *= LHS; return b; } namespace APIntOps { inline const APInt &smin(const APInt &A, const APInt &B) { return A.slt(B) ? A : B; } inline const APInt &smax(const APInt &A, const APInt &B) { return A.sgt(B) ? A : B; } inline const APInt &umin(const APInt &A, const APInt &B) { return A.ult(B) ? A : B; } inline const APInt &umax(const APInt &A, const APInt &B) { return A.ugt(B) ? A : B; } APInt GreatestCommonDivisor(APInt A, APInt B); inline double RoundAPIntToDouble(const APInt &APIVal) { return APIVal.roundToDouble(); } inline double RoundSignedAPIntToDouble(const APInt &APIVal) { return APIVal.signedRoundToDouble(); } inline float RoundAPIntToFloat(const APInt &APIVal) { return float(RoundAPIntToDouble(APIVal)); } inline float RoundSignedAPIntToFloat(const APInt &APIVal) { return float(APIVal.signedRoundToDouble()); } APInt RoundDoubleToAPInt(double Double, unsigned width); inline APInt RoundFloatToAPInt(float Float, unsigned width) { return RoundDoubleToAPInt(double(Float), width); } APInt RoundingUDiv(const APInt &A, const APInt &B, APInt::Rounding RM); APInt RoundingSDiv(const APInt &A, const APInt &B, APInt::Rounding RM); # 2269 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APInt.h" Optional<APInt> SolveQuadraticEquationWrap(APInt A, APInt B, APInt C, unsigned RangeWidth); Optional<unsigned> GetMostSignificantDifferentBit(const APInt &A, const APInt &B); } hash_code hash_value(const APInt &Arg); void StoreIntToMemory(const APInt &IntVal, uint8_t *Dst, unsigned StoreBytes); void LoadIntFromMemory(APInt &IntVal, const uint8_t *Src, unsigned LoadBytes); } # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APFloat.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/FloatingPointMode.h" 1 # 16 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/FloatingPointMode.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringSwitch.h" 1 # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringSwitch.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringSwitch.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 3 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringSwitch.h" 2 namespace llvm { # 41 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/StringSwitch.h" template<typename T, typename R = T> class StringSwitch { const StringRef Str; Optional<T> Result; public: explicit StringSwitch(StringRef S) : Str(S), Result() { } StringSwitch(const StringSwitch &) = delete; void operator=(const StringSwitch &) = delete; void operator=(StringSwitch &&other) = delete; StringSwitch(StringSwitch &&other) : Str(other.Str), Result(std::move(other.Result)) { } ~StringSwitch() = default; StringSwitch &Case(StringLiteral S, T Value) { if (!Result && Str == S) { Result = std::move(Value); } return *this; } StringSwitch& EndsWith(StringLiteral S, T Value) { if (!Result && Str.endswith(S)) { Result = std::move(Value); } return *this; } StringSwitch& StartsWith(StringLiteral S, T Value) { if (!Result && Str.startswith(S)) { Result = std::move(Value); } return *this; } StringSwitch &Cases(StringLiteral S0, StringLiteral S1, T Value) { return Case(S0, Value).Case(S1, Value); } StringSwitch &Cases(StringLiteral S0, StringLiteral S1, StringLiteral S2, T Value) { return Case(S0, Value).Cases(S1, S2, Value); } StringSwitch &Cases(StringLiteral S0, StringLiteral S1, StringLiteral S2, StringLiteral S3, T Value) { return Case(S0, Value).Cases(S1, S2, S3, Value); } StringSwitch &Cases(StringLiteral S0, StringLiteral S1, StringLiteral S2, StringLiteral S3, StringLiteral S4, T Value) { return Case(S0, Value).Cases(S1, S2, S3, S4, Value); } StringSwitch &Cases(StringLiteral S0, StringLiteral S1, StringLiteral S2, StringLiteral S3, StringLiteral S4, StringLiteral S5, T Value) { return Case(S0, Value).Cases(S1, S2, S3, S4, S5, Value); } StringSwitch &Cases(StringLiteral S0, StringLiteral S1, StringLiteral S2, StringLiteral S3, StringLiteral S4, StringLiteral S5, StringLiteral S6, T Value) { return Case(S0, Value).Cases(S1, S2, S3, S4, S5, S6, Value); } StringSwitch &Cases(StringLiteral S0, StringLiteral S1, StringLiteral S2, StringLiteral S3, StringLiteral S4, StringLiteral S5, StringLiteral S6, StringLiteral S7, T Value) { return Case(S0, Value).Cases(S1, S2, S3, S4, S5, S6, S7, Value); } StringSwitch &Cases(StringLiteral S0, StringLiteral S1, StringLiteral S2, StringLiteral S3, StringLiteral S4, StringLiteral S5, StringLiteral S6, StringLiteral S7, StringLiteral S8, T Value) { return Case(S0, Value).Cases(S1, S2, S3, S4, S5, S6, S7, S8, Value); } StringSwitch &Cases(StringLiteral S0, StringLiteral S1, StringLiteral S2, StringLiteral S3, StringLiteral S4, StringLiteral S5, StringLiteral S6, StringLiteral S7, StringLiteral S8, StringLiteral S9, T Value) { return Case(S0, Value).Cases(S1, S2, S3, S4, S5, S6, S7, S8, S9, Value); } StringSwitch &CaseLower(StringLiteral S, T Value) { if (!Result && Str.equals_lower(S)) Result = std::move(Value); return *this; } StringSwitch &EndsWithLower(StringLiteral S, T Value) { if (!Result && Str.endswith_lower(S)) Result = Value; return *this; } StringSwitch &StartsWithLower(StringLiteral S, T Value) { if (!Result && Str.startswith_lower(S)) Result = std::move(Value); return *this; } StringSwitch &CasesLower(StringLiteral S0, StringLiteral S1, T Value) { return CaseLower(S0, Value).CaseLower(S1, Value); } StringSwitch &CasesLower(StringLiteral S0, StringLiteral S1, StringLiteral S2, T Value) { return CaseLower(S0, Value).CasesLower(S1, S2, Value); } StringSwitch &CasesLower(StringLiteral S0, StringLiteral S1, StringLiteral S2, StringLiteral S3, T Value) { return CaseLower(S0, Value).CasesLower(S1, S2, S3, Value); } StringSwitch &CasesLower(StringLiteral S0, StringLiteral S1, StringLiteral S2, StringLiteral S3, StringLiteral S4, T Value) { return CaseLower(S0, Value).CasesLower(S1, S2, S3, S4, Value); } [[clang::warn_unused_result]] R Default(T Value) { if (Result) return std::move(*Result); return Value; } [[clang::warn_unused_result]] operator R() { (static_cast<void> (0)); return std::move(*Result); } }; } # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/FloatingPointMode.h" 2 namespace llvm { # 34 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/FloatingPointMode.h" enum class RoundingMode : int8_t { TowardZero = 0, NearestTiesToEven = 1, TowardPositive = 2, TowardNegative = 3, NearestTiesToAway = 4, Dynamic = 7, Invalid = -1 }; struct DenormalMode { enum DenormalModeKind : int8_t { Invalid = -1, IEEE, PreserveSign, PositiveZero }; DenormalModeKind Output = DenormalModeKind::Invalid; DenormalModeKind Input = DenormalModeKind::Invalid; constexpr DenormalMode() = default; constexpr DenormalMode(DenormalModeKind Out, DenormalModeKind In) : Output(Out), Input(In) {} static constexpr DenormalMode getInvalid() { return DenormalMode(DenormalModeKind::Invalid, DenormalModeKind::Invalid); } static constexpr DenormalMode getIEEE() { return DenormalMode(DenormalModeKind::IEEE, DenormalModeKind::IEEE); } static constexpr DenormalMode getPreserveSign() { return DenormalMode(DenormalModeKind::PreserveSign, DenormalModeKind::PreserveSign); } static constexpr DenormalMode getPositiveZero() { return DenormalMode(DenormalModeKind::PositiveZero, DenormalModeKind::PositiveZero); } bool operator==(DenormalMode Other) const { return Output == Other.Output && Input == Other.Input; } bool operator!=(DenormalMode Other) const { return !(*this == Other); } bool isSimple() const { return Input == Output; } bool isValid() const { return Output != DenormalModeKind::Invalid && Input != DenormalModeKind::Invalid; } inline void print(raw_ostream &OS) const; inline std::string str() const { std::string storage; raw_string_ostream OS(storage); print(OS); return OS.str(); } }; inline raw_ostream& operator<<(raw_ostream &OS, DenormalMode Mode) { Mode.print(OS); return OS; } inline DenormalMode::DenormalModeKind parseDenormalFPAttributeComponent(StringRef Str) { return StringSwitch<DenormalMode::DenormalModeKind>(Str) .Cases("", "ieee", DenormalMode::IEEE) .Case("preserve-sign", DenormalMode::PreserveSign) .Case("positive-zero", DenormalMode::PositiveZero) .Default(DenormalMode::Invalid); } inline StringRef denormalModeKindName(DenormalMode::DenormalModeKind Mode) { switch (Mode) { case DenormalMode::IEEE: return "ieee"; case DenormalMode::PreserveSign: return "preserve-sign"; case DenormalMode::PositiveZero: return "positive-zero"; default: return ""; } } inline DenormalMode parseDenormalFPAttribute(StringRef Str) { StringRef OutputStr, InputStr; std::tie(OutputStr, InputStr) = Str.split(','); DenormalMode Mode; Mode.Output = parseDenormalFPAttributeComponent(OutputStr); Mode.Input = InputStr.empty() ? Mode.Output : parseDenormalFPAttributeComponent(InputStr); return Mode; } void DenormalMode::print(raw_ostream &OS) const { OS << denormalModeKindName(Output) << ',' << denormalModeKindName(Input); } } # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APFloat.h" 2 # 34 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APFloat.h" namespace llvm { struct fltSemantics; class APSInt; class StringRef; class APFloat; class raw_ostream; template <typename T> class Expected; template <typename T> class SmallVectorImpl; enum lostFraction { lfExactlyZero, lfLessThanHalf, lfExactlyHalf, lfMoreThanHalf }; # 143 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APFloat.h" struct APFloatBase { typedef APInt::WordType integerPart; static constexpr unsigned integerPartWidth = APInt::APINT_BITS_PER_WORD; typedef int32_t ExponentType; enum Semantics { S_IEEEhalf, S_BFloat, S_IEEEsingle, S_IEEEdouble, S_x87DoubleExtended, S_IEEEquad, S_PPCDoubleDouble }; static const llvm::fltSemantics &EnumToSemantics(Semantics S); static Semantics SemanticsToEnum(const llvm::fltSemantics &Sem); static const fltSemantics &IEEEhalf() __attribute__((__const__)); static const fltSemantics &BFloat() __attribute__((__const__)); static const fltSemantics &IEEEsingle() __attribute__((__const__)); static const fltSemantics &IEEEdouble() __attribute__((__const__)); static const fltSemantics &IEEEquad() __attribute__((__const__)); static const fltSemantics &PPCDoubleDouble() __attribute__((__const__)); static const fltSemantics &x87DoubleExtended() __attribute__((__const__)); static const fltSemantics &Bogus() __attribute__((__const__)); enum cmpResult { cmpLessThan, cmpEqual, cmpGreaterThan, cmpUnordered }; using roundingMode = llvm::RoundingMode; static constexpr roundingMode rmNearestTiesToEven = RoundingMode::NearestTiesToEven; static constexpr roundingMode rmTowardPositive = RoundingMode::TowardPositive; static constexpr roundingMode rmTowardNegative = RoundingMode::TowardNegative; static constexpr roundingMode rmTowardZero = RoundingMode::TowardZero; static constexpr roundingMode rmNearestTiesToAway = RoundingMode::NearestTiesToAway; # 206 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APFloat.h" enum opStatus { opOK = 0x00, opInvalidOp = 0x01, opDivByZero = 0x02, opOverflow = 0x04, opUnderflow = 0x08, opInexact = 0x10 }; enum fltCategory { fcInfinity, fcNaN, fcNormal, fcZero }; enum uninitializedTag { uninitialized }; enum IlogbErrorKinds { IEK_Zero = (-2147483647 -1) + 1, IEK_NaN = (-2147483647 -1), IEK_Inf = 2147483647 }; static unsigned int semanticsPrecision(const fltSemantics &); static ExponentType semanticsMinExponent(const fltSemantics &); static ExponentType semanticsMaxExponent(const fltSemantics &); static unsigned int semanticsSizeInBits(const fltSemantics &); static unsigned getSizeInBits(const fltSemantics &Sem); }; namespace detail { class IEEEFloat final : public APFloatBase { public: IEEEFloat(const fltSemantics &); IEEEFloat(const fltSemantics &, integerPart); IEEEFloat(const fltSemantics &, uninitializedTag); IEEEFloat(const fltSemantics &, const APInt &); explicit IEEEFloat(double d); explicit IEEEFloat(float f); IEEEFloat(const IEEEFloat &); IEEEFloat(IEEEFloat &&); ~IEEEFloat(); bool needsCleanup() const { return partCount() > 1; } # 275 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APFloat.h" opStatus add(const IEEEFloat &, roundingMode); opStatus subtract(const IEEEFloat &, roundingMode); opStatus multiply(const IEEEFloat &, roundingMode); opStatus divide(const IEEEFloat &, roundingMode); opStatus remainder(const IEEEFloat &); opStatus mod(const IEEEFloat &); opStatus fusedMultiplyAdd(const IEEEFloat &, const IEEEFloat &, roundingMode); opStatus roundToIntegral(roundingMode); opStatus next(bool nextDown); void changeSign(); opStatus convert(const fltSemantics &, roundingMode, bool *); opStatus convertToInteger(MutableArrayRef<integerPart>, unsigned int, bool, roundingMode, bool *) const; opStatus convertFromAPInt(const APInt &, bool, roundingMode); opStatus convertFromSignExtendedInteger(const integerPart *, unsigned int, bool, roundingMode); opStatus convertFromZeroExtendedInteger(const integerPart *, unsigned int, bool, roundingMode); Expected<opStatus> convertFromString(StringRef, roundingMode); APInt bitcastToAPInt() const; double convertToDouble() const; float convertToFloat() const; bool operator==(const IEEEFloat &) const = delete; cmpResult compare(const IEEEFloat &) const; bool bitwiseIsEqual(const IEEEFloat &) const; unsigned int convertToHexString(char *dst, unsigned int hexDigits, bool upperCase, roundingMode) const; # 340 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APFloat.h" bool isNegative() const { return sign; } bool isNormal() const { return !isDenormal() && isFiniteNonZero(); } bool isFinite() const { return !isNaN() && !isInfinity(); } bool isZero() const { return category == fcZero; } bool isDenormal() const; bool isInfinity() const { return category == fcInfinity; } bool isNaN() const { return category == fcNaN; } bool isSignaling() const; fltCategory getCategory() const { return category; } const fltSemantics &getSemantics() const { return *semantics; } bool isNonZero() const { return category != fcZero; } bool isFiniteNonZero() const { return isFinite() && !isZero(); } bool isPosZero() const { return isZero() && !isNegative(); } bool isNegZero() const { return isZero() && isNegative(); } bool isSmallest() const; bool isLargest() const; bool isInteger() const; IEEEFloat &operator=(const IEEEFloat &); IEEEFloat &operator=(IEEEFloat &&); # 407 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APFloat.h" friend hash_code hash_value(const IEEEFloat &Arg); # 435 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APFloat.h" void toString(SmallVectorImpl<char> &Str, unsigned FormatPrecision = 0, unsigned FormatMaxPadding = 3, bool TruncateZero = true) const; bool getExactInverse(APFloat *inv) const; # 451 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APFloat.h" friend int ilogb(const IEEEFloat &Arg); friend IEEEFloat scalbn(IEEEFloat X, int Exp, roundingMode); friend IEEEFloat frexp(const IEEEFloat &X, int &Exp, roundingMode); void makeLargest(bool Neg = false); void makeSmallest(bool Neg = false); void makeNaN(bool SNaN = false, bool Neg = false, const APInt *fill = nullptr); void makeInf(bool Neg = false); void makeZero(bool Neg = false); void makeQuiet(); void makeSmallestNormalized(bool Negative = false); cmpResult compareAbsoluteValue(const IEEEFloat &) const; private: integerPart *significandParts(); const integerPart *significandParts() const; unsigned int partCount() const; integerPart addSignificand(const IEEEFloat &); integerPart subtractSignificand(const IEEEFloat &, integerPart); lostFraction addOrSubtractSignificand(const IEEEFloat &, bool subtract); lostFraction multiplySignificand(const IEEEFloat &, IEEEFloat); lostFraction multiplySignificand(const IEEEFloat&); lostFraction divideSignificand(const IEEEFloat &); void incrementSignificand(); void initialize(const fltSemantics *); void shiftSignificandLeft(unsigned int); lostFraction shiftSignificandRight(unsigned int); unsigned int significandLSB() const; unsigned int significandMSB() const; void zeroSignificand(); bool isSignificandAllOnes() const; bool isSignificandAllZeros() const; opStatus addOrSubtractSpecials(const IEEEFloat &, bool subtract); opStatus divideSpecials(const IEEEFloat &); opStatus multiplySpecials(const IEEEFloat &); opStatus modSpecials(const IEEEFloat &); opStatus remainderSpecials(const IEEEFloat&); bool convertFromStringSpecials(StringRef str); opStatus normalize(roundingMode, lostFraction); opStatus addOrSubtract(const IEEEFloat &, roundingMode, bool subtract); opStatus handleOverflow(roundingMode); bool roundAwayFromZero(roundingMode, lostFraction, unsigned int) const; opStatus convertToSignExtendedInteger(MutableArrayRef<integerPart>, unsigned int, bool, roundingMode, bool *) const; opStatus convertFromUnsignedParts(const integerPart *, unsigned int, roundingMode); Expected<opStatus> convertFromHexadecimalString(StringRef, roundingMode); Expected<opStatus> convertFromDecimalString(StringRef, roundingMode); char *convertNormalToHexString(char *, unsigned int, bool, roundingMode) const; opStatus roundSignificandWithExponent(const integerPart *, unsigned int, int, roundingMode); APInt convertHalfAPFloatToAPInt() const; APInt convertBFloatAPFloatToAPInt() const; APInt convertFloatAPFloatToAPInt() const; APInt convertDoubleAPFloatToAPInt() const; APInt convertQuadrupleAPFloatToAPInt() const; APInt convertF80LongDoubleAPFloatToAPInt() const; APInt convertPPCDoubleDoubleAPFloatToAPInt() const; void initFromAPInt(const fltSemantics *Sem, const APInt &api); void initFromHalfAPInt(const APInt &api); void initFromBFloatAPInt(const APInt &api); void initFromFloatAPInt(const APInt &api); void initFromDoubleAPInt(const APInt &api); void initFromQuadrupleAPInt(const APInt &api); void initFromF80LongDoubleAPInt(const APInt &api); void initFromPPCDoubleDoubleAPInt(const APInt &api); void assign(const IEEEFloat &); void copySignificand(const IEEEFloat &); void freeSignificand(); const fltSemantics *semantics; union Significand { integerPart part; integerPart *parts; } significand; ExponentType exponent; fltCategory category : 3; unsigned int sign : 1; }; hash_code hash_value(const IEEEFloat &Arg); int ilogb(const IEEEFloat &Arg); IEEEFloat scalbn(IEEEFloat X, int Exp, IEEEFloat::roundingMode); IEEEFloat frexp(const IEEEFloat &Val, int &Exp, IEEEFloat::roundingMode RM); class DoubleAPFloat final : public APFloatBase { const fltSemantics *Semantics; std::unique_ptr<APFloat[]> Floats; opStatus addImpl(const APFloat &a, const APFloat &aa, const APFloat &c, const APFloat &cc, roundingMode RM); opStatus addWithSpecial(const DoubleAPFloat &LHS, const DoubleAPFloat &RHS, DoubleAPFloat &Out, roundingMode RM); public: DoubleAPFloat(const fltSemantics &S); DoubleAPFloat(const fltSemantics &S, uninitializedTag); DoubleAPFloat(const fltSemantics &S, integerPart); DoubleAPFloat(const fltSemantics &S, const APInt &I); DoubleAPFloat(const fltSemantics &S, APFloat &&First, APFloat &&Second); DoubleAPFloat(const DoubleAPFloat &RHS); DoubleAPFloat(DoubleAPFloat &&RHS); DoubleAPFloat &operator=(const DoubleAPFloat &RHS); DoubleAPFloat &operator=(DoubleAPFloat &&RHS) { if (this != &RHS) { this->~DoubleAPFloat(); new (this) DoubleAPFloat(std::move(RHS)); } return *this; } bool needsCleanup() const { return Floats != nullptr; } APFloat &getFirst() { return Floats[0]; } const APFloat &getFirst() const { return Floats[0]; } APFloat &getSecond() { return Floats[1]; } const APFloat &getSecond() const { return Floats[1]; } opStatus add(const DoubleAPFloat &RHS, roundingMode RM); opStatus subtract(const DoubleAPFloat &RHS, roundingMode RM); opStatus multiply(const DoubleAPFloat &RHS, roundingMode RM); opStatus divide(const DoubleAPFloat &RHS, roundingMode RM); opStatus remainder(const DoubleAPFloat &RHS); opStatus mod(const DoubleAPFloat &RHS); opStatus fusedMultiplyAdd(const DoubleAPFloat &Multiplicand, const DoubleAPFloat &Addend, roundingMode RM); opStatus roundToIntegral(roundingMode RM); void changeSign(); cmpResult compareAbsoluteValue(const DoubleAPFloat &RHS) const; fltCategory getCategory() const; bool isNegative() const; void makeInf(bool Neg); void makeZero(bool Neg); void makeLargest(bool Neg); void makeSmallest(bool Neg); void makeSmallestNormalized(bool Neg); void makeNaN(bool SNaN, bool Neg, const APInt *fill); cmpResult compare(const DoubleAPFloat &RHS) const; bool bitwiseIsEqual(const DoubleAPFloat &RHS) const; APInt bitcastToAPInt() const; Expected<opStatus> convertFromString(StringRef, roundingMode); opStatus next(bool nextDown); opStatus convertToInteger(MutableArrayRef<integerPart> Input, unsigned int Width, bool IsSigned, roundingMode RM, bool *IsExact) const; opStatus convertFromAPInt(const APInt &Input, bool IsSigned, roundingMode RM); opStatus convertFromSignExtendedInteger(const integerPart *Input, unsigned int InputSize, bool IsSigned, roundingMode RM); opStatus convertFromZeroExtendedInteger(const integerPart *Input, unsigned int InputSize, bool IsSigned, roundingMode RM); unsigned int convertToHexString(char *DST, unsigned int HexDigits, bool UpperCase, roundingMode RM) const; bool isDenormal() const; bool isSmallest() const; bool isLargest() const; bool isInteger() const; void toString(SmallVectorImpl<char> &Str, unsigned FormatPrecision, unsigned FormatMaxPadding, bool TruncateZero = true) const; bool getExactInverse(APFloat *inv) const; friend int ilogb(const DoubleAPFloat &Arg); friend DoubleAPFloat scalbn(DoubleAPFloat X, int Exp, roundingMode); friend DoubleAPFloat frexp(const DoubleAPFloat &X, int &Exp, roundingMode); friend hash_code hash_value(const DoubleAPFloat &Arg); }; hash_code hash_value(const DoubleAPFloat &Arg); } class APFloat : public APFloatBase { typedef detail::IEEEFloat IEEEFloat; typedef detail::DoubleAPFloat DoubleAPFloat; static_assert(std::is_standard_layout<IEEEFloat>::value, ""); union Storage { const fltSemantics *semantics; IEEEFloat IEEE; DoubleAPFloat Double; explicit Storage(IEEEFloat F, const fltSemantics &S); explicit Storage(DoubleAPFloat F, const fltSemantics &S) : Double(std::move(F)) { (static_cast<void> (0)); } template <typename... ArgTypes> Storage(const fltSemantics &Semantics, ArgTypes &&... Args) { if (usesLayout<IEEEFloat>(Semantics)) { new (&IEEE) IEEEFloat(Semantics, std::forward<ArgTypes>(Args)...); return; } if (usesLayout<DoubleAPFloat>(Semantics)) { new (&Double) DoubleAPFloat(Semantics, std::forward<ArgTypes>(Args)...); return; } __builtin_unreachable(); } ~Storage() { if (usesLayout<IEEEFloat>(*semantics)) { IEEE.~IEEEFloat(); return; } if (usesLayout<DoubleAPFloat>(*semantics)) { Double.~DoubleAPFloat(); return; } __builtin_unreachable(); } Storage(const Storage &RHS) { if (usesLayout<IEEEFloat>(*RHS.semantics)) { new (this) IEEEFloat(RHS.IEEE); return; } if (usesLayout<DoubleAPFloat>(*RHS.semantics)) { new (this) DoubleAPFloat(RHS.Double); return; } __builtin_unreachable(); } Storage(Storage &&RHS) { if (usesLayout<IEEEFloat>(*RHS.semantics)) { new (this) IEEEFloat(std::move(RHS.IEEE)); return; } if (usesLayout<DoubleAPFloat>(*RHS.semantics)) { new (this) DoubleAPFloat(std::move(RHS.Double)); return; } __builtin_unreachable(); } Storage &operator=(const Storage &RHS) { if (usesLayout<IEEEFloat>(*semantics) && usesLayout<IEEEFloat>(*RHS.semantics)) { IEEE = RHS.IEEE; } else if (usesLayout<DoubleAPFloat>(*semantics) && usesLayout<DoubleAPFloat>(*RHS.semantics)) { Double = RHS.Double; } else if (this != &RHS) { this->~Storage(); new (this) Storage(RHS); } return *this; } Storage &operator=(Storage &&RHS) { if (usesLayout<IEEEFloat>(*semantics) && usesLayout<IEEEFloat>(*RHS.semantics)) { IEEE = std::move(RHS.IEEE); } else if (usesLayout<DoubleAPFloat>(*semantics) && usesLayout<DoubleAPFloat>(*RHS.semantics)) { Double = std::move(RHS.Double); } else if (this != &RHS) { this->~Storage(); new (this) Storage(std::move(RHS)); } return *this; } } U; template <typename T> static bool usesLayout(const fltSemantics &Semantics) { static_assert(std::is_same<T, IEEEFloat>::value || std::is_same<T, DoubleAPFloat>::value, ""); if (std::is_same<T, DoubleAPFloat>::value) { return &Semantics == &PPCDoubleDouble(); } return &Semantics != &PPCDoubleDouble(); } IEEEFloat &getIEEE() { if (usesLayout<IEEEFloat>(*U.semantics)) return U.IEEE; if (usesLayout<DoubleAPFloat>(*U.semantics)) return U.Double.getFirst().U.IEEE; __builtin_unreachable(); } const IEEEFloat &getIEEE() const { if (usesLayout<IEEEFloat>(*U.semantics)) return U.IEEE; if (usesLayout<DoubleAPFloat>(*U.semantics)) return U.Double.getFirst().U.IEEE; __builtin_unreachable(); } void makeZero(bool Neg) { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.makeZero(Neg); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.makeZero(Neg); __builtin_unreachable(); } while (false); } void makeInf(bool Neg) { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.makeInf(Neg); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.makeInf(Neg); __builtin_unreachable(); } while (false); } void makeNaN(bool SNaN, bool Neg, const APInt *fill) { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.makeNaN(SNaN, Neg, fill); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.makeNaN(SNaN, Neg, fill); __builtin_unreachable(); } while (false); } void makeLargest(bool Neg) { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.makeLargest(Neg); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.makeLargest(Neg); __builtin_unreachable(); } while (false); } void makeSmallest(bool Neg) { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.makeSmallest(Neg); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.makeSmallest(Neg); __builtin_unreachable(); } while (false); } void makeSmallestNormalized(bool Neg) { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.makeSmallestNormalized(Neg); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.makeSmallestNormalized(Neg); __builtin_unreachable(); } while (false); } APFloat() : U(IEEEdouble()) { __builtin_unreachable(); } explicit APFloat(IEEEFloat F, const fltSemantics &S) : U(std::move(F), S) {} explicit APFloat(DoubleAPFloat F, const fltSemantics &S) : U(std::move(F), S) {} cmpResult compareAbsoluteValue(const APFloat &RHS) const { (static_cast<void> (0)); if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.compareAbsoluteValue(RHS.U.IEEE); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.compareAbsoluteValue(RHS.U.Double); __builtin_unreachable(); } public: APFloat(const fltSemantics &Semantics) : U(Semantics) {} APFloat(const fltSemantics &Semantics, StringRef S); APFloat(const fltSemantics &Semantics, integerPart I) : U(Semantics, I) {} template <typename T, typename = std::enable_if_t<std::is_floating_point<T>::value>> APFloat(const fltSemantics &Semantics, T V) = delete; APFloat(const fltSemantics &Semantics, uninitializedTag) : U(Semantics, uninitialized) {} APFloat(const fltSemantics &Semantics, const APInt &I) : U(Semantics, I) {} explicit APFloat(double d) : U(IEEEFloat(d), IEEEdouble()) {} explicit APFloat(float f) : U(IEEEFloat(f), IEEEsingle()) {} APFloat(const APFloat &RHS) = default; APFloat(APFloat &&RHS) = default; ~APFloat() = default; bool needsCleanup() const { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.needsCleanup(); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.needsCleanup(); __builtin_unreachable(); } while (false); } static APFloat getZero(const fltSemantics &Sem, bool Negative = false) { APFloat Val(Sem, uninitialized); Val.makeZero(Negative); return Val; } static APFloat getInf(const fltSemantics &Sem, bool Negative = false) { APFloat Val(Sem, uninitialized); Val.makeInf(Negative); return Val; } static APFloat getNaN(const fltSemantics &Sem, bool Negative = false, uint64_t payload = 0) { if (payload) { APInt intPayload(64, payload); return getQNaN(Sem, Negative, &intPayload); } else { return getQNaN(Sem, Negative, nullptr); } } static APFloat getQNaN(const fltSemantics &Sem, bool Negative = false, const APInt *payload = nullptr) { APFloat Val(Sem, uninitialized); Val.makeNaN(false, Negative, payload); return Val; } static APFloat getSNaN(const fltSemantics &Sem, bool Negative = false, const APInt *payload = nullptr) { APFloat Val(Sem, uninitialized); Val.makeNaN(true, Negative, payload); return Val; } static APFloat getLargest(const fltSemantics &Sem, bool Negative = false) { APFloat Val(Sem, uninitialized); Val.makeLargest(Negative); return Val; } static APFloat getSmallest(const fltSemantics &Sem, bool Negative = false) { APFloat Val(Sem, uninitialized); Val.makeSmallest(Negative); return Val; } static APFloat getSmallestNormalized(const fltSemantics &Sem, bool Negative = false) { APFloat Val(Sem, uninitialized); Val.makeSmallestNormalized(Negative); return Val; } static APFloat getAllOnesValue(const fltSemantics &Semantics, unsigned BitWidth); void Profile(FoldingSetNodeID &NID) const; opStatus add(const APFloat &RHS, roundingMode RM) { (static_cast<void> (0)); if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.add(RHS.U.IEEE, RM); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.add(RHS.U.Double, RM); __builtin_unreachable(); } opStatus subtract(const APFloat &RHS, roundingMode RM) { (static_cast<void> (0)); if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.subtract(RHS.U.IEEE, RM); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.subtract(RHS.U.Double, RM); __builtin_unreachable(); } opStatus multiply(const APFloat &RHS, roundingMode RM) { (static_cast<void> (0)); if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.multiply(RHS.U.IEEE, RM); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.multiply(RHS.U.Double, RM); __builtin_unreachable(); } opStatus divide(const APFloat &RHS, roundingMode RM) { (static_cast<void> (0)); if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.divide(RHS.U.IEEE, RM); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.divide(RHS.U.Double, RM); __builtin_unreachable(); } opStatus remainder(const APFloat &RHS) { (static_cast<void> (0)); if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.remainder(RHS.U.IEEE); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.remainder(RHS.U.Double); __builtin_unreachable(); } opStatus mod(const APFloat &RHS) { (static_cast<void> (0)); if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.mod(RHS.U.IEEE); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.mod(RHS.U.Double); __builtin_unreachable(); } opStatus fusedMultiplyAdd(const APFloat &Multiplicand, const APFloat &Addend, roundingMode RM) { (static_cast<void> (0)); (static_cast<void> (0)); if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.fusedMultiplyAdd(Multiplicand.U.IEEE, Addend.U.IEEE, RM); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.fusedMultiplyAdd(Multiplicand.U.Double, Addend.U.Double, RM); __builtin_unreachable(); } opStatus roundToIntegral(roundingMode RM) { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.roundToIntegral(RM); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.roundToIntegral(RM); __builtin_unreachable(); } while (false); } opStatus next(bool nextDown) { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.next(nextDown); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.next(nextDown); __builtin_unreachable(); } while (false); } APFloat operator-() const { APFloat Result(*this); Result.changeSign(); return Result; } APFloat operator+(const APFloat &RHS) const { APFloat Result(*this); (void)Result.add(RHS, rmNearestTiesToEven); return Result; } APFloat operator-(const APFloat &RHS) const { APFloat Result(*this); (void)Result.subtract(RHS, rmNearestTiesToEven); return Result; } APFloat operator*(const APFloat &RHS) const { APFloat Result(*this); (void)Result.multiply(RHS, rmNearestTiesToEven); return Result; } APFloat operator/(const APFloat &RHS) const { APFloat Result(*this); (void)Result.divide(RHS, rmNearestTiesToEven); return Result; } void changeSign() { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.changeSign(); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.changeSign(); __builtin_unreachable(); } while (false); } void clearSign() { if (isNegative()) changeSign(); } void copySign(const APFloat &RHS) { if (isNegative() != RHS.isNegative()) changeSign(); } static APFloat copySign(APFloat Value, const APFloat &Sign) { Value.copySign(Sign); return Value; } opStatus convert(const fltSemantics &ToSemantics, roundingMode RM, bool *losesInfo); opStatus convertToInteger(MutableArrayRef<integerPart> Input, unsigned int Width, bool IsSigned, roundingMode RM, bool *IsExact) const { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.convertToInteger(Input, Width, IsSigned, RM, IsExact); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.convertToInteger(Input, Width, IsSigned, RM, IsExact); __builtin_unreachable(); } while (false); } opStatus convertToInteger(APSInt &Result, roundingMode RM, bool *IsExact) const; opStatus convertFromAPInt(const APInt &Input, bool IsSigned, roundingMode RM) { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.convertFromAPInt(Input, IsSigned, RM); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.convertFromAPInt(Input, IsSigned, RM); __builtin_unreachable(); } while (false); } opStatus convertFromSignExtendedInteger(const integerPart *Input, unsigned int InputSize, bool IsSigned, roundingMode RM) { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.convertFromSignExtendedInteger(Input, InputSize, IsSigned, RM); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.convertFromSignExtendedInteger(Input, InputSize, IsSigned, RM); __builtin_unreachable(); } while (false); } opStatus convertFromZeroExtendedInteger(const integerPart *Input, unsigned int InputSize, bool IsSigned, roundingMode RM) { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.convertFromZeroExtendedInteger(Input, InputSize, IsSigned, RM); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.convertFromZeroExtendedInteger(Input, InputSize, IsSigned, RM); __builtin_unreachable(); } while (false); } Expected<opStatus> convertFromString(StringRef, roundingMode); APInt bitcastToAPInt() const { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.bitcastToAPInt(); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.bitcastToAPInt(); __builtin_unreachable(); } while (false); } double convertToDouble() const { return getIEEE().convertToDouble(); } float convertToFloat() const { return getIEEE().convertToFloat(); } bool operator==(const APFloat &RHS) const { return compare(RHS) == cmpEqual; } bool operator!=(const APFloat &RHS) const { return compare(RHS) != cmpEqual; } bool operator<(const APFloat &RHS) const { return compare(RHS) == cmpLessThan; } bool operator>(const APFloat &RHS) const { return compare(RHS) == cmpGreaterThan; } bool operator<=(const APFloat &RHS) const { cmpResult Res = compare(RHS); return Res == cmpLessThan || Res == cmpEqual; } bool operator>=(const APFloat &RHS) const { cmpResult Res = compare(RHS); return Res == cmpGreaterThan || Res == cmpEqual; } cmpResult compare(const APFloat &RHS) const { (static_cast<void> (0)); if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.compare(RHS.U.IEEE); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.compare(RHS.U.Double); __builtin_unreachable(); } bool bitwiseIsEqual(const APFloat &RHS) const { if (&getSemantics() != &RHS.getSemantics()) return false; if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.bitwiseIsEqual(RHS.U.IEEE); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.bitwiseIsEqual(RHS.U.Double); __builtin_unreachable(); } # 1186 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/APFloat.h" bool isExactlyValue(double V) const { bool ignored; APFloat Tmp(V); Tmp.convert(getSemantics(), APFloat::rmNearestTiesToEven, &ignored); return bitwiseIsEqual(Tmp); } unsigned int convertToHexString(char *DST, unsigned int HexDigits, bool UpperCase, roundingMode RM) const { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.convertToHexString(DST, HexDigits, UpperCase, RM); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.convertToHexString(DST, HexDigits, UpperCase, RM); __builtin_unreachable(); } while (false); } bool isZero() const { return getCategory() == fcZero; } bool isInfinity() const { return getCategory() == fcInfinity; } bool isNaN() const { return getCategory() == fcNaN; } bool isNegative() const { return getIEEE().isNegative(); } bool isDenormal() const { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.isDenormal(); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.isDenormal(); __builtin_unreachable(); } while (false); } bool isSignaling() const { return getIEEE().isSignaling(); } bool isNormal() const { return !isDenormal() && isFiniteNonZero(); } bool isFinite() const { return !isNaN() && !isInfinity(); } fltCategory getCategory() const { return getIEEE().getCategory(); } const fltSemantics &getSemantics() const { return *U.semantics; } bool isNonZero() const { return !isZero(); } bool isFiniteNonZero() const { return isFinite() && !isZero(); } bool isPosZero() const { return isZero() && !isNegative(); } bool isNegZero() const { return isZero() && isNegative(); } bool isSmallest() const { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.isSmallest(); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.isSmallest(); __builtin_unreachable(); } while (false); } bool isLargest() const { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.isLargest(); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.isLargest(); __builtin_unreachable(); } while (false); } bool isInteger() const { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.isInteger(); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.isInteger(); __builtin_unreachable(); } while (false); } APFloat &operator=(const APFloat &RHS) = default; APFloat &operator=(APFloat &&RHS) = default; void toString(SmallVectorImpl<char> &Str, unsigned FormatPrecision = 0, unsigned FormatMaxPadding = 3, bool TruncateZero = true) const { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.toString(Str, FormatPrecision, FormatMaxPadding, TruncateZero); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.toString(Str, FormatPrecision, FormatMaxPadding, TruncateZero); __builtin_unreachable(); } while (false); } void print(raw_ostream &) const; void dump() const; bool getExactInverse(APFloat *inv) const { do { if (usesLayout<IEEEFloat>(getSemantics())) return U.IEEE.getExactInverse(inv); if (usesLayout<DoubleAPFloat>(getSemantics())) return U.Double.getExactInverse(inv); __builtin_unreachable(); } while (false); } friend hash_code hash_value(const APFloat &Arg); friend int ilogb(const APFloat &Arg) { return ilogb(Arg.getIEEE()); } friend APFloat scalbn(APFloat X, int Exp, roundingMode RM); friend APFloat frexp(const APFloat &X, int &Exp, roundingMode RM); friend IEEEFloat; friend DoubleAPFloat; }; hash_code hash_value(const APFloat &Arg); inline APFloat scalbn(APFloat X, int Exp, APFloat::roundingMode RM) { if (APFloat::usesLayout<detail::IEEEFloat>(X.getSemantics())) return APFloat(scalbn(X.U.IEEE, Exp, RM), X.getSemantics()); if (APFloat::usesLayout<detail::DoubleAPFloat>(X.getSemantics())) return APFloat(scalbn(X.U.Double, Exp, RM), X.getSemantics()); __builtin_unreachable(); } inline APFloat frexp(const APFloat &X, int &Exp, APFloat::roundingMode RM) { if (APFloat::usesLayout<detail::IEEEFloat>(X.getSemantics())) return APFloat(frexp(X.U.IEEE, Exp, RM), X.getSemantics()); if (APFloat::usesLayout<detail::DoubleAPFloat>(X.getSemantics())) return APFloat(frexp(X.U.Double, Exp, RM), X.getSemantics()); __builtin_unreachable(); } inline APFloat abs(APFloat X) { X.clearSign(); return X; } inline APFloat neg(APFloat X) { X.changeSign(); return X; } __attribute__((__pure__)) inline APFloat minnum(const APFloat &A, const APFloat &B) { if (A.isNaN()) return B; if (B.isNaN()) return A; return B < A ? B : A; } __attribute__((__pure__)) inline APFloat maxnum(const APFloat &A, const APFloat &B) { if (A.isNaN()) return B; if (B.isNaN()) return A; return A < B ? B : A; } __attribute__((__pure__)) inline APFloat minimum(const APFloat &A, const APFloat &B) { if (A.isNaN()) return A; if (B.isNaN()) return B; if (A.isZero() && B.isZero() && (A.isNegative() != B.isNegative())) return A.isNegative() ? A : B; return B < A ? B : A; } __attribute__((__pure__)) inline APFloat maximum(const APFloat &A, const APFloat &B) { if (A.isNaN()) return A; if (B.isNaN()) return B; if (A.isZero() && B.isZero() && (A.isNegative() != B.isNegative())) return A.isNegative() ? B : A; return A < B ? B : A; } } # 24 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constants.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DerivedTypes.h" 1 # 23 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DerivedTypes.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Type.h" 1 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Type.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallPtrSet.h" 1 # 21 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallPtrSet.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallPtrSet.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstdlib" 3 # 24 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallPtrSet.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 3 # 25 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallPtrSet.h" 2 namespace llvm { # 49 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/SmallPtrSet.h" class SmallPtrSetImplBase : public DebugEpochBase { friend class SmallPtrSetIteratorImpl; protected: const void **SmallArray; const void **CurArray; unsigned CurArraySize; unsigned NumNonEmpty; unsigned NumTombstones; SmallPtrSetImplBase(const void **SmallStorage, const SmallPtrSetImplBase &that); SmallPtrSetImplBase(const void **SmallStorage, unsigned SmallSize, SmallPtrSetImplBase &&that); explicit SmallPtrSetImplBase(const void **SmallStorage, unsigned SmallSize) : SmallArray(SmallStorage), CurArray(SmallStorage), CurArraySize(SmallSize), NumNonEmpty(0), NumTombstones(0) { (static_cast<void> (0)); } ~SmallPtrSetImplBase() { if (!isSmall()) free(CurArray); } public: using size_type = unsigned; SmallPtrSetImplBase &operator=(const SmallPtrSetImplBase &) = delete; [[clang::warn_unused_result]] bool empty() const { return size() == 0; } size_type size() const { return NumNonEmpty - NumTombstones; } void clear() { incrementEpoch(); if (!isSmall()) { if (size() * 4 < CurArraySize && CurArraySize > 32) return shrink_and_clear(); memset(CurArray, -1, CurArraySize * sizeof(void *)); } NumNonEmpty = 0; NumTombstones = 0; } protected: static void *getTombstoneMarker() { return reinterpret_cast<void*>(-2); } static void *getEmptyMarker() { return reinterpret_cast<void*>(-1); } const void **EndPointer() const { return isSmall() ? CurArray + NumNonEmpty : CurArray + CurArraySize; } std::pair<const void *const *, bool> insert_imp(const void *Ptr) { if (isSmall()) { const void **LastTombstone = nullptr; for (const void **APtr = SmallArray, **E = SmallArray + NumNonEmpty; APtr != E; ++APtr) { const void *Value = *APtr; if (Value == Ptr) return std::make_pair(APtr, false); if (Value == getTombstoneMarker()) LastTombstone = APtr; } if (LastTombstone != nullptr) { *LastTombstone = Ptr; --NumTombstones; incrementEpoch(); return std::make_pair(LastTombstone, true); } if (NumNonEmpty < CurArraySize) { SmallArray[NumNonEmpty++] = Ptr; incrementEpoch(); return std::make_pair(SmallArray + (NumNonEmpty - 1), true); } } return insert_imp_big(Ptr); } bool erase_imp(const void * Ptr) { const void *const *P = find_imp(Ptr); if (P == EndPointer()) return false; const void **Loc = const_cast<const void **>(P); (static_cast<void> (0)); *Loc = getTombstoneMarker(); NumTombstones++; return true; } const void *const * find_imp(const void * Ptr) const { if (isSmall()) { for (const void *const *APtr = SmallArray, *const *E = SmallArray + NumNonEmpty; APtr != E; ++APtr) if (*APtr == Ptr) return APtr; return EndPointer(); } auto *Bucket = FindBucketFor(Ptr); if (*Bucket == Ptr) return Bucket; return EndPointer(); } private: bool isSmall() const { return CurArray == SmallArray; } std::pair<const void *const *, bool> insert_imp_big(const void *Ptr); const void * const *FindBucketFor(const void *Ptr) const; void shrink_and_clear(); void Grow(unsigned NewSize); protected: void swap(SmallPtrSetImplBase &RHS); void CopyFrom(const SmallPtrSetImplBase &RHS); void MoveFrom(unsigned SmallSize, SmallPtrSetImplBase &&RHS); private: void MoveHelper(unsigned SmallSize, SmallPtrSetImplBase &&RHS); void CopyHelper(const SmallPtrSetImplBase &RHS); }; class SmallPtrSetIteratorImpl { protected: const void *const *Bucket; const void *const *End; public: explicit SmallPtrSetIteratorImpl(const void *const *BP, const void*const *E) : Bucket(BP), End(E) { if (shouldReverseIterate()) { RetreatIfNotValid(); return; } AdvanceIfNotValid(); } bool operator==(const SmallPtrSetIteratorImpl &RHS) const { return Bucket == RHS.Bucket; } bool operator!=(const SmallPtrSetIteratorImpl &RHS) const { return Bucket != RHS.Bucket; } protected: void AdvanceIfNotValid() { (static_cast<void> (0)); while (Bucket != End && (*Bucket == SmallPtrSetImplBase::getEmptyMarker() || *Bucket == SmallPtrSetImplBase::getTombstoneMarker())) ++Bucket; } void RetreatIfNotValid() { (static_cast<void> (0)); while (Bucket != End && (Bucket[-1] == SmallPtrSetImplBase::getEmptyMarker() || Bucket[-1] == SmallPtrSetImplBase::getTombstoneMarker())) { --Bucket; } } }; template <typename PtrTy> class SmallPtrSetIterator : public SmallPtrSetIteratorImpl, DebugEpochBase::HandleBase { using PtrTraits = PointerLikeTypeTraits<PtrTy>; public: using value_type = PtrTy; using reference = PtrTy; using pointer = PtrTy; using difference_type = std::ptrdiff_t; using iterator_category = std::forward_iterator_tag; explicit SmallPtrSetIterator(const void *const *BP, const void *const *E, const DebugEpochBase &Epoch) : SmallPtrSetIteratorImpl(BP, E), DebugEpochBase::HandleBase(&Epoch) {} const PtrTy operator*() const { (static_cast<void> (0)); if (shouldReverseIterate()) { (static_cast<void> (0)); return PtrTraits::getFromVoidPointer(const_cast<void *>(Bucket[-1])); } (static_cast<void> (0)); return PtrTraits::getFromVoidPointer(const_cast<void*>(*Bucket)); } inline SmallPtrSetIterator& operator++() { (static_cast<void> (0)); if (shouldReverseIterate()) { --Bucket; RetreatIfNotValid(); return *this; } ++Bucket; AdvanceIfNotValid(); return *this; } SmallPtrSetIterator operator++(int) { SmallPtrSetIterator tmp = *this; ++*this; return tmp; } }; template<unsigned N> struct RoundUpToPowerOfTwo; template<unsigned N, bool isPowerTwo> struct RoundUpToPowerOfTwoH { enum { Val = N }; }; template<unsigned N> struct RoundUpToPowerOfTwoH<N, false> { enum { Val = RoundUpToPowerOfTwo<(N|(N-1)) + 1>::Val }; }; template<unsigned N> struct RoundUpToPowerOfTwo { enum { Val = RoundUpToPowerOfTwoH<N, (N&(N-1)) == 0>::Val }; }; template <typename PtrType> class SmallPtrSetImpl : public SmallPtrSetImplBase { using ConstPtrType = typename add_const_past_pointer<PtrType>::type; using PtrTraits = PointerLikeTypeTraits<PtrType>; using ConstPtrTraits = PointerLikeTypeTraits<ConstPtrType>; protected: using SmallPtrSetImplBase::SmallPtrSetImplBase; public: using iterator = SmallPtrSetIterator<PtrType>; using const_iterator = SmallPtrSetIterator<PtrType>; using key_type = ConstPtrType; using value_type = PtrType; SmallPtrSetImpl(const SmallPtrSetImpl &) = delete; std::pair<iterator, bool> insert(PtrType Ptr) { auto p = insert_imp(PtrTraits::getAsVoidPointer(Ptr)); return std::make_pair(makeIterator(p.first), p.second); } bool erase(PtrType Ptr) { return erase_imp(PtrTraits::getAsVoidPointer(Ptr)); } size_type count(ConstPtrType Ptr) const { return find_imp(ConstPtrTraits::getAsVoidPointer(Ptr)) != EndPointer(); } iterator find(ConstPtrType Ptr) const { return makeIterator(find_imp(ConstPtrTraits::getAsVoidPointer(Ptr))); } bool contains(ConstPtrType Ptr) const { return find_imp(ConstPtrTraits::getAsVoidPointer(Ptr)) != EndPointer(); } template <typename IterT> void insert(IterT I, IterT E) { for (; I != E; ++I) insert(*I); } void insert(std::initializer_list<PtrType> IL) { insert(IL.begin(), IL.end()); } iterator begin() const { if (shouldReverseIterate()) return makeIterator(EndPointer() - 1); return makeIterator(CurArray); } iterator end() const { return makeIterator(EndPointer()); } private: iterator makeIterator(const void *const *P) const { if (shouldReverseIterate()) return iterator(P == EndPointer() ? CurArray : P + 1, CurArray, *this); return iterator(P, EndPointer(), *this); } }; template <typename PtrType> bool operator==(const SmallPtrSetImpl<PtrType> &LHS, const SmallPtrSetImpl<PtrType> &RHS) { if (LHS.size() != RHS.size()) return false; for (const auto *KV : LHS) if (!RHS.count(KV)) return false; return true; } template <typename PtrType> bool operator!=(const SmallPtrSetImpl<PtrType> &LHS, const SmallPtrSetImpl<PtrType> &RHS) { return !(LHS == RHS); } template<class PtrType, unsigned SmallSize> class SmallPtrSet : public SmallPtrSetImpl<PtrType> { static_assert(SmallSize <= 32, "SmallSize should be small"); using BaseT = SmallPtrSetImpl<PtrType>; enum { SmallSizePowTwo = RoundUpToPowerOfTwo<SmallSize>::Val }; const void *SmallStorage[SmallSizePowTwo]; public: SmallPtrSet() : BaseT(SmallStorage, SmallSizePowTwo) {} SmallPtrSet(const SmallPtrSet &that) : BaseT(SmallStorage, that) {} SmallPtrSet(SmallPtrSet &&that) : BaseT(SmallStorage, SmallSizePowTwo, std::move(that)) {} template<typename It> SmallPtrSet(It I, It E) : BaseT(SmallStorage, SmallSizePowTwo) { this->insert(I, E); } SmallPtrSet(std::initializer_list<PtrType> IL) : BaseT(SmallStorage, SmallSizePowTwo) { this->insert(IL.begin(), IL.end()); } SmallPtrSet<PtrType, SmallSize> & operator=(const SmallPtrSet<PtrType, SmallSize> &RHS) { if (&RHS != this) this->CopyFrom(RHS); return *this; } SmallPtrSet<PtrType, SmallSize> & operator=(SmallPtrSet<PtrType, SmallSize> &&RHS) { if (&RHS != this) this->MoveFrom(SmallSizePowTwo, std::move(RHS)); return *this; } SmallPtrSet<PtrType, SmallSize> & operator=(std::initializer_list<PtrType> IL) { this->clear(); this->insert(IL.begin(), IL.end()); return *this; } void swap(SmallPtrSet<PtrType, SmallSize> &RHS) { SmallPtrSetImplBase::swap(RHS); } }; } namespace std { template<class T, unsigned N> inline void swap(llvm::SmallPtrSet<T, N> &LHS, llvm::SmallPtrSet<T, N> &RHS) { LHS.swap(RHS); } } # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Type.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/TypeSize.h" 1 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/TypeSize.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/WithColor.h" 1 # 14 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/WithColor.h" namespace llvm { class Error; class StringRef; namespace cl { class OptionCategory; } extern cl::OptionCategory ColorCategory; enum class HighlightColor { Address, String, Tag, Attribute, Enumerator, Macro, Error, Warning, Note, Remark }; enum class ColorMode { Auto, Enable, Disable, }; class WithColor { raw_ostream &OS; ColorMode Mode; public: WithColor(raw_ostream &OS, HighlightColor S, ColorMode Mode = ColorMode::Auto); WithColor(raw_ostream &OS, raw_ostream::Colors Color = raw_ostream::SAVEDCOLOR, bool Bold = false, bool BG = false, ColorMode Mode = ColorMode::Auto) : OS(OS), Mode(Mode) { changeColor(Color, Bold, BG); } ~WithColor(); raw_ostream &get() { return OS; } operator raw_ostream &() { return OS; } template <typename T> WithColor &operator<<(T &O) { OS << O; return *this; } template <typename T> WithColor &operator<<(const T &O) { OS << O; return *this; } static raw_ostream &error(); static raw_ostream &warning(); static raw_ostream ¬e(); static raw_ostream &remark(); static raw_ostream &error(raw_ostream &OS, StringRef Prefix = "", bool DisableColors = false); static raw_ostream &warning(raw_ostream &OS, StringRef Prefix = "", bool DisableColors = false); static raw_ostream ¬e(raw_ostream &OS, StringRef Prefix = "", bool DisableColors = false); static raw_ostream &remark(raw_ostream &OS, StringRef Prefix = "", bool DisableColors = false); bool colorsEnabled(); WithColor &changeColor(raw_ostream::Colors Color, bool Bold = false, bool BG = false); WithColor &resetColor(); static void defaultErrorHandler(Error Err); static void defaultWarningHandler(Error Warning); }; } # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/TypeSize.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 23 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/TypeSize.h" 2 namespace llvm { template <typename T> struct DenseMapInfo; class ElementCount { public: unsigned Min; bool Scalable; ElementCount() = default; ElementCount(unsigned Min, bool Scalable) : Min(Min), Scalable(Scalable) {} ElementCount operator*(unsigned RHS) { return { Min * RHS, Scalable }; } ElementCount operator/(unsigned RHS) { (static_cast<void> (0)); return { Min / RHS, Scalable }; } bool operator==(const ElementCount& RHS) const { return Min == RHS.Min && Scalable == RHS.Scalable; } bool operator!=(const ElementCount& RHS) const { return !(*this == RHS); } bool operator==(unsigned RHS) const { return Min == RHS && !Scalable; } bool operator!=(unsigned RHS) const { return !(*this == RHS); } ElementCount NextPowerOf2() const { return ElementCount(llvm::NextPowerOf2(Min), Scalable); } }; class TypeSize { uint64_t MinSize; bool IsScalable; public: constexpr TypeSize(uint64_t MinSize, bool Scalable) : MinSize(MinSize), IsScalable(Scalable) {} static constexpr TypeSize Fixed(uint64_t Size) { return TypeSize(Size, false); } static constexpr TypeSize Scalable(uint64_t MinSize) { return TypeSize(MinSize, true); } friend bool operator==(const TypeSize &LHS, const TypeSize &RHS) { return LHS.MinSize == RHS.MinSize && LHS.IsScalable == RHS.IsScalable; } friend bool operator!=(const TypeSize &LHS, const TypeSize &RHS) { return !(LHS == RHS); } # 101 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/TypeSize.h" friend bool operator<(const TypeSize &LHS, const TypeSize &RHS) { (static_cast<void> (0)); return LHS.MinSize < RHS.MinSize; } friend bool operator>(const TypeSize &LHS, const TypeSize &RHS) { return RHS < LHS; } friend bool operator<=(const TypeSize &LHS, const TypeSize &RHS) { return !(RHS < LHS); } friend bool operator>=(const TypeSize &LHS, const TypeSize& RHS) { return !(LHS < RHS); } TypeSize operator*(unsigned RHS) const { return { MinSize * RHS, IsScalable }; } friend TypeSize operator*(const unsigned LHS, const TypeSize &RHS) { return { LHS * RHS.MinSize, RHS.IsScalable }; } TypeSize operator/(unsigned RHS) const { return { MinSize / RHS, IsScalable }; } uint64_t getFixedSize() const { (static_cast<void> (0)); return MinSize; } uint64_t getKnownMinSize() const { return MinSize; } bool isScalable() const { return IsScalable; } bool isByteSized() const { return (MinSize & 7) == 0; } bool isNonZero() const { return MinSize != 0; } bool isZero() const { return MinSize == 0; } # 183 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/TypeSize.h" operator uint64_t() const { if (isScalable()) WithColor::warning() << "Compiler has made implicit assumption that " "TypeSize is not scalable. This may or may not " "lead to broken code.\n"; return getKnownMinSize(); } TypeSize operator*(uint64_t RHS) const { return { MinSize * RHS, IsScalable }; } TypeSize operator*(int RHS) const { return { MinSize * RHS, IsScalable }; } TypeSize operator*(int64_t RHS) const { return { MinSize * RHS, IsScalable }; } friend TypeSize operator*(const uint64_t LHS, const TypeSize &RHS) { return { LHS * RHS.MinSize, RHS.IsScalable }; } friend TypeSize operator*(const int LHS, const TypeSize &RHS) { return { LHS * RHS.MinSize, RHS.IsScalable }; } friend TypeSize operator*(const int64_t LHS, const TypeSize &RHS) { return { LHS * RHS.MinSize, RHS.IsScalable }; } TypeSize operator/(uint64_t RHS) const { return { MinSize / RHS, IsScalable }; } TypeSize operator/(int RHS) const { return { MinSize / RHS, IsScalable }; } TypeSize operator/(int64_t RHS) const { return { MinSize / RHS, IsScalable }; } TypeSize NextPowerOf2() const { return TypeSize(llvm::NextPowerOf2(MinSize), IsScalable); } }; inline TypeSize alignTo(TypeSize Size, uint64_t Align) { (static_cast<void> (0)); return {(Size.getKnownMinSize() + Align - 1) / Align * Align, Size.isScalable()}; } template <> struct DenseMapInfo<ElementCount> { static inline ElementCount getEmptyKey() { return {~0U, true}; } static inline ElementCount getTombstoneKey() { return {~0U - 1, false}; } static unsigned getHashValue(const ElementCount& EltCnt) { if (EltCnt.Scalable) return (EltCnt.Min * 37U) - 1U; return EltCnt.Min * 37U; } static bool isEqual(const ElementCount& LHS, const ElementCount& RHS) { return LHS == RHS; } }; } # 25 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Type.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 26 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Type.h" 2 namespace llvm { template<class GraphType> struct GraphTraits; class IntegerType; class LLVMContext; class PointerType; class raw_ostream; class StringRef; # 46 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Type.h" class Type { public: enum TypeID { HalfTyID = 0, BFloatTyID, FloatTyID, DoubleTyID, X86_FP80TyID, FP128TyID, PPC_FP128TyID, VoidTyID, LabelTyID, MetadataTyID, X86_MMXTyID, TokenTyID, IntegerTyID, FunctionTyID, PointerTyID, StructTyID, ArrayTyID, FixedVectorTyID, ScalableVectorTyID }; private: LLVMContext &Context; TypeID ID : 8; unsigned SubclassData : 24; protected: friend class LLVMContextImpl; explicit Type(LLVMContext &C, TypeID tid) : Context(C), ID(tid), SubclassData(0) {} ~Type() = default; unsigned getSubclassData() const { return SubclassData; } void setSubclassData(unsigned val) { SubclassData = val; (static_cast<void> (0)); } unsigned NumContainedTys = 0; Type * const *ContainedTys = nullptr; public: void print(raw_ostream &O, bool IsForDebug = false, bool NoDetails = false) const; void dump() const; LLVMContext &getContext() const { return Context; } TypeID getTypeID() const { return ID; } bool isVoidTy() const { return getTypeID() == VoidTyID; } bool isHalfTy() const { return getTypeID() == HalfTyID; } bool isBFloatTy() const { return getTypeID() == BFloatTyID; } bool isFloatTy() const { return getTypeID() == FloatTyID; } bool isDoubleTy() const { return getTypeID() == DoubleTyID; } bool isX86_FP80Ty() const { return getTypeID() == X86_FP80TyID; } bool isFP128Ty() const { return getTypeID() == FP128TyID; } bool isPPC_FP128Ty() const { return getTypeID() == PPC_FP128TyID; } bool isFloatingPointTy() const { return getTypeID() == HalfTyID || getTypeID() == BFloatTyID || getTypeID() == FloatTyID || getTypeID() == DoubleTyID || getTypeID() == X86_FP80TyID || getTypeID() == FP128TyID || getTypeID() == PPC_FP128TyID; } const fltSemantics &getFltSemantics() const { switch (getTypeID()) { case HalfTyID: return APFloat::IEEEhalf(); case BFloatTyID: return APFloat::BFloat(); case FloatTyID: return APFloat::IEEEsingle(); case DoubleTyID: return APFloat::IEEEdouble(); case X86_FP80TyID: return APFloat::x87DoubleExtended(); case FP128TyID: return APFloat::IEEEquad(); case PPC_FP128TyID: return APFloat::PPCDoubleDouble(); default: __builtin_unreachable(); } } bool isX86_MMXTy() const { return getTypeID() == X86_MMXTyID; } bool isFPOrFPVectorTy() const { return getScalarType()->isFloatingPointTy(); } bool isLabelTy() const { return getTypeID() == LabelTyID; } bool isMetadataTy() const { return getTypeID() == MetadataTyID; } bool isTokenTy() const { return getTypeID() == TokenTyID; } bool isIntegerTy() const { return getTypeID() == IntegerTyID; } bool isIntegerTy(unsigned Bitwidth) const; bool isIntOrIntVectorTy() const { return getScalarType()->isIntegerTy(); } bool isIntOrIntVectorTy(unsigned BitWidth) const { return getScalarType()->isIntegerTy(BitWidth); } bool isIntOrPtrTy() const { return isIntegerTy() || isPointerTy(); } bool isFunctionTy() const { return getTypeID() == FunctionTyID; } bool isStructTy() const { return getTypeID() == StructTyID; } bool isArrayTy() const { return getTypeID() == ArrayTyID; } bool isPointerTy() const { return getTypeID() == PointerTyID; } bool isPtrOrPtrVectorTy() const { return getScalarType()->isPointerTy(); } inline bool isVectorTy() const { return getTypeID() == ScalableVectorTyID || getTypeID() == FixedVectorTyID; } bool canLosslesslyBitCastTo(Type *Ty) const; bool isEmptyTy() const; bool isFirstClassType() const { return getTypeID() != FunctionTyID && getTypeID() != VoidTyID; } bool isSingleValueType() const { return isFloatingPointTy() || isX86_MMXTy() || isIntegerTy() || isPointerTy() || isVectorTy(); } bool isAggregateType() const { return getTypeID() == StructTyID || getTypeID() == ArrayTyID; } bool isSized(SmallPtrSetImpl<Type*> *Visited = nullptr) const { if (getTypeID() == IntegerTyID || isFloatingPointTy() || getTypeID() == PointerTyID || getTypeID() == X86_MMXTyID) return true; if (getTypeID() != StructTyID && getTypeID() != ArrayTyID && !isVectorTy()) return false; return isSizedDerivedType(Visited); } # 295 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Type.h" TypeSize getPrimitiveSizeInBits() const __attribute__((__pure__)); unsigned getScalarSizeInBits() const __attribute__((__pure__)); int getFPMantissaWidth() const; inline Type *getScalarType() const { if (isVectorTy()) return getContainedType(0); return const_cast<Type *>(this); } using subtype_iterator = Type * const *; subtype_iterator subtype_begin() const { return ContainedTys; } subtype_iterator subtype_end() const { return &ContainedTys[NumContainedTys];} ArrayRef<Type*> subtypes() const { return makeArrayRef(subtype_begin(), subtype_end()); } using subtype_reverse_iterator = std::reverse_iterator<subtype_iterator>; subtype_reverse_iterator subtype_rbegin() const { return subtype_reverse_iterator(subtype_end()); } subtype_reverse_iterator subtype_rend() const { return subtype_reverse_iterator(subtype_begin()); } Type *getContainedType(unsigned i) const { (static_cast<void> (0)); return ContainedTys[i]; } unsigned getNumContainedTypes() const { return NumContainedTys; } # 353 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Type.h" inline unsigned getIntegerBitWidth() const; inline Type *getFunctionParamType(unsigned i) const; inline unsigned getFunctionNumParams() const; inline bool isFunctionVarArg() const; inline StringRef getStructName() const; inline unsigned getStructNumElements() const; inline Type *getStructElementType(unsigned N) const; inline uint64_t getArrayNumElements() const; Type *getArrayElementType() const { (static_cast<void> (0)); return ContainedTys[0]; } Type *getPointerElementType() const { (static_cast<void> (0)); return ContainedTys[0]; } inline Type *getWithNewBitWidth(unsigned NewBitWidth) const; inline Type *getExtendedType() const; inline unsigned getPointerAddressSpace() const; static Type *getPrimitiveType(LLVMContext &C, TypeID IDNumber); static Type *getVoidTy(LLVMContext &C); static Type *getLabelTy(LLVMContext &C); static Type *getHalfTy(LLVMContext &C); static Type *getBFloatTy(LLVMContext &C); static Type *getFloatTy(LLVMContext &C); static Type *getDoubleTy(LLVMContext &C); static Type *getMetadataTy(LLVMContext &C); static Type *getX86_FP80Ty(LLVMContext &C); static Type *getFP128Ty(LLVMContext &C); static Type *getPPC_FP128Ty(LLVMContext &C); static Type *getX86_MMXTy(LLVMContext &C); static Type *getTokenTy(LLVMContext &C); static IntegerType *getIntNTy(LLVMContext &C, unsigned N); static IntegerType *getInt1Ty(LLVMContext &C); static IntegerType *getInt8Ty(LLVMContext &C); static IntegerType *getInt16Ty(LLVMContext &C); static IntegerType *getInt32Ty(LLVMContext &C); static IntegerType *getInt64Ty(LLVMContext &C); static IntegerType *getInt128Ty(LLVMContext &C); template <typename ScalarTy> static Type *getScalarTy(LLVMContext &C) { int noOfBits = sizeof(ScalarTy) * 8; if (std::is_integral<ScalarTy>::value) { return (Type*) Type::getIntNTy(C, noOfBits); } else if (std::is_floating_point<ScalarTy>::value) { switch (noOfBits) { case 32: return Type::getFloatTy(C); case 64: return Type::getDoubleTy(C); } } __builtin_unreachable(); } static PointerType *getHalfPtrTy(LLVMContext &C, unsigned AS = 0); static PointerType *getBFloatPtrTy(LLVMContext &C, unsigned AS = 0); static PointerType *getFloatPtrTy(LLVMContext &C, unsigned AS = 0); static PointerType *getDoublePtrTy(LLVMContext &C, unsigned AS = 0); static PointerType *getX86_FP80PtrTy(LLVMContext &C, unsigned AS = 0); static PointerType *getFP128PtrTy(LLVMContext &C, unsigned AS = 0); static PointerType *getPPC_FP128PtrTy(LLVMContext &C, unsigned AS = 0); static PointerType *getX86_MMXPtrTy(LLVMContext &C, unsigned AS = 0); static PointerType *getIntNPtrTy(LLVMContext &C, unsigned N, unsigned AS = 0); static PointerType *getInt1PtrTy(LLVMContext &C, unsigned AS = 0); static PointerType *getInt8PtrTy(LLVMContext &C, unsigned AS = 0); static PointerType *getInt16PtrTy(LLVMContext &C, unsigned AS = 0); static PointerType *getInt32PtrTy(LLVMContext &C, unsigned AS = 0); static PointerType *getInt64PtrTy(LLVMContext &C, unsigned AS = 0); PointerType *getPointerTo(unsigned AddrSpace = 0) const; private: bool isSizedDerivedType(SmallPtrSetImpl<Type*> *Visited = nullptr) const; }; inline raw_ostream &operator<<(raw_ostream &OS, const Type &T) { T.print(OS); return OS; } template <> struct isa_impl<PointerType, Type> { static inline bool doit(const Type &Ty) { return Ty.getTypeID() == Type::PointerTyID; } }; inline Type *unwrap(LLVMTypeRef P) { return reinterpret_cast<Type*>(P); } inline LLVMTypeRef wrap(const Type *P) { return reinterpret_cast<LLVMTypeRef>(const_cast<Type*>(P)); } template<typename T> inline T *unwrap(LLVMTypeRef P) { return cast<T>(unwrap(P)); } inline Type **unwrap(LLVMTypeRef* Tys) { return reinterpret_cast<Type**>(Tys); } inline LLVMTypeRef *wrap(Type **Tys) { return reinterpret_cast<LLVMTypeRef*>(const_cast<Type**>(Tys)); } } # 24 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DerivedTypes.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 28 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DerivedTypes.h" 2 namespace llvm { class Value; class APInt; class LLVMContext; class IntegerType : public Type { friend class LLVMContextImpl; protected: explicit IntegerType(LLVMContext &C, unsigned NumBits) : Type(C, IntegerTyID){ setSubclassData(NumBits); } public: enum { MIN_INT_BITS = 1, MAX_INT_BITS = (1<<24)-1 }; static IntegerType *get(LLVMContext &C, unsigned NumBits); IntegerType *getExtendedType() const { return Type::getIntNTy(getContext(), 2 * getScalarSizeInBits()); } unsigned getBitWidth() const { return getSubclassData(); } uint64_t getBitMask() const { return ~uint64_t(0UL) >> (64-getBitWidth()); } uint64_t getSignBit() const { return 1ULL << (getBitWidth()-1); } APInt getMask() const; bool isPowerOf2ByteWidth() const; static bool classof(const Type *T) { return T->getTypeID() == IntegerTyID; } }; unsigned Type::getIntegerBitWidth() const { return cast<IntegerType>(this)->getBitWidth(); } class FunctionType : public Type { FunctionType(Type *Result, ArrayRef<Type*> Params, bool IsVarArgs); public: FunctionType(const FunctionType &) = delete; FunctionType &operator=(const FunctionType &) = delete; static FunctionType *get(Type *Result, ArrayRef<Type*> Params, bool isVarArg); static FunctionType *get(Type *Result, bool isVarArg); static bool isValidReturnType(Type *RetTy); static bool isValidArgumentType(Type *ArgTy); bool isVarArg() const { return getSubclassData()!=0; } Type *getReturnType() const { return ContainedTys[0]; } using param_iterator = Type::subtype_iterator; param_iterator param_begin() const { return ContainedTys + 1; } param_iterator param_end() const { return &ContainedTys[NumContainedTys]; } ArrayRef<Type *> params() const { return makeArrayRef(param_begin(), param_end()); } Type *getParamType(unsigned i) const { return ContainedTys[i+1]; } unsigned getNumParams() const { return NumContainedTys - 1; } static bool classof(const Type *T) { return T->getTypeID() == FunctionTyID; } }; static_assert(alignof(FunctionType) >= alignof(Type *), "Alignment sufficient for objects appended to FunctionType"); bool Type::isFunctionVarArg() const { return cast<FunctionType>(this)->isVarArg(); } Type *Type::getFunctionParamType(unsigned i) const { return cast<FunctionType>(this)->getParamType(i); } unsigned Type::getFunctionNumParams() const { return cast<FunctionType>(this)->getNumParams(); } class FunctionCallee { public: template <typename T, typename U = decltype(&T::getFunctionType)> FunctionCallee(T *Fn) : FnTy(Fn ? Fn->getFunctionType() : nullptr), Callee(Fn) {} FunctionCallee(FunctionType *FnTy, Value *Callee) : FnTy(FnTy), Callee(Callee) { (static_cast<void> (0)); } FunctionCallee(std::nullptr_t) {} FunctionCallee() = default; FunctionType *getFunctionType() { return FnTy; } Value *getCallee() { return Callee; } explicit operator bool() { return Callee; } private: FunctionType *FnTy = nullptr; Value *Callee = nullptr; }; # 218 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DerivedTypes.h" class StructType : public Type { StructType(LLVMContext &C) : Type(C, StructTyID) {} enum { SCDB_HasBody = 1, SCDB_Packed = 2, SCDB_IsLiteral = 4, SCDB_IsSized = 8 }; void *SymbolTableEntry = nullptr; public: StructType(const StructType &) = delete; StructType &operator=(const StructType &) = delete; static StructType *create(LLVMContext &Context, StringRef Name); static StructType *create(LLVMContext &Context); static StructType *create(ArrayRef<Type *> Elements, StringRef Name, bool isPacked = false); static StructType *create(ArrayRef<Type *> Elements); static StructType *create(LLVMContext &Context, ArrayRef<Type *> Elements, StringRef Name, bool isPacked = false); static StructType *create(LLVMContext &Context, ArrayRef<Type *> Elements); template <class... Tys> static std::enable_if_t<are_base_of<Type, Tys...>::value, StructType *> create(StringRef Name, Type *elt1, Tys *... elts) { (static_cast<void> (0)); SmallVector<llvm::Type *, 8> StructFields({elt1, elts...}); return create(StructFields, Name); } static StructType *get(LLVMContext &Context, ArrayRef<Type*> Elements, bool isPacked = false); static StructType *get(LLVMContext &Context, bool isPacked = false); template <class... Tys> static std::enable_if_t<are_base_of<Type, Tys...>::value, StructType *> get(Type *elt1, Tys *... elts) { (static_cast<void> (0)); LLVMContext &Ctx = elt1->getContext(); SmallVector<llvm::Type *, 8> StructFields({elt1, elts...}); return llvm::StructType::get(Ctx, StructFields); } bool isPacked() const { return (getSubclassData() & SCDB_Packed) != 0; } bool isLiteral() const { return (getSubclassData() & SCDB_IsLiteral) != 0; } bool isOpaque() const { return (getSubclassData() & SCDB_HasBody) == 0; } bool isSized(SmallPtrSetImpl<Type *> *Visited = nullptr) const; bool hasName() const { return SymbolTableEntry != nullptr; } StringRef getName() const; void setName(StringRef Name); void setBody(ArrayRef<Type*> Elements, bool isPacked = false); template <typename... Tys> std::enable_if_t<are_base_of<Type, Tys...>::value, void> setBody(Type *elt1, Tys *... elts) { (static_cast<void> (0)); SmallVector<llvm::Type *, 8> StructFields({elt1, elts...}); setBody(StructFields); } static bool isValidElementType(Type *ElemTy); using element_iterator = Type::subtype_iterator; element_iterator element_begin() const { return ContainedTys; } element_iterator element_end() const { return &ContainedTys[NumContainedTys];} ArrayRef<Type *> const elements() const { return makeArrayRef(element_begin(), element_end()); } bool isLayoutIdentical(StructType *Other) const; unsigned getNumElements() const { return NumContainedTys; } Type *getElementType(unsigned N) const { (static_cast<void> (0)); return ContainedTys[N]; } Type *getTypeAtIndex(const Value *V) const; Type *getTypeAtIndex(unsigned N) const { return getElementType(N); } bool indexValid(const Value *V) const; bool indexValid(unsigned Idx) const { return Idx < getNumElements(); } static bool classof(const Type *T) { return T->getTypeID() == StructTyID; } }; StringRef Type::getStructName() const { return cast<StructType>(this)->getName(); } unsigned Type::getStructNumElements() const { return cast<StructType>(this)->getNumElements(); } Type *Type::getStructElementType(unsigned N) const { return cast<StructType>(this)->getElementType(N); } class ArrayType : public Type { Type *ContainedType; uint64_t NumElements; ArrayType(Type *ElType, uint64_t NumEl); public: ArrayType(const ArrayType &) = delete; ArrayType &operator=(const ArrayType &) = delete; uint64_t getNumElements() const { return NumElements; } Type *getElementType() const { return ContainedType; } static ArrayType *get(Type *ElementType, uint64_t NumElements); static bool isValidElementType(Type *ElemTy); static bool classof(const Type *T) { return T->getTypeID() == ArrayTyID; } }; uint64_t Type::getArrayNumElements() const { return cast<ArrayType>(this)->getNumElements(); } class VectorType : public Type { # 405 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DerivedTypes.h" Type *ContainedType; protected: const unsigned ElementQuantity; VectorType(Type *ElType, unsigned EQ, Type::TypeID TID); public: VectorType(const VectorType &) = delete; VectorType &operator=(const VectorType &) = delete; unsigned getNumElements() const { ElementCount EC = getElementCount(); if (EC.Scalable) WithColor::warning() << "The code that requested the fixed number of elements has made " "the assumption that this vector is not scalable. This assumption " "was not correct, and this may lead to broken code\n"; return EC.Min; } Type *getElementType() const { return ContainedType; } static VectorType *get(Type *ElementType, ElementCount EC); inline static VectorType *get(Type *ElementType, unsigned NumElements) __attribute__((deprecated("The base class version of get with the scalable argument defaulted to " "false is deprecated. Either call VectorType::get(Type *, unsigned, " "bool) and pass false, or call FixedVectorType::get(Type *, unsigned)."))); static VectorType *get(Type *ElementType, unsigned NumElements, bool Scalable) { return VectorType::get(ElementType, {NumElements, Scalable}); } static VectorType *get(Type *ElementType, const VectorType *Other) { return VectorType::get(ElementType, Other->getElementCount()); } static VectorType *getInteger(VectorType *VTy) { unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits(); (static_cast<void> (0)); Type *EltTy = IntegerType::get(VTy->getContext(), EltBits); return VectorType::get(EltTy, VTy->getElementCount()); } static VectorType *getExtendedElementVectorType(VectorType *VTy) { (static_cast<void> (0)); auto *EltTy = cast<IntegerType>(VTy->getElementType()); return VectorType::get(EltTy->getExtendedType(), VTy->getElementCount()); } static VectorType *getTruncatedElementVectorType(VectorType *VTy) { Type *EltTy; if (VTy->getElementType()->isFloatingPointTy()) { switch(VTy->getElementType()->getTypeID()) { case DoubleTyID: EltTy = Type::getFloatTy(VTy->getContext()); break; case FloatTyID: EltTy = Type::getHalfTy(VTy->getContext()); break; default: __builtin_unreachable(); } } else { unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits(); (static_cast<void> (0)); EltTy = IntegerType::get(VTy->getContext(), EltBits / 2); } return VectorType::get(EltTy, VTy->getElementCount()); } static VectorType *getSubdividedVectorType(VectorType *VTy, int NumSubdivs) { for (int i = 0; i < NumSubdivs; ++i) { VTy = VectorType::getDoubleElementsVectorType(VTy); VTy = VectorType::getTruncatedElementVectorType(VTy); } return VTy; } static VectorType *getHalfElementsVectorType(VectorType *VTy) { auto EltCnt = VTy->getElementCount(); (static_cast<void> (0)); return VectorType::get(VTy->getElementType(), EltCnt/2); } static VectorType *getDoubleElementsVectorType(VectorType *VTy) { auto EltCnt = VTy->getElementCount(); (static_cast<void> (0)); return VectorType::get(VTy->getElementType(), EltCnt * 2); } static bool isValidElementType(Type *ElemTy); inline ElementCount getElementCount() const; static bool classof(const Type *T) { return T->getTypeID() == FixedVectorTyID || T->getTypeID() == ScalableVectorTyID; } }; inline VectorType *VectorType::get(Type *ElementType, unsigned NumElements) { return VectorType::get(ElementType, NumElements, false); } class FixedVectorType : public VectorType { protected: FixedVectorType(Type *ElTy, unsigned NumElts) : VectorType(ElTy, NumElts, FixedVectorTyID) {} public: static FixedVectorType *get(Type *ElementType, unsigned NumElts); static FixedVectorType *get(Type *ElementType, const FixedVectorType *FVTy) { return get(ElementType, FVTy->getNumElements()); } static FixedVectorType *getInteger(FixedVectorType *VTy) { return cast<FixedVectorType>(VectorType::getInteger(VTy)); } static FixedVectorType *getExtendedElementVectorType(FixedVectorType *VTy) { return cast<FixedVectorType>(VectorType::getExtendedElementVectorType(VTy)); } static FixedVectorType *getTruncatedElementVectorType(FixedVectorType *VTy) { return cast<FixedVectorType>( VectorType::getTruncatedElementVectorType(VTy)); } static FixedVectorType *getSubdividedVectorType(FixedVectorType *VTy, int NumSubdivs) { return cast<FixedVectorType>( VectorType::getSubdividedVectorType(VTy, NumSubdivs)); } static FixedVectorType *getHalfElementsVectorType(FixedVectorType *VTy) { return cast<FixedVectorType>(VectorType::getHalfElementsVectorType(VTy)); } static FixedVectorType *getDoubleElementsVectorType(FixedVectorType *VTy) { return cast<FixedVectorType>(VectorType::getDoubleElementsVectorType(VTy)); } static bool classof(const Type *T) { return T->getTypeID() == FixedVectorTyID; } }; class ScalableVectorType : public VectorType { protected: ScalableVectorType(Type *ElTy, unsigned MinNumElts) : VectorType(ElTy, MinNumElts, ScalableVectorTyID) {} public: static ScalableVectorType *get(Type *ElementType, unsigned MinNumElts); static ScalableVectorType *get(Type *ElementType, const ScalableVectorType *SVTy) { return get(ElementType, SVTy->getMinNumElements()); } static ScalableVectorType *getInteger(ScalableVectorType *VTy) { return cast<ScalableVectorType>(VectorType::getInteger(VTy)); } static ScalableVectorType * getExtendedElementVectorType(ScalableVectorType *VTy) { return cast<ScalableVectorType>( VectorType::getExtendedElementVectorType(VTy)); } static ScalableVectorType * getTruncatedElementVectorType(ScalableVectorType *VTy) { return cast<ScalableVectorType>( VectorType::getTruncatedElementVectorType(VTy)); } static ScalableVectorType *getSubdividedVectorType(ScalableVectorType *VTy, int NumSubdivs) { return cast<ScalableVectorType>( VectorType::getSubdividedVectorType(VTy, NumSubdivs)); } static ScalableVectorType * getHalfElementsVectorType(ScalableVectorType *VTy) { return cast<ScalableVectorType>(VectorType::getHalfElementsVectorType(VTy)); } static ScalableVectorType * getDoubleElementsVectorType(ScalableVectorType *VTy) { return cast<ScalableVectorType>( VectorType::getDoubleElementsVectorType(VTy)); } uint64_t getMinNumElements() const { return ElementQuantity; } static bool classof(const Type *T) { return T->getTypeID() == ScalableVectorTyID; } }; inline ElementCount VectorType::getElementCount() const { return ElementCount(ElementQuantity, isa<ScalableVectorType>(this)); } class PointerType : public Type { explicit PointerType(Type *ElType, unsigned AddrSpace); Type *PointeeTy; public: PointerType(const PointerType &) = delete; PointerType &operator=(const PointerType &) = delete; static PointerType *get(Type *ElementType, unsigned AddressSpace); static PointerType *getUnqual(Type *ElementType) { return PointerType::get(ElementType, 0); } Type *getElementType() const { return PointeeTy; } static bool isValidElementType(Type *ElemTy); static bool isLoadableOrStorableType(Type *ElemTy); inline unsigned getAddressSpace() const { return getSubclassData(); } static bool classof(const Type *T) { return T->getTypeID() == PointerTyID; } }; Type *Type::getExtendedType() const { (static_cast<void> (0)); if (auto *VTy = dyn_cast<VectorType>(this)) return VectorType::getExtendedElementVectorType( const_cast<VectorType *>(VTy)); return cast<IntegerType>(this)->getExtendedType(); } Type *Type::getWithNewBitWidth(unsigned NewBitWidth) const { (static_cast<void> (0)); Type *NewType = getIntNTy(getContext(), NewBitWidth); if (auto *VTy = dyn_cast<VectorType>(this)) NewType = VectorType::get(NewType, VTy->getElementCount()); return NewType; } unsigned Type::getPointerAddressSpace() const { return cast<PointerType>(getScalarType())->getAddressSpace(); } } # 32 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constants.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/OperandTraits.h" 1 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/OperandTraits.h" namespace llvm { # 29 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/OperandTraits.h" template <typename SubClass, unsigned ARITY> struct FixedNumOperandTraits { static Use *op_begin(SubClass* U) { static_assert( !std::is_polymorphic<SubClass>::value, "adding virtual methods to subclasses of User breaks use lists"); return reinterpret_cast<Use*>(U) - ARITY; } static Use *op_end(SubClass* U) { return reinterpret_cast<Use*>(U); } static unsigned operands(const User*) { return ARITY; } }; # 52 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/OperandTraits.h" template <typename SubClass, unsigned ARITY = 1> struct OptionalOperandTraits : public FixedNumOperandTraits<SubClass, ARITY> { static unsigned operands(const User *U) { return U->getNumOperands(); } }; # 67 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/OperandTraits.h" template <typename SubClass, unsigned MINARITY = 0> struct VariadicOperandTraits { static Use *op_begin(SubClass* U) { static_assert( !std::is_polymorphic<SubClass>::value, "adding virtual methods to subclasses of User breaks use lists"); return reinterpret_cast<Use*>(U) - static_cast<User*>(U)->getNumOperands(); } static Use *op_end(SubClass* U) { return reinterpret_cast<Use*>(U); } static unsigned operands(const User *U) { return U->getNumOperands(); } }; # 94 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/OperandTraits.h" template <unsigned MINARITY = 1> struct HungoffOperandTraits { static Use *op_begin(User* U) { return U->getOperandList(); } static Use *op_end(User* U) { return U->getOperandList() + U->getNumOperands(); } static unsigned operands(const User *U) { return U->getNumOperands(); } }; # 160 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/OperandTraits.h" } # 33 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constants.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 39 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constants.h" 2 namespace llvm { template <class ConstantClass> struct ConstantAggrKeyType; class ConstantData : public Constant { friend class Constant; Value *handleOperandChangeImpl(Value *From, Value *To) { __builtin_unreachable(); } protected: explicit ConstantData(Type *Ty, ValueTy VT) : Constant(Ty, VT, nullptr, 0) {} void *operator new(size_t s) { return User::operator new(s, 0); } public: ConstantData(const ConstantData &) = delete; static bool classof(const Value *V) { return V->getValueID() >= ConstantDataFirstVal && V->getValueID() <= ConstantDataLastVal; } }; class ConstantInt final : public ConstantData { friend class Constant; APInt Val; ConstantInt(IntegerType *Ty, const APInt& V); void destroyConstantImpl(); public: ConstantInt(const ConstantInt &) = delete; static ConstantInt *getTrue(LLVMContext &Context); static ConstantInt *getFalse(LLVMContext &Context); static Constant *getTrue(Type *Ty); static Constant *getFalse(Type *Ty); static Constant *get(Type *Ty, uint64_t V, bool isSigned = false); static ConstantInt *get(IntegerType *Ty, uint64_t V, bool isSigned = false); static ConstantInt *getSigned(IntegerType *Ty, int64_t V); static Constant *getSigned(Type *Ty, int64_t V); static ConstantInt *get(LLVMContext &Context, const APInt &V); static ConstantInt *get(IntegerType *Ty, StringRef Str, uint8_t radix); static Constant *get(Type* Ty, const APInt& V); inline const APInt &getValue() const { return Val; } unsigned getBitWidth() const { return Val.getBitWidth(); } inline uint64_t getZExtValue() const { return Val.getZExtValue(); } inline int64_t getSExtValue() const { return Val.getSExtValue(); } inline MaybeAlign getMaybeAlignValue() const { return MaybeAlign(getZExtValue()); } inline Align getAlignValue() const { return getMaybeAlignValue().valueOrOne(); } bool equalsInt(uint64_t V) const { return Val == V; } inline IntegerType *getType() const { return cast<IntegerType>(Value::getType()); } # 192 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constants.h" static bool isValueValidForType(Type *Ty, uint64_t V); static bool isValueValidForType(Type *Ty, int64_t V); bool isNegative() const { return Val.isNegative(); } bool isZero() const { return Val.isNullValue(); } bool isOne() const { return Val.isOneValue(); } bool isMinusOne() const { return Val.isAllOnesValue(); } bool isMaxValue(bool isSigned) const { if (isSigned) return Val.isMaxSignedValue(); else return Val.isMaxValue(); } bool isMinValue(bool isSigned) const { if (isSigned) return Val.isMinSignedValue(); else return Val.isMinValue(); } bool uge(uint64_t Num) const { return Val.uge(Num); } uint64_t getLimitedValue(uint64_t Limit = ~0ULL) const { return Val.getLimitedValue(Limit); } static bool classof(const Value *V) { return V->getValueID() == ConstantIntVal; } }; class ConstantFP final : public ConstantData { friend class Constant; APFloat Val; ConstantFP(Type *Ty, const APFloat& V); void destroyConstantImpl(); public: ConstantFP(const ConstantFP &) = delete; static Constant *getZeroValueForNegation(Type *Ty); static Constant *get(Type* Ty, double V); static Constant *get(Type *Ty, const APFloat &V); static Constant *get(Type* Ty, StringRef Str); static ConstantFP *get(LLVMContext &Context, const APFloat &V); static Constant *getNaN(Type *Ty, bool Negative = false, uint64_t Payload = 0); static Constant *getQNaN(Type *Ty, bool Negative = false, APInt *Payload = nullptr); static Constant *getSNaN(Type *Ty, bool Negative = false, APInt *Payload = nullptr); static Constant *getNegativeZero(Type *Ty); static Constant *getInfinity(Type *Ty, bool Negative = false); static bool isValueValidForType(Type *Ty, const APFloat &V); inline const APFloat &getValueAPF() const { return Val; } inline const APFloat &getValue() const { return Val; } bool isZero() const { return Val.isZero(); } bool isNegative() const { return Val.isNegative(); } bool isInfinity() const { return Val.isInfinity(); } bool isNaN() const { return Val.isNaN(); } bool isExactlyValue(const APFloat &V) const; bool isExactlyValue(double V) const { bool ignored; APFloat FV(V); FV.convert(Val.getSemantics(), APFloat::rmNearestTiesToEven, &ignored); return isExactlyValue(FV); } static bool classof(const Value *V) { return V->getValueID() == ConstantFPVal; } }; class ConstantAggregateZero final : public ConstantData { friend class Constant; explicit ConstantAggregateZero(Type *Ty) : ConstantData(Ty, ConstantAggregateZeroVal) {} void destroyConstantImpl(); public: ConstantAggregateZero(const ConstantAggregateZero &) = delete; static ConstantAggregateZero *get(Type *Ty); Constant *getSequentialElement() const; Constant *getStructElement(unsigned Elt) const; Constant *getElementValue(Constant *C) const; Constant *getElementValue(unsigned Idx) const; unsigned getNumElements() const; static bool classof(const Value *V) { return V->getValueID() == ConstantAggregateZeroVal; } }; # 398 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constants.h" class ConstantAggregate : public Constant { protected: ConstantAggregate(Type *T, ValueTy VT, ArrayRef<Constant *> V); public: public: inline Constant *getOperand(unsigned) const; inline void setOperand(unsigned, Constant*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; static bool classof(const Value *V) { return V->getValueID() >= ConstantAggregateFirstVal && V->getValueID() <= ConstantAggregateLastVal; } }; template <> struct OperandTraits<ConstantAggregate> : public VariadicOperandTraits<ConstantAggregate> {}; ConstantAggregate::op_iterator ConstantAggregate::op_begin() { return OperandTraits<ConstantAggregate>::op_begin(this); } ConstantAggregate::const_op_iterator ConstantAggregate::op_begin() const { return OperandTraits<ConstantAggregate>::op_begin(const_cast<ConstantAggregate*>(this)); } ConstantAggregate::op_iterator ConstantAggregate::op_end() { return OperandTraits<ConstantAggregate>::op_end(this); } ConstantAggregate::const_op_iterator ConstantAggregate::op_end() const { return OperandTraits<ConstantAggregate>::op_end(const_cast<ConstantAggregate*>(this)); } Constant *ConstantAggregate::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Constant>( OperandTraits<ConstantAggregate>::op_begin(const_cast<ConstantAggregate*>(this))[i_nocapture].get()); } void ConstantAggregate::setOperand(unsigned i_nocapture, Constant *Val_nocapture) { (static_cast<void> (0)); OperandTraits<ConstantAggregate>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ConstantAggregate::getNumOperands() const { return OperandTraits<ConstantAggregate>::operands(this); } template <int Idx_nocapture> Use &ConstantAggregate::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &ConstantAggregate::Op() const { return this->OpFrom<Idx_nocapture>(this); } class ConstantArray final : public ConstantAggregate { friend struct ConstantAggrKeyType<ConstantArray>; friend class Constant; ConstantArray(ArrayType *T, ArrayRef<Constant *> Val); void destroyConstantImpl(); Value *handleOperandChangeImpl(Value *From, Value *To); public: static Constant *get(ArrayType *T, ArrayRef<Constant*> V); private: static Constant *getImpl(ArrayType *T, ArrayRef<Constant *> V); public: inline ArrayType *getType() const { return cast<ArrayType>(Value::getType()); } static bool classof(const Value *V) { return V->getValueID() == ConstantArrayVal; } }; class ConstantStruct final : public ConstantAggregate { friend struct ConstantAggrKeyType<ConstantStruct>; friend class Constant; ConstantStruct(StructType *T, ArrayRef<Constant *> Val); void destroyConstantImpl(); Value *handleOperandChangeImpl(Value *From, Value *To); public: static Constant *get(StructType *T, ArrayRef<Constant*> V); template <typename... Csts> static std::enable_if_t<are_base_of<Constant, Csts...>::value, Constant *> get(StructType *T, Csts *... Vs) { SmallVector<Constant *, 8> Values({Vs...}); return get(T, Values); } static Constant *getAnon(ArrayRef<Constant*> V, bool Packed = false) { return get(getTypeForElements(V, Packed), V); } static Constant *getAnon(LLVMContext &Ctx, ArrayRef<Constant*> V, bool Packed = false) { return get(getTypeForElements(Ctx, V, Packed), V); } static StructType *getTypeForElements(ArrayRef<Constant*> V, bool Packed = false); static StructType *getTypeForElements(LLVMContext &Ctx, ArrayRef<Constant*> V, bool Packed = false); inline StructType *getType() const { return cast<StructType>(Value::getType()); } static bool classof(const Value *V) { return V->getValueID() == ConstantStructVal; } }; class ConstantVector final : public ConstantAggregate { friend struct ConstantAggrKeyType<ConstantVector>; friend class Constant; ConstantVector(VectorType *T, ArrayRef<Constant *> Val); void destroyConstantImpl(); Value *handleOperandChangeImpl(Value *From, Value *To); public: static Constant *get(ArrayRef<Constant*> V); private: static Constant *getImpl(ArrayRef<Constant *> V); public: static Constant *getSplat(ElementCount EC, Constant *Elt); inline FixedVectorType *getType() const { return cast<FixedVectorType>(Value::getType()); } Constant *getSplatValue(bool AllowUndefs = false) const; static bool classof(const Value *V) { return V->getValueID() == ConstantVectorVal; } }; class ConstantPointerNull final : public ConstantData { friend class Constant; explicit ConstantPointerNull(PointerType *T) : ConstantData(T, Value::ConstantPointerNullVal) {} void destroyConstantImpl(); public: ConstantPointerNull(const ConstantPointerNull &) = delete; static ConstantPointerNull *get(PointerType *T); inline PointerType *getType() const { return cast<PointerType>(Value::getType()); } static bool classof(const Value *V) { return V->getValueID() == ConstantPointerNullVal; } }; # 583 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constants.h" class ConstantDataSequential : public ConstantData { friend class LLVMContextImpl; friend class Constant; const char *DataElements; ConstantDataSequential *Next; void destroyConstantImpl(); protected: explicit ConstantDataSequential(Type *ty, ValueTy VT, const char *Data) : ConstantData(ty, VT), DataElements(Data), Next(nullptr) {} ~ConstantDataSequential() { delete Next; } static Constant *getImpl(StringRef Bytes, Type *Ty); public: ConstantDataSequential(const ConstantDataSequential &) = delete; static bool isElementTypeCompatible(Type *Ty); uint64_t getElementAsInteger(unsigned i) const; APInt getElementAsAPInt(unsigned i) const; APFloat getElementAsAPFloat(unsigned i) const; float getElementAsFloat(unsigned i) const; double getElementAsDouble(unsigned i) const; Constant *getElementAsConstant(unsigned i) const; Type *getElementType() const; unsigned getNumElements() const; uint64_t getElementByteSize() const; bool isString(unsigned CharSize = 8) const; bool isCString() const; StringRef getAsString() const { (static_cast<void> (0)); return getRawDataValues(); } StringRef getAsCString() const { (static_cast<void> (0)); StringRef Str = getAsString(); return Str.substr(0, Str.size()-1); } StringRef getRawDataValues() const; static bool classof(const Value *V) { return V->getValueID() == ConstantDataArrayVal || V->getValueID() == ConstantDataVectorVal; } private: const char *getElementPointer(unsigned Elt) const; }; class ConstantDataArray final : public ConstantDataSequential { friend class ConstantDataSequential; explicit ConstantDataArray(Type *ty, const char *Data) : ConstantDataSequential(ty, ConstantDataArrayVal, Data) {} public: ConstantDataArray(const ConstantDataArray &) = delete; template <typename ElementTy> static Constant *get(LLVMContext &Context, ArrayRef<ElementTy> Elts) { const char *Data = reinterpret_cast<const char *>(Elts.data()); return getRaw(StringRef(Data, Elts.size() * sizeof(ElementTy)), Elts.size(), Type::getScalarTy<ElementTy>(Context)); } template <typename ArrayTy> static Constant *get(LLVMContext &Context, ArrayTy &Elts) { return ConstantDataArray::get(Context, makeArrayRef(Elts)); } static Constant *getRaw(StringRef Data, uint64_t NumElements, Type *ElementTy) { Type *Ty = ArrayType::get(ElementTy, NumElements); return getImpl(Data, Ty); } static Constant *getFP(Type *ElementType, ArrayRef<uint16_t> Elts); static Constant *getFP(Type *ElementType, ArrayRef<uint32_t> Elts); static Constant *getFP(Type *ElementType, ArrayRef<uint64_t> Elts); static Constant *getString(LLVMContext &Context, StringRef Initializer, bool AddNull = true); inline ArrayType *getType() const { return cast<ArrayType>(Value::getType()); } static bool classof(const Value *V) { return V->getValueID() == ConstantDataArrayVal; } }; class ConstantDataVector final : public ConstantDataSequential { friend class ConstantDataSequential; explicit ConstantDataVector(Type *ty, const char *Data) : ConstantDataSequential(ty, ConstantDataVectorVal, Data), IsSplatSet(false) {} mutable bool IsSplatSet : 1; mutable bool IsSplat : 1; bool isSplatData() const; public: ConstantDataVector(const ConstantDataVector &) = delete; static Constant *get(LLVMContext &Context, ArrayRef<uint8_t> Elts); static Constant *get(LLVMContext &Context, ArrayRef<uint16_t> Elts); static Constant *get(LLVMContext &Context, ArrayRef<uint32_t> Elts); static Constant *get(LLVMContext &Context, ArrayRef<uint64_t> Elts); static Constant *get(LLVMContext &Context, ArrayRef<float> Elts); static Constant *get(LLVMContext &Context, ArrayRef<double> Elts); static Constant *getFP(Type *ElementType, ArrayRef<uint16_t> Elts); static Constant *getFP(Type *ElementType, ArrayRef<uint32_t> Elts); static Constant *getFP(Type *ElementType, ArrayRef<uint64_t> Elts); static Constant *getSplat(unsigned NumElts, Constant *Elt); bool isSplat() const; Constant *getSplatValue() const; inline FixedVectorType *getType() const { return cast<FixedVectorType>(Value::getType()); } static bool classof(const Value *V) { return V->getValueID() == ConstantDataVectorVal; } }; class ConstantTokenNone final : public ConstantData { friend class Constant; explicit ConstantTokenNone(LLVMContext &Context) : ConstantData(Type::getTokenTy(Context), ConstantTokenNoneVal) {} void destroyConstantImpl(); public: ConstantTokenNone(const ConstantTokenNone &) = delete; static ConstantTokenNone *get(LLVMContext &Context); static bool classof(const Value *V) { return V->getValueID() == ConstantTokenNoneVal; } }; class BlockAddress final : public Constant { friend class Constant; BlockAddress(Function *F, BasicBlock *BB); void *operator new(size_t s) { return User::operator new(s, 2); } void destroyConstantImpl(); Value *handleOperandChangeImpl(Value *From, Value *To); public: static BlockAddress *get(Function *F, BasicBlock *BB); static BlockAddress *get(BasicBlock *BB); static BlockAddress *lookup(const BasicBlock *BB); public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; Function *getFunction() const { return (Function*)Op<0>().get(); } BasicBlock *getBasicBlock() const { return (BasicBlock*)Op<1>().get(); } static bool classof(const Value *V) { return V->getValueID() == BlockAddressVal; } }; template <> struct OperandTraits<BlockAddress> : public FixedNumOperandTraits<BlockAddress, 2> { }; BlockAddress::op_iterator BlockAddress::op_begin() { return OperandTraits<BlockAddress>::op_begin(this); } BlockAddress::const_op_iterator BlockAddress::op_begin() const { return OperandTraits<BlockAddress>::op_begin(const_cast<BlockAddress*>(this)); } BlockAddress::op_iterator BlockAddress::op_end() { return OperandTraits<BlockAddress>::op_end(this); } BlockAddress::const_op_iterator BlockAddress::op_end() const { return OperandTraits<BlockAddress>::op_end(const_cast<BlockAddress*>(this)); } Value *BlockAddress::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<BlockAddress>::op_begin(const_cast<BlockAddress*>(this))[i_nocapture].get()); } void BlockAddress::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<BlockAddress>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned BlockAddress::getNumOperands() const { return OperandTraits<BlockAddress>::operands(this); } template <int Idx_nocapture> Use &BlockAddress::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &BlockAddress::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 899 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constants.h" class ConstantExpr : public Constant { friend struct ConstantExprKeyType; friend class Constant; void destroyConstantImpl(); Value *handleOperandChangeImpl(Value *From, Value *To); protected: ConstantExpr(Type *ty, unsigned Opcode, Use *Ops, unsigned NumOps) : Constant(ty, ConstantExprVal, Ops, NumOps) { setValueSubclassData(Opcode); } ~ConstantExpr() = default; public: static Constant *getAlignOf(Type *Ty); static Constant *getSizeOf(Type *Ty); static Constant *getOffsetOf(StructType *STy, unsigned FieldNo); static Constant *getOffsetOf(Type *Ty, Constant *FieldNo); static Constant *getNeg(Constant *C, bool HasNUW = false, bool HasNSW =false); static Constant *getFNeg(Constant *C); static Constant *getNot(Constant *C); static Constant *getAdd(Constant *C1, Constant *C2, bool HasNUW = false, bool HasNSW = false); static Constant *getFAdd(Constant *C1, Constant *C2); static Constant *getSub(Constant *C1, Constant *C2, bool HasNUW = false, bool HasNSW = false); static Constant *getFSub(Constant *C1, Constant *C2); static Constant *getMul(Constant *C1, Constant *C2, bool HasNUW = false, bool HasNSW = false); static Constant *getFMul(Constant *C1, Constant *C2); static Constant *getUDiv(Constant *C1, Constant *C2, bool isExact = false); static Constant *getSDiv(Constant *C1, Constant *C2, bool isExact = false); static Constant *getFDiv(Constant *C1, Constant *C2); static Constant *getURem(Constant *C1, Constant *C2); static Constant *getSRem(Constant *C1, Constant *C2); static Constant *getFRem(Constant *C1, Constant *C2); static Constant *getAnd(Constant *C1, Constant *C2); static Constant *getOr(Constant *C1, Constant *C2); static Constant *getXor(Constant *C1, Constant *C2); static Constant *getShl(Constant *C1, Constant *C2, bool HasNUW = false, bool HasNSW = false); static Constant *getLShr(Constant *C1, Constant *C2, bool isExact = false); static Constant *getAShr(Constant *C1, Constant *C2, bool isExact = false); static Constant *getTrunc(Constant *C, Type *Ty, bool OnlyIfReduced = false); static Constant *getSExt(Constant *C, Type *Ty, bool OnlyIfReduced = false); static Constant *getZExt(Constant *C, Type *Ty, bool OnlyIfReduced = false); static Constant *getFPTrunc(Constant *C, Type *Ty, bool OnlyIfReduced = false); static Constant *getFPExtend(Constant *C, Type *Ty, bool OnlyIfReduced = false); static Constant *getUIToFP(Constant *C, Type *Ty, bool OnlyIfReduced = false); static Constant *getSIToFP(Constant *C, Type *Ty, bool OnlyIfReduced = false); static Constant *getFPToUI(Constant *C, Type *Ty, bool OnlyIfReduced = false); static Constant *getFPToSI(Constant *C, Type *Ty, bool OnlyIfReduced = false); static Constant *getPtrToInt(Constant *C, Type *Ty, bool OnlyIfReduced = false); static Constant *getIntToPtr(Constant *C, Type *Ty, bool OnlyIfReduced = false); static Constant *getBitCast(Constant *C, Type *Ty, bool OnlyIfReduced = false); static Constant *getAddrSpaceCast(Constant *C, Type *Ty, bool OnlyIfReduced = false); static Constant *getNSWNeg(Constant *C) { return getNeg(C, false, true); } static Constant *getNUWNeg(Constant *C) { return getNeg(C, true, false); } static Constant *getNSWAdd(Constant *C1, Constant *C2) { return getAdd(C1, C2, false, true); } static Constant *getNUWAdd(Constant *C1, Constant *C2) { return getAdd(C1, C2, true, false); } static Constant *getNSWSub(Constant *C1, Constant *C2) { return getSub(C1, C2, false, true); } static Constant *getNUWSub(Constant *C1, Constant *C2) { return getSub(C1, C2, true, false); } static Constant *getNSWMul(Constant *C1, Constant *C2) { return getMul(C1, C2, false, true); } static Constant *getNUWMul(Constant *C1, Constant *C2) { return getMul(C1, C2, true, false); } static Constant *getNSWShl(Constant *C1, Constant *C2) { return getShl(C1, C2, false, true); } static Constant *getNUWShl(Constant *C1, Constant *C2) { return getShl(C1, C2, true, false); } static Constant *getExactSDiv(Constant *C1, Constant *C2) { return getSDiv(C1, C2, true); } static Constant *getExactUDiv(Constant *C1, Constant *C2) { return getUDiv(C1, C2, true); } static Constant *getExactAShr(Constant *C1, Constant *C2) { return getAShr(C1, C2, true); } static Constant *getExactLShr(Constant *C1, Constant *C2) { return getLShr(C1, C2, true); } # 1044 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constants.h" static Constant *getBinOpIdentity(unsigned Opcode, Type *Ty, bool AllowRHSConstant = false); static Constant *getBinOpAbsorber(unsigned Opcode, Type *Ty); public: inline Constant *getOperand(unsigned) const; inline void setOperand(unsigned, Constant*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; static Constant *getCast(unsigned ops, Constant *C, Type *Ty, bool OnlyIfReduced = false); static Constant *getZExtOrBitCast( Constant *C, Type *Ty ); static Constant *getSExtOrBitCast( Constant *C, Type *Ty ); static Constant *getTruncOrBitCast( Constant *C, Type *Ty ); static Constant *getPointerCast( Constant *C, Type *Ty ); static Constant *getPointerBitCastOrAddrSpaceCast( Constant *C, Type *Ty ); static Constant *getIntegerCast( Constant *C, Type *Ty, bool isSigned ); static Constant *getFPCast( Constant *C, Type *Ty ); bool isCast() const; bool isCompare() const; bool hasIndices() const; bool isGEPWithNoNotionalOverIndexing() const; static Constant *getSelect(Constant *C, Constant *V1, Constant *V2, Type *OnlyIfReducedTy = nullptr); static Constant *get(unsigned Opcode, Constant *C1, unsigned Flags = 0, Type *OnlyIfReducedTy = nullptr); static Constant *get(unsigned Opcode, Constant *C1, Constant *C2, unsigned Flags = 0, Type *OnlyIfReducedTy = nullptr); static Constant *getCompare(unsigned short pred, Constant *C1, Constant *C2, bool OnlyIfReduced = false); static Constant *getICmp(unsigned short pred, Constant *LHS, Constant *RHS, bool OnlyIfReduced = false); static Constant *getFCmp(unsigned short pred, Constant *LHS, Constant *RHS, bool OnlyIfReduced = false); static Constant *getGetElementPtr(Type *Ty, Constant *C, ArrayRef<Constant *> IdxList, bool InBounds = false, Optional<unsigned> InRangeIndex = None, Type *OnlyIfReducedTy = nullptr) { return getGetElementPtr( Ty, C, makeArrayRef((Value * const *)IdxList.data(), IdxList.size()), InBounds, InRangeIndex, OnlyIfReducedTy); } static Constant *getGetElementPtr(Type *Ty, Constant *C, Constant *Idx, bool InBounds = false, Optional<unsigned> InRangeIndex = None, Type *OnlyIfReducedTy = nullptr) { return getGetElementPtr(Ty, C, cast<Value>(Idx), InBounds, InRangeIndex, OnlyIfReducedTy); } static Constant *getGetElementPtr(Type *Ty, Constant *C, ArrayRef<Value *> IdxList, bool InBounds = false, Optional<unsigned> InRangeIndex = None, Type *OnlyIfReducedTy = nullptr); static Constant *getInBoundsGetElementPtr(Type *Ty, Constant *C, ArrayRef<Constant *> IdxList) { return getGetElementPtr(Ty, C, IdxList, true); } static Constant *getInBoundsGetElementPtr(Type *Ty, Constant *C, Constant *Idx) { return getGetElementPtr(Ty, C, Idx, true); } static Constant *getInBoundsGetElementPtr(Type *Ty, Constant *C, ArrayRef<Value *> IdxList) { return getGetElementPtr(Ty, C, IdxList, true); } static Constant *getExtractElement(Constant *Vec, Constant *Idx, Type *OnlyIfReducedTy = nullptr); static Constant *getInsertElement(Constant *Vec, Constant *Elt, Constant *Idx, Type *OnlyIfReducedTy = nullptr); static Constant *getShuffleVector(Constant *V1, Constant *V2, ArrayRef<int> Mask, Type *OnlyIfReducedTy = nullptr); static Constant *getExtractValue(Constant *Agg, ArrayRef<unsigned> Idxs, Type *OnlyIfReducedTy = nullptr); static Constant *getInsertValue(Constant *Agg, Constant *Val, ArrayRef<unsigned> Idxs, Type *OnlyIfReducedTy = nullptr); unsigned getOpcode() const { return getSubclassDataFromValue(); } unsigned getPredicate() const; ArrayRef<unsigned> getIndices() const; ArrayRef<int> getShuffleMask() const; Constant *getShuffleMaskForBitcode() const; const char *getOpcodeName() const; Constant *getWithOperandReplaced(unsigned OpNo, Constant *Op) const; Constant *getWithOperands(ArrayRef<Constant*> Ops) const { return getWithOperands(Ops, getType()); } # 1266 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constants.h" Constant *getWithOperands(ArrayRef<Constant *> Ops, Type *Ty, bool OnlyIfReduced = false, Type *SrcTy = nullptr) const; # 1277 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constants.h" Instruction *getAsInstruction() const; static bool classof(const Value *V) { return V->getValueID() == ConstantExprVal; } private: void setValueSubclassData(unsigned short D) { Value::setValueSubclassData(D); } }; template <> struct OperandTraits<ConstantExpr> : public VariadicOperandTraits<ConstantExpr, 1> { }; ConstantExpr::op_iterator ConstantExpr::op_begin() { return OperandTraits<ConstantExpr>::op_begin(this); } ConstantExpr::const_op_iterator ConstantExpr::op_begin() const { return OperandTraits<ConstantExpr>::op_begin(const_cast<ConstantExpr*>(this)); } ConstantExpr::op_iterator ConstantExpr::op_end() { return OperandTraits<ConstantExpr>::op_end(this); } ConstantExpr::const_op_iterator ConstantExpr::op_end() const { return OperandTraits<ConstantExpr>::op_end(const_cast<ConstantExpr*>(this)); } Constant *ConstantExpr::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Constant>( OperandTraits<ConstantExpr>::op_begin(const_cast<ConstantExpr*>(this))[i_nocapture].get()); } void ConstantExpr::setOperand(unsigned i_nocapture, Constant *Val_nocapture) { (static_cast<void> (0)); OperandTraits<ConstantExpr>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ConstantExpr::getNumOperands() const { return OperandTraits<ConstantExpr>::operands(this); } template <int Idx_nocapture> Use &ConstantExpr::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &ConstantExpr::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 1309 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Constants.h" class UndefValue final : public ConstantData { friend class Constant; explicit UndefValue(Type *T) : ConstantData(T, UndefValueVal) {} void destroyConstantImpl(); public: UndefValue(const UndefValue &) = delete; static UndefValue *get(Type *T); UndefValue *getSequentialElement() const; UndefValue *getStructElement(unsigned Elt) const; UndefValue *getElementValue(Constant *C) const; UndefValue *getElementValue(unsigned Idx) const; unsigned getNumElements() const; static bool classof(const Value *V) { return V->getValueID() == UndefValueVal; } }; } # 27 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 30 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/climits" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/climits" 3 # 31 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" 2 # 61 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" namespace llvm { class DITypeRefArray { const MDTuple *N = nullptr; public: DITypeRefArray() = default; DITypeRefArray(const MDTuple *N) : N(N) {} explicit operator bool() const { return get(); } explicit operator MDTuple *() const { return get(); } MDTuple *get() const { return const_cast<MDTuple *>(N); } MDTuple *operator->() const { return get(); } MDTuple &operator*() const { return *get(); } unsigned size() const { return N ? N->getNumOperands() : 0u; } DIType *operator[](unsigned I) const { return cast_or_null<DIType>(N->getOperand(I)); } class iterator : std::iterator<std::input_iterator_tag, DIType *, std::ptrdiff_t, void, DIType *> { MDNode::op_iterator I = nullptr; public: iterator() = default; explicit iterator(MDNode::op_iterator I) : I(I) {} DIType *operator*() const { return cast_or_null<DIType>(*I); } iterator &operator++() { ++I; return *this; } iterator operator++(int) { iterator Temp(*this); ++I; return Temp; } bool operator==(const iterator &X) const { return I == X.I; } bool operator!=(const iterator &X) const { return I != X.I; } }; iterator begin() const { return N ? iterator(N->op_begin()) : iterator(); } iterator end() const { return N ? iterator(N->op_end()) : iterator(); } }; class DINode : public MDNode { friend class LLVMContextImpl; friend class MDNode; protected: DINode(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, ArrayRef<Metadata *> Ops1, ArrayRef<Metadata *> Ops2 = None) : MDNode(C, ID, Storage, Ops1, Ops2) { (static_cast<void> (0)); SubclassData16 = Tag; } ~DINode() = default; template <class Ty> Ty *getOperandAs(unsigned I) const { return cast_or_null<Ty>(getOperand(I)); } StringRef getStringOperand(unsigned I) const { if (auto *S = getOperandAs<MDString>(I)) return S->getString(); return StringRef(); } static MDString *getCanonicalMDString(LLVMContext &Context, StringRef S) { if (S.empty()) return nullptr; return MDString::get(Context, S); } void setTag(unsigned Tag) { SubclassData16 = Tag; } public: unsigned getTag() const { return SubclassData16; } enum DIFlags : uint32_t { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoFlags.def" 1 # 27 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoFlags.def" FlagZero = 0, FlagPrivate = 1, FlagProtected = 2, FlagPublic = 3, FlagFwdDecl = (1 << 2), FlagAppleBlock = (1 << 3), FlagReservedBit4 = (1 << 4), FlagVirtual = (1 << 5), FlagArtificial = (1 << 6), FlagExplicit = (1 << 7), FlagPrototyped = (1 << 8), FlagObjcClassComplete = (1 << 9), FlagObjectPointer = (1 << 10), FlagVector = (1 << 11), FlagStaticMember = (1 << 12), FlagLValueReference = (1 << 13), FlagRValueReference = (1 << 14), FlagExportSymbols = (1 << 15), FlagSingleInheritance = (1 << 16), FlagMultipleInheritance = (2 << 16), FlagVirtualInheritance = (3 << 16), FlagIntroducedVirtual = (1 << 18), FlagBitField = (1 << 19), FlagNoReturn = (1 << 20), FlagTypePassByValue = (1 << 22), FlagTypePassByReference = (1 << 23), FlagEnumClass = (1 << 24), FlagThunk = (1 << 25), FlagNonTrivial = (1 << 26), FlagBigEndian = (1 << 27), FlagLittleEndian = (1 << 28), FlagAllCallsDescribed = (1 << 29), FlagIndirectVirtualBase = (1 << 2) | (1 << 5), FlagLargest = (1 << 29), # 161 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" 2 FlagAccessibility = FlagPrivate | FlagProtected | FlagPublic, FlagPtrToMemberRep = FlagSingleInheritance | FlagMultipleInheritance | FlagVirtualInheritance, LLVM_BITMASK_LARGEST_ENUMERATOR = FlagLargest }; static DIFlags getFlag(StringRef Flag); static StringRef getFlagString(DIFlags Flag); static DIFlags splitFlags(DIFlags Flags, SmallVectorImpl<DIFlags> &SplitFlags); static bool classof(const Metadata *MD) { switch (MD->getMetadataID()) { default: return false; case GenericDINodeKind: case DISubrangeKind: case DIEnumeratorKind: case DIBasicTypeKind: case DIDerivedTypeKind: case DICompositeTypeKind: case DISubroutineTypeKind: case DIFileKind: case DICompileUnitKind: case DISubprogramKind: case DILexicalBlockKind: case DILexicalBlockFileKind: case DINamespaceKind: case DICommonBlockKind: case DITemplateTypeParameterKind: case DITemplateValueParameterKind: case DIGlobalVariableKind: case DILocalVariableKind: case DILabelKind: case DIObjCPropertyKind: case DIImportedEntityKind: case DIModuleKind: return true; } } }; class GenericDINode : public DINode { friend class LLVMContextImpl; friend class MDNode; GenericDINode(LLVMContext &C, StorageType Storage, unsigned Hash, unsigned Tag, ArrayRef<Metadata *> Ops1, ArrayRef<Metadata *> Ops2) : DINode(C, GenericDINodeKind, Storage, Tag, Ops1, Ops2) { setHash(Hash); } ~GenericDINode() { dropAllReferences(); } void setHash(unsigned Hash) { SubclassData32 = Hash; } void recalculateHash(); static GenericDINode *getImpl(LLVMContext &Context, unsigned Tag, StringRef Header, ArrayRef<Metadata *> DwarfOps, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Tag, getCanonicalMDString(Context, Header), DwarfOps, Storage, ShouldCreate); } static GenericDINode *getImpl(LLVMContext &Context, unsigned Tag, MDString *Header, ArrayRef<Metadata *> DwarfOps, StorageType Storage, bool ShouldCreate = true); TempGenericDINode cloneImpl() const { return getTemporary( getContext(), getTag(), getHeader(), SmallVector<Metadata *, 4>(dwarf_op_begin(), dwarf_op_end())); } public: unsigned getHash() const { return SubclassData32; } static GenericDINode *get(LLVMContext &Context, unsigned Tag, StringRef Header, ArrayRef<Metadata *> DwarfOps) { return getImpl(Context, Tag, Header, DwarfOps, Uniqued); } static GenericDINode *getIfExists(LLVMContext &Context, unsigned Tag, StringRef Header, ArrayRef<Metadata *> DwarfOps) { return getImpl(Context, Tag, Header, DwarfOps, Uniqued, false); } static GenericDINode *getDistinct(LLVMContext &Context, unsigned Tag, StringRef Header, ArrayRef<Metadata *> DwarfOps) { return getImpl(Context, Tag, Header, DwarfOps, Distinct); } static TempGenericDINode getTemporary(LLVMContext &Context, unsigned Tag, StringRef Header, ArrayRef<Metadata *> DwarfOps) { return TempGenericDINode( getImpl(Context, Tag, Header, DwarfOps, Temporary)); } static GenericDINode *get(LLVMContext &Context, unsigned Tag, MDString *Header, ArrayRef<Metadata *> DwarfOps) { return getImpl(Context, Tag, Header, DwarfOps, Uniqued); } static GenericDINode *getIfExists(LLVMContext &Context, unsigned Tag, MDString *Header, ArrayRef<Metadata *> DwarfOps) { return getImpl(Context, Tag, Header, DwarfOps, Uniqued, false); } static GenericDINode *getDistinct(LLVMContext &Context, unsigned Tag, MDString *Header, ArrayRef<Metadata *> DwarfOps) { return getImpl(Context, Tag, Header, DwarfOps, Distinct); } static TempGenericDINode getTemporary(LLVMContext &Context, unsigned Tag, MDString *Header, ArrayRef<Metadata *> DwarfOps) { return TempGenericDINode( getImpl(Context, Tag, Header, DwarfOps, Temporary)); } TempGenericDINode clone() const { return cloneImpl(); } unsigned getTag() const { return SubclassData16; } StringRef getHeader() const { return getStringOperand(0); } MDString *getRawHeader() const { return getOperandAs<MDString>(0); } op_iterator dwarf_op_begin() const { return op_begin() + 1; } op_iterator dwarf_op_end() const { return op_end(); } op_range dwarf_operands() const { return op_range(dwarf_op_begin(), dwarf_op_end()); } unsigned getNumDwarfOperands() const { return getNumOperands() - 1; } const MDOperand &getDwarfOperand(unsigned I) const { return getOperand(I + 1); } void replaceDwarfOperandWith(unsigned I, Metadata *New) { replaceOperandWith(I + 1, New); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == GenericDINodeKind; } }; class DISubrange : public DINode { friend class LLVMContextImpl; friend class MDNode; DISubrange(LLVMContext &C, StorageType Storage, ArrayRef<Metadata *> Ops) : DINode(C, DISubrangeKind, Storage, dwarf::DW_TAG_subrange_type, Ops) {} ~DISubrange() = default; static DISubrange *getImpl(LLVMContext &Context, int64_t Count, int64_t LowerBound, StorageType Storage, bool ShouldCreate = true); static DISubrange *getImpl(LLVMContext &Context, Metadata *CountNode, int64_t LowerBound, StorageType Storage, bool ShouldCreate = true); static DISubrange *getImpl(LLVMContext &Context, Metadata *CountNode, Metadata *LowerBound, Metadata *UpperBound, Metadata *Stride, StorageType Storage, bool ShouldCreate = true); TempDISubrange cloneImpl() const { return getTemporary(getContext(), getRawCountNode(), getRawLowerBound(), getRawUpperBound(), getRawStride()); } public: static DISubrange *get(LLVMContext &Context, int64_t Count, int64_t LowerBound = 0) { return getImpl(Context, Count, LowerBound, Uniqued); } static DISubrange *getIfExists(LLVMContext &Context, int64_t Count, int64_t LowerBound = 0) { return getImpl(Context, Count, LowerBound, Uniqued, false); } static DISubrange *getDistinct(LLVMContext &Context, int64_t Count, int64_t LowerBound = 0) { return getImpl(Context, Count, LowerBound, Distinct); } static TempDISubrange getTemporary(LLVMContext &Context, int64_t Count, int64_t LowerBound = 0) { return TempDISubrange( getImpl(Context, Count, LowerBound, Temporary)); } static DISubrange *get(LLVMContext &Context, Metadata *CountNode, int64_t LowerBound = 0) { return getImpl(Context, CountNode, LowerBound, Uniqued); } static DISubrange *getIfExists(LLVMContext &Context, Metadata *CountNode, int64_t LowerBound = 0) { return getImpl(Context, CountNode, LowerBound, Uniqued, false); } static DISubrange *getDistinct(LLVMContext &Context, Metadata *CountNode, int64_t LowerBound = 0) { return getImpl(Context, CountNode, LowerBound, Distinct); } static TempDISubrange getTemporary(LLVMContext &Context, Metadata *CountNode, int64_t LowerBound = 0) { return TempDISubrange( getImpl(Context, CountNode, LowerBound, Temporary)); } static DISubrange *get(LLVMContext &Context, Metadata * CountNode, Metadata *LowerBound, Metadata *UpperBound, Metadata *Stride) { return getImpl(Context, CountNode, LowerBound, UpperBound, Stride, Uniqued); } static DISubrange *getIfExists(LLVMContext &Context, Metadata * CountNode, Metadata *LowerBound, Metadata *UpperBound, Metadata *Stride) { return getImpl(Context, CountNode, LowerBound, UpperBound, Stride, Uniqued, false); } static DISubrange *getDistinct(LLVMContext &Context, Metadata * CountNode, Metadata *LowerBound, Metadata *UpperBound, Metadata *Stride) { return getImpl(Context, CountNode, LowerBound, UpperBound, Stride, Distinct); } static TempDISubrange getTemporary(LLVMContext &Context, Metadata * CountNode, Metadata *LowerBound, Metadata *UpperBound, Metadata *Stride) { return TempDISubrange( getImpl(Context, CountNode, LowerBound, UpperBound, Stride, Temporary)); } TempDISubrange clone() const { return cloneImpl(); } Metadata *getRawCountNode() const { return getOperand(0).get(); } Metadata *getRawLowerBound() const { return getOperand(1).get(); } Metadata *getRawUpperBound() const { return getOperand(2).get(); } Metadata *getRawStride() const { return getOperand(3).get(); } typedef PointerUnion<ConstantInt*, DIVariable*> CountType; typedef PointerUnion<ConstantInt *, DIVariable *, DIExpression *> BoundType; CountType getCount() const; BoundType getLowerBound() const; BoundType getUpperBound() const; BoundType getStride() const; static bool classof(const Metadata *MD) { return MD->getMetadataID() == DISubrangeKind; } }; class DIEnumerator : public DINode { friend class LLVMContextImpl; friend class MDNode; APInt Value; DIEnumerator(LLVMContext &C, StorageType Storage, const APInt &Value, bool IsUnsigned, ArrayRef<Metadata *> Ops) : DINode(C, DIEnumeratorKind, Storage, dwarf::DW_TAG_enumerator, Ops), Value(Value) { SubclassData32 = IsUnsigned; } DIEnumerator(LLVMContext &C, StorageType Storage, int64_t Value, bool IsUnsigned, ArrayRef<Metadata *> Ops) : DIEnumerator(C, Storage, APInt(64, Value, !IsUnsigned), IsUnsigned, Ops) {} ~DIEnumerator() = default; static DIEnumerator *getImpl(LLVMContext &Context, const APInt &Value, bool IsUnsigned, StringRef Name, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Value, IsUnsigned, getCanonicalMDString(Context, Name), Storage, ShouldCreate); } static DIEnumerator *getImpl(LLVMContext &Context, const APInt &Value, bool IsUnsigned, MDString *Name, StorageType Storage, bool ShouldCreate = true); TempDIEnumerator cloneImpl() const { return getTemporary(getContext(), getValue(), isUnsigned(), getName()); } public: static DIEnumerator *get(LLVMContext &Context, int64_t Value, bool IsUnsigned, StringRef Name) { return getImpl(Context, APInt(64, Value, !IsUnsigned), IsUnsigned, Name, Uniqued); } static DIEnumerator *getIfExists(LLVMContext &Context, int64_t Value, bool IsUnsigned, StringRef Name) { return getImpl(Context, APInt(64, Value, !IsUnsigned), IsUnsigned, Name, Uniqued, false); } static DIEnumerator *getDistinct(LLVMContext &Context, int64_t Value, bool IsUnsigned, StringRef Name) { return getImpl(Context, APInt(64, Value, !IsUnsigned), IsUnsigned, Name, Distinct); } static TempDIEnumerator getTemporary(LLVMContext &Context, int64_t Value, bool IsUnsigned, StringRef Name) { return TempDIEnumerator( getImpl(Context, APInt(64, Value, !IsUnsigned), IsUnsigned, Name, Temporary)); } static DIEnumerator *get(LLVMContext &Context, int64_t Value, bool IsUnsigned, MDString *Name) { return getImpl(Context, APInt(64, Value, !IsUnsigned), IsUnsigned, Name, Uniqued); } static DIEnumerator *getIfExists(LLVMContext &Context, int64_t Value, bool IsUnsigned, MDString *Name) { return getImpl(Context, APInt(64, Value, !IsUnsigned), IsUnsigned, Name, Uniqued, false); } static DIEnumerator *getDistinct(LLVMContext &Context, int64_t Value, bool IsUnsigned, MDString *Name) { return getImpl(Context, APInt(64, Value, !IsUnsigned), IsUnsigned, Name, Distinct); } static TempDIEnumerator getTemporary(LLVMContext &Context, int64_t Value, bool IsUnsigned, MDString *Name) { return TempDIEnumerator( getImpl(Context, APInt(64, Value, !IsUnsigned), IsUnsigned, Name, Temporary)); } static DIEnumerator *get(LLVMContext &Context, APInt Value, bool IsUnsigned, StringRef Name) { return getImpl(Context, Value, IsUnsigned, Name, Uniqued); } static DIEnumerator *getIfExists(LLVMContext &Context, APInt Value, bool IsUnsigned, StringRef Name) { return getImpl(Context, Value, IsUnsigned, Name, Uniqued, false); } static DIEnumerator *getDistinct(LLVMContext &Context, APInt Value, bool IsUnsigned, StringRef Name) { return getImpl(Context, Value, IsUnsigned, Name, Distinct); } static TempDIEnumerator getTemporary(LLVMContext &Context, APInt Value, bool IsUnsigned, StringRef Name) { return TempDIEnumerator( getImpl(Context, Value, IsUnsigned, Name, Temporary)); } static DIEnumerator *get(LLVMContext &Context, APInt Value, bool IsUnsigned, MDString *Name) { return getImpl(Context, Value, IsUnsigned, Name, Uniqued); } static DIEnumerator *getIfExists(LLVMContext &Context, APInt Value, bool IsUnsigned, MDString *Name) { return getImpl(Context, Value, IsUnsigned, Name, Uniqued, false); } static DIEnumerator *getDistinct(LLVMContext &Context, APInt Value, bool IsUnsigned, MDString *Name) { return getImpl(Context, Value, IsUnsigned, Name, Distinct); } static TempDIEnumerator getTemporary(LLVMContext &Context, APInt Value, bool IsUnsigned, MDString *Name) { return TempDIEnumerator( getImpl(Context, Value, IsUnsigned, Name, Temporary)); } TempDIEnumerator clone() const { return cloneImpl(); } const APInt &getValue() const { return Value; } bool isUnsigned() const { return SubclassData32; } StringRef getName() const { return getStringOperand(0); } MDString *getRawName() const { return getOperandAs<MDString>(0); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DIEnumeratorKind; } }; class DIScope : public DINode { protected: DIScope(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, ArrayRef<Metadata *> Ops) : DINode(C, ID, Storage, Tag, Ops) {} ~DIScope() = default; public: DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); } inline StringRef getFilename() const; inline StringRef getDirectory() const; inline Optional<StringRef> getSource() const; StringRef getName() const; DIScope *getScope() const; Metadata *getRawFile() const { return isa<DIFile>(this) ? const_cast<DIScope *>(this) : static_cast<Metadata *>(getOperand(0)); } static bool classof(const Metadata *MD) { switch (MD->getMetadataID()) { default: return false; case DIBasicTypeKind: case DIDerivedTypeKind: case DICompositeTypeKind: case DISubroutineTypeKind: case DIFileKind: case DICompileUnitKind: case DISubprogramKind: case DILexicalBlockKind: case DILexicalBlockFileKind: case DINamespaceKind: case DICommonBlockKind: case DIModuleKind: return true; } } }; class DIFile : public DIScope { friend class LLVMContextImpl; friend class MDNode; public: enum ChecksumKind { CSK_MD5 = 1, CSK_SHA1 = 2, CSK_SHA256 = 3, CSK_Last = CSK_SHA256 }; template <typename T> struct ChecksumInfo { ChecksumKind Kind; T Value; ChecksumInfo(ChecksumKind Kind, T Value) : Kind(Kind), Value(Value) { } ~ChecksumInfo() = default; bool operator==(const ChecksumInfo<T> &X) const { return Kind == X.Kind && Value == X.Value; } bool operator!=(const ChecksumInfo<T> &X) const { return !(*this == X); } StringRef getKindAsString() const { return getChecksumKindAsString(Kind); } }; private: Optional<ChecksumInfo<MDString *>> Checksum; Optional<MDString *> Source; DIFile(LLVMContext &C, StorageType Storage, Optional<ChecksumInfo<MDString *>> CS, Optional<MDString *> Src, ArrayRef<Metadata *> Ops) : DIScope(C, DIFileKind, Storage, dwarf::DW_TAG_file_type, Ops), Checksum(CS), Source(Src) {} ~DIFile() = default; static DIFile *getImpl(LLVMContext &Context, StringRef Filename, StringRef Directory, Optional<ChecksumInfo<StringRef>> CS, Optional<StringRef> Source, StorageType Storage, bool ShouldCreate = true) { Optional<ChecksumInfo<MDString *>> MDChecksum; if (CS) MDChecksum.emplace(CS->Kind, getCanonicalMDString(Context, CS->Value)); return getImpl(Context, getCanonicalMDString(Context, Filename), getCanonicalMDString(Context, Directory), MDChecksum, Source ? Optional<MDString *>(getCanonicalMDString(Context, *Source)) : None, Storage, ShouldCreate); } static DIFile *getImpl(LLVMContext &Context, MDString *Filename, MDString *Directory, Optional<ChecksumInfo<MDString *>> CS, Optional<MDString *> Source, StorageType Storage, bool ShouldCreate = true); TempDIFile cloneImpl() const { return getTemporary(getContext(), getFilename(), getDirectory(), getChecksum(), getSource()); } public: static DIFile *get(LLVMContext &Context, StringRef Filename, StringRef Directory, Optional<ChecksumInfo<StringRef>> CS = None, Optional<StringRef> Source = None) { return getImpl(Context, Filename, Directory, CS, Source, Uniqued); } static DIFile *getIfExists(LLVMContext &Context, StringRef Filename, StringRef Directory, Optional<ChecksumInfo<StringRef>> CS = None, Optional<StringRef> Source = None) { return getImpl(Context, Filename, Directory, CS, Source, Uniqued, false); } static DIFile *getDistinct(LLVMContext &Context, StringRef Filename, StringRef Directory, Optional<ChecksumInfo<StringRef>> CS = None, Optional<StringRef> Source = None) { return getImpl(Context, Filename, Directory, CS, Source, Distinct); } static TempDIFile getTemporary(LLVMContext &Context, StringRef Filename, StringRef Directory, Optional<ChecksumInfo<StringRef>> CS = None, Optional<StringRef> Source = None) { return TempDIFile( getImpl(Context, Filename, Directory, CS, Source, Temporary)); } static DIFile *get(LLVMContext &Context, MDString * Filename, MDString *Directory, Optional<ChecksumInfo<MDString *>> CS = None, Optional<MDString *> Source = None) { return getImpl(Context, Filename, Directory, CS, Source, Uniqued); } static DIFile *getIfExists(LLVMContext &Context, MDString * Filename, MDString *Directory, Optional<ChecksumInfo<MDString *>> CS = None, Optional<MDString *> Source = None) { return getImpl(Context, Filename, Directory, CS, Source, Uniqued, false); } static DIFile *getDistinct(LLVMContext &Context, MDString * Filename, MDString *Directory, Optional<ChecksumInfo<MDString *>> CS = None, Optional<MDString *> Source = None) { return getImpl(Context, Filename, Directory, CS, Source, Distinct); } static TempDIFile getTemporary(LLVMContext &Context, MDString * Filename, MDString *Directory, Optional<ChecksumInfo<MDString *>> CS = None, Optional<MDString *> Source = None) { return TempDIFile( getImpl(Context, Filename, Directory, CS, Source, Temporary)); } TempDIFile clone() const { return cloneImpl(); } StringRef getFilename() const { return getStringOperand(0); } StringRef getDirectory() const { return getStringOperand(1); } Optional<ChecksumInfo<StringRef>> getChecksum() const { Optional<ChecksumInfo<StringRef>> StringRefChecksum; if (Checksum) StringRefChecksum.emplace(Checksum->Kind, Checksum->Value->getString()); return StringRefChecksum; } Optional<StringRef> getSource() const { return Source ? Optional<StringRef>((*Source)->getString()) : None; } MDString *getRawFilename() const { return getOperandAs<MDString>(0); } MDString *getRawDirectory() const { return getOperandAs<MDString>(1); } Optional<ChecksumInfo<MDString *>> getRawChecksum() const { return Checksum; } Optional<MDString *> getRawSource() const { return Source; } static StringRef getChecksumKindAsString(ChecksumKind CSKind); static Optional<ChecksumKind> getChecksumKind(StringRef CSKindStr); static bool classof(const Metadata *MD) { return MD->getMetadataID() == DIFileKind; } }; StringRef DIScope::getFilename() const { if (auto *F = getFile()) return F->getFilename(); return ""; } StringRef DIScope::getDirectory() const { if (auto *F = getFile()) return F->getDirectory(); return ""; } Optional<StringRef> DIScope::getSource() const { if (auto *F = getFile()) return F->getSource(); return None; } class DIType : public DIScope { unsigned Line; DIFlags Flags; uint64_t SizeInBits; uint64_t OffsetInBits; uint32_t AlignInBits; protected: DIType(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, unsigned Line, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, ArrayRef<Metadata *> Ops) : DIScope(C, ID, Storage, Tag, Ops) { init(Line, SizeInBits, AlignInBits, OffsetInBits, Flags); } ~DIType() = default; void init(unsigned Line, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags) { this->Line = Line; this->Flags = Flags; this->SizeInBits = SizeInBits; this->AlignInBits = AlignInBits; this->OffsetInBits = OffsetInBits; } void mutate(unsigned Tag, unsigned Line, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags) { (static_cast<void> (0)); setTag(Tag); init(Line, SizeInBits, AlignInBits, OffsetInBits, Flags); } public: TempDIType clone() const { return TempDIType(cast<DIType>(MDNode::clone().release())); } unsigned getLine() const { return Line; } uint64_t getSizeInBits() const { return SizeInBits; } uint32_t getAlignInBits() const { return AlignInBits; } uint32_t getAlignInBytes() const { return getAlignInBits() / 8; } uint64_t getOffsetInBits() const { return OffsetInBits; } DIFlags getFlags() const { return Flags; } DIScope *getScope() const { return cast_or_null<DIScope>(getRawScope()); } StringRef getName() const { return getStringOperand(2); } Metadata *getRawScope() const { return getOperand(1); } MDString *getRawName() const { return getOperandAs<MDString>(2); } TempDIType cloneWithFlags(DIFlags NewFlags) const { auto NewTy = clone(); NewTy->Flags = NewFlags; return NewTy; } bool isPrivate() const { return (getFlags() & FlagAccessibility) == FlagPrivate; } bool isProtected() const { return (getFlags() & FlagAccessibility) == FlagProtected; } bool isPublic() const { return (getFlags() & FlagAccessibility) == FlagPublic; } bool isForwardDecl() const { return getFlags() & FlagFwdDecl; } bool isAppleBlockExtension() const { return getFlags() & FlagAppleBlock; } bool isVirtual() const { return getFlags() & FlagVirtual; } bool isArtificial() const { return getFlags() & FlagArtificial; } bool isObjectPointer() const { return getFlags() & FlagObjectPointer; } bool isObjcClassComplete() const { return getFlags() & FlagObjcClassComplete; } bool isVector() const { return getFlags() & FlagVector; } bool isBitField() const { return getFlags() & FlagBitField; } bool isStaticMember() const { return getFlags() & FlagStaticMember; } bool isLValueReference() const { return getFlags() & FlagLValueReference; } bool isRValueReference() const { return getFlags() & FlagRValueReference; } bool isTypePassByValue() const { return getFlags() & FlagTypePassByValue; } bool isTypePassByReference() const { return getFlags() & FlagTypePassByReference; } bool isBigEndian() const { return getFlags() & FlagBigEndian; } bool isLittleEndian() const { return getFlags() & FlagLittleEndian; } bool getExportSymbols() const { return getFlags() & FlagExportSymbols; } static bool classof(const Metadata *MD) { switch (MD->getMetadataID()) { default: return false; case DIBasicTypeKind: case DIDerivedTypeKind: case DICompositeTypeKind: case DISubroutineTypeKind: return true; } } }; class DIBasicType : public DIType { friend class LLVMContextImpl; friend class MDNode; unsigned Encoding; DIBasicType(LLVMContext &C, StorageType Storage, unsigned Tag, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DIFlags Flags, ArrayRef<Metadata *> Ops) : DIType(C, DIBasicTypeKind, Storage, Tag, 0, SizeInBits, AlignInBits, 0, Flags, Ops), Encoding(Encoding) {} ~DIBasicType() = default; static DIBasicType *getImpl(LLVMContext &Context, unsigned Tag, StringRef Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DIFlags Flags, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Tag, getCanonicalMDString(Context, Name), SizeInBits, AlignInBits, Encoding, Flags, Storage, ShouldCreate); } static DIBasicType *getImpl(LLVMContext &Context, unsigned Tag, MDString *Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DIFlags Flags, StorageType Storage, bool ShouldCreate = true); TempDIBasicType cloneImpl() const { return getTemporary(getContext(), getTag(), getName(), getSizeInBits(), getAlignInBits(), getEncoding(), getFlags()); } public: static DIBasicType *get(LLVMContext &Context, unsigned Tag, StringRef Name) { return getImpl(Context, Tag, Name, 0, 0, 0, FlagZero, Uniqued); } static DIBasicType *getIfExists(LLVMContext &Context, unsigned Tag, StringRef Name) { return getImpl(Context, Tag, Name, 0, 0, 0, FlagZero, Uniqued, false); } static DIBasicType *getDistinct(LLVMContext &Context, unsigned Tag, StringRef Name) { return getImpl(Context, Tag, Name, 0, 0, 0, FlagZero, Distinct); } static TempDIBasicType getTemporary(LLVMContext &Context, unsigned Tag, StringRef Name) { return TempDIBasicType( getImpl(Context, Tag, Name, 0, 0, 0, FlagZero, Temporary)); } static DIBasicType *get(LLVMContext &Context, unsigned Tag, StringRef Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DIFlags Flags) { return getImpl(Context, Tag, Name, SizeInBits, AlignInBits, Encoding, Flags, Uniqued); } static DIBasicType *getIfExists(LLVMContext &Context, unsigned Tag, StringRef Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DIFlags Flags) { return getImpl(Context, Tag, Name, SizeInBits, AlignInBits, Encoding, Flags, Uniqued, false); } static DIBasicType *getDistinct(LLVMContext &Context, unsigned Tag, StringRef Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DIFlags Flags) { return getImpl(Context, Tag, Name, SizeInBits, AlignInBits, Encoding, Flags, Distinct); } static TempDIBasicType getTemporary(LLVMContext &Context, unsigned Tag, StringRef Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DIFlags Flags) { return TempDIBasicType( getImpl(Context, Tag, Name, SizeInBits, AlignInBits, Encoding, Flags, Temporary)); } static DIBasicType *get(LLVMContext &Context, unsigned Tag, MDString *Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DIFlags Flags) { return getImpl(Context, Tag, Name, SizeInBits, AlignInBits, Encoding, Flags, Uniqued); } static DIBasicType *getIfExists(LLVMContext &Context, unsigned Tag, MDString *Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DIFlags Flags) { return getImpl(Context, Tag, Name, SizeInBits, AlignInBits, Encoding, Flags, Uniqued, false); } static DIBasicType *getDistinct(LLVMContext &Context, unsigned Tag, MDString *Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DIFlags Flags) { return getImpl(Context, Tag, Name, SizeInBits, AlignInBits, Encoding, Flags, Distinct); } static TempDIBasicType getTemporary(LLVMContext &Context, unsigned Tag, MDString *Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DIFlags Flags) { return TempDIBasicType( getImpl(Context, Tag, Name, SizeInBits, AlignInBits, Encoding, Flags, Temporary)); } TempDIBasicType clone() const { return cloneImpl(); } unsigned getEncoding() const { return Encoding; } enum class Signedness { Signed, Unsigned }; Optional<Signedness> getSignedness() const; static bool classof(const Metadata *MD) { return MD->getMetadataID() == DIBasicTypeKind; } }; class DIDerivedType : public DIType { friend class LLVMContextImpl; friend class MDNode; Optional<unsigned> DWARFAddressSpace; DIDerivedType(LLVMContext &C, StorageType Storage, unsigned Tag, unsigned Line, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, Optional<unsigned> DWARFAddressSpace, DIFlags Flags, ArrayRef<Metadata *> Ops) : DIType(C, DIDerivedTypeKind, Storage, Tag, Line, SizeInBits, AlignInBits, OffsetInBits, Flags, Ops), DWARFAddressSpace(DWARFAddressSpace) {} ~DIDerivedType() = default; static DIDerivedType * getImpl(LLVMContext &Context, unsigned Tag, StringRef Name, DIFile *File, unsigned Line, DIScope *Scope, DIType *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, Optional<unsigned> DWARFAddressSpace, DIFlags Flags, Metadata *ExtraData, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Tag, getCanonicalMDString(Context, Name), File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, DWARFAddressSpace, Flags, ExtraData, Storage, ShouldCreate); } static DIDerivedType *getImpl(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, Optional<unsigned> DWARFAddressSpace, DIFlags Flags, Metadata *ExtraData, StorageType Storage, bool ShouldCreate = true); TempDIDerivedType cloneImpl() const { return getTemporary(getContext(), getTag(), getName(), getFile(), getLine(), getScope(), getBaseType(), getSizeInBits(), getAlignInBits(), getOffsetInBits(), getDWARFAddressSpace(), getFlags(), getExtraData()); } public: static DIDerivedType *get(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, Optional<unsigned> DWARFAddressSpace, DIFlags Flags, Metadata *ExtraData = nullptr) { return getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, DWARFAddressSpace, Flags, ExtraData, Uniqued); } static DIDerivedType *getIfExists(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, Optional<unsigned> DWARFAddressSpace, DIFlags Flags, Metadata *ExtraData = nullptr) { return getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, DWARFAddressSpace, Flags, ExtraData, Uniqued, false); } static DIDerivedType *getDistinct(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, Optional<unsigned> DWARFAddressSpace, DIFlags Flags, Metadata *ExtraData = nullptr) { return getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, DWARFAddressSpace, Flags, ExtraData, Distinct); } static TempDIDerivedType getTemporary(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, Optional<unsigned> DWARFAddressSpace, DIFlags Flags, Metadata *ExtraData = nullptr) { return TempDIDerivedType( getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, DWARFAddressSpace, Flags, ExtraData, Temporary)); } # 833 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" static DIDerivedType *get(LLVMContext &Context, unsigned Tag, StringRef Name, DIFile *File, unsigned Line, DIScope *Scope, DIType *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, Optional<unsigned> DWARFAddressSpace, DIFlags Flags, Metadata *ExtraData = nullptr) { return getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, DWARFAddressSpace, Flags, ExtraData, Uniqued); } static DIDerivedType *getIfExists(LLVMContext &Context, unsigned Tag, StringRef Name, DIFile *File, unsigned Line, DIScope *Scope, DIType *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, Optional<unsigned> DWARFAddressSpace, DIFlags Flags, Metadata *ExtraData = nullptr) { return getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, DWARFAddressSpace, Flags, ExtraData, Uniqued, false); } static DIDerivedType *getDistinct(LLVMContext &Context, unsigned Tag, StringRef Name, DIFile *File, unsigned Line, DIScope *Scope, DIType *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, Optional<unsigned> DWARFAddressSpace, DIFlags Flags, Metadata *ExtraData = nullptr) { return getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, DWARFAddressSpace, Flags, ExtraData, Distinct); } static TempDIDerivedType getTemporary(LLVMContext &Context, unsigned Tag, StringRef Name, DIFile *File, unsigned Line, DIScope *Scope, DIType *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, Optional<unsigned> DWARFAddressSpace, DIFlags Flags, Metadata *ExtraData = nullptr) { return TempDIDerivedType( getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, DWARFAddressSpace, Flags, ExtraData, Temporary)); } # 843 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" TempDIDerivedType clone() const { return cloneImpl(); } DIType *getBaseType() const { return cast_or_null<DIType>(getRawBaseType()); } Metadata *getRawBaseType() const { return getOperand(3); } Optional<unsigned> getDWARFAddressSpace() const { return DWARFAddressSpace; } # 861 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" Metadata *getExtraData() const { return getRawExtraData(); } Metadata *getRawExtraData() const { return getOperand(4); } DIType *getClassType() const { (static_cast<void> (0)); return cast_or_null<DIType>(getExtraData()); } DIObjCProperty *getObjCProperty() const { return dyn_cast_or_null<DIObjCProperty>(getExtraData()); } uint32_t getVBPtrOffset() const { (static_cast<void> (0)); if (auto *CM = cast_or_null<ConstantAsMetadata>(getExtraData())) if (auto *CI = dyn_cast_or_null<ConstantInt>(CM->getValue())) return static_cast<uint32_t>(CI->getZExtValue()); return 0; } Constant *getStorageOffsetInBits() const { (static_cast<void> (0)); if (auto *C = cast_or_null<ConstantAsMetadata>(getExtraData())) return C->getValue(); return nullptr; } Constant *getConstant() const { (static_cast<void> (0)); if (auto *C = cast_or_null<ConstantAsMetadata>(getExtraData())) return C->getValue(); return nullptr; } Constant *getDiscriminantValue() const { (static_cast<void> (0)); if (auto *C = cast_or_null<ConstantAsMetadata>(getExtraData())) return C->getValue(); return nullptr; } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DIDerivedTypeKind; } }; class DICompositeType : public DIType { friend class LLVMContextImpl; friend class MDNode; unsigned RuntimeLang; DICompositeType(LLVMContext &C, StorageType Storage, unsigned Tag, unsigned Line, unsigned RuntimeLang, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, ArrayRef<Metadata *> Ops) : DIType(C, DICompositeTypeKind, Storage, Tag, Line, SizeInBits, AlignInBits, OffsetInBits, Flags, Ops), RuntimeLang(RuntimeLang) {} ~DICompositeType() = default; void mutate(unsigned Tag, unsigned Line, unsigned RuntimeLang, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags) { (static_cast<void> (0)); (static_cast<void> (0)); this->RuntimeLang = RuntimeLang; DIType::mutate(Tag, Line, SizeInBits, AlignInBits, OffsetInBits, Flags); } static DICompositeType * getImpl(LLVMContext &Context, unsigned Tag, StringRef Name, Metadata *File, unsigned Line, DIScope *Scope, DIType *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, DINodeArray Elements, unsigned RuntimeLang, DIType *VTableHolder, DITemplateParameterArray TemplateParams, StringRef Identifier, DIDerivedType *Discriminator, Metadata *DataLocation, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Tag, getCanonicalMDString(Context, Name), File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, Flags, Elements.get(), RuntimeLang, VTableHolder, TemplateParams.get(), getCanonicalMDString(Context, Identifier), Discriminator, DataLocation, Storage, ShouldCreate); } static DICompositeType * getImpl(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, Metadata *Elements, unsigned RuntimeLang, Metadata *VTableHolder, Metadata *TemplateParams, MDString *Identifier, Metadata *Discriminator, Metadata *DataLocation, StorageType Storage, bool ShouldCreate = true); TempDICompositeType cloneImpl() const { return getTemporary(getContext(), getTag(), getName(), getFile(), getLine(), getScope(), getBaseType(), getSizeInBits(), getAlignInBits(), getOffsetInBits(), getFlags(), getElements(), getRuntimeLang(), getVTableHolder(), getTemplateParams(), getIdentifier(), getDiscriminator(), getRawDataLocation()); } public: static DICompositeType *get(LLVMContext &Context, unsigned Tag, StringRef Name, DIFile *File, unsigned Line, DIScope *Scope, DIType *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, DINodeArray Elements, unsigned RuntimeLang, DIType *VTableHolder, DITemplateParameterArray TemplateParams = nullptr, StringRef Identifier = "", DIDerivedType *Discriminator = nullptr, Metadata *DataLocation = nullptr) { return getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang, VTableHolder, TemplateParams, Identifier, Discriminator, DataLocation, Uniqued); } static DICompositeType *getIfExists(LLVMContext &Context, unsigned Tag, StringRef Name, DIFile *File, unsigned Line, DIScope *Scope, DIType *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, DINodeArray Elements, unsigned RuntimeLang, DIType *VTableHolder, DITemplateParameterArray TemplateParams = nullptr, StringRef Identifier = "", DIDerivedType *Discriminator = nullptr, Metadata *DataLocation = nullptr) { return getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang, VTableHolder, TemplateParams, Identifier, Discriminator, DataLocation, Uniqued, false); } static DICompositeType *getDistinct(LLVMContext &Context, unsigned Tag, StringRef Name, DIFile *File, unsigned Line, DIScope *Scope, DIType *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, DINodeArray Elements, unsigned RuntimeLang, DIType *VTableHolder, DITemplateParameterArray TemplateParams = nullptr, StringRef Identifier = "", DIDerivedType *Discriminator = nullptr, Metadata *DataLocation = nullptr) { return getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang, VTableHolder, TemplateParams, Identifier, Discriminator, DataLocation, Distinct); } static TempDICompositeType getTemporary(LLVMContext &Context, unsigned Tag, StringRef Name, DIFile *File, unsigned Line, DIScope *Scope, DIType *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, DINodeArray Elements, unsigned RuntimeLang, DIType *VTableHolder, DITemplateParameterArray TemplateParams = nullptr, StringRef Identifier = "", DIDerivedType *Discriminator = nullptr, Metadata *DataLocation = nullptr) { return TempDICompositeType( getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang, VTableHolder, TemplateParams, Identifier, Discriminator, DataLocation, Temporary)); } # 984 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" static DICompositeType *get(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, Metadata *Elements, unsigned RuntimeLang, Metadata *VTableHolder, Metadata *TemplateParams = nullptr, MDString *Identifier = nullptr, Metadata *Discriminator = nullptr, Metadata *DataLocation = nullptr) { return getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang, VTableHolder, TemplateParams, Identifier, Discriminator, DataLocation, Uniqued); } static DICompositeType *getIfExists(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, Metadata *Elements, unsigned RuntimeLang, Metadata *VTableHolder, Metadata *TemplateParams = nullptr, MDString *Identifier = nullptr, Metadata *Discriminator = nullptr, Metadata *DataLocation = nullptr) { return getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang, VTableHolder, TemplateParams, Identifier, Discriminator, DataLocation, Uniqued, false); } static DICompositeType *getDistinct(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, Metadata *Elements, unsigned RuntimeLang, Metadata *VTableHolder, Metadata *TemplateParams = nullptr, MDString *Identifier = nullptr, Metadata *Discriminator = nullptr, Metadata *DataLocation = nullptr) { return getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang, VTableHolder, TemplateParams, Identifier, Discriminator, DataLocation, Distinct); } static TempDICompositeType getTemporary(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, Metadata *Elements, unsigned RuntimeLang, Metadata *VTableHolder, Metadata *TemplateParams = nullptr, MDString *Identifier = nullptr, Metadata *Discriminator = nullptr, Metadata *DataLocation = nullptr) { return TempDICompositeType( getImpl(Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang, VTableHolder, TemplateParams, Identifier, Discriminator, DataLocation, Temporary)); } # 996 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" TempDICompositeType clone() const { return cloneImpl(); } # 1005 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" static DICompositeType * getODRType(LLVMContext &Context, MDString &Identifier, unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, Metadata *Elements, unsigned RuntimeLang, Metadata *VTableHolder, Metadata *TemplateParams, Metadata *Discriminator, Metadata *DataLocation); static DICompositeType *getODRTypeIfExists(LLVMContext &Context, MDString &Identifier); # 1025 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" static DICompositeType * buildODRType(LLVMContext &Context, MDString &Identifier, unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, Metadata *Elements, unsigned RuntimeLang, Metadata *VTableHolder, Metadata *TemplateParams, Metadata *Discriminator, Metadata *DataLocation); DIType *getBaseType() const { return cast_or_null<DIType>(getRawBaseType()); } DINodeArray getElements() const { return cast_or_null<MDTuple>(getRawElements()); } DIType *getVTableHolder() const { return cast_or_null<DIType>(getRawVTableHolder()); } DITemplateParameterArray getTemplateParams() const { return cast_or_null<MDTuple>(getRawTemplateParams()); } StringRef getIdentifier() const { return getStringOperand(7); } unsigned getRuntimeLang() const { return RuntimeLang; } Metadata *getRawBaseType() const { return getOperand(3); } Metadata *getRawElements() const { return getOperand(4); } Metadata *getRawVTableHolder() const { return getOperand(5); } Metadata *getRawTemplateParams() const { return getOperand(6); } MDString *getRawIdentifier() const { return getOperandAs<MDString>(7); } Metadata *getRawDiscriminator() const { return getOperand(8); } DIDerivedType *getDiscriminator() const { return getOperandAs<DIDerivedType>(8); } Metadata *getRawDataLocation() const { return getOperand(9); } DIVariable *getDataLocation() const { return dyn_cast_or_null<DIVariable>(getRawDataLocation()); } DIExpression *getDataLocationExp() const { return dyn_cast_or_null<DIExpression>(getRawDataLocation()); } void replaceElements(DINodeArray Elements) { replaceOperandWith(4, Elements.get()); } void replaceVTableHolder(DIType *VTableHolder) { replaceOperandWith(5, VTableHolder); } void replaceTemplateParams(DITemplateParameterArray TemplateParams) { replaceOperandWith(6, TemplateParams.get()); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DICompositeTypeKind; } }; class DISubroutineType : public DIType { friend class LLVMContextImpl; friend class MDNode; uint8_t CC; DISubroutineType(LLVMContext &C, StorageType Storage, DIFlags Flags, uint8_t CC, ArrayRef<Metadata *> Ops) : DIType(C, DISubroutineTypeKind, Storage, dwarf::DW_TAG_subroutine_type, 0, 0, 0, 0, Flags, Ops), CC(CC) {} ~DISubroutineType() = default; static DISubroutineType *getImpl(LLVMContext &Context, DIFlags Flags, uint8_t CC, DITypeRefArray TypeArray, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Flags, CC, TypeArray.get(), Storage, ShouldCreate); } static DISubroutineType *getImpl(LLVMContext &Context, DIFlags Flags, uint8_t CC, Metadata *TypeArray, StorageType Storage, bool ShouldCreate = true); TempDISubroutineType cloneImpl() const { return getTemporary(getContext(), getFlags(), getCC(), getTypeArray()); } public: static DISubroutineType *get(LLVMContext &Context, DIFlags Flags, uint8_t CC, DITypeRefArray TypeArray) { return getImpl(Context, Flags, CC, TypeArray, Uniqued); } static DISubroutineType *getIfExists(LLVMContext &Context, DIFlags Flags, uint8_t CC, DITypeRefArray TypeArray) { return getImpl(Context, Flags, CC, TypeArray, Uniqued, false); } static DISubroutineType *getDistinct(LLVMContext &Context, DIFlags Flags, uint8_t CC, DITypeRefArray TypeArray) { return getImpl(Context, Flags, CC, TypeArray, Distinct); } static TempDISubroutineType getTemporary(LLVMContext &Context, DIFlags Flags, uint8_t CC, DITypeRefArray TypeArray) { return TempDISubroutineType( getImpl(Context, Flags, CC, TypeArray, Temporary)); } static DISubroutineType *get(LLVMContext &Context, DIFlags Flags, uint8_t CC, Metadata *TypeArray) { return getImpl(Context, Flags, CC, TypeArray, Uniqued); } static DISubroutineType *getIfExists(LLVMContext &Context, DIFlags Flags, uint8_t CC, Metadata *TypeArray) { return getImpl(Context, Flags, CC, TypeArray, Uniqued, false); } static DISubroutineType *getDistinct(LLVMContext &Context, DIFlags Flags, uint8_t CC, Metadata *TypeArray) { return getImpl(Context, Flags, CC, TypeArray, Distinct); } static TempDISubroutineType getTemporary(LLVMContext &Context, DIFlags Flags, uint8_t CC, Metadata *TypeArray) { return TempDISubroutineType( getImpl(Context, Flags, CC, TypeArray, Temporary)); } TempDISubroutineType clone() const { return cloneImpl(); } uint8_t getCC() const { return CC; } DITypeRefArray getTypeArray() const { return cast_or_null<MDTuple>(getRawTypeArray()); } Metadata *getRawTypeArray() const { return getOperand(3); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DISubroutineTypeKind; } }; class DICompileUnit : public DIScope { friend class LLVMContextImpl; friend class MDNode; public: enum DebugEmissionKind : unsigned { NoDebug = 0, FullDebug, LineTablesOnly, DebugDirectivesOnly, LastEmissionKind = DebugDirectivesOnly }; enum class DebugNameTableKind : unsigned { Default = 0, GNU = 1, None = 2, LastDebugNameTableKind = None }; static Optional<DebugEmissionKind> getEmissionKind(StringRef Str); static const char *emissionKindString(DebugEmissionKind EK); static Optional<DebugNameTableKind> getNameTableKind(StringRef Str); static const char *nameTableKindString(DebugNameTableKind PK); private: unsigned SourceLanguage; bool IsOptimized; unsigned RuntimeVersion; unsigned EmissionKind; uint64_t DWOId; bool SplitDebugInlining; bool DebugInfoForProfiling; unsigned NameTableKind; bool RangesBaseAddress; DICompileUnit(LLVMContext &C, StorageType Storage, unsigned SourceLanguage, bool IsOptimized, unsigned RuntimeVersion, unsigned EmissionKind, uint64_t DWOId, bool SplitDebugInlining, bool DebugInfoForProfiling, unsigned NameTableKind, bool RangesBaseAddress, ArrayRef<Metadata *> Ops) : DIScope(C, DICompileUnitKind, Storage, dwarf::DW_TAG_compile_unit, Ops), SourceLanguage(SourceLanguage), IsOptimized(IsOptimized), RuntimeVersion(RuntimeVersion), EmissionKind(EmissionKind), DWOId(DWOId), SplitDebugInlining(SplitDebugInlining), DebugInfoForProfiling(DebugInfoForProfiling), NameTableKind(NameTableKind), RangesBaseAddress(RangesBaseAddress) { (static_cast<void> (0)); } ~DICompileUnit() = default; static DICompileUnit * getImpl(LLVMContext &Context, unsigned SourceLanguage, DIFile *File, StringRef Producer, bool IsOptimized, StringRef Flags, unsigned RuntimeVersion, StringRef SplitDebugFilename, unsigned EmissionKind, DICompositeTypeArray EnumTypes, DIScopeArray RetainedTypes, DIGlobalVariableExpressionArray GlobalVariables, DIImportedEntityArray ImportedEntities, DIMacroNodeArray Macros, uint64_t DWOId, bool SplitDebugInlining, bool DebugInfoForProfiling, unsigned NameTableKind, bool RangesBaseAddress, StringRef SysRoot, StringRef SDK, StorageType Storage, bool ShouldCreate = true) { return getImpl( Context, SourceLanguage, File, getCanonicalMDString(Context, Producer), IsOptimized, getCanonicalMDString(Context, Flags), RuntimeVersion, getCanonicalMDString(Context, SplitDebugFilename), EmissionKind, EnumTypes.get(), RetainedTypes.get(), GlobalVariables.get(), ImportedEntities.get(), Macros.get(), DWOId, SplitDebugInlining, DebugInfoForProfiling, NameTableKind, RangesBaseAddress, getCanonicalMDString(Context, SysRoot), getCanonicalMDString(Context, SDK), Storage, ShouldCreate); } static DICompileUnit * getImpl(LLVMContext &Context, unsigned SourceLanguage, Metadata *File, MDString *Producer, bool IsOptimized, MDString *Flags, unsigned RuntimeVersion, MDString *SplitDebugFilename, unsigned EmissionKind, Metadata *EnumTypes, Metadata *RetainedTypes, Metadata *GlobalVariables, Metadata *ImportedEntities, Metadata *Macros, uint64_t DWOId, bool SplitDebugInlining, bool DebugInfoForProfiling, unsigned NameTableKind, bool RangesBaseAddress, MDString *SysRoot, MDString *SDK, StorageType Storage, bool ShouldCreate = true); TempDICompileUnit cloneImpl() const { return getTemporary( getContext(), getSourceLanguage(), getFile(), getProducer(), isOptimized(), getFlags(), getRuntimeVersion(), getSplitDebugFilename(), getEmissionKind(), getEnumTypes(), getRetainedTypes(), getGlobalVariables(), getImportedEntities(), getMacros(), DWOId, getSplitDebugInlining(), getDebugInfoForProfiling(), getNameTableKind(), getRangesBaseAddress(), getSysRoot(), getSDK()); } public: static void get() = delete; static void getIfExists() = delete; static DICompileUnit *getDistinct(LLVMContext &Context, unsigned SourceLanguage, DIFile *File, StringRef Producer, bool IsOptimized, StringRef Flags, unsigned RuntimeVersion, StringRef SplitDebugFilename, DebugEmissionKind EmissionKind, DICompositeTypeArray EnumTypes, DIScopeArray RetainedTypes, DIGlobalVariableExpressionArray GlobalVariables, DIImportedEntityArray ImportedEntities, DIMacroNodeArray Macros, uint64_t DWOId, bool SplitDebugInlining, bool DebugInfoForProfiling, DebugNameTableKind NameTableKind, bool RangesBaseAddress, StringRef SysRoot, StringRef SDK) { return getImpl(Context, SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion, SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes, GlobalVariables, ImportedEntities, Macros, DWOId, SplitDebugInlining, DebugInfoForProfiling, (unsigned)NameTableKind, RangesBaseAddress, SysRoot, SDK, Distinct); } static TempDICompileUnit getTemporary(LLVMContext &Context, unsigned SourceLanguage, DIFile *File, StringRef Producer, bool IsOptimized, StringRef Flags, unsigned RuntimeVersion, StringRef SplitDebugFilename, DebugEmissionKind EmissionKind, DICompositeTypeArray EnumTypes, DIScopeArray RetainedTypes, DIGlobalVariableExpressionArray GlobalVariables, DIImportedEntityArray ImportedEntities, DIMacroNodeArray Macros, uint64_t DWOId, bool SplitDebugInlining, bool DebugInfoForProfiling, DebugNameTableKind NameTableKind, bool RangesBaseAddress, StringRef SysRoot, StringRef SDK) { return TempDICompileUnit( getImpl(Context, SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion, SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes, GlobalVariables, ImportedEntities, Macros, DWOId, SplitDebugInlining, DebugInfoForProfiling, (unsigned)NameTableKind, RangesBaseAddress, SysRoot, SDK, Temporary)); } # 1261 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" static DICompileUnit *getDistinct(LLVMContext &Context, unsigned SourceLanguage, Metadata *File, MDString *Producer, bool IsOptimized, MDString *Flags, unsigned RuntimeVersion, MDString *SplitDebugFilename, unsigned EmissionKind, Metadata *EnumTypes, Metadata *RetainedTypes, Metadata *GlobalVariables, Metadata *ImportedEntities, Metadata *Macros, uint64_t DWOId, bool SplitDebugInlining, bool DebugInfoForProfiling, unsigned NameTableKind, bool RangesBaseAddress, MDString *SysRoot, MDString *SDK) { return getImpl(Context, SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion, SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes, GlobalVariables, ImportedEntities, Macros, DWOId, SplitDebugInlining, DebugInfoForProfiling, NameTableKind, RangesBaseAddress, SysRoot, SDK, Distinct); } static TempDICompileUnit getTemporary(LLVMContext &Context, unsigned SourceLanguage, Metadata *File, MDString *Producer, bool IsOptimized, MDString *Flags, unsigned RuntimeVersion, MDString *SplitDebugFilename, unsigned EmissionKind, Metadata *EnumTypes, Metadata *RetainedTypes, Metadata *GlobalVariables, Metadata *ImportedEntities, Metadata *Macros, uint64_t DWOId, bool SplitDebugInlining, bool DebugInfoForProfiling, unsigned NameTableKind, bool RangesBaseAddress, MDString *SysRoot, MDString *SDK) { return TempDICompileUnit( getImpl(Context, SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion, SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes, GlobalVariables, ImportedEntities, Macros, DWOId, SplitDebugInlining, DebugInfoForProfiling, NameTableKind, RangesBaseAddress, SysRoot, SDK, Temporary)); } # 1276 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" TempDICompileUnit clone() const { return cloneImpl(); } unsigned getSourceLanguage() const { return SourceLanguage; } bool isOptimized() const { return IsOptimized; } unsigned getRuntimeVersion() const { return RuntimeVersion; } DebugEmissionKind getEmissionKind() const { return (DebugEmissionKind)EmissionKind; } bool isDebugDirectivesOnly() const { return EmissionKind == DebugDirectivesOnly; } bool getDebugInfoForProfiling() const { return DebugInfoForProfiling; } DebugNameTableKind getNameTableKind() const { return (DebugNameTableKind)NameTableKind; } bool getRangesBaseAddress() const { return RangesBaseAddress; } StringRef getProducer() const { return getStringOperand(1); } StringRef getFlags() const { return getStringOperand(2); } StringRef getSplitDebugFilename() const { return getStringOperand(3); } DICompositeTypeArray getEnumTypes() const { return cast_or_null<MDTuple>(getRawEnumTypes()); } DIScopeArray getRetainedTypes() const { return cast_or_null<MDTuple>(getRawRetainedTypes()); } DIGlobalVariableExpressionArray getGlobalVariables() const { return cast_or_null<MDTuple>(getRawGlobalVariables()); } DIImportedEntityArray getImportedEntities() const { return cast_or_null<MDTuple>(getRawImportedEntities()); } DIMacroNodeArray getMacros() const { return cast_or_null<MDTuple>(getRawMacros()); } uint64_t getDWOId() const { return DWOId; } void setDWOId(uint64_t DwoId) { DWOId = DwoId; } bool getSplitDebugInlining() const { return SplitDebugInlining; } void setSplitDebugInlining(bool SplitDebugInlining) { this->SplitDebugInlining = SplitDebugInlining; } StringRef getSysRoot() const { return getStringOperand(9); } StringRef getSDK() const { return getStringOperand(10); } MDString *getRawProducer() const { return getOperandAs<MDString>(1); } MDString *getRawFlags() const { return getOperandAs<MDString>(2); } MDString *getRawSplitDebugFilename() const { return getOperandAs<MDString>(3); } Metadata *getRawEnumTypes() const { return getOperand(4); } Metadata *getRawRetainedTypes() const { return getOperand(5); } Metadata *getRawGlobalVariables() const { return getOperand(6); } Metadata *getRawImportedEntities() const { return getOperand(7); } Metadata *getRawMacros() const { return getOperand(8); } MDString *getRawSysRoot() const { return getOperandAs<MDString>(9); } MDString *getRawSDK() const { return getOperandAs<MDString>(10); } void replaceEnumTypes(DICompositeTypeArray N) { replaceOperandWith(4, N.get()); } void replaceRetainedTypes(DITypeArray N) { replaceOperandWith(5, N.get()); } void replaceGlobalVariables(DIGlobalVariableExpressionArray N) { replaceOperandWith(6, N.get()); } void replaceImportedEntities(DIImportedEntityArray N) { replaceOperandWith(7, N.get()); } void replaceMacros(DIMacroNodeArray N) { replaceOperandWith(8, N.get()); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DICompileUnitKind; } }; class DILocalScope : public DIScope { protected: DILocalScope(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, ArrayRef<Metadata *> Ops) : DIScope(C, ID, Storage, Tag, Ops) {} ~DILocalScope() = default; public: DISubprogram *getSubprogram() const; DILocalScope *getNonLexicalBlockFileScope() const; static bool classof(const Metadata *MD) { return MD->getMetadataID() == DISubprogramKind || MD->getMetadataID() == DILexicalBlockKind || MD->getMetadataID() == DILexicalBlockFileKind; } }; class DILocation : public MDNode { friend class LLVMContextImpl; friend class MDNode; DILocation(LLVMContext &C, StorageType Storage, unsigned Line, unsigned Column, ArrayRef<Metadata *> MDs, bool ImplicitCode); ~DILocation() { dropAllReferences(); } static DILocation *getImpl(LLVMContext &Context, unsigned Line, unsigned Column, Metadata *Scope, Metadata *InlinedAt, bool ImplicitCode, StorageType Storage, bool ShouldCreate = true); static DILocation *getImpl(LLVMContext &Context, unsigned Line, unsigned Column, DILocalScope *Scope, DILocation *InlinedAt, bool ImplicitCode, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Line, Column, static_cast<Metadata *>(Scope), static_cast<Metadata *>(InlinedAt), ImplicitCode, Storage, ShouldCreate); } static unsigned getPrefixEncodingFromUnsigned(unsigned U) { U &= 0xfff; return U > 0x1f ? (((U & 0xfe0) << 1) | (U & 0x1f) | 0x20) : U; } static unsigned getUnsignedFromPrefixEncoding(unsigned U) { if (U & 1) return 0; U >>= 1; return (U & 0x20) ? (((U >> 1) & 0xfe0) | (U & 0x1f)) : (U & 0x1f); } static unsigned getNextComponentInDiscriminator(unsigned D) { if ((D & 1) == 0) return D >> ((D & 0x40) ? 14 : 7); else return D >> 1; } TempDILocation cloneImpl() const { return getTemporary(getContext(), getLine(), getColumn(), getRawScope(), getRawInlinedAt(), isImplicitCode()); } static unsigned encodeComponent(unsigned C) { return (C == 0) ? 1U : (getPrefixEncodingFromUnsigned(C) << 1); } static unsigned encodingBits(unsigned C) { return (C == 0) ? 1 : (C > 0x1f ? 14 : 7); } public: void replaceOperandWith(unsigned I, Metadata *New) = delete; static DILocation *get(LLVMContext &Context, unsigned Line, unsigned Column, Metadata *Scope, Metadata *InlinedAt = nullptr, bool ImplicitCode = false) { return getImpl(Context, Line, Column, Scope, InlinedAt, ImplicitCode, Uniqued); } static DILocation *getIfExists(LLVMContext &Context, unsigned Line, unsigned Column, Metadata *Scope, Metadata *InlinedAt = nullptr, bool ImplicitCode = false) { return getImpl(Context, Line, Column, Scope, InlinedAt, ImplicitCode, Uniqued, false); } static DILocation *getDistinct(LLVMContext &Context, unsigned Line, unsigned Column, Metadata *Scope, Metadata *InlinedAt = nullptr, bool ImplicitCode = false) { return getImpl(Context, Line, Column, Scope, InlinedAt, ImplicitCode, Distinct); } static TempDILocation getTemporary(LLVMContext &Context, unsigned Line, unsigned Column, Metadata *Scope, Metadata *InlinedAt = nullptr, bool ImplicitCode = false) { return TempDILocation( getImpl(Context, Line, Column, Scope, InlinedAt, ImplicitCode, Temporary)); } static DILocation *get(LLVMContext &Context, unsigned Line, unsigned Column, DILocalScope *Scope, DILocation *InlinedAt = nullptr, bool ImplicitCode = false) { return getImpl(Context, Line, Column, Scope, InlinedAt, ImplicitCode, Uniqued); } static DILocation *getIfExists(LLVMContext &Context, unsigned Line, unsigned Column, DILocalScope *Scope, DILocation *InlinedAt = nullptr, bool ImplicitCode = false) { return getImpl(Context, Line, Column, Scope, InlinedAt, ImplicitCode, Uniqued, false); } static DILocation *getDistinct(LLVMContext &Context, unsigned Line, unsigned Column, DILocalScope *Scope, DILocation *InlinedAt = nullptr, bool ImplicitCode = false) { return getImpl(Context, Line, Column, Scope, InlinedAt, ImplicitCode, Distinct); } static TempDILocation getTemporary(LLVMContext &Context, unsigned Line, unsigned Column, DILocalScope *Scope, DILocation *InlinedAt = nullptr, bool ImplicitCode = false) { return TempDILocation( getImpl(Context, Line, Column, Scope, InlinedAt, ImplicitCode, Temporary)); } TempDILocation clone() const { return cloneImpl(); } unsigned getLine() const { return SubclassData32; } unsigned getColumn() const { return SubclassData16; } DILocalScope *getScope() const { return cast<DILocalScope>(getRawScope()); } DILocation *getInlinedAt() const { return cast_or_null<DILocation>(getRawInlinedAt()); } bool isImplicitCode() const { return ImplicitCode; } void setImplicitCode(bool ImplicitCode) { this->ImplicitCode = ImplicitCode; } DIFile *getFile() const { return getScope()->getFile(); } StringRef getFilename() const { return getScope()->getFilename(); } StringRef getDirectory() const { return getScope()->getDirectory(); } Optional<StringRef> getSource() const { return getScope()->getSource(); } DILocalScope *getInlinedAtScope() const { if (auto *IA = getInlinedAt()) return IA->getInlinedAtScope(); return getScope(); } # 1537 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" inline unsigned getDiscriminator() const; inline const DILocation *cloneWithDiscriminator(unsigned Discriminator) const; inline Optional<const DILocation *> cloneWithBaseDiscriminator(unsigned BD) const; inline unsigned getDuplicationFactor() const; inline unsigned getCopyIdentifier() const; inline unsigned getBaseDiscriminator() const; inline Optional<const DILocation *> cloneByMultiplyingDuplicationFactor(unsigned DF) const; # 1578 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" static const DILocation *getMergedLocation(const DILocation *LocA, const DILocation *LocB); static const DILocation *getMergedLocations(ArrayRef<const DILocation *> Locs); static unsigned getBaseDiscriminatorFromDiscriminator(unsigned D) { return getUnsignedFromPrefixEncoding(D); } # 1602 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" static Optional<unsigned> encodeDiscriminator(unsigned BD, unsigned DF, unsigned CI); static void decodeDiscriminator(unsigned D, unsigned &BD, unsigned &DF, unsigned &CI); static unsigned getDuplicationFactorFromDiscriminator(unsigned D) { D = getNextComponentInDiscriminator(D); unsigned Ret = getUnsignedFromPrefixEncoding(D); if (Ret == 0) return 1; return Ret; } static unsigned getCopyIdentifierFromDiscriminator(unsigned D) { return getUnsignedFromPrefixEncoding(getNextComponentInDiscriminator( getNextComponentInDiscriminator(D))); } Metadata *getRawScope() const { return getOperand(0); } Metadata *getRawInlinedAt() const { if (getNumOperands() == 2) return getOperand(1); return nullptr; } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DILocationKind; } }; class DISubprogram : public DILocalScope { friend class LLVMContextImpl; friend class MDNode; unsigned Line; unsigned ScopeLine; unsigned VirtualIndex; int ThisAdjustment; public: enum DISPFlags : uint32_t { # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoFlags.def" 1 # 78 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoFlags.def" SPFlagZero = 0, SPFlagVirtual = 1u, SPFlagPureVirtual = 2u, SPFlagLocalToUnit = (1u << 2), SPFlagDefinition = (1u << 3), SPFlagOptimized = (1u << 4), SPFlagPure = (1u << 5), SPFlagElemental = (1u << 6), SPFlagRecursive = (1u << 7), SPFlagMainSubprogram = (1u << 8), SPFlagDeleted = (1u << 9), SPFlagObjCDirect = (1u << 11), SPFlagLargest = (1 << 11), # 1657 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" 2 SPFlagNonvirtual = SPFlagZero, SPFlagVirtuality = SPFlagVirtual | SPFlagPureVirtual, LLVM_BITMASK_LARGEST_ENUMERATOR = SPFlagLargest }; static DISPFlags getFlag(StringRef Flag); static StringRef getFlagString(DISPFlags Flag); static DISPFlags splitFlags(DISPFlags Flags, SmallVectorImpl<DISPFlags> &SplitFlags); static DISPFlags toSPFlags(bool IsLocalToUnit, bool IsDefinition, bool IsOptimized, unsigned Virtuality = SPFlagNonvirtual, bool IsMainSubprogram = false) { static_assert( int(SPFlagVirtual) == int(dwarf::DW_VIRTUALITY_virtual) && int(SPFlagPureVirtual) == int(dwarf::DW_VIRTUALITY_pure_virtual), "Virtuality constant mismatch"); return static_cast<DISPFlags>( (Virtuality & SPFlagVirtuality) | (IsLocalToUnit ? SPFlagLocalToUnit : SPFlagZero) | (IsDefinition ? SPFlagDefinition : SPFlagZero) | (IsOptimized ? SPFlagOptimized : SPFlagZero) | (IsMainSubprogram ? SPFlagMainSubprogram : SPFlagZero)); } private: DIFlags Flags; DISPFlags SPFlags; DISubprogram(LLVMContext &C, StorageType Storage, unsigned Line, unsigned ScopeLine, unsigned VirtualIndex, int ThisAdjustment, DIFlags Flags, DISPFlags SPFlags, ArrayRef<Metadata *> Ops) : DILocalScope(C, DISubprogramKind, Storage, dwarf::DW_TAG_subprogram, Ops), Line(Line), ScopeLine(ScopeLine), VirtualIndex(VirtualIndex), ThisAdjustment(ThisAdjustment), Flags(Flags), SPFlags(SPFlags) { static_assert(dwarf::DW_VIRTUALITY_max < 4, "Virtuality out of range"); } ~DISubprogram() = default; static DISubprogram * getImpl(LLVMContext &Context, DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DISubroutineType *Type, unsigned ScopeLine, DIType *ContainingType, unsigned VirtualIndex, int ThisAdjustment, DIFlags Flags, DISPFlags SPFlags, DICompileUnit *Unit, DITemplateParameterArray TemplateParams, DISubprogram *Declaration, DINodeArray RetainedNodes, DITypeArray ThrownTypes, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Scope, getCanonicalMDString(Context, Name), getCanonicalMDString(Context, LinkageName), File, Line, Type, ScopeLine, ContainingType, VirtualIndex, ThisAdjustment, Flags, SPFlags, Unit, TemplateParams.get(), Declaration, RetainedNodes.get(), ThrownTypes.get(), Storage, ShouldCreate); } static DISubprogram *getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, unsigned ScopeLine, Metadata *ContainingType, unsigned VirtualIndex, int ThisAdjustment, DIFlags Flags, DISPFlags SPFlags, Metadata *Unit, Metadata *TemplateParams, Metadata *Declaration, Metadata *RetainedNodes, Metadata *ThrownTypes, StorageType Storage, bool ShouldCreate = true); TempDISubprogram cloneImpl() const { return getTemporary(getContext(), getScope(), getName(), getLinkageName(), getFile(), getLine(), getType(), getScopeLine(), getContainingType(), getVirtualIndex(), getThisAdjustment(), getFlags(), getSPFlags(), getUnit(), getTemplateParams(), getDeclaration(), getRetainedNodes(), getThrownTypes()); } public: static DISubprogram *get(LLVMContext &Context, DIScope * Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DISubroutineType *Type, unsigned ScopeLine, DIType *ContainingType, unsigned VirtualIndex, int ThisAdjustment, DIFlags Flags, DISPFlags SPFlags, DICompileUnit *Unit, DITemplateParameterArray TemplateParams = nullptr, DISubprogram *Declaration = nullptr, DINodeArray RetainedNodes = nullptr, DITypeArray ThrownTypes = nullptr) { return getImpl(Context, Scope, Name, LinkageName, File, Line, Type, ScopeLine, ContainingType, VirtualIndex, ThisAdjustment, Flags, SPFlags, Unit, TemplateParams, Declaration, RetainedNodes, ThrownTypes, Uniqued); } static DISubprogram *getIfExists(LLVMContext &Context, DIScope * Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DISubroutineType *Type, unsigned ScopeLine, DIType *ContainingType, unsigned VirtualIndex, int ThisAdjustment, DIFlags Flags, DISPFlags SPFlags, DICompileUnit *Unit, DITemplateParameterArray TemplateParams = nullptr, DISubprogram *Declaration = nullptr, DINodeArray RetainedNodes = nullptr, DITypeArray ThrownTypes = nullptr) { return getImpl(Context, Scope, Name, LinkageName, File, Line, Type, ScopeLine, ContainingType, VirtualIndex, ThisAdjustment, Flags, SPFlags, Unit, TemplateParams, Declaration, RetainedNodes, ThrownTypes, Uniqued, false); } static DISubprogram *getDistinct(LLVMContext &Context, DIScope * Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DISubroutineType *Type, unsigned ScopeLine, DIType *ContainingType, unsigned VirtualIndex, int ThisAdjustment, DIFlags Flags, DISPFlags SPFlags, DICompileUnit *Unit, DITemplateParameterArray TemplateParams = nullptr, DISubprogram *Declaration = nullptr, DINodeArray RetainedNodes = nullptr, DITypeArray ThrownTypes = nullptr) { return getImpl(Context, Scope, Name, LinkageName, File, Line, Type, ScopeLine, ContainingType, VirtualIndex, ThisAdjustment, Flags, SPFlags, Unit, TemplateParams, Declaration, RetainedNodes, ThrownTypes, Distinct); } static TempDISubprogram getTemporary(LLVMContext &Context, DIScope * Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DISubroutineType *Type, unsigned ScopeLine, DIType *ContainingType, unsigned VirtualIndex, int ThisAdjustment, DIFlags Flags, DISPFlags SPFlags, DICompileUnit *Unit, DITemplateParameterArray TemplateParams = nullptr, DISubprogram *Declaration = nullptr, DINodeArray RetainedNodes = nullptr, DITypeArray ThrownTypes = nullptr) { return TempDISubprogram( getImpl(Context, Scope, Name, LinkageName, File, Line, Type, ScopeLine, ContainingType, VirtualIndex, ThisAdjustment, Flags, SPFlags, Unit, TemplateParams, Declaration, RetainedNodes, ThrownTypes, Temporary)); } # 1754 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" static DISubprogram *get(LLVMContext &Context, Metadata * Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, unsigned ScopeLine, Metadata *ContainingType, unsigned VirtualIndex, int ThisAdjustment, DIFlags Flags, DISPFlags SPFlags, Metadata *Unit, Metadata *TemplateParams = nullptr, Metadata *Declaration = nullptr, Metadata *RetainedNodes = nullptr, Metadata *ThrownTypes = nullptr) { return getImpl(Context, Scope, Name, LinkageName, File, Line, Type, ScopeLine, ContainingType, VirtualIndex, ThisAdjustment, Flags, SPFlags, Unit, TemplateParams, Declaration, RetainedNodes, ThrownTypes, Uniqued); } static DISubprogram *getIfExists(LLVMContext &Context, Metadata * Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, unsigned ScopeLine, Metadata *ContainingType, unsigned VirtualIndex, int ThisAdjustment, DIFlags Flags, DISPFlags SPFlags, Metadata *Unit, Metadata *TemplateParams = nullptr, Metadata *Declaration = nullptr, Metadata *RetainedNodes = nullptr, Metadata *ThrownTypes = nullptr) { return getImpl(Context, Scope, Name, LinkageName, File, Line, Type, ScopeLine, ContainingType, VirtualIndex, ThisAdjustment, Flags, SPFlags, Unit, TemplateParams, Declaration, RetainedNodes, ThrownTypes, Uniqued, false); } static DISubprogram *getDistinct(LLVMContext &Context, Metadata * Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, unsigned ScopeLine, Metadata *ContainingType, unsigned VirtualIndex, int ThisAdjustment, DIFlags Flags, DISPFlags SPFlags, Metadata *Unit, Metadata *TemplateParams = nullptr, Metadata *Declaration = nullptr, Metadata *RetainedNodes = nullptr, Metadata *ThrownTypes = nullptr) { return getImpl(Context, Scope, Name, LinkageName, File, Line, Type, ScopeLine, ContainingType, VirtualIndex, ThisAdjustment, Flags, SPFlags, Unit, TemplateParams, Declaration, RetainedNodes, ThrownTypes, Distinct); } static TempDISubprogram getTemporary(LLVMContext &Context, Metadata * Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, unsigned ScopeLine, Metadata *ContainingType, unsigned VirtualIndex, int ThisAdjustment, DIFlags Flags, DISPFlags SPFlags, Metadata *Unit, Metadata *TemplateParams = nullptr, Metadata *Declaration = nullptr, Metadata *RetainedNodes = nullptr, Metadata *ThrownTypes = nullptr) { return TempDISubprogram( getImpl(Context, Scope, Name, LinkageName, File, Line, Type, ScopeLine, ContainingType, VirtualIndex, ThisAdjustment, Flags, SPFlags, Unit, TemplateParams, Declaration, RetainedNodes, ThrownTypes, Temporary)); } # 1766 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" TempDISubprogram clone() const { return cloneImpl(); } TempDISubprogram cloneWithFlags(DIFlags NewFlags) const { auto NewSP = clone(); NewSP->Flags = NewFlags; return NewSP; } public: unsigned getLine() const { return Line; } unsigned getVirtuality() const { return getSPFlags() & SPFlagVirtuality; } unsigned getVirtualIndex() const { return VirtualIndex; } int getThisAdjustment() const { return ThisAdjustment; } unsigned getScopeLine() const { return ScopeLine; } DIFlags getFlags() const { return Flags; } DISPFlags getSPFlags() const { return SPFlags; } bool isLocalToUnit() const { return getSPFlags() & SPFlagLocalToUnit; } bool isDefinition() const { return getSPFlags() & SPFlagDefinition; } bool isOptimized() const { return getSPFlags() & SPFlagOptimized; } bool isMainSubprogram() const { return getSPFlags() & SPFlagMainSubprogram; } bool isArtificial() const { return getFlags() & FlagArtificial; } bool isPrivate() const { return (getFlags() & FlagAccessibility) == FlagPrivate; } bool isProtected() const { return (getFlags() & FlagAccessibility) == FlagProtected; } bool isPublic() const { return (getFlags() & FlagAccessibility) == FlagPublic; } bool isExplicit() const { return getFlags() & FlagExplicit; } bool isPrototyped() const { return getFlags() & FlagPrototyped; } bool areAllCallsDescribed() const { return getFlags() & FlagAllCallsDescribed; } bool isPure() const { return getSPFlags() & SPFlagPure; } bool isElemental() const { return getSPFlags() & SPFlagElemental; } bool isRecursive() const { return getSPFlags() & SPFlagRecursive; } bool isObjCDirect() const { return getSPFlags() & SPFlagObjCDirect; } bool isDeleted() const { return getSPFlags() & SPFlagDeleted; } bool isLValueReference() const { return getFlags() & FlagLValueReference; } bool isRValueReference() const { return getFlags() & FlagRValueReference; } bool isNoReturn() const { return getFlags() & FlagNoReturn; } bool isThunk() const { return getFlags() & FlagThunk; } DIScope *getScope() const { return cast_or_null<DIScope>(getRawScope()); } StringRef getName() const { return getStringOperand(2); } StringRef getLinkageName() const { return getStringOperand(3); } DISubroutineType *getType() const { return cast_or_null<DISubroutineType>(getRawType()); } DIType *getContainingType() const { return cast_or_null<DIType>(getRawContainingType()); } DICompileUnit *getUnit() const { return cast_or_null<DICompileUnit>(getRawUnit()); } void replaceUnit(DICompileUnit *CU) { replaceOperandWith(5, CU); } DITemplateParameterArray getTemplateParams() const { return cast_or_null<MDTuple>(getRawTemplateParams()); } DISubprogram *getDeclaration() const { return cast_or_null<DISubprogram>(getRawDeclaration()); } DINodeArray getRetainedNodes() const { return cast_or_null<MDTuple>(getRawRetainedNodes()); } DITypeArray getThrownTypes() const { return cast_or_null<MDTuple>(getRawThrownTypes()); } Metadata *getRawScope() const { return getOperand(1); } MDString *getRawName() const { return getOperandAs<MDString>(2); } MDString *getRawLinkageName() const { return getOperandAs<MDString>(3); } Metadata *getRawType() const { return getOperand(4); } Metadata *getRawUnit() const { return getOperand(5); } Metadata *getRawDeclaration() const { return getOperand(6); } Metadata *getRawRetainedNodes() const { return getOperand(7); } Metadata *getRawContainingType() const { return getNumOperands() > 8 ? getOperandAs<Metadata>(8) : nullptr; } Metadata *getRawTemplateParams() const { return getNumOperands() > 9 ? getOperandAs<Metadata>(9) : nullptr; } Metadata *getRawThrownTypes() const { return getNumOperands() > 10 ? getOperandAs<Metadata>(10) : nullptr; } bool describes(const Function *F) const; static bool classof(const Metadata *MD) { return MD->getMetadataID() == DISubprogramKind; } }; class DILexicalBlockBase : public DILocalScope { protected: DILexicalBlockBase(LLVMContext &C, unsigned ID, StorageType Storage, ArrayRef<Metadata *> Ops) : DILocalScope(C, ID, Storage, dwarf::DW_TAG_lexical_block, Ops) {} ~DILexicalBlockBase() = default; public: DILocalScope *getScope() const { return cast<DILocalScope>(getRawScope()); } Metadata *getRawScope() const { return getOperand(1); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DILexicalBlockKind || MD->getMetadataID() == DILexicalBlockFileKind; } }; class DILexicalBlock : public DILexicalBlockBase { friend class LLVMContextImpl; friend class MDNode; unsigned Line; uint16_t Column; DILexicalBlock(LLVMContext &C, StorageType Storage, unsigned Line, unsigned Column, ArrayRef<Metadata *> Ops) : DILexicalBlockBase(C, DILexicalBlockKind, Storage, Ops), Line(Line), Column(Column) { (static_cast<void> (0)); } ~DILexicalBlock() = default; static DILexicalBlock *getImpl(LLVMContext &Context, DILocalScope *Scope, DIFile *File, unsigned Line, unsigned Column, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, static_cast<Metadata *>(Scope), static_cast<Metadata *>(File), Line, Column, Storage, ShouldCreate); } static DILexicalBlock *getImpl(LLVMContext &Context, Metadata *Scope, Metadata *File, unsigned Line, unsigned Column, StorageType Storage, bool ShouldCreate = true); TempDILexicalBlock cloneImpl() const { return getTemporary(getContext(), getScope(), getFile(), getLine(), getColumn()); } public: static DILexicalBlock *get(LLVMContext &Context, DILocalScope * Scope, DIFile *File, unsigned Line, unsigned Column) { return getImpl(Context, Scope, File, Line, Column, Uniqued); } static DILexicalBlock *getIfExists(LLVMContext &Context, DILocalScope * Scope, DIFile *File, unsigned Line, unsigned Column) { return getImpl(Context, Scope, File, Line, Column, Uniqued, false); } static DILexicalBlock *getDistinct(LLVMContext &Context, DILocalScope * Scope, DIFile *File, unsigned Line, unsigned Column) { return getImpl(Context, Scope, File, Line, Column, Distinct); } static TempDILexicalBlock getTemporary(LLVMContext &Context, DILocalScope * Scope, DIFile *File, unsigned Line, unsigned Column) { return TempDILexicalBlock( getImpl(Context, Scope, File, Line, Column, Temporary)); } static DILexicalBlock *get(LLVMContext &Context, Metadata * Scope, Metadata *File, unsigned Line, unsigned Column) { return getImpl(Context, Scope, File, Line, Column, Uniqued); } static DILexicalBlock *getIfExists(LLVMContext &Context, Metadata * Scope, Metadata *File, unsigned Line, unsigned Column) { return getImpl(Context, Scope, File, Line, Column, Uniqued, false); } static DILexicalBlock *getDistinct(LLVMContext &Context, Metadata * Scope, Metadata *File, unsigned Line, unsigned Column) { return getImpl(Context, Scope, File, Line, Column, Distinct); } static TempDILexicalBlock getTemporary(LLVMContext &Context, Metadata * Scope, Metadata *File, unsigned Line, unsigned Column) { return TempDILexicalBlock( getImpl(Context, Scope, File, Line, Column, Temporary)); } TempDILexicalBlock clone() const { return cloneImpl(); } unsigned getLine() const { return Line; } unsigned getColumn() const { return Column; } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DILexicalBlockKind; } }; class DILexicalBlockFile : public DILexicalBlockBase { friend class LLVMContextImpl; friend class MDNode; unsigned Discriminator; DILexicalBlockFile(LLVMContext &C, StorageType Storage, unsigned Discriminator, ArrayRef<Metadata *> Ops) : DILexicalBlockBase(C, DILexicalBlockFileKind, Storage, Ops), Discriminator(Discriminator) {} ~DILexicalBlockFile() = default; static DILexicalBlockFile *getImpl(LLVMContext &Context, DILocalScope *Scope, DIFile *File, unsigned Discriminator, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, static_cast<Metadata *>(Scope), static_cast<Metadata *>(File), Discriminator, Storage, ShouldCreate); } static DILexicalBlockFile *getImpl(LLVMContext &Context, Metadata *Scope, Metadata *File, unsigned Discriminator, StorageType Storage, bool ShouldCreate = true); TempDILexicalBlockFile cloneImpl() const { return getTemporary(getContext(), getScope(), getFile(), getDiscriminator()); } public: static DILexicalBlockFile *get(LLVMContext &Context, DILocalScope * Scope, DIFile *File, unsigned Discriminator) { return getImpl(Context, Scope, File, Discriminator, Uniqued); } static DILexicalBlockFile *getIfExists(LLVMContext &Context, DILocalScope * Scope, DIFile *File, unsigned Discriminator) { return getImpl(Context, Scope, File, Discriminator, Uniqued, false); } static DILexicalBlockFile *getDistinct(LLVMContext &Context, DILocalScope * Scope, DIFile *File, unsigned Discriminator) { return getImpl(Context, Scope, File, Discriminator, Distinct); } static TempDILexicalBlockFile getTemporary(LLVMContext &Context, DILocalScope * Scope, DIFile *File, unsigned Discriminator) { return TempDILexicalBlockFile( getImpl(Context, Scope, File, Discriminator, Temporary)); } static DILexicalBlockFile *get(LLVMContext &Context, Metadata * Scope, Metadata *File, unsigned Discriminator) { return getImpl(Context, Scope, File, Discriminator, Uniqued); } static DILexicalBlockFile *getIfExists(LLVMContext &Context, Metadata * Scope, Metadata *File, unsigned Discriminator) { return getImpl(Context, Scope, File, Discriminator, Uniqued, false); } static DILexicalBlockFile *getDistinct(LLVMContext &Context, Metadata * Scope, Metadata *File, unsigned Discriminator) { return getImpl(Context, Scope, File, Discriminator, Distinct); } static TempDILexicalBlockFile getTemporary(LLVMContext &Context, Metadata * Scope, Metadata *File, unsigned Discriminator) { return TempDILexicalBlockFile( getImpl(Context, Scope, File, Discriminator, Temporary)); } TempDILexicalBlockFile clone() const { return cloneImpl(); } unsigned getLine() const = delete; unsigned getColumn() const = delete; unsigned getDiscriminator() const { return Discriminator; } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DILexicalBlockFileKind; } }; unsigned DILocation::getDiscriminator() const { if (auto *F = dyn_cast<DILexicalBlockFile>(getScope())) return F->getDiscriminator(); return 0; } const DILocation * DILocation::cloneWithDiscriminator(unsigned Discriminator) const { DIScope *Scope = getScope(); for (auto *LBF = dyn_cast<DILexicalBlockFile>(Scope); LBF && LBF->getDiscriminator() != 0; LBF = dyn_cast<DILexicalBlockFile>(Scope)) Scope = LBF->getScope(); DILexicalBlockFile *NewScope = DILexicalBlockFile::get(getContext(), Scope, getFile(), Discriminator); return DILocation::get(getContext(), getLine(), getColumn(), NewScope, getInlinedAt()); } unsigned DILocation::getBaseDiscriminator() const { return getBaseDiscriminatorFromDiscriminator(getDiscriminator()); } unsigned DILocation::getDuplicationFactor() const { return getDuplicationFactorFromDiscriminator(getDiscriminator()); } unsigned DILocation::getCopyIdentifier() const { return getCopyIdentifierFromDiscriminator(getDiscriminator()); } Optional<const DILocation *> DILocation::cloneWithBaseDiscriminator(unsigned D) const { unsigned BD, DF, CI; decodeDiscriminator(getDiscriminator(), BD, DF, CI); if (D == BD) return this; if (Optional<unsigned> Encoded = encodeDiscriminator(D, DF, CI)) return cloneWithDiscriminator(*Encoded); return None; } Optional<const DILocation *> DILocation::cloneByMultiplyingDuplicationFactor(unsigned DF) const { DF *= getDuplicationFactor(); if (DF <= 1) return this; unsigned BD = getBaseDiscriminator(); unsigned CI = getCopyIdentifier(); if (Optional<unsigned> D = encodeDiscriminator(BD, DF, CI)) return cloneWithDiscriminator(*D); return None; } class DINamespace : public DIScope { friend class LLVMContextImpl; friend class MDNode; unsigned ExportSymbols : 1; DINamespace(LLVMContext &Context, StorageType Storage, bool ExportSymbols, ArrayRef<Metadata *> Ops) : DIScope(Context, DINamespaceKind, Storage, dwarf::DW_TAG_namespace, Ops), ExportSymbols(ExportSymbols) {} ~DINamespace() = default; static DINamespace *getImpl(LLVMContext &Context, DIScope *Scope, StringRef Name, bool ExportSymbols, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Scope, getCanonicalMDString(Context, Name), ExportSymbols, Storage, ShouldCreate); } static DINamespace *getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name, bool ExportSymbols, StorageType Storage, bool ShouldCreate = true); TempDINamespace cloneImpl() const { return getTemporary(getContext(), getScope(), getName(), getExportSymbols()); } public: static DINamespace *get(LLVMContext &Context, DIScope *Scope, StringRef Name, bool ExportSymbols) { return getImpl(Context, Scope, Name, ExportSymbols, Uniqued); } static DINamespace *getIfExists(LLVMContext &Context, DIScope *Scope, StringRef Name, bool ExportSymbols) { return getImpl(Context, Scope, Name, ExportSymbols, Uniqued, false); } static DINamespace *getDistinct(LLVMContext &Context, DIScope *Scope, StringRef Name, bool ExportSymbols) { return getImpl(Context, Scope, Name, ExportSymbols, Distinct); } static TempDINamespace getTemporary(LLVMContext &Context, DIScope *Scope, StringRef Name, bool ExportSymbols) { return TempDINamespace( getImpl(Context, Scope, Name, ExportSymbols, Temporary)); } static DINamespace *get(LLVMContext &Context, Metadata *Scope, MDString *Name, bool ExportSymbols) { return getImpl(Context, Scope, Name, ExportSymbols, Uniqued); } static DINamespace *getIfExists(LLVMContext &Context, Metadata *Scope, MDString *Name, bool ExportSymbols) { return getImpl(Context, Scope, Name, ExportSymbols, Uniqued, false); } static DINamespace *getDistinct(LLVMContext &Context, Metadata *Scope, MDString *Name, bool ExportSymbols) { return getImpl(Context, Scope, Name, ExportSymbols, Distinct); } static TempDINamespace getTemporary(LLVMContext &Context, Metadata *Scope, MDString *Name, bool ExportSymbols) { return TempDINamespace( getImpl(Context, Scope, Name, ExportSymbols, Temporary)); } TempDINamespace clone() const { return cloneImpl(); } bool getExportSymbols() const { return ExportSymbols; } DIScope *getScope() const { return cast_or_null<DIScope>(getRawScope()); } StringRef getName() const { return getStringOperand(2); } Metadata *getRawScope() const { return getOperand(1); } MDString *getRawName() const { return getOperandAs<MDString>(2); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DINamespaceKind; } }; class DIModule : public DIScope { friend class LLVMContextImpl; friend class MDNode; unsigned LineNo; DIModule(LLVMContext &Context, StorageType Storage, unsigned LineNo, ArrayRef<Metadata *> Ops) : DIScope(Context, DIModuleKind, Storage, dwarf::DW_TAG_module, Ops), LineNo(LineNo) {} ~DIModule() = default; static DIModule *getImpl(LLVMContext &Context, DIFile *File, DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, StringRef IncludePath, StringRef APINotesFile, unsigned LineNo, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, File, Scope, getCanonicalMDString(Context, Name), getCanonicalMDString(Context, ConfigurationMacros), getCanonicalMDString(Context, IncludePath), getCanonicalMDString(Context, APINotesFile), LineNo, Storage, ShouldCreate); } static DIModule *getImpl(LLVMContext &Context, Metadata *File, Metadata *Scope, MDString *Name, MDString *ConfigurationMacros, MDString *IncludePath, MDString *APINotesFile, unsigned LineNo, StorageType Storage, bool ShouldCreate = true); TempDIModule cloneImpl() const { return getTemporary(getContext(), getFile(), getScope(), getName(), getConfigurationMacros(), getIncludePath(), getAPINotesFile(), getLineNo()); } public: static DIModule *get(LLVMContext &Context, DIFile * File, DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, StringRef IncludePath, StringRef APINotesFile, unsigned LineNo) { return getImpl(Context, File, Scope, Name, ConfigurationMacros, IncludePath, APINotesFile, LineNo, Uniqued); } static DIModule *getIfExists(LLVMContext &Context, DIFile * File, DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, StringRef IncludePath, StringRef APINotesFile, unsigned LineNo) { return getImpl(Context, File, Scope, Name, ConfigurationMacros, IncludePath, APINotesFile, LineNo, Uniqued, false); } static DIModule *getDistinct(LLVMContext &Context, DIFile * File, DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, StringRef IncludePath, StringRef APINotesFile, unsigned LineNo) { return getImpl(Context, File, Scope, Name, ConfigurationMacros, IncludePath, APINotesFile, LineNo, Distinct); } static TempDIModule getTemporary(LLVMContext &Context, DIFile * File, DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, StringRef IncludePath, StringRef APINotesFile, unsigned LineNo) { return TempDIModule( getImpl(Context, File, Scope, Name, ConfigurationMacros, IncludePath, APINotesFile, LineNo, Temporary)); } static DIModule *get(LLVMContext &Context, Metadata * File, Metadata *Scope, MDString *Name, MDString *ConfigurationMacros, MDString *IncludePath, MDString *APINotesFile, unsigned LineNo) { return getImpl(Context, File, Scope, Name, ConfigurationMacros, IncludePath, APINotesFile, LineNo, Uniqued); } static DIModule *getIfExists(LLVMContext &Context, Metadata * File, Metadata *Scope, MDString *Name, MDString *ConfigurationMacros, MDString *IncludePath, MDString *APINotesFile, unsigned LineNo) { return getImpl(Context, File, Scope, Name, ConfigurationMacros, IncludePath, APINotesFile, LineNo, Uniqued, false); } static DIModule *getDistinct(LLVMContext &Context, Metadata * File, Metadata *Scope, MDString *Name, MDString *ConfigurationMacros, MDString *IncludePath, MDString *APINotesFile, unsigned LineNo) { return getImpl(Context, File, Scope, Name, ConfigurationMacros, IncludePath, APINotesFile, LineNo, Distinct); } static TempDIModule getTemporary(LLVMContext &Context, Metadata * File, Metadata *Scope, MDString *Name, MDString *ConfigurationMacros, MDString *IncludePath, MDString *APINotesFile, unsigned LineNo) { return TempDIModule( getImpl(Context, File, Scope, Name, ConfigurationMacros, IncludePath, APINotesFile, LineNo, Temporary)); } TempDIModule clone() const { return cloneImpl(); } DIScope *getScope() const { return cast_or_null<DIScope>(getRawScope()); } StringRef getName() const { return getStringOperand(2); } StringRef getConfigurationMacros() const { return getStringOperand(3); } StringRef getIncludePath() const { return getStringOperand(4); } StringRef getAPINotesFile() const { return getStringOperand(5); } unsigned getLineNo() const { return LineNo; } Metadata *getRawScope() const { return getOperand(1); } MDString *getRawName() const { return getOperandAs<MDString>(2); } MDString *getRawConfigurationMacros() const { return getOperandAs<MDString>(3); } MDString *getRawIncludePath() const { return getOperandAs<MDString>(4); } MDString *getRawAPINotesFile() const { return getOperandAs<MDString>(5); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DIModuleKind; } }; class DITemplateParameter : public DINode { protected: bool IsDefault; DITemplateParameter(LLVMContext &Context, unsigned ID, StorageType Storage, unsigned Tag, bool IsDefault, ArrayRef<Metadata *> Ops) : DINode(Context, ID, Storage, Tag, Ops), IsDefault(IsDefault) {} ~DITemplateParameter() = default; public: StringRef getName() const { return getStringOperand(0); } DIType *getType() const { return cast_or_null<DIType>(getRawType()); } MDString *getRawName() const { return getOperandAs<MDString>(0); } Metadata *getRawType() const { return getOperand(1); } bool isDefault() const { return IsDefault; } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DITemplateTypeParameterKind || MD->getMetadataID() == DITemplateValueParameterKind; } }; class DITemplateTypeParameter : public DITemplateParameter { friend class LLVMContextImpl; friend class MDNode; DITemplateTypeParameter(LLVMContext &Context, StorageType Storage, bool IsDefault, ArrayRef<Metadata *> Ops) : DITemplateParameter(Context, DITemplateTypeParameterKind, Storage, dwarf::DW_TAG_template_type_parameter, IsDefault, Ops) {} ~DITemplateTypeParameter() = default; static DITemplateTypeParameter *getImpl(LLVMContext &Context, StringRef Name, DIType *Type, bool IsDefault, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, getCanonicalMDString(Context, Name), Type, IsDefault, Storage, ShouldCreate); } static DITemplateTypeParameter *getImpl(LLVMContext &Context, MDString *Name, Metadata *Type, bool IsDefault, StorageType Storage, bool ShouldCreate = true); TempDITemplateTypeParameter cloneImpl() const { return getTemporary(getContext(), getName(), getType(), isDefault()); } public: static DITemplateTypeParameter *get(LLVMContext &Context, StringRef Name, DIType *Type, bool IsDefault) { return getImpl(Context, Name, Type, IsDefault, Uniqued); } static DITemplateTypeParameter *getIfExists(LLVMContext &Context, StringRef Name, DIType *Type, bool IsDefault) { return getImpl(Context, Name, Type, IsDefault, Uniqued, false); } static DITemplateTypeParameter *getDistinct(LLVMContext &Context, StringRef Name, DIType *Type, bool IsDefault) { return getImpl(Context, Name, Type, IsDefault, Distinct); } static TempDITemplateTypeParameter getTemporary(LLVMContext &Context, StringRef Name, DIType *Type, bool IsDefault) { return TempDITemplateTypeParameter( getImpl(Context, Name, Type, IsDefault, Temporary)); } static DITemplateTypeParameter *get(LLVMContext &Context, MDString *Name, Metadata *Type, bool IsDefault) { return getImpl(Context, Name, Type, IsDefault, Uniqued); } static DITemplateTypeParameter *getIfExists(LLVMContext &Context, MDString *Name, Metadata *Type, bool IsDefault) { return getImpl(Context, Name, Type, IsDefault, Uniqued, false); } static DITemplateTypeParameter *getDistinct(LLVMContext &Context, MDString *Name, Metadata *Type, bool IsDefault) { return getImpl(Context, Name, Type, IsDefault, Distinct); } static TempDITemplateTypeParameter getTemporary(LLVMContext &Context, MDString *Name, Metadata *Type, bool IsDefault) { return TempDITemplateTypeParameter( getImpl(Context, Name, Type, IsDefault, Temporary)); } TempDITemplateTypeParameter clone() const { return cloneImpl(); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DITemplateTypeParameterKind; } }; class DITemplateValueParameter : public DITemplateParameter { friend class LLVMContextImpl; friend class MDNode; DITemplateValueParameter(LLVMContext &Context, StorageType Storage, unsigned Tag, bool IsDefault, ArrayRef<Metadata *> Ops) : DITemplateParameter(Context, DITemplateValueParameterKind, Storage, Tag, IsDefault, Ops) {} ~DITemplateValueParameter() = default; static DITemplateValueParameter *getImpl(LLVMContext &Context, unsigned Tag, StringRef Name, DIType *Type, bool IsDefault, Metadata *Value, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Tag, getCanonicalMDString(Context, Name), Type, IsDefault, Value, Storage, ShouldCreate); } static DITemplateValueParameter *getImpl(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *Type, bool IsDefault, Metadata *Value, StorageType Storage, bool ShouldCreate = true); TempDITemplateValueParameter cloneImpl() const { return getTemporary(getContext(), getTag(), getName(), getType(), isDefault(), getValue()); } public: static DITemplateValueParameter *get(LLVMContext &Context, unsigned Tag, StringRef Name, DIType *Type, bool IsDefault, Metadata *Value) { return getImpl(Context, Tag, Name, Type, IsDefault, Value, Uniqued); } static DITemplateValueParameter *getIfExists(LLVMContext &Context, unsigned Tag, StringRef Name, DIType *Type, bool IsDefault, Metadata *Value) { return getImpl(Context, Tag, Name, Type, IsDefault, Value, Uniqued, false); } static DITemplateValueParameter *getDistinct(LLVMContext &Context, unsigned Tag, StringRef Name, DIType *Type, bool IsDefault, Metadata *Value) { return getImpl(Context, Tag, Name, Type, IsDefault, Value, Distinct); } static TempDITemplateValueParameter getTemporary(LLVMContext &Context, unsigned Tag, StringRef Name, DIType *Type, bool IsDefault, Metadata *Value) { return TempDITemplateValueParameter( getImpl(Context, Tag, Name, Type, IsDefault, Value, Temporary)); } static DITemplateValueParameter *get(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *Type, bool IsDefault, Metadata *Value) { return getImpl(Context, Tag, Name, Type, IsDefault, Value, Uniqued); } static DITemplateValueParameter *getIfExists(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *Type, bool IsDefault, Metadata *Value) { return getImpl(Context, Tag, Name, Type, IsDefault, Value, Uniqued, false); } static DITemplateValueParameter *getDistinct(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *Type, bool IsDefault, Metadata *Value) { return getImpl(Context, Tag, Name, Type, IsDefault, Value, Distinct); } static TempDITemplateValueParameter getTemporary(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *Type, bool IsDefault, Metadata *Value) { return TempDITemplateValueParameter( getImpl(Context, Tag, Name, Type, IsDefault, Value, Temporary)); } TempDITemplateValueParameter clone() const { return cloneImpl(); } Metadata *getValue() const { return getOperand(2); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DITemplateValueParameterKind; } }; class DIVariable : public DINode { unsigned Line; uint32_t AlignInBits; protected: DIVariable(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Line, ArrayRef<Metadata *> Ops, uint32_t AlignInBits = 0) : DINode(C, ID, Storage, dwarf::DW_TAG_variable, Ops), Line(Line), AlignInBits(AlignInBits) {} ~DIVariable() = default; public: unsigned getLine() const { return Line; } DIScope *getScope() const { return cast_or_null<DIScope>(getRawScope()); } StringRef getName() const { return getStringOperand(1); } DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); } DIType *getType() const { return cast_or_null<DIType>(getRawType()); } uint32_t getAlignInBits() const { return AlignInBits; } uint32_t getAlignInBytes() const { return getAlignInBits() / 8; } Optional<uint64_t> getSizeInBits() const; Optional<DIBasicType::Signedness> getSignedness() const { if (auto *BT = dyn_cast<DIBasicType>(getType())) return BT->getSignedness(); return None; } StringRef getFilename() const { if (auto *F = getFile()) return F->getFilename(); return ""; } StringRef getDirectory() const { if (auto *F = getFile()) return F->getDirectory(); return ""; } Optional<StringRef> getSource() const { if (auto *F = getFile()) return F->getSource(); return None; } Metadata *getRawScope() const { return getOperand(0); } MDString *getRawName() const { return getOperandAs<MDString>(1); } Metadata *getRawFile() const { return getOperand(2); } Metadata *getRawType() const { return getOperand(3); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DILocalVariableKind || MD->getMetadataID() == DIGlobalVariableKind; } }; # 2376 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" class DIExpression : public MDNode { friend class LLVMContextImpl; friend class MDNode; std::vector<uint64_t> Elements; DIExpression(LLVMContext &C, StorageType Storage, ArrayRef<uint64_t> Elements) : MDNode(C, DIExpressionKind, Storage, None), Elements(Elements.begin(), Elements.end()) {} ~DIExpression() = default; static DIExpression *getImpl(LLVMContext &Context, ArrayRef<uint64_t> Elements, StorageType Storage, bool ShouldCreate = true); TempDIExpression cloneImpl() const { return getTemporary(getContext(), getElements()); } public: static DIExpression *get(LLVMContext &Context, ArrayRef<uint64_t> Elements) { return getImpl(Context, Elements, Uniqued); } static DIExpression *getIfExists(LLVMContext &Context, ArrayRef<uint64_t> Elements) { return getImpl(Context, Elements, Uniqued, false); } static DIExpression *getDistinct(LLVMContext &Context, ArrayRef<uint64_t> Elements) { return getImpl(Context, Elements, Distinct); } static TempDIExpression getTemporary(LLVMContext &Context, ArrayRef<uint64_t> Elements) { return TempDIExpression( getImpl(Context, Elements, Temporary)); } TempDIExpression clone() const { return cloneImpl(); } ArrayRef<uint64_t> getElements() const { return Elements; } unsigned getNumElements() const { return Elements.size(); } uint64_t getElement(unsigned I) const { (static_cast<void> (0)); return Elements[I]; } bool isConstant() const; using element_iterator = ArrayRef<uint64_t>::iterator; element_iterator elements_begin() const { return getElements().begin(); } element_iterator elements_end() const { return getElements().end(); } class ExprOperand { const uint64_t *Op = nullptr; public: ExprOperand() = default; explicit ExprOperand(const uint64_t *Op) : Op(Op) {} const uint64_t *get() const { return Op; } uint64_t getOp() const { return *Op; } uint64_t getArg(unsigned I) const { return Op[I + 1]; } unsigned getNumArgs() const { return getSize() - 1; } unsigned getSize() const; void appendToVector(SmallVectorImpl<uint64_t> &V) const { V.append(get(), get() + getSize()); } }; class expr_op_iterator : public std::iterator<std::input_iterator_tag, ExprOperand> { ExprOperand Op; public: expr_op_iterator() = default; explicit expr_op_iterator(element_iterator I) : Op(I) {} element_iterator getBase() const { return Op.get(); } const ExprOperand &operator*() const { return Op; } const ExprOperand *operator->() const { return &Op; } expr_op_iterator &operator++() { increment(); return *this; } expr_op_iterator operator++(int) { expr_op_iterator T(*this); increment(); return T; } expr_op_iterator getNext() const { return ++expr_op_iterator(*this); } bool operator==(const expr_op_iterator &X) const { return getBase() == X.getBase(); } bool operator!=(const expr_op_iterator &X) const { return getBase() != X.getBase(); } private: void increment() { Op = ExprOperand(getBase() + Op.getSize()); } }; # 2500 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" expr_op_iterator expr_op_begin() const { return expr_op_iterator(elements_begin()); } expr_op_iterator expr_op_end() const { return expr_op_iterator(elements_end()); } iterator_range<expr_op_iterator> expr_ops() const { return {expr_op_begin(), expr_op_end()}; } bool isValid() const; static bool classof(const Metadata *MD) { return MD->getMetadataID() == DIExpressionKind; } bool startsWithDeref() const { return getNumElements() > 0 && getElement(0) == dwarf::DW_OP_deref; } struct FragmentInfo { uint64_t SizeInBits; uint64_t OffsetInBits; }; static Optional<FragmentInfo> getFragmentInfo(expr_op_iterator Start, expr_op_iterator End); Optional<FragmentInfo> getFragmentInfo() const { return getFragmentInfo(expr_op_begin(), expr_op_end()); } bool isFragment() const { return getFragmentInfo().hasValue(); } bool isImplicit() const; bool isComplex() const; static void appendOffset(SmallVectorImpl<uint64_t> &Ops, int64_t Offset); bool extractIfOffset(int64_t &Offset) const; static const DIExpression *extractAddressClass(const DIExpression *Expr, unsigned &AddrClass); enum PrependOps : uint8_t { ApplyOffset = 0, DerefBefore = 1 << 0, DerefAfter = 1 << 1, StackValue = 1 << 2, EntryValue = 1 << 3 }; static DIExpression *prepend(const DIExpression *Expr, uint8_t Flags, int64_t Offset = 0); static DIExpression *prependOpcodes(const DIExpression *Expr, SmallVectorImpl<uint64_t> &Ops, bool StackValue = false, bool EntryValue = false); static DIExpression *append(const DIExpression *Expr, ArrayRef<uint64_t> Ops); static DIExpression *appendToStack(const DIExpression *Expr, ArrayRef<uint64_t> Ops); # 2604 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" static Optional<DIExpression *> createFragmentExpression(const DIExpression *Expr, unsigned OffsetInBits, unsigned SizeInBits); static int fragmentCmp(const FragmentInfo &A, const FragmentInfo &B) { uint64_t l1 = A.OffsetInBits; uint64_t l2 = B.OffsetInBits; uint64_t r1 = l1 + A.SizeInBits; uint64_t r2 = l2 + B.SizeInBits; if (r1 <= l2) return -1; else if (r2 <= l1) return 1; else return 0; } using ExtOps = std::array<uint64_t, 6>; static ExtOps getExtOps(unsigned FromSize, unsigned ToSize, bool Signed); static DIExpression *appendExt(const DIExpression *Expr, unsigned FromSize, unsigned ToSize, bool Signed); static bool fragmentsOverlap(const FragmentInfo &A, const FragmentInfo &B) { return fragmentCmp(A, B) == 0; } int fragmentCmp(const DIExpression *Other) const { auto Fragment1 = *getFragmentInfo(); auto Fragment2 = *Other->getFragmentInfo(); return fragmentCmp(Fragment1, Fragment2); } bool fragmentsOverlap(const DIExpression *Other) const { if (!isFragment() || !Other->isFragment()) return true; return fragmentCmp(Other) == 0; } bool isEntryValue() const { return getNumElements() > 0 && getElement(0) == dwarf::DW_OP_LLVM_entry_value; } }; inline bool operator==(const DIExpression::FragmentInfo &A, const DIExpression::FragmentInfo &B) { return std::tie(A.SizeInBits, A.OffsetInBits) == std::tie(B.SizeInBits, B.OffsetInBits); } inline bool operator<(const DIExpression::FragmentInfo &A, const DIExpression::FragmentInfo &B) { return std::tie(A.SizeInBits, A.OffsetInBits) < std::tie(B.SizeInBits, B.OffsetInBits); } template <> struct DenseMapInfo<DIExpression::FragmentInfo> { using FragInfo = DIExpression::FragmentInfo; static const uint64_t MaxVal = std::numeric_limits<uint64_t>::max(); static inline FragInfo getEmptyKey() { return {MaxVal, MaxVal}; } static inline FragInfo getTombstoneKey() { return {MaxVal - 1, MaxVal - 1}; } static unsigned getHashValue(const FragInfo &Frag) { return (Frag.SizeInBits & 0xffff) << 16 | (Frag.OffsetInBits & 0xffff); } static bool isEqual(const FragInfo &A, const FragInfo &B) { return A == B; } }; class DIGlobalVariable : public DIVariable { friend class LLVMContextImpl; friend class MDNode; bool IsLocalToUnit; bool IsDefinition; DIGlobalVariable(LLVMContext &C, StorageType Storage, unsigned Line, bool IsLocalToUnit, bool IsDefinition, uint32_t AlignInBits, ArrayRef<Metadata *> Ops) : DIVariable(C, DIGlobalVariableKind, Storage, Line, Ops, AlignInBits), IsLocalToUnit(IsLocalToUnit), IsDefinition(IsDefinition) {} ~DIGlobalVariable() = default; static DIGlobalVariable * getImpl(LLVMContext &Context, DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DIType *Type, bool IsLocalToUnit, bool IsDefinition, DIDerivedType *StaticDataMemberDeclaration, MDTuple *TemplateParams, uint32_t AlignInBits, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Scope, getCanonicalMDString(Context, Name), getCanonicalMDString(Context, LinkageName), File, Line, Type, IsLocalToUnit, IsDefinition, StaticDataMemberDeclaration, cast_or_null<Metadata>(TemplateParams), AlignInBits, Storage, ShouldCreate); } static DIGlobalVariable * getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, bool IsLocalToUnit, bool IsDefinition, Metadata *StaticDataMemberDeclaration, Metadata *TemplateParams, uint32_t AlignInBits, StorageType Storage, bool ShouldCreate = true); TempDIGlobalVariable cloneImpl() const { return getTemporary(getContext(), getScope(), getName(), getLinkageName(), getFile(), getLine(), getType(), isLocalToUnit(), isDefinition(), getStaticDataMemberDeclaration(), getTemplateParams(), getAlignInBits()); } public: static DIGlobalVariable *get(LLVMContext &Context, DIScope * Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DIType *Type, bool IsLocalToUnit, bool IsDefinition, DIDerivedType *StaticDataMemberDeclaration, MDTuple *TemplateParams, uint32_t AlignInBits) { return getImpl(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, StaticDataMemberDeclaration, TemplateParams, AlignInBits, Uniqued); } static DIGlobalVariable *getIfExists(LLVMContext &Context, DIScope * Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DIType *Type, bool IsLocalToUnit, bool IsDefinition, DIDerivedType *StaticDataMemberDeclaration, MDTuple *TemplateParams, uint32_t AlignInBits) { return getImpl(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, StaticDataMemberDeclaration, TemplateParams, AlignInBits, Uniqued, false); } static DIGlobalVariable *getDistinct(LLVMContext &Context, DIScope * Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DIType *Type, bool IsLocalToUnit, bool IsDefinition, DIDerivedType *StaticDataMemberDeclaration, MDTuple *TemplateParams, uint32_t AlignInBits) { return getImpl(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, StaticDataMemberDeclaration, TemplateParams, AlignInBits, Distinct); } static TempDIGlobalVariable getTemporary(LLVMContext &Context, DIScope * Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DIType *Type, bool IsLocalToUnit, bool IsDefinition, DIDerivedType *StaticDataMemberDeclaration, MDTuple *TemplateParams, uint32_t AlignInBits) { return TempDIGlobalVariable( getImpl(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, StaticDataMemberDeclaration, TemplateParams, AlignInBits, Temporary)); } # 2742 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" static DIGlobalVariable *get(LLVMContext &Context, Metadata * Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, bool IsLocalToUnit, bool IsDefinition, Metadata *StaticDataMemberDeclaration, Metadata *TemplateParams, uint32_t AlignInBits) { return getImpl(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, StaticDataMemberDeclaration, TemplateParams, AlignInBits, Uniqued); } static DIGlobalVariable *getIfExists(LLVMContext &Context, Metadata * Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, bool IsLocalToUnit, bool IsDefinition, Metadata *StaticDataMemberDeclaration, Metadata *TemplateParams, uint32_t AlignInBits) { return getImpl(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, StaticDataMemberDeclaration, TemplateParams, AlignInBits, Uniqued, false); } static DIGlobalVariable *getDistinct(LLVMContext &Context, Metadata * Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, bool IsLocalToUnit, bool IsDefinition, Metadata *StaticDataMemberDeclaration, Metadata *TemplateParams, uint32_t AlignInBits) { return getImpl(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, StaticDataMemberDeclaration, TemplateParams, AlignInBits, Distinct); } static TempDIGlobalVariable getTemporary(LLVMContext &Context, Metadata * Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, bool IsLocalToUnit, bool IsDefinition, Metadata *StaticDataMemberDeclaration, Metadata *TemplateParams, uint32_t AlignInBits) { return TempDIGlobalVariable( getImpl(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, StaticDataMemberDeclaration, TemplateParams, AlignInBits, Temporary)); } # 2752 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" TempDIGlobalVariable clone() const { return cloneImpl(); } bool isLocalToUnit() const { return IsLocalToUnit; } bool isDefinition() const { return IsDefinition; } StringRef getDisplayName() const { return getStringOperand(4); } StringRef getLinkageName() const { return getStringOperand(5); } DIDerivedType *getStaticDataMemberDeclaration() const { return cast_or_null<DIDerivedType>(getRawStaticDataMemberDeclaration()); } MDString *getRawLinkageName() const { return getOperandAs<MDString>(5); } Metadata *getRawStaticDataMemberDeclaration() const { return getOperand(6); } Metadata *getRawTemplateParams() const { return getOperand(7); } MDTuple *getTemplateParams() const { return getOperandAs<MDTuple>(7); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DIGlobalVariableKind; } }; class DICommonBlock : public DIScope { unsigned LineNo; friend class LLVMContextImpl; friend class MDNode; DICommonBlock(LLVMContext &Context, StorageType Storage, unsigned LineNo, ArrayRef<Metadata *> Ops) : DIScope(Context, DICommonBlockKind, Storage, dwarf::DW_TAG_common_block, Ops), LineNo(LineNo) {} static DICommonBlock *getImpl(LLVMContext &Context, DIScope *Scope, DIGlobalVariable *Decl, StringRef Name, DIFile *File, unsigned LineNo, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Scope, Decl, getCanonicalMDString(Context, Name), File, LineNo, Storage, ShouldCreate); } static DICommonBlock *getImpl(LLVMContext &Context, Metadata *Scope, Metadata *Decl, MDString *Name, Metadata *File, unsigned LineNo, StorageType Storage, bool ShouldCreate = true); TempDICommonBlock cloneImpl() const { return getTemporary(getContext(), getScope(), getDecl(), getName(), getFile(), getLineNo()); } public: static DICommonBlock *get(LLVMContext &Context, DIScope *Scope, DIGlobalVariable *Decl, StringRef Name, DIFile *File, unsigned LineNo) { return getImpl(Context, Scope, Decl, Name, File, LineNo, Uniqued); } static DICommonBlock *getIfExists(LLVMContext &Context, DIScope *Scope, DIGlobalVariable *Decl, StringRef Name, DIFile *File, unsigned LineNo) { return getImpl(Context, Scope, Decl, Name, File, LineNo, Uniqued, false); } static DICommonBlock *getDistinct(LLVMContext &Context, DIScope *Scope, DIGlobalVariable *Decl, StringRef Name, DIFile *File, unsigned LineNo) { return getImpl(Context, Scope, Decl, Name, File, LineNo, Distinct); } static TempDICommonBlock getTemporary(LLVMContext &Context, DIScope *Scope, DIGlobalVariable *Decl, StringRef Name, DIFile *File, unsigned LineNo) { return TempDICommonBlock( getImpl(Context, Scope, Decl, Name, File, LineNo, Temporary)); } static DICommonBlock *get(LLVMContext &Context, Metadata *Scope, Metadata *Decl, MDString *Name, Metadata *File, unsigned LineNo) { return getImpl(Context, Scope, Decl, Name, File, LineNo, Uniqued); } static DICommonBlock *getIfExists(LLVMContext &Context, Metadata *Scope, Metadata *Decl, MDString *Name, Metadata *File, unsigned LineNo) { return getImpl(Context, Scope, Decl, Name, File, LineNo, Uniqued, false); } static DICommonBlock *getDistinct(LLVMContext &Context, Metadata *Scope, Metadata *Decl, MDString *Name, Metadata *File, unsigned LineNo) { return getImpl(Context, Scope, Decl, Name, File, LineNo, Distinct); } static TempDICommonBlock getTemporary(LLVMContext &Context, Metadata *Scope, Metadata *Decl, MDString *Name, Metadata *File, unsigned LineNo) { return TempDICommonBlock( getImpl(Context, Scope, Decl, Name, File, LineNo, Temporary)); } TempDICommonBlock clone() const { return cloneImpl(); } DIScope *getScope() const { return cast_or_null<DIScope>(getRawScope()); } DIGlobalVariable *getDecl() const { return cast_or_null<DIGlobalVariable>(getRawDecl()); } StringRef getName() const { return getStringOperand(2); } DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); } unsigned getLineNo() const { return LineNo; } Metadata *getRawScope() const { return getOperand(0); } Metadata *getRawDecl() const { return getOperand(1); } MDString *getRawName() const { return getOperandAs<MDString>(2); } Metadata *getRawFile() const { return getOperand(3); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DICommonBlockKind; } }; class DILocalVariable : public DIVariable { friend class LLVMContextImpl; friend class MDNode; unsigned Arg : 16; DIFlags Flags; DILocalVariable(LLVMContext &C, StorageType Storage, unsigned Line, unsigned Arg, DIFlags Flags, uint32_t AlignInBits, ArrayRef<Metadata *> Ops) : DIVariable(C, DILocalVariableKind, Storage, Line, Ops, AlignInBits), Arg(Arg), Flags(Flags) { (static_cast<void> (0)); } ~DILocalVariable() = default; static DILocalVariable *getImpl(LLVMContext &Context, DIScope *Scope, StringRef Name, DIFile *File, unsigned Line, DIType *Type, unsigned Arg, DIFlags Flags, uint32_t AlignInBits, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Scope, getCanonicalMDString(Context, Name), File, Line, Type, Arg, Flags, AlignInBits, Storage, ShouldCreate); } static DILocalVariable *getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name, Metadata *File, unsigned Line, Metadata *Type, unsigned Arg, DIFlags Flags, uint32_t AlignInBits, StorageType Storage, bool ShouldCreate = true); TempDILocalVariable cloneImpl() const { return getTemporary(getContext(), getScope(), getName(), getFile(), getLine(), getType(), getArg(), getFlags(), getAlignInBits()); } public: static DILocalVariable *get(LLVMContext &Context, DILocalScope * Scope, StringRef Name, DIFile *File, unsigned Line, DIType *Type, unsigned Arg, DIFlags Flags, uint32_t AlignInBits) { return getImpl(Context, Scope, Name, File, Line, Type, Arg, Flags, AlignInBits, Uniqued); } static DILocalVariable *getIfExists(LLVMContext &Context, DILocalScope * Scope, StringRef Name, DIFile *File, unsigned Line, DIType *Type, unsigned Arg, DIFlags Flags, uint32_t AlignInBits) { return getImpl(Context, Scope, Name, File, Line, Type, Arg, Flags, AlignInBits, Uniqued, false); } static DILocalVariable *getDistinct(LLVMContext &Context, DILocalScope * Scope, StringRef Name, DIFile *File, unsigned Line, DIType *Type, unsigned Arg, DIFlags Flags, uint32_t AlignInBits) { return getImpl(Context, Scope, Name, File, Line, Type, Arg, Flags, AlignInBits, Distinct); } static TempDILocalVariable getTemporary(LLVMContext &Context, DILocalScope * Scope, StringRef Name, DIFile *File, unsigned Line, DIType *Type, unsigned Arg, DIFlags Flags, uint32_t AlignInBits) { return TempDILocalVariable( getImpl(Context, Scope, Name, File, Line, Type, Arg, Flags, AlignInBits, Temporary)); } static DILocalVariable *get(LLVMContext &Context, Metadata * Scope, MDString *Name, Metadata *File, unsigned Line, Metadata *Type, unsigned Arg, DIFlags Flags, uint32_t AlignInBits) { return getImpl(Context, Scope, Name, File, Line, Type, Arg, Flags, AlignInBits, Uniqued); } static DILocalVariable *getIfExists(LLVMContext &Context, Metadata * Scope, MDString *Name, Metadata *File, unsigned Line, Metadata *Type, unsigned Arg, DIFlags Flags, uint32_t AlignInBits) { return getImpl(Context, Scope, Name, File, Line, Type, Arg, Flags, AlignInBits, Uniqued, false); } static DILocalVariable *getDistinct(LLVMContext &Context, Metadata * Scope, MDString *Name, Metadata *File, unsigned Line, Metadata *Type, unsigned Arg, DIFlags Flags, uint32_t AlignInBits) { return getImpl(Context, Scope, Name, File, Line, Type, Arg, Flags, AlignInBits, Distinct); } static TempDILocalVariable getTemporary(LLVMContext &Context, Metadata * Scope, MDString *Name, Metadata *File, unsigned Line, Metadata *Type, unsigned Arg, DIFlags Flags, uint32_t AlignInBits) { return TempDILocalVariable( getImpl(Context, Scope, Name, File, Line, Type, Arg, Flags, AlignInBits, Temporary)); } TempDILocalVariable clone() const { return cloneImpl(); } DILocalScope *getScope() const { return cast<DILocalScope>(DIVariable::getScope()); } bool isParameter() const { return Arg; } unsigned getArg() const { return Arg; } DIFlags getFlags() const { return Flags; } bool isArtificial() const { return getFlags() & FlagArtificial; } bool isObjectPointer() const { return getFlags() & FlagObjectPointer; } bool isValidLocationForIntrinsic(const DILocation *DL) const { return DL && getScope()->getSubprogram() == DL->getScope()->getSubprogram(); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DILocalVariableKind; } }; class DILabel : public DINode { friend class LLVMContextImpl; friend class MDNode; unsigned Line; DILabel(LLVMContext &C, StorageType Storage, unsigned Line, ArrayRef<Metadata *> Ops) : DINode(C, DILabelKind, Storage, dwarf::DW_TAG_label, Ops), Line(Line) {} ~DILabel() = default; static DILabel *getImpl(LLVMContext &Context, DIScope *Scope, StringRef Name, DIFile *File, unsigned Line, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Scope, getCanonicalMDString(Context, Name), File, Line, Storage, ShouldCreate); } static DILabel *getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name, Metadata *File, unsigned Line, StorageType Storage, bool ShouldCreate = true); TempDILabel cloneImpl() const { return getTemporary(getContext(), getScope(), getName(), getFile(), getLine()); } public: static DILabel *get(LLVMContext &Context, DILocalScope * Scope, StringRef Name, DIFile *File, unsigned Line) { return getImpl(Context, Scope, Name, File, Line, Uniqued); } static DILabel *getIfExists(LLVMContext &Context, DILocalScope * Scope, StringRef Name, DIFile *File, unsigned Line) { return getImpl(Context, Scope, Name, File, Line, Uniqued, false); } static DILabel *getDistinct(LLVMContext &Context, DILocalScope * Scope, StringRef Name, DIFile *File, unsigned Line) { return getImpl(Context, Scope, Name, File, Line, Distinct); } static TempDILabel getTemporary(LLVMContext &Context, DILocalScope * Scope, StringRef Name, DIFile *File, unsigned Line) { return TempDILabel( getImpl(Context, Scope, Name, File, Line, Temporary)); } static DILabel *get(LLVMContext &Context, Metadata * Scope, MDString *Name, Metadata *File, unsigned Line) { return getImpl(Context, Scope, Name, File, Line, Uniqued); } static DILabel *getIfExists(LLVMContext &Context, Metadata * Scope, MDString *Name, Metadata *File, unsigned Line) { return getImpl(Context, Scope, Name, File, Line, Uniqued, false); } static DILabel *getDistinct(LLVMContext &Context, Metadata * Scope, MDString *Name, Metadata *File, unsigned Line) { return getImpl(Context, Scope, Name, File, Line, Distinct); } static TempDILabel getTemporary(LLVMContext &Context, Metadata * Scope, MDString *Name, Metadata *File, unsigned Line) { return TempDILabel( getImpl(Context, Scope, Name, File, Line, Temporary)); } TempDILabel clone() const { return cloneImpl(); } DILocalScope *getScope() const { return cast_or_null<DILocalScope>(getRawScope()); } unsigned getLine() const { return Line; } StringRef getName() const { return getStringOperand(1); } DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); } Metadata *getRawScope() const { return getOperand(0); } MDString *getRawName() const { return getOperandAs<MDString>(1); } Metadata *getRawFile() const { return getOperand(2); } bool isValidLocationForIntrinsic(const DILocation *DL) const { return DL && getScope()->getSubprogram() == DL->getScope()->getSubprogram(); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DILabelKind; } }; class DIObjCProperty : public DINode { friend class LLVMContextImpl; friend class MDNode; unsigned Line; unsigned Attributes; DIObjCProperty(LLVMContext &C, StorageType Storage, unsigned Line, unsigned Attributes, ArrayRef<Metadata *> Ops) : DINode(C, DIObjCPropertyKind, Storage, dwarf::DW_TAG_APPLE_property, Ops), Line(Line), Attributes(Attributes) {} ~DIObjCProperty() = default; static DIObjCProperty * getImpl(LLVMContext &Context, StringRef Name, DIFile *File, unsigned Line, StringRef GetterName, StringRef SetterName, unsigned Attributes, DIType *Type, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, getCanonicalMDString(Context, Name), File, Line, getCanonicalMDString(Context, GetterName), getCanonicalMDString(Context, SetterName), Attributes, Type, Storage, ShouldCreate); } static DIObjCProperty *getImpl(LLVMContext &Context, MDString *Name, Metadata *File, unsigned Line, MDString *GetterName, MDString *SetterName, unsigned Attributes, Metadata *Type, StorageType Storage, bool ShouldCreate = true); TempDIObjCProperty cloneImpl() const { return getTemporary(getContext(), getName(), getFile(), getLine(), getGetterName(), getSetterName(), getAttributes(), getType()); } public: static DIObjCProperty *get(LLVMContext &Context, StringRef Name, DIFile *File, unsigned Line, StringRef GetterName, StringRef SetterName, unsigned Attributes, DIType *Type) { return getImpl(Context, Name, File, Line, GetterName, SetterName, Attributes, Type, Uniqued); } static DIObjCProperty *getIfExists(LLVMContext &Context, StringRef Name, DIFile *File, unsigned Line, StringRef GetterName, StringRef SetterName, unsigned Attributes, DIType *Type) { return getImpl(Context, Name, File, Line, GetterName, SetterName, Attributes, Type, Uniqued, false); } static DIObjCProperty *getDistinct(LLVMContext &Context, StringRef Name, DIFile *File, unsigned Line, StringRef GetterName, StringRef SetterName, unsigned Attributes, DIType *Type) { return getImpl(Context, Name, File, Line, GetterName, SetterName, Attributes, Type, Distinct); } static TempDIObjCProperty getTemporary(LLVMContext &Context, StringRef Name, DIFile *File, unsigned Line, StringRef GetterName, StringRef SetterName, unsigned Attributes, DIType *Type) { return TempDIObjCProperty( getImpl(Context, Name, File, Line, GetterName, SetterName, Attributes, Type, Temporary)); } static DIObjCProperty *get(LLVMContext &Context, MDString * Name, Metadata *File, unsigned Line, MDString *GetterName, MDString *SetterName, unsigned Attributes, Metadata *Type) { return getImpl(Context, Name, File, Line, GetterName, SetterName, Attributes, Type, Uniqued); } static DIObjCProperty *getIfExists(LLVMContext &Context, MDString * Name, Metadata *File, unsigned Line, MDString *GetterName, MDString *SetterName, unsigned Attributes, Metadata *Type) { return getImpl(Context, Name, File, Line, GetterName, SetterName, Attributes, Type, Uniqued, false); } static DIObjCProperty *getDistinct(LLVMContext &Context, MDString * Name, Metadata *File, unsigned Line, MDString *GetterName, MDString *SetterName, unsigned Attributes, Metadata *Type) { return getImpl(Context, Name, File, Line, GetterName, SetterName, Attributes, Type, Distinct); } static TempDIObjCProperty getTemporary(LLVMContext &Context, MDString * Name, Metadata *File, unsigned Line, MDString *GetterName, MDString *SetterName, unsigned Attributes, Metadata *Type) { return TempDIObjCProperty( getImpl(Context, Name, File, Line, GetterName, SetterName, Attributes, Type, Temporary)); } TempDIObjCProperty clone() const { return cloneImpl(); } unsigned getLine() const { return Line; } unsigned getAttributes() const { return Attributes; } StringRef getName() const { return getStringOperand(0); } DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); } StringRef getGetterName() const { return getStringOperand(2); } StringRef getSetterName() const { return getStringOperand(3); } DIType *getType() const { return cast_or_null<DIType>(getRawType()); } StringRef getFilename() const { if (auto *F = getFile()) return F->getFilename(); return ""; } StringRef getDirectory() const { if (auto *F = getFile()) return F->getDirectory(); return ""; } Optional<StringRef> getSource() const { if (auto *F = getFile()) return F->getSource(); return None; } MDString *getRawName() const { return getOperandAs<MDString>(0); } Metadata *getRawFile() const { return getOperand(1); } MDString *getRawGetterName() const { return getOperandAs<MDString>(2); } MDString *getRawSetterName() const { return getOperandAs<MDString>(3); } Metadata *getRawType() const { return getOperand(4); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DIObjCPropertyKind; } }; class DIImportedEntity : public DINode { friend class LLVMContextImpl; friend class MDNode; unsigned Line; DIImportedEntity(LLVMContext &C, StorageType Storage, unsigned Tag, unsigned Line, ArrayRef<Metadata *> Ops) : DINode(C, DIImportedEntityKind, Storage, Tag, Ops), Line(Line) {} ~DIImportedEntity() = default; static DIImportedEntity *getImpl(LLVMContext &Context, unsigned Tag, DIScope *Scope, DINode *Entity, DIFile *File, unsigned Line, StringRef Name, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Tag, Scope, Entity, File, Line, getCanonicalMDString(Context, Name), Storage, ShouldCreate); } static DIImportedEntity *getImpl(LLVMContext &Context, unsigned Tag, Metadata *Scope, Metadata *Entity, Metadata *File, unsigned Line, MDString *Name, StorageType Storage, bool ShouldCreate = true); TempDIImportedEntity cloneImpl() const { return getTemporary(getContext(), getTag(), getScope(), getEntity(), getFile(), getLine(), getName()); } public: static DIImportedEntity *get(LLVMContext &Context, unsigned Tag, DIScope *Scope, DINode *Entity, DIFile *File, unsigned Line, StringRef Name = "") { return getImpl(Context, Tag, Scope, Entity, File, Line, Name, Uniqued); } static DIImportedEntity *getIfExists(LLVMContext &Context, unsigned Tag, DIScope *Scope, DINode *Entity, DIFile *File, unsigned Line, StringRef Name = "") { return getImpl(Context, Tag, Scope, Entity, File, Line, Name, Uniqued, false); } static DIImportedEntity *getDistinct(LLVMContext &Context, unsigned Tag, DIScope *Scope, DINode *Entity, DIFile *File, unsigned Line, StringRef Name = "") { return getImpl(Context, Tag, Scope, Entity, File, Line, Name, Distinct); } static TempDIImportedEntity getTemporary(LLVMContext &Context, unsigned Tag, DIScope *Scope, DINode *Entity, DIFile *File, unsigned Line, StringRef Name = "") { return TempDIImportedEntity( getImpl(Context, Tag, Scope, Entity, File, Line, Name, Temporary)); } static DIImportedEntity *get(LLVMContext &Context, unsigned Tag, Metadata *Scope, Metadata *Entity, Metadata *File, unsigned Line, MDString *Name) { return getImpl(Context, Tag, Scope, Entity, File, Line, Name, Uniqued); } static DIImportedEntity *getIfExists(LLVMContext &Context, unsigned Tag, Metadata *Scope, Metadata *Entity, Metadata *File, unsigned Line, MDString *Name) { return getImpl(Context, Tag, Scope, Entity, File, Line, Name, Uniqued, false); } static DIImportedEntity *getDistinct(LLVMContext &Context, unsigned Tag, Metadata *Scope, Metadata *Entity, Metadata *File, unsigned Line, MDString *Name) { return getImpl(Context, Tag, Scope, Entity, File, Line, Name, Distinct); } static TempDIImportedEntity getTemporary(LLVMContext &Context, unsigned Tag, Metadata *Scope, Metadata *Entity, Metadata *File, unsigned Line, MDString *Name) { return TempDIImportedEntity( getImpl(Context, Tag, Scope, Entity, File, Line, Name, Temporary)); } TempDIImportedEntity clone() const { return cloneImpl(); } unsigned getLine() const { return Line; } DIScope *getScope() const { return cast_or_null<DIScope>(getRawScope()); } DINode *getEntity() const { return cast_or_null<DINode>(getRawEntity()); } StringRef getName() const { return getStringOperand(2); } DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); } Metadata *getRawScope() const { return getOperand(0); } Metadata *getRawEntity() const { return getOperand(1); } MDString *getRawName() const { return getOperandAs<MDString>(2); } Metadata *getRawFile() const { return getOperand(3); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DIImportedEntityKind; } }; class DIGlobalVariableExpression : public MDNode { friend class LLVMContextImpl; friend class MDNode; DIGlobalVariableExpression(LLVMContext &C, StorageType Storage, ArrayRef<Metadata *> Ops) : MDNode(C, DIGlobalVariableExpressionKind, Storage, Ops) {} ~DIGlobalVariableExpression() = default; static DIGlobalVariableExpression * getImpl(LLVMContext &Context, Metadata *Variable, Metadata *Expression, StorageType Storage, bool ShouldCreate = true); TempDIGlobalVariableExpression cloneImpl() const { return getTemporary(getContext(), getVariable(), getExpression()); } public: static DIGlobalVariableExpression *get(LLVMContext &Context, Metadata * Variable, Metadata *Expression) { return getImpl(Context, Variable, Expression, Uniqued); } static DIGlobalVariableExpression *getIfExists(LLVMContext &Context, Metadata * Variable, Metadata *Expression) { return getImpl(Context, Variable, Expression, Uniqued, false); } static DIGlobalVariableExpression *getDistinct(LLVMContext &Context, Metadata * Variable, Metadata *Expression) { return getImpl(Context, Variable, Expression, Distinct); } static TempDIGlobalVariableExpression getTemporary(LLVMContext &Context, Metadata * Variable, Metadata *Expression) { return TempDIGlobalVariableExpression( getImpl(Context, Variable, Expression, Temporary)); } TempDIGlobalVariableExpression clone() const { return cloneImpl(); } Metadata *getRawVariable() const { return getOperand(0); } DIGlobalVariable *getVariable() const { return cast_or_null<DIGlobalVariable>(getRawVariable()); } Metadata *getRawExpression() const { return getOperand(1); } DIExpression *getExpression() const { return cast<DIExpression>(getRawExpression()); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DIGlobalVariableExpressionKind; } }; class DIMacroNode : public MDNode { friend class LLVMContextImpl; friend class MDNode; protected: DIMacroNode(LLVMContext &C, unsigned ID, StorageType Storage, unsigned MIType, ArrayRef<Metadata *> Ops1, ArrayRef<Metadata *> Ops2 = None) : MDNode(C, ID, Storage, Ops1, Ops2) { (static_cast<void> (0)); SubclassData16 = MIType; } ~DIMacroNode() = default; template <class Ty> Ty *getOperandAs(unsigned I) const { return cast_or_null<Ty>(getOperand(I)); } StringRef getStringOperand(unsigned I) const { if (auto *S = getOperandAs<MDString>(I)) return S->getString(); return StringRef(); } static MDString *getCanonicalMDString(LLVMContext &Context, StringRef S) { if (S.empty()) return nullptr; return MDString::get(Context, S); } public: unsigned getMacinfoType() const { return SubclassData16; } static bool classof(const Metadata *MD) { switch (MD->getMetadataID()) { default: return false; case DIMacroKind: case DIMacroFileKind: return true; } } }; class DIMacro : public DIMacroNode { friend class LLVMContextImpl; friend class MDNode; unsigned Line; DIMacro(LLVMContext &C, StorageType Storage, unsigned MIType, unsigned Line, ArrayRef<Metadata *> Ops) : DIMacroNode(C, DIMacroKind, Storage, MIType, Ops), Line(Line) {} ~DIMacro() = default; static DIMacro *getImpl(LLVMContext &Context, unsigned MIType, unsigned Line, StringRef Name, StringRef Value, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, MIType, Line, getCanonicalMDString(Context, Name), getCanonicalMDString(Context, Value), Storage, ShouldCreate); } static DIMacro *getImpl(LLVMContext &Context, unsigned MIType, unsigned Line, MDString *Name, MDString *Value, StorageType Storage, bool ShouldCreate = true); TempDIMacro cloneImpl() const { return getTemporary(getContext(), getMacinfoType(), getLine(), getName(), getValue()); } public: static DIMacro *get(LLVMContext &Context, unsigned MIType, unsigned Line, StringRef Name, StringRef Value = "") { return getImpl(Context, MIType, Line, Name, Value, Uniqued); } static DIMacro *getIfExists(LLVMContext &Context, unsigned MIType, unsigned Line, StringRef Name, StringRef Value = "") { return getImpl(Context, MIType, Line, Name, Value, Uniqued, false); } static DIMacro *getDistinct(LLVMContext &Context, unsigned MIType, unsigned Line, StringRef Name, StringRef Value = "") { return getImpl(Context, MIType, Line, Name, Value, Distinct); } static TempDIMacro getTemporary(LLVMContext &Context, unsigned MIType, unsigned Line, StringRef Name, StringRef Value = "") { return TempDIMacro( getImpl(Context, MIType, Line, Name, Value, Temporary)); } static DIMacro *get(LLVMContext &Context, unsigned MIType, unsigned Line, MDString *Name, MDString *Value) { return getImpl(Context, MIType, Line, Name, Value, Uniqued); } static DIMacro *getIfExists(LLVMContext &Context, unsigned MIType, unsigned Line, MDString *Name, MDString *Value) { return getImpl(Context, MIType, Line, Name, Value, Uniqued, false); } static DIMacro *getDistinct(LLVMContext &Context, unsigned MIType, unsigned Line, MDString *Name, MDString *Value) { return getImpl(Context, MIType, Line, Name, Value, Distinct); } static TempDIMacro getTemporary(LLVMContext &Context, unsigned MIType, unsigned Line, MDString *Name, MDString *Value) { return TempDIMacro( getImpl(Context, MIType, Line, Name, Value, Temporary)); } TempDIMacro clone() const { return cloneImpl(); } unsigned getLine() const { return Line; } StringRef getName() const { return getStringOperand(0); } StringRef getValue() const { return getStringOperand(1); } MDString *getRawName() const { return getOperandAs<MDString>(0); } MDString *getRawValue() const { return getOperandAs<MDString>(1); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DIMacroKind; } }; class DIMacroFile : public DIMacroNode { friend class LLVMContextImpl; friend class MDNode; unsigned Line; DIMacroFile(LLVMContext &C, StorageType Storage, unsigned MIType, unsigned Line, ArrayRef<Metadata *> Ops) : DIMacroNode(C, DIMacroFileKind, Storage, MIType, Ops), Line(Line) {} ~DIMacroFile() = default; static DIMacroFile *getImpl(LLVMContext &Context, unsigned MIType, unsigned Line, DIFile *File, DIMacroNodeArray Elements, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, MIType, Line, static_cast<Metadata *>(File), Elements.get(), Storage, ShouldCreate); } static DIMacroFile *getImpl(LLVMContext &Context, unsigned MIType, unsigned Line, Metadata *File, Metadata *Elements, StorageType Storage, bool ShouldCreate = true); TempDIMacroFile cloneImpl() const { return getTemporary(getContext(), getMacinfoType(), getLine(), getFile(), getElements()); } public: static DIMacroFile *get(LLVMContext &Context, unsigned MIType, unsigned Line, DIFile *File, DIMacroNodeArray Elements) { return getImpl(Context, MIType, Line, File, Elements, Uniqued); } static DIMacroFile *getIfExists(LLVMContext &Context, unsigned MIType, unsigned Line, DIFile *File, DIMacroNodeArray Elements) { return getImpl(Context, MIType, Line, File, Elements, Uniqued, false); } static DIMacroFile *getDistinct(LLVMContext &Context, unsigned MIType, unsigned Line, DIFile *File, DIMacroNodeArray Elements) { return getImpl(Context, MIType, Line, File, Elements, Distinct); } static TempDIMacroFile getTemporary(LLVMContext &Context, unsigned MIType, unsigned Line, DIFile *File, DIMacroNodeArray Elements) { return TempDIMacroFile( getImpl(Context, MIType, Line, File, Elements, Temporary)); } static DIMacroFile *get(LLVMContext &Context, unsigned MIType, unsigned Line, Metadata *File, Metadata *Elements) { return getImpl(Context, MIType, Line, File, Elements, Uniqued); } static DIMacroFile *getIfExists(LLVMContext &Context, unsigned MIType, unsigned Line, Metadata *File, Metadata *Elements) { return getImpl(Context, MIType, Line, File, Elements, Uniqued, false); } static DIMacroFile *getDistinct(LLVMContext &Context, unsigned MIType, unsigned Line, Metadata *File, Metadata *Elements) { return getImpl(Context, MIType, Line, File, Elements, Distinct); } static TempDIMacroFile getTemporary(LLVMContext &Context, unsigned MIType, unsigned Line, Metadata *File, Metadata *Elements) { return TempDIMacroFile( getImpl(Context, MIType, Line, File, Elements, Temporary)); } TempDIMacroFile clone() const { return cloneImpl(); } void replaceElements(DIMacroNodeArray Elements) { replaceOperandWith(1, Elements.get()); } unsigned getLine() const { return Line; } DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); } DIMacroNodeArray getElements() const { return cast_or_null<MDTuple>(getRawElements()); } Metadata *getRawFile() const { return getOperand(0); } Metadata *getRawElements() const { return getOperand(1); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DIMacroFileKind; } }; # 3342 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DebugInfoMetadata.h" class DebugVariable { using FragmentInfo = DIExpression::FragmentInfo; const DILocalVariable *Variable; Optional<FragmentInfo> Fragment; const DILocation *InlinedAt; static const FragmentInfo DefaultFragment; public: DebugVariable(const DILocalVariable *Var, Optional<FragmentInfo> FragmentInfo, const DILocation *InlinedAt) : Variable(Var), Fragment(FragmentInfo), InlinedAt(InlinedAt) {} DebugVariable(const DILocalVariable *Var, const DIExpression *DIExpr, const DILocation *InlinedAt) : Variable(Var), Fragment(DIExpr ? DIExpr->getFragmentInfo() : NoneType()), InlinedAt(InlinedAt) {} const DILocalVariable *getVariable() const { return Variable; } const Optional<FragmentInfo> getFragment() const { return Fragment; } const DILocation *getInlinedAt() const { return InlinedAt; } const FragmentInfo getFragmentOrDefault() const { return Fragment.getValueOr(DefaultFragment); } static bool isDefaultFragment(const FragmentInfo F) { return F == DefaultFragment; } bool operator==(const DebugVariable &Other) const { return std::tie(Variable, Fragment, InlinedAt) == std::tie(Other.Variable, Other.Fragment, Other.InlinedAt); } bool operator<(const DebugVariable &Other) const { return std::tie(Variable, Fragment, InlinedAt) < std::tie(Other.Variable, Other.Fragment, Other.InlinedAt); } }; template <> struct DenseMapInfo<DebugVariable> { using FragmentInfo = DIExpression::FragmentInfo; static inline DebugVariable getEmptyKey() { return DebugVariable(nullptr, NoneType(), nullptr); } static inline DebugVariable getTombstoneKey() { return DebugVariable(nullptr, {{0, 0}}, nullptr); } static unsigned getHashValue(const DebugVariable &D) { unsigned HV = 0; const Optional<FragmentInfo> Fragment = D.getFragment(); if (Fragment) HV = DenseMapInfo<FragmentInfo>::getHashValue(*Fragment); return hash_combine(D.getVariable(), HV, D.getInlinedAt()); } static bool isEqual(const DebugVariable &A, const DebugVariable &B) { return A == B; } }; } # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Function.h" 1 # 20 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Function.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseSet.h" 1 # 26 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseSet.h" namespace llvm { namespace detail { struct DenseSetEmpty {}; template <typename KeyT> class DenseSetPair : public DenseSetEmpty { KeyT key; public: KeyT &getFirst() { return key; } const KeyT &getFirst() const { return key; } DenseSetEmpty &getSecond() { return *this; } const DenseSetEmpty &getSecond() const { return *this; } }; # 53 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/ADT/DenseSet.h" template <typename ValueT, typename MapTy, typename ValueInfoT> class DenseSetImpl { static_assert(sizeof(typename MapTy::value_type) == sizeof(ValueT), "DenseMap buckets unexpectedly large!"); MapTy TheMap; template <typename T> using const_arg_type_t = typename const_pointer_or_const_ref<T>::type; public: using key_type = ValueT; using value_type = ValueT; using size_type = unsigned; explicit DenseSetImpl(unsigned InitialReserve = 0) : TheMap(InitialReserve) {} template <typename InputIt> DenseSetImpl(const InputIt &I, const InputIt &E) : DenseSetImpl(PowerOf2Ceil(std::distance(I, E))) { insert(I, E); } DenseSetImpl(std::initializer_list<ValueT> Elems) : DenseSetImpl(PowerOf2Ceil(Elems.size())) { insert(Elems.begin(), Elems.end()); } bool empty() const { return TheMap.empty(); } size_type size() const { return TheMap.size(); } size_t getMemorySize() const { return TheMap.getMemorySize(); } void resize(size_t Size) { TheMap.resize(Size); } void reserve(size_t Size) { TheMap.reserve(Size); } void clear() { TheMap.clear(); } size_type count(const_arg_type_t<ValueT> V) const { return TheMap.count(V); } bool erase(const ValueT &V) { return TheMap.erase(V); } void swap(DenseSetImpl &RHS) { TheMap.swap(RHS.TheMap); } class ConstIterator; class Iterator { typename MapTy::iterator I; friend class DenseSetImpl; friend class ConstIterator; public: using difference_type = typename MapTy::iterator::difference_type; using value_type = ValueT; using pointer = value_type *; using reference = value_type &; using iterator_category = std::forward_iterator_tag; Iterator() = default; Iterator(const typename MapTy::iterator &i) : I(i) {} ValueT &operator*() { return I->getFirst(); } const ValueT &operator*() const { return I->getFirst(); } ValueT *operator->() { return &I->getFirst(); } const ValueT *operator->() const { return &I->getFirst(); } Iterator& operator++() { ++I; return *this; } Iterator operator++(int) { auto T = *this; ++I; return T; } bool operator==(const ConstIterator& X) const { return I == X.I; } bool operator!=(const ConstIterator& X) const { return I != X.I; } }; class ConstIterator { typename MapTy::const_iterator I; friend class DenseSetImpl; friend class Iterator; public: using difference_type = typename MapTy::const_iterator::difference_type; using value_type = ValueT; using pointer = const value_type *; using reference = const value_type &; using iterator_category = std::forward_iterator_tag; ConstIterator() = default; ConstIterator(const Iterator &B) : I(B.I) {} ConstIterator(const typename MapTy::const_iterator &i) : I(i) {} const ValueT &operator*() const { return I->getFirst(); } const ValueT *operator->() const { return &I->getFirst(); } ConstIterator& operator++() { ++I; return *this; } ConstIterator operator++(int) { auto T = *this; ++I; return T; } bool operator==(const ConstIterator& X) const { return I == X.I; } bool operator!=(const ConstIterator& X) const { return I != X.I; } }; using iterator = Iterator; using const_iterator = ConstIterator; iterator begin() { return Iterator(TheMap.begin()); } iterator end() { return Iterator(TheMap.end()); } const_iterator begin() const { return ConstIterator(TheMap.begin()); } const_iterator end() const { return ConstIterator(TheMap.end()); } iterator find(const_arg_type_t<ValueT> V) { return Iterator(TheMap.find(V)); } const_iterator find(const_arg_type_t<ValueT> V) const { return ConstIterator(TheMap.find(V)); } template <class LookupKeyT> iterator find_as(const LookupKeyT &Val) { return Iterator(TheMap.find_as(Val)); } template <class LookupKeyT> const_iterator find_as(const LookupKeyT &Val) const { return ConstIterator(TheMap.find_as(Val)); } void erase(Iterator I) { return TheMap.erase(I.I); } void erase(ConstIterator CI) { return TheMap.erase(CI.I); } std::pair<iterator, bool> insert(const ValueT &V) { detail::DenseSetEmpty Empty; return TheMap.try_emplace(V, Empty); } std::pair<iterator, bool> insert(ValueT &&V) { detail::DenseSetEmpty Empty; return TheMap.try_emplace(std::move(V), Empty); } template <typename LookupKeyT> std::pair<iterator, bool> insert_as(const ValueT &V, const LookupKeyT &LookupKey) { return TheMap.insert_as({V, detail::DenseSetEmpty()}, LookupKey); } template <typename LookupKeyT> std::pair<iterator, bool> insert_as(ValueT &&V, const LookupKeyT &LookupKey) { return TheMap.insert_as({std::move(V), detail::DenseSetEmpty()}, LookupKey); } template<typename InputIt> void insert(InputIt I, InputIt E) { for (; I != E; ++I) insert(*I); } }; template <typename ValueT, typename MapTy, typename ValueInfoT> bool operator==(const DenseSetImpl<ValueT, MapTy, ValueInfoT> &LHS, const DenseSetImpl<ValueT, MapTy, ValueInfoT> &RHS) { if (LHS.size() != RHS.size()) return false; for (auto &E : LHS) if (!RHS.count(E)) return false; return true; } template <typename ValueT, typename MapTy, typename ValueInfoT> bool operator!=(const DenseSetImpl<ValueT, MapTy, ValueInfoT> &LHS, const DenseSetImpl<ValueT, MapTy, ValueInfoT> &RHS) { return !(LHS == RHS); } } template <typename ValueT, typename ValueInfoT = DenseMapInfo<ValueT>> class DenseSet : public detail::DenseSetImpl< ValueT, DenseMap<ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair<ValueT>>, ValueInfoT> { using BaseT = detail::DenseSetImpl<ValueT, DenseMap<ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair<ValueT>>, ValueInfoT>; public: using BaseT::BaseT; }; template <typename ValueT, unsigned InlineBuckets = 4, typename ValueInfoT = DenseMapInfo<ValueT>> class SmallDenseSet : public detail::DenseSetImpl< ValueT, SmallDenseMap<ValueT, detail::DenseSetEmpty, InlineBuckets, ValueInfoT, detail::DenseSetPair<ValueT>>, ValueInfoT> { using BaseT = detail::DenseSetImpl< ValueT, SmallDenseMap<ValueT, detail::DenseSetEmpty, InlineBuckets, ValueInfoT, detail::DenseSetPair<ValueT>>, ValueInfoT>; public: using BaseT::BaseT; }; } # 21 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Function.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/CallingConv.h" 1 # 16 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/CallingConv.h" namespace llvm { namespace CallingConv { using ID = unsigned; enum { C = 0, Fast = 8, Cold = 9, GHC = 10, HiPE = 11, WebKit_JS = 12, AnyReg = 13, PreserveMost = 14, PreserveAll = 15, Swift = 16, CXX_FAST_TLS = 17, Tail = 18, CFGuard_Check = 19, FirstTargetCC = 64, X86_StdCall = 64, X86_FastCall = 65, ARM_APCS = 66, ARM_AAPCS = 67, ARM_AAPCS_VFP = 68, MSP430_INTR = 69, X86_ThisCall = 70, PTX_Kernel = 71, PTX_Device = 72, # 139 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/CallingConv.h" SPIR_FUNC = 75, SPIR_KERNEL = 76, Intel_OCL_BI = 77, X86_64_SysV = 78, # 164 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/CallingConv.h" Win64 = 79, X86_VectorCall = 80, HHVM = 81, HHVM_C = 82, X86_INTR = 83, AVR_INTR = 84, AVR_SIGNAL = 85, AVR_BUILTIN = 86, AMDGPU_VS = 87, AMDGPU_GS = 88, AMDGPU_PS = 89, AMDGPU_CS = 90, AMDGPU_KERNEL = 91, X86_RegCall = 92, AMDGPU_HS = 93, MSP430_BUILTIN = 94, AMDGPU_LS = 95, AMDGPU_ES = 96, AArch64_VectorCall = 97, AArch64_SVE_VectorCall = 98, WASM_EmscriptenInvoke = 99, MaxID = 1023 }; } } # 29 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Function.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalObject.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalObject.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalValue.h" 1 # 27 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalValue.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MD5.h" 1 # 32 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MD5.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Endian.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Endian.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Endian.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 1 3 # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cstring" 3 # 22 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Endian.h" 2 namespace llvm { namespace support { enum endianness {big, little, native}; enum {aligned = 0, unaligned = 1}; namespace detail { template<class T, int alignment> struct PickAlignment { enum { value = alignment == 0 ? alignof(T) : alignment }; }; } namespace endian { constexpr endianness system_endianness() { return sys::IsBigEndianHost ? big : little; } template <typename value_type> inline value_type byte_swap(value_type value, endianness endian) { if ((endian != native) && (endian != system_endianness())) sys::swapByteOrder(value); return value; } template<typename value_type, endianness endian> inline value_type byte_swap(value_type value) { return byte_swap(value, endian); } template <typename value_type, std::size_t alignment> inline value_type read(const void *memory, endianness endian) { value_type ret; memcpy(&ret, __builtin_assume_aligned(memory, (detail::PickAlignment<value_type, alignment>::value)), sizeof(value_type)); return byte_swap<value_type>(ret, endian); } template<typename value_type, endianness endian, std::size_t alignment> inline value_type read(const void *memory) { return read<value_type, alignment>(memory, endian); } template <typename value_type, std::size_t alignment, typename CharT> inline value_type readNext(const CharT *&memory, endianness endian) { value_type ret = read<value_type, alignment>(memory, endian); memory += sizeof(value_type); return ret; } template<typename value_type, endianness endian, std::size_t alignment, typename CharT> inline value_type readNext(const CharT *&memory) { return readNext<value_type, alignment, CharT>(memory, endian); } template <typename value_type, std::size_t alignment> inline void write(void *memory, value_type value, endianness endian) { value = byte_swap<value_type>(value, endian); memcpy(__builtin_assume_aligned(memory, (detail::PickAlignment<value_type, alignment>::value)), &value, sizeof(value_type)); } template<typename value_type, endianness endian, std::size_t alignment> inline void write(void *memory, value_type value) { write<value_type, alignment>(memory, value, endian); } template <typename value_type> using make_unsigned_t = std::make_unsigned_t<value_type>; template <typename value_type, endianness endian, std::size_t alignment> inline value_type readAtBitAlignment(const void *memory, uint64_t startBit) { (static_cast<void> (0)); if (startBit == 0) return read<value_type, endian, alignment>(memory); else { value_type val[2]; memcpy(&val[0], __builtin_assume_aligned(memory, (detail::PickAlignment<value_type, alignment>::value)), sizeof(value_type) * 2); val[0] = byte_swap<value_type, endian>(val[0]); val[1] = byte_swap<value_type, endian>(val[1]); make_unsigned_t<value_type> lowerVal = val[0] >> startBit; make_unsigned_t<value_type> numBitsFirstVal = (sizeof(value_type) * 8) - startBit; lowerVal &= ((make_unsigned_t<value_type>)1 << numBitsFirstVal) - 1; make_unsigned_t<value_type> upperVal = val[1] & (((make_unsigned_t<value_type>)1 << startBit) - 1); upperVal <<= numBitsFirstVal; return lowerVal | upperVal; } } template <typename value_type, endianness endian, std::size_t alignment> inline void writeAtBitAlignment(void *memory, value_type value, uint64_t startBit) { (static_cast<void> (0)); if (startBit == 0) write<value_type, endian, alignment>(memory, value); else { value_type val[2]; memcpy(&val[0], __builtin_assume_aligned(memory, (detail::PickAlignment<value_type, alignment>::value)), sizeof(value_type) * 2); val[0] = byte_swap<value_type, endian>(val[0]); val[1] = byte_swap<value_type, endian>(val[1]); val[0] &= ((make_unsigned_t<value_type>)1 << startBit) - 1; make_unsigned_t<value_type> numBitsFirstVal = (sizeof(value_type) * 8) - startBit; make_unsigned_t<value_type> lowerVal = value; if (startBit > 0) { lowerVal &= (((make_unsigned_t<value_type>)1 << numBitsFirstVal) - 1); lowerVal <<= startBit; } val[0] |= lowerVal; val[1] &= ~(((make_unsigned_t<value_type>)1 << startBit) - 1); make_unsigned_t<value_type> upperVal = value >> numBitsFirstVal; upperVal &= ((make_unsigned_t<value_type>)1 << startBit) - 1; val[1] |= upperVal; val[0] = byte_swap<value_type, endian>(val[0]); val[1] = byte_swap<value_type, endian>(val[1]); memcpy(__builtin_assume_aligned(memory, (detail::PickAlignment<value_type, alignment>::value)), &val[0], sizeof(value_type) * 2); } } } namespace detail { template <typename ValueType, endianness Endian, std::size_t Alignment, std::size_t ALIGN = PickAlignment<ValueType, Alignment>::value> struct packed_endian_specific_integral { using value_type = ValueType; static constexpr endianness endian = Endian; static constexpr std::size_t alignment = Alignment; packed_endian_specific_integral() = default; explicit packed_endian_specific_integral(value_type val) { *this = val; } operator value_type() const { return endian::read<value_type, endian, alignment>( (const void*)Value.buffer); } void operator=(value_type newValue) { endian::write<value_type, endian, alignment>( (void*)Value.buffer, newValue); } packed_endian_specific_integral &operator+=(value_type newValue) { *this = *this + newValue; return *this; } packed_endian_specific_integral &operator-=(value_type newValue) { *this = *this - newValue; return *this; } packed_endian_specific_integral &operator|=(value_type newValue) { *this = *this | newValue; return *this; } packed_endian_specific_integral &operator&=(value_type newValue) { *this = *this & newValue; return *this; } private: struct { alignas(ALIGN) char buffer[sizeof(value_type)]; } Value; public: struct ref { explicit ref(void *Ptr) : Ptr(Ptr) {} operator value_type() const { return endian::read<value_type, endian, alignment>(Ptr); } void operator=(value_type NewValue) { endian::write<value_type, endian, alignment>(Ptr, NewValue); } private: void *Ptr; }; }; } using ulittle16_t = detail::packed_endian_specific_integral<uint16_t, little, unaligned>; using ulittle32_t = detail::packed_endian_specific_integral<uint32_t, little, unaligned>; using ulittle64_t = detail::packed_endian_specific_integral<uint64_t, little, unaligned>; using little16_t = detail::packed_endian_specific_integral<int16_t, little, unaligned>; using little32_t = detail::packed_endian_specific_integral<int32_t, little, unaligned>; using little64_t = detail::packed_endian_specific_integral<int64_t, little, unaligned>; using aligned_ulittle16_t = detail::packed_endian_specific_integral<uint16_t, little, aligned>; using aligned_ulittle32_t = detail::packed_endian_specific_integral<uint32_t, little, aligned>; using aligned_ulittle64_t = detail::packed_endian_specific_integral<uint64_t, little, aligned>; using aligned_little16_t = detail::packed_endian_specific_integral<int16_t, little, aligned>; using aligned_little32_t = detail::packed_endian_specific_integral<int32_t, little, aligned>; using aligned_little64_t = detail::packed_endian_specific_integral<int64_t, little, aligned>; using ubig16_t = detail::packed_endian_specific_integral<uint16_t, big, unaligned>; using ubig32_t = detail::packed_endian_specific_integral<uint32_t, big, unaligned>; using ubig64_t = detail::packed_endian_specific_integral<uint64_t, big, unaligned>; using big16_t = detail::packed_endian_specific_integral<int16_t, big, unaligned>; using big32_t = detail::packed_endian_specific_integral<int32_t, big, unaligned>; using big64_t = detail::packed_endian_specific_integral<int64_t, big, unaligned>; using aligned_ubig16_t = detail::packed_endian_specific_integral<uint16_t, big, aligned>; using aligned_ubig32_t = detail::packed_endian_specific_integral<uint32_t, big, aligned>; using aligned_ubig64_t = detail::packed_endian_specific_integral<uint64_t, big, aligned>; using aligned_big16_t = detail::packed_endian_specific_integral<int16_t, big, aligned>; using aligned_big32_t = detail::packed_endian_specific_integral<int32_t, big, aligned>; using aligned_big64_t = detail::packed_endian_specific_integral<int64_t, big, aligned>; using unaligned_uint16_t = detail::packed_endian_specific_integral<uint16_t, native, unaligned>; using unaligned_uint32_t = detail::packed_endian_specific_integral<uint32_t, native, unaligned>; using unaligned_uint64_t = detail::packed_endian_specific_integral<uint64_t, native, unaligned>; using unaligned_int16_t = detail::packed_endian_specific_integral<int16_t, native, unaligned>; using unaligned_int32_t = detail::packed_endian_specific_integral<int32_t, native, unaligned>; using unaligned_int64_t = detail::packed_endian_specific_integral<int64_t, native, unaligned>; template <typename T> using little_t = detail::packed_endian_specific_integral<T, little, unaligned>; template <typename T> using big_t = detail::packed_endian_specific_integral<T, big, unaligned>; template <typename T> using aligned_little_t = detail::packed_endian_specific_integral<T, little, aligned>; template <typename T> using aligned_big_t = detail::packed_endian_specific_integral<T, big, aligned>; namespace endian { template <typename T> inline T read(const void *P, endianness E) { return read<T, unaligned>(P, E); } template <typename T, endianness E> inline T read(const void *P) { return *(const detail::packed_endian_specific_integral<T, E, unaligned> *)P; } inline uint16_t read16(const void *P, endianness E) { return read<uint16_t>(P, E); } inline uint32_t read32(const void *P, endianness E) { return read<uint32_t>(P, E); } inline uint64_t read64(const void *P, endianness E) { return read<uint64_t>(P, E); } template <endianness E> inline uint16_t read16(const void *P) { return read<uint16_t, E>(P); } template <endianness E> inline uint32_t read32(const void *P) { return read<uint32_t, E>(P); } template <endianness E> inline uint64_t read64(const void *P) { return read<uint64_t, E>(P); } inline uint16_t read16le(const void *P) { return read16<little>(P); } inline uint32_t read32le(const void *P) { return read32<little>(P); } inline uint64_t read64le(const void *P) { return read64<little>(P); } inline uint16_t read16be(const void *P) { return read16<big>(P); } inline uint32_t read32be(const void *P) { return read32<big>(P); } inline uint64_t read64be(const void *P) { return read64<big>(P); } template <typename T> inline void write(void *P, T V, endianness E) { write<T, unaligned>(P, V, E); } template <typename T, endianness E> inline void write(void *P, T V) { *(detail::packed_endian_specific_integral<T, E, unaligned> *)P = V; } inline void write16(void *P, uint16_t V, endianness E) { write<uint16_t>(P, V, E); } inline void write32(void *P, uint32_t V, endianness E) { write<uint32_t>(P, V, E); } inline void write64(void *P, uint64_t V, endianness E) { write<uint64_t>(P, V, E); } template <endianness E> inline void write16(void *P, uint16_t V) { write<uint16_t, E>(P, V); } template <endianness E> inline void write32(void *P, uint32_t V) { write<uint32_t, E>(P, V); } template <endianness E> inline void write64(void *P, uint64_t V) { write<uint64_t, E>(P, V); } inline void write16le(void *P, uint16_t V) { write16<little>(P, V); } inline void write32le(void *P, uint32_t V) { write32<little>(P, V); } inline void write64le(void *P, uint64_t V) { write64<little>(P, V); } inline void write16be(void *P, uint16_t V) { write16<big>(P, V); } inline void write32be(void *P, uint32_t V) { write32<big>(P, V); } inline void write64be(void *P, uint64_t V) { write64<big>(P, V); } } } } # 33 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/MD5.h" 2 namespace llvm { template <unsigned N> class SmallString; template <typename T> class ArrayRef; class MD5 { typedef uint32_t MD5_u32plus; MD5_u32plus a = 0x67452301; MD5_u32plus b = 0xefcdab89; MD5_u32plus c = 0x98badcfe; MD5_u32plus d = 0x10325476; MD5_u32plus hi = 0; MD5_u32plus lo = 0; uint8_t buffer[64]; MD5_u32plus block[16]; public: struct MD5Result { std::array<uint8_t, 16> Bytes; operator std::array<uint8_t, 16>() const { return Bytes; } const uint8_t &operator[](size_t I) const { return Bytes[I]; } uint8_t &operator[](size_t I) { return Bytes[I]; } SmallString<32> digest() const; uint64_t low() const { using namespace support; return endian::read<uint64_t, little, unaligned>(Bytes.data()); } uint64_t high() const { using namespace support; return endian::read<uint64_t, little, unaligned>(Bytes.data() + 8); } std::pair<uint64_t, uint64_t> words() const { using namespace support; return std::make_pair(high(), low()); } }; MD5(); void update(ArrayRef<uint8_t> Data); void update(StringRef Str); void final(MD5Result &Result); static void stringifyResult(MD5Result &Result, SmallString<32> &Str); static std::array<uint8_t, 16> hash(ArrayRef<uint8_t> Data); private: const uint8_t *body(ArrayRef<uint8_t> Data); }; inline bool operator==(const MD5::MD5Result &LHS, const MD5::MD5Result &RHS) { return LHS.Bytes == RHS.Bytes; } inline uint64_t MD5Hash(StringRef Str) { using namespace support; MD5 Hash; Hash.update(Str); MD5::MD5Result Result; Hash.final(Result); return Result.low(); } } # 28 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalValue.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 29 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalValue.h" 2 namespace llvm { class Comdat; class ConstantRange; class Error; class GlobalObject; class Module; namespace Intrinsic { typedef unsigned ID; } class GlobalValue : public Constant { public: enum LinkageTypes { ExternalLinkage = 0, AvailableExternallyLinkage, LinkOnceAnyLinkage, LinkOnceODRLinkage, WeakAnyLinkage, WeakODRLinkage, AppendingLinkage, InternalLinkage, PrivateLinkage, ExternalWeakLinkage, CommonLinkage }; enum VisibilityTypes { DefaultVisibility = 0, HiddenVisibility, ProtectedVisibility }; enum DLLStorageClassTypes { DefaultStorageClass = 0, DLLImportStorageClass = 1, DLLExportStorageClass = 2 }; protected: GlobalValue(Type *Ty, ValueTy VTy, Use *Ops, unsigned NumOps, LinkageTypes Linkage, const Twine &Name, unsigned AddressSpace) : Constant(PointerType::get(Ty, AddressSpace), VTy, Ops, NumOps), ValueType(Ty), Visibility(DefaultVisibility), UnnamedAddrVal(unsigned(UnnamedAddr::None)), DllStorageClass(DefaultStorageClass), ThreadLocal(NotThreadLocal), HasLLVMReservedName(false), IsDSOLocal(false), HasPartition(false), IntID((Intrinsic::ID)0U), Parent(nullptr) { setLinkage(Linkage); setName(Name); } Type *ValueType; static const unsigned GlobalValueSubClassDataBits = 16; unsigned Linkage : 4; unsigned Visibility : 2; unsigned UnnamedAddrVal : 2; unsigned DllStorageClass : 2; unsigned ThreadLocal : 3; unsigned HasLLVMReservedName : 1; unsigned IsDSOLocal : 1; unsigned HasPartition : 1; private: unsigned SubClassData : GlobalValueSubClassDataBits; friend class Constant; void destroyConstantImpl(); Value *handleOperandChangeImpl(Value *From, Value *To); bool mayBeDerefined() const { switch (getLinkage()) { case WeakODRLinkage: case LinkOnceODRLinkage: case AvailableExternallyLinkage: return true; case WeakAnyLinkage: case LinkOnceAnyLinkage: case CommonLinkage: case ExternalWeakLinkage: case ExternalLinkage: case AppendingLinkage: case InternalLinkage: case PrivateLinkage: return isInterposable(); } __builtin_unreachable(); } protected: Intrinsic::ID IntID; unsigned getGlobalValueSubClassData() const { return SubClassData; } void setGlobalValueSubClassData(unsigned V) { (static_cast<void> (0)); SubClassData = V; } Module *Parent; void setParent(Module *parent) { Parent = parent; } ~GlobalValue() { removeDeadConstantUsers(); } public: enum ThreadLocalMode { NotThreadLocal = 0, GeneralDynamicTLSModel, LocalDynamicTLSModel, InitialExecTLSModel, LocalExecTLSModel }; GlobalValue(const GlobalValue &) = delete; unsigned getAddressSpace() const; enum class UnnamedAddr { None, Local, Global, }; bool hasGlobalUnnamedAddr() const { return getUnnamedAddr() == UnnamedAddr::Global; } bool hasAtLeastLocalUnnamedAddr() const { return getUnnamedAddr() != UnnamedAddr::None; } UnnamedAddr getUnnamedAddr() const { return UnnamedAddr(UnnamedAddrVal); } void setUnnamedAddr(UnnamedAddr Val) { UnnamedAddrVal = unsigned(Val); } static UnnamedAddr getMinUnnamedAddr(UnnamedAddr A, UnnamedAddr B) { if (A == UnnamedAddr::None || B == UnnamedAddr::None) return UnnamedAddr::None; if (A == UnnamedAddr::Local || B == UnnamedAddr::Local) return UnnamedAddr::Local; return UnnamedAddr::Global; } bool hasComdat() const { return getComdat() != nullptr; } const Comdat *getComdat() const; Comdat *getComdat() { return const_cast<Comdat *>( static_cast<const GlobalValue *>(this)->getComdat()); } VisibilityTypes getVisibility() const { return VisibilityTypes(Visibility); } bool hasDefaultVisibility() const { return Visibility == DefaultVisibility; } bool hasHiddenVisibility() const { return Visibility == HiddenVisibility; } bool hasProtectedVisibility() const { return Visibility == ProtectedVisibility; } void setVisibility(VisibilityTypes V) { (static_cast<void> (0)); Visibility = V; if (isImplicitDSOLocal()) setDSOLocal(true); } bool isThreadLocal() const { return getThreadLocalMode() != NotThreadLocal; } void setThreadLocal(bool Val) { setThreadLocalMode(Val ? GeneralDynamicTLSModel : NotThreadLocal); } void setThreadLocalMode(ThreadLocalMode Val) { (static_cast<void> (0)); ThreadLocal = Val; } ThreadLocalMode getThreadLocalMode() const { return static_cast<ThreadLocalMode>(ThreadLocal); } DLLStorageClassTypes getDLLStorageClass() const { return DLLStorageClassTypes(DllStorageClass); } bool hasDLLImportStorageClass() const { return DllStorageClass == DLLImportStorageClass; } bool hasDLLExportStorageClass() const { return DllStorageClass == DLLExportStorageClass; } void setDLLStorageClass(DLLStorageClassTypes C) { DllStorageClass = C; } bool hasSection() const { return !getSection().empty(); } StringRef getSection() const; PointerType *getType() const { return cast<PointerType>(User::getType()); } Type *getValueType() const { return ValueType; } bool isImplicitDSOLocal() const { return hasLocalLinkage() || (!hasDefaultVisibility() && !hasExternalWeakLinkage()); } void setDSOLocal(bool Local) { IsDSOLocal = Local; } bool isDSOLocal() const { return IsDSOLocal; } bool hasPartition() const { return HasPartition; } StringRef getPartition() const; void setPartition(StringRef Part); static LinkageTypes getLinkOnceLinkage(bool ODR) { return ODR ? LinkOnceODRLinkage : LinkOnceAnyLinkage; } static LinkageTypes getWeakLinkage(bool ODR) { return ODR ? WeakODRLinkage : WeakAnyLinkage; } static bool isExternalLinkage(LinkageTypes Linkage) { return Linkage == ExternalLinkage; } static bool isAvailableExternallyLinkage(LinkageTypes Linkage) { return Linkage == AvailableExternallyLinkage; } static bool isLinkOnceODRLinkage(LinkageTypes Linkage) { return Linkage == LinkOnceODRLinkage; } static bool isLinkOnceLinkage(LinkageTypes Linkage) { return Linkage == LinkOnceAnyLinkage || Linkage == LinkOnceODRLinkage; } static bool isWeakAnyLinkage(LinkageTypes Linkage) { return Linkage == WeakAnyLinkage; } static bool isWeakODRLinkage(LinkageTypes Linkage) { return Linkage == WeakODRLinkage; } static bool isWeakLinkage(LinkageTypes Linkage) { return isWeakAnyLinkage(Linkage) || isWeakODRLinkage(Linkage); } static bool isAppendingLinkage(LinkageTypes Linkage) { return Linkage == AppendingLinkage; } static bool isInternalLinkage(LinkageTypes Linkage) { return Linkage == InternalLinkage; } static bool isPrivateLinkage(LinkageTypes Linkage) { return Linkage == PrivateLinkage; } static bool isLocalLinkage(LinkageTypes Linkage) { return isInternalLinkage(Linkage) || isPrivateLinkage(Linkage); } static bool isExternalWeakLinkage(LinkageTypes Linkage) { return Linkage == ExternalWeakLinkage; } static bool isCommonLinkage(LinkageTypes Linkage) { return Linkage == CommonLinkage; } static bool isValidDeclarationLinkage(LinkageTypes Linkage) { return isExternalWeakLinkage(Linkage) || isExternalLinkage(Linkage); } static bool isInterposableLinkage(LinkageTypes Linkage) { switch (Linkage) { case WeakAnyLinkage: case LinkOnceAnyLinkage: case CommonLinkage: case ExternalWeakLinkage: return true; case AvailableExternallyLinkage: case LinkOnceODRLinkage: case WeakODRLinkage: case ExternalLinkage: case AppendingLinkage: case InternalLinkage: case PrivateLinkage: return false; } __builtin_unreachable(); } static bool isDiscardableIfUnused(LinkageTypes Linkage) { return isLinkOnceLinkage(Linkage) || isLocalLinkage(Linkage) || isAvailableExternallyLinkage(Linkage); } static bool isWeakForLinker(LinkageTypes Linkage) { return Linkage == WeakAnyLinkage || Linkage == WeakODRLinkage || Linkage == LinkOnceAnyLinkage || Linkage == LinkOnceODRLinkage || Linkage == CommonLinkage || Linkage == ExternalWeakLinkage; } # 410 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalValue.h" bool isDefinitionExact() const { return !mayBeDerefined(); } bool hasExactDefinition() const { return !isDeclaration() && isDefinitionExact(); } bool isInterposable() const; bool canBenefitFromLocalAlias() const; bool hasExternalLinkage() const { return isExternalLinkage(getLinkage()); } bool hasAvailableExternallyLinkage() const { return isAvailableExternallyLinkage(getLinkage()); } bool hasLinkOnceLinkage() const { return isLinkOnceLinkage(getLinkage()); } bool hasLinkOnceODRLinkage() const { return isLinkOnceODRLinkage(getLinkage()); } bool hasWeakLinkage() const { return isWeakLinkage(getLinkage()); } bool hasWeakAnyLinkage() const { return isWeakAnyLinkage(getLinkage()); } bool hasWeakODRLinkage() const { return isWeakODRLinkage(getLinkage()); } bool hasAppendingLinkage() const { return isAppendingLinkage(getLinkage()); } bool hasInternalLinkage() const { return isInternalLinkage(getLinkage()); } bool hasPrivateLinkage() const { return isPrivateLinkage(getLinkage()); } bool hasLocalLinkage() const { return isLocalLinkage(getLinkage()); } bool hasExternalWeakLinkage() const { return isExternalWeakLinkage(getLinkage()); } bool hasCommonLinkage() const { return isCommonLinkage(getLinkage()); } bool hasValidDeclarationLinkage() const { return isValidDeclarationLinkage(getLinkage()); } void setLinkage(LinkageTypes LT) { if (isLocalLinkage(LT)) Visibility = DefaultVisibility; Linkage = LT; if (isImplicitDSOLocal()) setDSOLocal(true); } LinkageTypes getLinkage() const { return LinkageTypes(Linkage); } bool isDiscardableIfUnused() const { return isDiscardableIfUnused(getLinkage()); } bool isWeakForLinker() const { return isWeakForLinker(getLinkage()); } protected: void copyAttributesFrom(const GlobalValue *Src); public: static StringRef dropLLVMManglingEscape(StringRef Name) { if (!Name.empty() && Name[0] == '\1') return Name.substr(1); return Name; } static std::string getGlobalIdentifier(StringRef Name, GlobalValue::LinkageTypes Linkage, StringRef FileName); std::string getGlobalIdentifier() const; using GUID = uint64_t; static GUID getGUID(StringRef GlobalName) { return MD5Hash(GlobalName); } GUID getGUID() const { return getGUID(getGlobalIdentifier()); } # 523 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalValue.h" bool isMaterializable() const; Error materialize(); bool isDeclaration() const; bool isDeclarationForLinker() const { if (hasAvailableExternallyLinkage()) return true; return isDeclaration(); } bool isStrongDefinitionForLinker() const { return !(isDeclarationForLinker() || isWeakForLinker()); } const GlobalObject *getBaseObject() const; GlobalObject *getBaseObject() { return const_cast<GlobalObject *>( static_cast<const GlobalValue *>(this)->getBaseObject()); } bool isAbsoluteSymbolRef() const; Optional<ConstantRange> getAbsoluteSymbolRange() const; void removeFromParent(); void eraseFromParent(); Module *getParent() { return Parent; } const Module *getParent() const { return Parent; } static bool classof(const Value *V) { return V->getValueID() == Value::FunctionVal || V->getValueID() == Value::GlobalVariableVal || V->getValueID() == Value::GlobalAliasVal || V->getValueID() == Value::GlobalIFuncVal; } bool canBeOmittedFromSymbolTable() const; }; } # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalObject.h" 2 namespace llvm { class Comdat; class MDNode; class Metadata; class GlobalObject : public GlobalValue { public: enum VCallVisibility { VCallVisibilityPublic = 0, VCallVisibilityLinkageUnit = 1, VCallVisibilityTranslationUnit = 2, }; protected: GlobalObject(Type *Ty, ValueTy VTy, Use *Ops, unsigned NumOps, LinkageTypes Linkage, const Twine &Name, unsigned AddressSpace = 0) : GlobalValue(Ty, VTy, Ops, NumOps, Linkage, Name, AddressSpace), ObjComdat(nullptr) { setGlobalValueSubClassData(0); } Comdat *ObjComdat; enum { LastAlignmentBit = 4, HasMetadataHashEntryBit, HasSectionHashEntryBit, GlobalObjectBits, }; static const unsigned GlobalObjectSubClassDataBits = GlobalValueSubClassDataBits - GlobalObjectBits; private: static const unsigned AlignmentBits = LastAlignmentBit + 1; static const unsigned AlignmentMask = (1 << AlignmentBits) - 1; static const unsigned GlobalObjectMask = (1 << GlobalObjectBits) - 1; public: GlobalObject(const GlobalObject &) = delete; unsigned getAlignment() const { MaybeAlign Align = getAlign(); return Align ? Align->value() : 0; } MaybeAlign getAlign() const { unsigned Data = getGlobalValueSubClassData(); unsigned AlignmentData = Data & AlignmentMask; return decodeMaybeAlign(AlignmentData); } void setAlignment(MaybeAlign Align); unsigned getGlobalObjectSubClassData() const { unsigned ValueData = getGlobalValueSubClassData(); return ValueData >> GlobalObjectBits; } void setGlobalObjectSubClassData(unsigned Val) { unsigned OldData = getGlobalValueSubClassData(); setGlobalValueSubClassData((OldData & GlobalObjectMask) | (Val << GlobalObjectBits)); (static_cast<void> (0)); } bool hasSection() const { return getGlobalValueSubClassData() & (1 << HasSectionHashEntryBit); } StringRef getSection() const { return hasSection() ? getSectionImpl() : StringRef(); } void setSection(StringRef S); bool hasComdat() const { return getComdat() != nullptr; } const Comdat *getComdat() const { return ObjComdat; } Comdat *getComdat() { return ObjComdat; } void setComdat(Comdat *C) { ObjComdat = C; } bool hasMetadata() const { return hasMetadataHashEntry(); } bool hasMetadata(unsigned KindID) const { return getMetadata(KindID) != nullptr; } bool hasMetadata(StringRef Kind) const { return getMetadata(Kind) != nullptr; } MDNode *getMetadata(unsigned KindID) const; MDNode *getMetadata(StringRef Kind) const; void getMetadata(unsigned KindID, SmallVectorImpl<MDNode *> &MDs) const; void getMetadata(StringRef Kind, SmallVectorImpl<MDNode *> &MDs) const; void setMetadata(unsigned KindID, MDNode *MD); void setMetadata(StringRef Kind, MDNode *MD); void addMetadata(unsigned KindID, MDNode &MD); void addMetadata(StringRef Kind, MDNode &MD); void getAllMetadata(SmallVectorImpl<std::pair<unsigned, MDNode *>> &MDs) const; bool eraseMetadata(unsigned KindID); void copyMetadata(const GlobalObject *Src, unsigned Offset); void addTypeMetadata(unsigned Offset, Metadata *TypeID); void setVCallVisibilityMetadata(VCallVisibility Visibility); VCallVisibility getVCallVisibility() const; bool canIncreaseAlignment() const; protected: void copyAttributesFrom(const GlobalObject *Src); public: static bool classof(const Value *V) { return V->getValueID() == Value::FunctionVal || V->getValueID() == Value::GlobalVariableVal; } void clearMetadata(); private: void setGlobalObjectFlag(unsigned Bit, bool Val) { unsigned Mask = 1 << Bit; setGlobalValueSubClassData((~Mask & getGlobalValueSubClassData()) | (Val ? Mask : 0u)); } bool hasMetadataHashEntry() const { return getGlobalValueSubClassData() & (1 << HasMetadataHashEntryBit); } void setHasMetadataHashEntry(bool HasEntry) { setGlobalObjectFlag(HasMetadataHashEntryBit, HasEntry); } StringRef getSectionImpl() const; }; } # 31 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Function.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 38 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Function.h" 2 namespace llvm { namespace Intrinsic { typedef unsigned ID; } class AssemblyAnnotationWriter; class Constant; class DISubprogram; class LLVMContext; class Module; template <typename T> class Optional; class raw_ostream; class Type; class User; class BranchProbabilityInfo; class BlockFrequencyInfo; class Function : public GlobalObject, public ilist_node<Function> { public: using BasicBlockListType = SymbolTableList<BasicBlock>; using iterator = BasicBlockListType::iterator; using const_iterator = BasicBlockListType::const_iterator; using arg_iterator = Argument *; using const_arg_iterator = const Argument *; private: BasicBlockListType BasicBlocks; mutable Argument *Arguments = nullptr; size_t NumArgs; std::unique_ptr<ValueSymbolTable> SymTab; AttributeList AttributeSets; # 94 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Function.h" enum { IsMaterializableBit = 0, }; friend class SymbolTableListTraits<Function>; public: bool hasLazyArguments() const { return getSubclassDataFromValue() & (1<<0); } private: void CheckLazyArguments() const { if (hasLazyArguments()) BuildLazyArguments(); } void BuildLazyArguments() const; void clearArguments(); Function(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace, const Twine &N = "", Module *M = nullptr); public: Function(const Function&) = delete; void operator=(const Function&) = delete; ~Function(); const Function &getFunction() const { return *this; } static Function *Create(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace, const Twine &N = "", Module *M = nullptr) { return new Function(Ty, Linkage, AddrSpace, N, M); } static Function *Create(FunctionType *Ty, LinkageTypes Linkage, const Twine &N = "", Module *M = nullptr) { return new Function(Ty, Linkage, static_cast<unsigned>(-1), N, M); } static Function *Create(FunctionType *Ty, LinkageTypes Linkage, const Twine &N, Module &M); public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; unsigned getInstructionCount() const; FunctionType *getFunctionType() const { return cast<FunctionType>(getValueType()); } Type *getReturnType() const { return getFunctionType()->getReturnType(); } LLVMContext &getContext() const; bool isVarArg() const { return getFunctionType()->isVarArg(); } bool isMaterializable() const { return getGlobalObjectSubClassData() & (1 << IsMaterializableBit); } void setIsMaterializable(bool V) { unsigned Mask = 1 << IsMaterializableBit; setGlobalObjectSubClassData((~Mask & getGlobalObjectSubClassData()) | (V ? Mask : 0u)); } Intrinsic::ID getIntrinsicID() const __attribute__((__pure__)) { return IntID; } bool isIntrinsic() const { return HasLLVMReservedName; } bool isConstrainedFPIntrinsic() const; static Intrinsic::ID lookupIntrinsicID(StringRef Name); void recalculateIntrinsicID(); CallingConv::ID getCallingConv() const { return static_cast<CallingConv::ID>((getSubclassDataFromValue() >> 4) & CallingConv::MaxID); } void setCallingConv(CallingConv::ID CC) { auto ID = static_cast<unsigned>(CC); (static_cast<void> (0)); setValueSubclassData((getSubclassDataFromValue() & 0xc00f) | (ID << 4)); } AttributeList getAttributes() const { return AttributeSets; } void setAttributes(AttributeList Attrs) { AttributeSets = Attrs; } void addFnAttr(Attribute::AttrKind Kind) { addAttribute(AttributeList::FunctionIndex, Kind); } void addFnAttr(StringRef Kind, StringRef Val = StringRef()) { addAttribute(AttributeList::FunctionIndex, Attribute::get(getContext(), Kind, Val)); } void addFnAttr(Attribute Attr) { addAttribute(AttributeList::FunctionIndex, Attr); } void removeFnAttr(Attribute::AttrKind Kind) { removeAttribute(AttributeList::FunctionIndex, Kind); } void removeFnAttr(StringRef Kind) { setAttributes(getAttributes().removeAttribute( getContext(), AttributeList::FunctionIndex, Kind)); } enum ProfileCountType { PCT_Invalid, PCT_Real, PCT_Synthetic }; class ProfileCount { private: uint64_t Count; ProfileCountType PCT; static ProfileCount Invalid; public: ProfileCount() : Count(-1), PCT(PCT_Invalid) {} ProfileCount(uint64_t Count, ProfileCountType PCT) : Count(Count), PCT(PCT) {} bool hasValue() const { return PCT != PCT_Invalid; } uint64_t getCount() const { return Count; } ProfileCountType getType() const { return PCT; } bool isSynthetic() const { return PCT == PCT_Synthetic; } explicit operator bool() { return hasValue(); } bool operator!() const { return !hasValue(); } ProfileCount &setCount(uint64_t C) { Count = C; return *this; } static ProfileCount getInvalid() { return ProfileCount(-1, PCT_Invalid); } }; void setEntryCount(ProfileCount Count, const DenseSet<GlobalValue::GUID> *Imports = nullptr); void setEntryCount(uint64_t Count, ProfileCountType Type = PCT_Real, const DenseSet<GlobalValue::GUID> *Imports = nullptr); ProfileCount getEntryCount(bool AllowSynthetic = false) const; bool hasProfileData(bool IncludeSynthetic = false) const { return getEntryCount(IncludeSynthetic).hasValue(); } DenseSet<GlobalValue::GUID> getImportGUIDs() const; void setSectionPrefix(StringRef Prefix); Optional<StringRef> getSectionPrefix() const; bool hasFnAttribute(Attribute::AttrKind Kind) const { return AttributeSets.hasFnAttribute(Kind); } bool hasFnAttribute(StringRef Kind) const { return AttributeSets.hasFnAttribute(Kind); } Attribute getFnAttribute(Attribute::AttrKind Kind) const { return getAttribute(AttributeList::FunctionIndex, Kind); } Attribute getFnAttribute(StringRef Kind) const { return getAttribute(AttributeList::FunctionIndex, Kind); } unsigned getFnStackAlignment() const { if (!hasFnAttribute(Attribute::StackAlignment)) return 0; if (const auto MA = AttributeSets.getStackAlignment(AttributeList::FunctionIndex)) return MA->value(); return 0; } MaybeAlign getFnStackAlign() const { if (!hasFnAttribute(Attribute::StackAlignment)) return None; return AttributeSets.getStackAlignment(AttributeList::FunctionIndex); } bool hasGC() const { return getSubclassDataFromValue() & (1<<14); } const std::string &getGC() const; void setGC(std::string Str); void clearGC(); void addAttribute(unsigned i, Attribute::AttrKind Kind); void addAttribute(unsigned i, Attribute Attr); void addAttributes(unsigned i, const AttrBuilder &Attrs); void addParamAttr(unsigned ArgNo, Attribute::AttrKind Kind); void addParamAttr(unsigned ArgNo, Attribute Attr); void addParamAttrs(unsigned ArgNo, const AttrBuilder &Attrs); void removeAttribute(unsigned i, Attribute::AttrKind Kind); void removeAttribute(unsigned i, StringRef Kind); void removeAttributes(unsigned i, const AttrBuilder &Attrs); void removeParamAttr(unsigned ArgNo, Attribute::AttrKind Kind); void removeParamAttr(unsigned ArgNo, StringRef Kind); void removeParamAttrs(unsigned ArgNo, const AttrBuilder &Attrs); bool hasAttribute(unsigned i, Attribute::AttrKind Kind) const { return getAttributes().hasAttribute(i, Kind); } bool hasParamAttribute(unsigned ArgNo, Attribute::AttrKind Kind) const { return getAttributes().hasParamAttribute(ArgNo, Kind); } Attribute getParamAttribute(unsigned ArgNo, Attribute::AttrKind Kind) const { return getAttributes().getParamAttr(ArgNo, Kind); } Attribute getAttribute(unsigned i, Attribute::AttrKind Kind) const { return AttributeSets.getAttribute(i, Kind); } Attribute getAttribute(unsigned i, StringRef Kind) const { return AttributeSets.getAttribute(i, Kind); } void addDereferenceableAttr(unsigned i, uint64_t Bytes); void addDereferenceableParamAttr(unsigned ArgNo, uint64_t Bytes); void addDereferenceableOrNullAttr(unsigned i, uint64_t Bytes); void addDereferenceableOrNullParamAttr(unsigned ArgNo, uint64_t Bytes); unsigned getParamAlignment(unsigned ArgNo) const { if (const auto MA = getParamAlign(ArgNo)) return MA->value(); return 0; } MaybeAlign getParamAlign(unsigned ArgNo) const { return AttributeSets.getParamAlignment(ArgNo); } Type *getParamByValType(unsigned ArgNo) const { Type *Ty = AttributeSets.getParamByValType(ArgNo); return Ty ? Ty : (arg_begin() + ArgNo)->getType()->getPointerElementType(); } uint64_t getDereferenceableBytes(unsigned i) const { return AttributeSets.getDereferenceableBytes(i); } uint64_t getParamDereferenceableBytes(unsigned ArgNo) const { return AttributeSets.getParamDereferenceableBytes(ArgNo); } uint64_t getDereferenceableOrNullBytes(unsigned i) const { return AttributeSets.getDereferenceableOrNullBytes(i); } uint64_t getParamDereferenceableOrNullBytes(unsigned ArgNo) const { return AttributeSets.getParamDereferenceableOrNullBytes(ArgNo); } bool doesNotAccessMemory() const { return hasFnAttribute(Attribute::ReadNone); } void setDoesNotAccessMemory() { addFnAttr(Attribute::ReadNone); } bool onlyReadsMemory() const { return doesNotAccessMemory() || hasFnAttribute(Attribute::ReadOnly); } void setOnlyReadsMemory() { addFnAttr(Attribute::ReadOnly); } bool doesNotReadMemory() const { return doesNotAccessMemory() || hasFnAttribute(Attribute::WriteOnly); } void setDoesNotReadMemory() { addFnAttr(Attribute::WriteOnly); } bool onlyAccessesArgMemory() const { return hasFnAttribute(Attribute::ArgMemOnly); } void setOnlyAccessesArgMemory() { addFnAttr(Attribute::ArgMemOnly); } bool onlyAccessesInaccessibleMemory() const { return hasFnAttribute(Attribute::InaccessibleMemOnly); } void setOnlyAccessesInaccessibleMemory() { addFnAttr(Attribute::InaccessibleMemOnly); } bool onlyAccessesInaccessibleMemOrArgMem() const { return hasFnAttribute(Attribute::InaccessibleMemOrArgMemOnly); } void setOnlyAccessesInaccessibleMemOrArgMem() { addFnAttr(Attribute::InaccessibleMemOrArgMemOnly); } bool doesNotReturn() const { return hasFnAttribute(Attribute::NoReturn); } void setDoesNotReturn() { addFnAttr(Attribute::NoReturn); } bool doesNoCfCheck() const { return hasFnAttribute(Attribute::NoCfCheck); } bool doesNotThrow() const { return hasFnAttribute(Attribute::NoUnwind); } void setDoesNotThrow() { addFnAttr(Attribute::NoUnwind); } bool cannotDuplicate() const { return hasFnAttribute(Attribute::NoDuplicate); } void setCannotDuplicate() { addFnAttr(Attribute::NoDuplicate); } bool isConvergent() const { return hasFnAttribute(Attribute::Convergent); } void setConvergent() { addFnAttr(Attribute::Convergent); } void setNotConvergent() { removeFnAttr(Attribute::Convergent); } bool isSpeculatable() const { return hasFnAttribute(Attribute::Speculatable); } void setSpeculatable() { addFnAttr(Attribute::Speculatable); } bool doesNotFreeMemory() const { return onlyReadsMemory() || hasFnAttribute(Attribute::NoFree); } void setDoesNotFreeMemory() { addFnAttr(Attribute::NoFree); } bool doesNotRecurse() const { return hasFnAttribute(Attribute::NoRecurse); } void setDoesNotRecurse() { addFnAttr(Attribute::NoRecurse); } bool hasUWTable() const { return hasFnAttribute(Attribute::UWTable); } void setHasUWTable() { addFnAttr(Attribute::UWTable); } bool needsUnwindTableEntry() const { return hasUWTable() || !doesNotThrow() || hasPersonalityFn(); } bool hasStructRetAttr() const { return AttributeSets.hasParamAttribute(0, Attribute::StructRet) || AttributeSets.hasParamAttribute(1, Attribute::StructRet); } bool returnDoesNotAlias() const { return AttributeSets.hasAttribute(AttributeList::ReturnIndex, Attribute::NoAlias); } void setReturnDoesNotAlias() { addAttribute(AttributeList::ReturnIndex, Attribute::NoAlias); } bool hasOptNone() const { return hasFnAttribute(Attribute::OptimizeNone); } bool hasMinSize() const { return hasFnAttribute(Attribute::MinSize); } bool hasOptSize() const { return hasFnAttribute(Attribute::OptimizeForSize) || hasMinSize(); } void copyAttributesFrom(const Function *Src); void deleteBody() { dropAllReferences(); setLinkage(ExternalLinkage); } void removeFromParent(); void eraseFromParent(); void stealArgumentListFrom(Function &Src); const BasicBlockListType &getBasicBlockList() const { return BasicBlocks; } BasicBlockListType &getBasicBlockList() { return BasicBlocks; } static BasicBlockListType Function::*getSublistAccess(BasicBlock*) { return &Function::BasicBlocks; } const BasicBlock &getEntryBlock() const { return front(); } BasicBlock &getEntryBlock() { return front(); } inline ValueSymbolTable *getValueSymbolTable() { return SymTab.get(); } inline const ValueSymbolTable *getValueSymbolTable() const { return SymTab.get(); } iterator begin() { return BasicBlocks.begin(); } const_iterator begin() const { return BasicBlocks.begin(); } iterator end () { return BasicBlocks.end(); } const_iterator end () const { return BasicBlocks.end(); } size_t size() const { return BasicBlocks.size(); } bool empty() const { return BasicBlocks.empty(); } const BasicBlock &front() const { return BasicBlocks.front(); } BasicBlock &front() { return BasicBlocks.front(); } const BasicBlock &back() const { return BasicBlocks.back(); } BasicBlock &back() { return BasicBlocks.back(); } arg_iterator arg_begin() { CheckLazyArguments(); return Arguments; } const_arg_iterator arg_begin() const { CheckLazyArguments(); return Arguments; } arg_iterator arg_end() { CheckLazyArguments(); return Arguments + NumArgs; } const_arg_iterator arg_end() const { CheckLazyArguments(); return Arguments + NumArgs; } Argument* getArg(unsigned i) const { (static_cast<void> (0)); CheckLazyArguments(); return Arguments + i; } iterator_range<arg_iterator> args() { return make_range(arg_begin(), arg_end()); } iterator_range<const_arg_iterator> args() const { return make_range(arg_begin(), arg_end()); } size_t arg_size() const { return NumArgs; } bool arg_empty() const { return arg_size() == 0; } bool hasPersonalityFn() const { return getSubclassDataFromValue() & (1<<3); } Constant *getPersonalityFn() const; void setPersonalityFn(Constant *Fn); bool hasPrefixData() const { return getSubclassDataFromValue() & (1<<1); } Constant *getPrefixData() const; void setPrefixData(Constant *PrefixData); bool hasPrologueData() const { return getSubclassDataFromValue() & (1<<2); } Constant *getPrologueData() const; void setPrologueData(Constant *PrologueData); void print(raw_ostream &OS, AssemblyAnnotationWriter *AAW = nullptr, bool ShouldPreserveUseListOrder = false, bool IsForDebug = false) const; void viewCFG() const; void viewCFG(bool ViewCFGOnly, const BlockFrequencyInfo *BFI, const BranchProbabilityInfo *BPI) const; void viewCFGOnly() const; void viewCFGOnly(const BlockFrequencyInfo *BFI, const BranchProbabilityInfo *BPI) const; static bool classof(const Value *V) { return V->getValueID() == Value::FunctionVal; } # 829 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Function.h" void dropAllReferences(); bool hasAddressTaken(const User ** = nullptr, bool IgnoreCallbackUses = false) const; bool isDefTriviallyDead() const; bool callsFunctionThatReturnsTwice() const; void setSubprogram(DISubprogram *SP); DISubprogram *getSubprogram() const; bool isDebugInfoForProfiling() const; bool nullPointerIsDefined() const; private: void allocHungoffUselist(); template<int Idx> void setHungoffOperand(Constant *C); void setValueSubclassData(unsigned short D) { Value::setValueSubclassData(D); } void setValueSubclassDataBit(unsigned Bit, bool On); }; bool NullPointerIsDefined(const Function *F, unsigned AS = 0); template <> struct OperandTraits<Function> : public HungoffOperandTraits<3> {}; Function::op_iterator Function::op_begin() { return OperandTraits<Function>::op_begin(this); } Function::const_op_iterator Function::op_begin() const { return OperandTraits<Function>::op_begin(const_cast<Function*>(this)); } Function::op_iterator Function::op_end() { return OperandTraits<Function>::op_end(this); } Function::const_op_iterator Function::op_end() const { return OperandTraits<Function>::op_end(const_cast<Function*>(this)); } Value *Function::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<Function>::op_begin(const_cast<Function*>(this))[i_nocapture].get()); } void Function::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<Function>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned Function::getNumOperands() const { return OperandTraits<Function>::operands(this); } template <int Idx_nocapture> Use &Function::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &Function::Op() const { return this->OpFrom<Idx_nocapture>(this); } } # 24 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalAlias.h" 1 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalAlias.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalIndirectSymbol.h" 1 # 26 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalIndirectSymbol.h" namespace llvm { class GlobalIndirectSymbol : public GlobalValue { protected: GlobalIndirectSymbol(Type *Ty, ValueTy VTy, unsigned AddressSpace, LinkageTypes Linkage, const Twine &Name, Constant *Symbol); public: GlobalIndirectSymbol(const GlobalIndirectSymbol &) = delete; GlobalIndirectSymbol &operator=(const GlobalIndirectSymbol &) = delete; void *operator new(size_t s) { return User::operator new(s, 1); } public: inline Constant *getOperand(unsigned) const; inline void setOperand(unsigned, Constant*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; void copyAttributesFrom(const GlobalValue *Src) { GlobalValue::copyAttributesFrom(Src); } void setIndirectSymbol(Constant *Symbol) { setOperand(0, Symbol); } const Constant *getIndirectSymbol() const { return getOperand(0); } Constant *getIndirectSymbol() { return const_cast<Constant *>( static_cast<const GlobalIndirectSymbol *>(this)->getIndirectSymbol()); } const GlobalObject *getBaseObject() const; GlobalObject *getBaseObject() { return const_cast<GlobalObject *>( static_cast<const GlobalIndirectSymbol *>(this)->getBaseObject()); } const GlobalObject *getBaseObject(const DataLayout &DL, APInt &Offset) const { return dyn_cast<GlobalObject>( getIndirectSymbol()->stripAndAccumulateInBoundsConstantOffsets(DL, Offset)); } GlobalObject *getBaseObject(const DataLayout &DL, APInt &Offset) { return const_cast<GlobalObject *>( static_cast<const GlobalIndirectSymbol *>(this) ->getBaseObject(DL, Offset)); } static bool classof(const Value *V) { return V->getValueID() == Value::GlobalAliasVal || V->getValueID() == Value::GlobalIFuncVal; } }; template <> struct OperandTraits<GlobalIndirectSymbol> : public FixedNumOperandTraits<GlobalIndirectSymbol, 1> { }; GlobalIndirectSymbol::op_iterator GlobalIndirectSymbol::op_begin() { return OperandTraits<GlobalIndirectSymbol>::op_begin(this); } GlobalIndirectSymbol::const_op_iterator GlobalIndirectSymbol::op_begin() const { return OperandTraits<GlobalIndirectSymbol>::op_begin(const_cast<GlobalIndirectSymbol*>(this)); } GlobalIndirectSymbol::op_iterator GlobalIndirectSymbol::op_end() { return OperandTraits<GlobalIndirectSymbol>::op_end(this); } GlobalIndirectSymbol::const_op_iterator GlobalIndirectSymbol::op_end() const { return OperandTraits<GlobalIndirectSymbol>::op_end(const_cast<GlobalIndirectSymbol*>(this)); } Constant *GlobalIndirectSymbol::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Constant>( OperandTraits<GlobalIndirectSymbol>::op_begin(const_cast<GlobalIndirectSymbol*>(this))[i_nocapture].get()); } void GlobalIndirectSymbol::setOperand(unsigned i_nocapture, Constant *Val_nocapture) { (static_cast<void> (0)); OperandTraits<GlobalIndirectSymbol>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned GlobalIndirectSymbol::getNumOperands() const { return OperandTraits<GlobalIndirectSymbol>::operands(this); } template <int Idx_nocapture> Use &GlobalIndirectSymbol::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &GlobalIndirectSymbol::Op() const { return this->OpFrom<Idx_nocapture>(this); } } # 19 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalAlias.h" 2 namespace llvm { class Twine; class Module; template <typename ValueSubClass> class SymbolTableListTraits; class GlobalAlias : public GlobalIndirectSymbol, public ilist_node<GlobalAlias> { friend class SymbolTableListTraits<GlobalAlias>; GlobalAlias(Type *Ty, unsigned AddressSpace, LinkageTypes Linkage, const Twine &Name, Constant *Aliasee, Module *Parent); public: GlobalAlias(const GlobalAlias &) = delete; GlobalAlias &operator=(const GlobalAlias &) = delete; static GlobalAlias *create(Type *Ty, unsigned AddressSpace, LinkageTypes Linkage, const Twine &Name, Constant *Aliasee, Module *Parent); static GlobalAlias *create(Type *Ty, unsigned AddressSpace, LinkageTypes Linkage, const Twine &Name, Module *Parent); static GlobalAlias *create(Type *Ty, unsigned AddressSpace, LinkageTypes Linkage, const Twine &Name, GlobalValue *Aliasee); static GlobalAlias *create(LinkageTypes Linkage, const Twine &Name, GlobalValue *Aliasee); static GlobalAlias *create(const Twine &Name, GlobalValue *Aliasee); void removeFromParent(); void eraseFromParent(); void setAliasee(Constant *Aliasee); const Constant *getAliasee() const { return getIndirectSymbol(); } Constant *getAliasee() { return getIndirectSymbol(); } static bool isValidLinkage(LinkageTypes L) { return isExternalLinkage(L) || isLocalLinkage(L) || isWeakLinkage(L) || isLinkOnceLinkage(L); } static bool classof(const Value *V) { return V->getValueID() == Value::GlobalAliasVal; } }; } # 25 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalIFunc.h" 1 # 24 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalIFunc.h" namespace llvm { class Twine; class Module; template <typename ValueSubClass> class SymbolTableListTraits; class GlobalIFunc final : public GlobalIndirectSymbol, public ilist_node<GlobalIFunc> { friend class SymbolTableListTraits<GlobalIFunc>; GlobalIFunc(Type *Ty, unsigned AddressSpace, LinkageTypes Linkage, const Twine &Name, Constant *Resolver, Module *Parent); public: GlobalIFunc(const GlobalIFunc &) = delete; GlobalIFunc &operator=(const GlobalIFunc &) = delete; static GlobalIFunc *create(Type *Ty, unsigned AddressSpace, LinkageTypes Linkage, const Twine &Name, Constant *Resolver, Module *Parent); void removeFromParent(); void eraseFromParent(); void setResolver(Constant *Resolver) { setIndirectSymbol(Resolver); } const Constant *getResolver() const { return getIndirectSymbol(); } Constant *getResolver() { return getIndirectSymbol(); } static bool classof(const Value *V) { return V->getValueID() == Value::GlobalIFuncVal; } }; } # 26 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalVariable.h" 1 # 28 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalVariable.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 29 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalVariable.h" 2 namespace llvm { class Constant; class Module; template <typename ValueSubClass> class SymbolTableListTraits; class DIGlobalVariable; class DIGlobalVariableExpression; class GlobalVariable : public GlobalObject, public ilist_node<GlobalVariable> { friend class SymbolTableListTraits<GlobalVariable>; AttributeSet Attrs; bool isConstantGlobal : 1; bool isExternallyInitializedConstant : 1; public: GlobalVariable(Type *Ty, bool isConstant, LinkageTypes Linkage, Constant *Initializer = nullptr, const Twine &Name = "", ThreadLocalMode = NotThreadLocal, unsigned AddressSpace = 0, bool isExternallyInitialized = false); GlobalVariable(Module &M, Type *Ty, bool isConstant, LinkageTypes Linkage, Constant *Initializer, const Twine &Name = "", GlobalVariable *InsertBefore = nullptr, ThreadLocalMode = NotThreadLocal, unsigned AddressSpace = 0, bool isExternallyInitialized = false); GlobalVariable(const GlobalVariable &) = delete; GlobalVariable &operator=(const GlobalVariable &) = delete; ~GlobalVariable() { dropAllReferences(); } void *operator new(size_t s) { return User::operator new(s, 1); } void operator delete(void *ptr){ (static_cast<void> (0)); User *Obj = static_cast<User *>(ptr); Obj->setGlobalVariableNumOperands(1); User::operator delete(Obj); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; inline bool hasInitializer() const { return !isDeclaration(); } # 109 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/GlobalVariable.h" inline bool hasDefinitiveInitializer() const { return hasInitializer() && !isInterposable() && !isExternallyInitialized(); } inline bool hasUniqueInitializer() const { return isStrongDefinitionForLinker() && !isExternallyInitialized(); } inline const Constant *getInitializer() const { (static_cast<void> (0)); return static_cast<Constant*>(Op<0>().get()); } inline Constant *getInitializer() { (static_cast<void> (0)); return static_cast<Constant*>(Op<0>().get()); } void setInitializer(Constant *InitVal); bool isConstant() const { return isConstantGlobal; } void setConstant(bool Val) { isConstantGlobal = Val; } bool isExternallyInitialized() const { return isExternallyInitializedConstant; } void setExternallyInitialized(bool Val) { isExternallyInitializedConstant = Val; } void copyAttributesFrom(const GlobalVariable *Src); void removeFromParent(); void eraseFromParent(); void dropAllReferences(); void addDebugInfo(DIGlobalVariableExpression *GV); void getDebugInfo(SmallVectorImpl<DIGlobalVariableExpression *> &GVs) const; void addAttribute(Attribute::AttrKind Kind) { Attrs = Attrs.addAttribute(getContext(), Kind); } void addAttribute(StringRef Kind, StringRef Val = StringRef()) { Attrs = Attrs.addAttribute(getContext(), Kind, Val); } bool hasAttribute(Attribute::AttrKind Kind) const { return Attrs.hasAttribute(Kind); } bool hasAttribute(StringRef Kind) const { return Attrs.hasAttribute(Kind); } bool hasAttributes() const { return Attrs.hasAttributes(); } Attribute getAttribute(Attribute::AttrKind Kind) const { return Attrs.getAttribute(Kind); } Attribute getAttribute(StringRef Kind) const { return Attrs.getAttribute(Kind); } AttributeSet getAttributes() const { return Attrs; } AttributeList getAttributesAsList(unsigned index) const { if (!hasAttributes()) return AttributeList(); std::pair<unsigned, AttributeSet> AS[1] = {{index, Attrs}}; return AttributeList::get(getContext(), AS); } void setAttributes(AttributeSet A) { Attrs = A; } bool hasImplicitSection() const { return getAttributes().hasAttribute("bss-section") || getAttributes().hasAttribute("data-section") || getAttributes().hasAttribute("relro-section") || getAttributes().hasAttribute("rodata-section"); } static bool classof(const Value *V) { return V->getValueID() == Value::GlobalVariableVal; } }; template <> struct OperandTraits<GlobalVariable> : public OptionalOperandTraits<GlobalVariable> { }; GlobalVariable::op_iterator GlobalVariable::op_begin() { return OperandTraits<GlobalVariable>::op_begin(this); } GlobalVariable::const_op_iterator GlobalVariable::op_begin() const { return OperandTraits<GlobalVariable>::op_begin(const_cast<GlobalVariable*>(this)); } GlobalVariable::op_iterator GlobalVariable::op_end() { return OperandTraits<GlobalVariable>::op_end(this); } GlobalVariable::const_op_iterator GlobalVariable::op_end() const { return OperandTraits<GlobalVariable>::op_end(const_cast<GlobalVariable*>(this)); } Value *GlobalVariable::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<GlobalVariable>::op_begin(const_cast<GlobalVariable*>(this))[i_nocapture].get()); } void GlobalVariable::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<GlobalVariable>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned GlobalVariable::getNumOperands() const { return OperandTraits<GlobalVariable>::operands(this); } template <int Idx_nocapture> Use &GlobalVariable::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &GlobalVariable::Op() const { return this->OpFrom<Idx_nocapture>(this); } } # 29 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" 1 # 33 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" 1 # 40 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 41 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" 2 namespace llvm { namespace Intrinsic { typedef unsigned ID; } class UnaryInstruction : public Instruction { protected: UnaryInstruction(Type *Ty, unsigned iType, Value *V, Instruction *IB = nullptr) : Instruction(Ty, iType, &Op<0>(), 1, IB) { Op<0>() = V; } UnaryInstruction(Type *Ty, unsigned iType, Value *V, BasicBlock *IAE) : Instruction(Ty, iType, &Op<0>(), 1, IAE) { Op<0>() = V; } public: void *operator new(size_t s) { return User::operator new(s, 1); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; static bool classof(const Instruction *I) { return I->isUnaryOp() || I->getOpcode() == Instruction::Alloca || I->getOpcode() == Instruction::Load || I->getOpcode() == Instruction::VAArg || I->getOpcode() == Instruction::ExtractValue || (I->getOpcode() >= CastOpsBegin && I->getOpcode() < CastOpsEnd); } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; template <> struct OperandTraits<UnaryInstruction> : public FixedNumOperandTraits<UnaryInstruction, 1> { }; UnaryInstruction::op_iterator UnaryInstruction::op_begin() { return OperandTraits<UnaryInstruction>::op_begin(this); } UnaryInstruction::const_op_iterator UnaryInstruction::op_begin() const { return OperandTraits<UnaryInstruction>::op_begin(const_cast<UnaryInstruction*>(this)); } UnaryInstruction::op_iterator UnaryInstruction::op_end() { return OperandTraits<UnaryInstruction>::op_end(this); } UnaryInstruction::const_op_iterator UnaryInstruction::op_end() const { return OperandTraits<UnaryInstruction>::op_end(const_cast<UnaryInstruction*>(this)); } Value *UnaryInstruction::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<UnaryInstruction>::op_begin(const_cast<UnaryInstruction*>(this))[i_nocapture].get()); } void UnaryInstruction::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<UnaryInstruction>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned UnaryInstruction::getNumOperands() const { return OperandTraits<UnaryInstruction>::operands(this); } template <int Idx_nocapture> Use &UnaryInstruction::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &UnaryInstruction::Op() const { return this->OpFrom<Idx_nocapture>(this); } class UnaryOperator : public UnaryInstruction { void AssertOK(); protected: UnaryOperator(UnaryOps iType, Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore); UnaryOperator(UnaryOps iType, Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd); friend class Instruction; UnaryOperator *cloneImpl() const; public: static UnaryOperator *Create(UnaryOps Op, Value *S, const Twine &Name = Twine(), Instruction *InsertBefore = nullptr); static UnaryOperator *Create(UnaryOps Op, Value *S, const Twine &Name, BasicBlock *InsertAtEnd); # 143 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" 1 # 142 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" static UnaryOperator *CreateFNeg(Value *V, const Twine &Name = "") { return Create(Instruction::FNeg, V, Name); } # 144 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" 1 # 142 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" static UnaryOperator *CreateFNeg(Value *V, const Twine &Name, BasicBlock *BB) { return Create(Instruction::FNeg, V, Name, BB); } # 150 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" 1 # 142 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" static UnaryOperator *CreateFNeg(Value *V, const Twine &Name, Instruction *I) { return Create(Instruction::FNeg, V, Name, I); } # 156 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" 2 static UnaryOperator * CreateWithCopiedFlags(UnaryOps Opc, Value *V, Instruction *CopyO, const Twine &Name = "", Instruction *InsertBefore = nullptr) { UnaryOperator *UO = Create(Opc, V, Name, InsertBefore); UO->copyIRFlags(CopyO); return UO; } static UnaryOperator *CreateFNegFMF(Value *Op, Instruction *FMFSource, const Twine &Name = "", Instruction *InsertBefore = nullptr) { return CreateWithCopiedFlags(Instruction::FNeg, Op, FMFSource, Name, InsertBefore); } UnaryOps getOpcode() const { return static_cast<UnaryOps>(Instruction::getOpcode()); } static bool classof(const Instruction *I) { return I->isUnaryOp(); } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class BinaryOperator : public Instruction { void AssertOK(); protected: BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty, const Twine &Name, Instruction *InsertBefore); BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd); friend class Instruction; BinaryOperator *cloneImpl() const; public: void *operator new(size_t s) { return User::operator new(s, 2); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2, const Twine &Name = Twine(), Instruction *InsertBefore = nullptr); static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2, const Twine &Name, BasicBlock *InsertAtEnd); # 237 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" 1 # 147 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" static BinaryOperator *CreateAdd(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::Add, V1, V2, Name); } static BinaryOperator *CreateFAdd(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::FAdd, V1, V2, Name); } static BinaryOperator *CreateSub(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::Sub, V1, V2, Name); } static BinaryOperator *CreateFSub(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::FSub, V1, V2, Name); } static BinaryOperator *CreateMul(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::Mul, V1, V2, Name); } static BinaryOperator *CreateFMul(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::FMul, V1, V2, Name); } static BinaryOperator *CreateUDiv(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::UDiv, V1, V2, Name); } static BinaryOperator *CreateSDiv(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::SDiv, V1, V2, Name); } static BinaryOperator *CreateFDiv(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::FDiv, V1, V2, Name); } static BinaryOperator *CreateURem(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::URem, V1, V2, Name); } static BinaryOperator *CreateSRem(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::SRem, V1, V2, Name); } static BinaryOperator *CreateFRem(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::FRem, V1, V2, Name); } static BinaryOperator *CreateShl(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::Shl, V1, V2, Name); } static BinaryOperator *CreateLShr(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::LShr, V1, V2, Name); } static BinaryOperator *CreateAShr(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::AShr, V1, V2, Name); } static BinaryOperator *CreateAnd(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::And, V1, V2, Name); } static BinaryOperator *CreateOr(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::Or, V1, V2, Name); } static BinaryOperator *CreateXor(Value *V1, Value *V2, const Twine &Name = "") { return Create(Instruction::Xor, V1, V2, Name); } # 238 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" 1 # 147 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" static BinaryOperator *CreateAdd(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::Add, V1, V2, Name, BB); } static BinaryOperator *CreateFAdd(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::FAdd, V1, V2, Name, BB); } static BinaryOperator *CreateSub(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::Sub, V1, V2, Name, BB); } static BinaryOperator *CreateFSub(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::FSub, V1, V2, Name, BB); } static BinaryOperator *CreateMul(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::Mul, V1, V2, Name, BB); } static BinaryOperator *CreateFMul(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::FMul, V1, V2, Name, BB); } static BinaryOperator *CreateUDiv(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::UDiv, V1, V2, Name, BB); } static BinaryOperator *CreateSDiv(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::SDiv, V1, V2, Name, BB); } static BinaryOperator *CreateFDiv(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::FDiv, V1, V2, Name, BB); } static BinaryOperator *CreateURem(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::URem, V1, V2, Name, BB); } static BinaryOperator *CreateSRem(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::SRem, V1, V2, Name, BB); } static BinaryOperator *CreateFRem(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::FRem, V1, V2, Name, BB); } static BinaryOperator *CreateShl(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::Shl, V1, V2, Name, BB); } static BinaryOperator *CreateLShr(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::LShr, V1, V2, Name, BB); } static BinaryOperator *CreateAShr(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::AShr, V1, V2, Name, BB); } static BinaryOperator *CreateAnd(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::And, V1, V2, Name, BB); } static BinaryOperator *CreateOr(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::Or, V1, V2, Name, BB); } static BinaryOperator *CreateXor(Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return Create(Instruction::Xor, V1, V2, Name, BB); } # 244 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" 1 # 147 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instruction.def" static BinaryOperator *CreateAdd(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::Add, V1, V2, Name, I); } static BinaryOperator *CreateFAdd(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::FAdd, V1, V2, Name, I); } static BinaryOperator *CreateSub(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::Sub, V1, V2, Name, I); } static BinaryOperator *CreateFSub(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::FSub, V1, V2, Name, I); } static BinaryOperator *CreateMul(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::Mul, V1, V2, Name, I); } static BinaryOperator *CreateFMul(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::FMul, V1, V2, Name, I); } static BinaryOperator *CreateUDiv(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::UDiv, V1, V2, Name, I); } static BinaryOperator *CreateSDiv(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::SDiv, V1, V2, Name, I); } static BinaryOperator *CreateFDiv(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::FDiv, V1, V2, Name, I); } static BinaryOperator *CreateURem(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::URem, V1, V2, Name, I); } static BinaryOperator *CreateSRem(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::SRem, V1, V2, Name, I); } static BinaryOperator *CreateFRem(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::FRem, V1, V2, Name, I); } static BinaryOperator *CreateShl(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::Shl, V1, V2, Name, I); } static BinaryOperator *CreateLShr(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::LShr, V1, V2, Name, I); } static BinaryOperator *CreateAShr(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::AShr, V1, V2, Name, I); } static BinaryOperator *CreateAnd(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::And, V1, V2, Name, I); } static BinaryOperator *CreateOr(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::Or, V1, V2, Name, I); } static BinaryOperator *CreateXor(Value *V1, Value *V2, const Twine &Name, Instruction *I) { return Create(Instruction::Xor, V1, V2, Name, I); } # 250 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" 2 static BinaryOperator *CreateWithCopiedFlags(BinaryOps Opc, Value *V1, Value *V2, Instruction *CopyO, const Twine &Name = "") { BinaryOperator *BO = Create(Opc, V1, V2, Name); BO->copyIRFlags(CopyO); return BO; } static BinaryOperator *CreateFAddFMF(Value *V1, Value *V2, Instruction *FMFSource, const Twine &Name = "") { return CreateWithCopiedFlags(Instruction::FAdd, V1, V2, FMFSource, Name); } static BinaryOperator *CreateFSubFMF(Value *V1, Value *V2, Instruction *FMFSource, const Twine &Name = "") { return CreateWithCopiedFlags(Instruction::FSub, V1, V2, FMFSource, Name); } static BinaryOperator *CreateFMulFMF(Value *V1, Value *V2, Instruction *FMFSource, const Twine &Name = "") { return CreateWithCopiedFlags(Instruction::FMul, V1, V2, FMFSource, Name); } static BinaryOperator *CreateFDivFMF(Value *V1, Value *V2, Instruction *FMFSource, const Twine &Name = "") { return CreateWithCopiedFlags(Instruction::FDiv, V1, V2, FMFSource, Name); } static BinaryOperator *CreateFRemFMF(Value *V1, Value *V2, Instruction *FMFSource, const Twine &Name = "") { return CreateWithCopiedFlags(Instruction::FRem, V1, V2, FMFSource, Name); } static BinaryOperator *CreateNSW(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name = "") { BinaryOperator *BO = Create(Opc, V1, V2, Name); BO->setHasNoSignedWrap(true); return BO; } static BinaryOperator *CreateNSW(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { BinaryOperator *BO = Create(Opc, V1, V2, Name, BB); BO->setHasNoSignedWrap(true); return BO; } static BinaryOperator *CreateNSW(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, Instruction *I) { BinaryOperator *BO = Create(Opc, V1, V2, Name, I); BO->setHasNoSignedWrap(true); return BO; } static BinaryOperator *CreateNUW(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name = "") { BinaryOperator *BO = Create(Opc, V1, V2, Name); BO->setHasNoUnsignedWrap(true); return BO; } static BinaryOperator *CreateNUW(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { BinaryOperator *BO = Create(Opc, V1, V2, Name, BB); BO->setHasNoUnsignedWrap(true); return BO; } static BinaryOperator *CreateNUW(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, Instruction *I) { BinaryOperator *BO = Create(Opc, V1, V2, Name, I); BO->setHasNoUnsignedWrap(true); return BO; } static BinaryOperator *CreateExact(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name = "") { BinaryOperator *BO = Create(Opc, V1, V2, Name); BO->setIsExact(true); return BO; } static BinaryOperator *CreateExact(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { BinaryOperator *BO = Create(Opc, V1, V2, Name, BB); BO->setIsExact(true); return BO; } static BinaryOperator *CreateExact(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, Instruction *I) { BinaryOperator *BO = Create(Opc, V1, V2, Name, I); BO->setIsExact(true); return BO; } # 357 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" static BinaryOperator *CreateNSWAdd(Value *V1, Value *V2, const Twine &Name = "") { return CreateNSW(Instruction::Add, V1, V2, Name); } static BinaryOperator *CreateNSWAdd( Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return CreateNSW(Instruction::Add, V1, V2, Name, BB); } static BinaryOperator *CreateNSWAdd( Value *V1, Value *V2, const Twine &Name, Instruction *I) { return CreateNSW(Instruction::Add, V1, V2, Name, I); } static BinaryOperator *CreateNUWAdd(Value *V1, Value *V2, const Twine &Name = "") { return CreateNUW(Instruction::Add, V1, V2, Name); } static BinaryOperator *CreateNUWAdd( Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return CreateNUW(Instruction::Add, V1, V2, Name, BB); } static BinaryOperator *CreateNUWAdd( Value *V1, Value *V2, const Twine &Name, Instruction *I) { return CreateNUW(Instruction::Add, V1, V2, Name, I); } static BinaryOperator *CreateNSWSub(Value *V1, Value *V2, const Twine &Name = "") { return CreateNSW(Instruction::Sub, V1, V2, Name); } static BinaryOperator *CreateNSWSub( Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return CreateNSW(Instruction::Sub, V1, V2, Name, BB); } static BinaryOperator *CreateNSWSub( Value *V1, Value *V2, const Twine &Name, Instruction *I) { return CreateNSW(Instruction::Sub, V1, V2, Name, I); } static BinaryOperator *CreateNUWSub(Value *V1, Value *V2, const Twine &Name = "") { return CreateNUW(Instruction::Sub, V1, V2, Name); } static BinaryOperator *CreateNUWSub( Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return CreateNUW(Instruction::Sub, V1, V2, Name, BB); } static BinaryOperator *CreateNUWSub( Value *V1, Value *V2, const Twine &Name, Instruction *I) { return CreateNUW(Instruction::Sub, V1, V2, Name, I); } static BinaryOperator *CreateNSWMul(Value *V1, Value *V2, const Twine &Name = "") { return CreateNSW(Instruction::Mul, V1, V2, Name); } static BinaryOperator *CreateNSWMul( Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return CreateNSW(Instruction::Mul, V1, V2, Name, BB); } static BinaryOperator *CreateNSWMul( Value *V1, Value *V2, const Twine &Name, Instruction *I) { return CreateNSW(Instruction::Mul, V1, V2, Name, I); } static BinaryOperator *CreateNUWMul(Value *V1, Value *V2, const Twine &Name = "") { return CreateNUW(Instruction::Mul, V1, V2, Name); } static BinaryOperator *CreateNUWMul( Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return CreateNUW(Instruction::Mul, V1, V2, Name, BB); } static BinaryOperator *CreateNUWMul( Value *V1, Value *V2, const Twine &Name, Instruction *I) { return CreateNUW(Instruction::Mul, V1, V2, Name, I); } static BinaryOperator *CreateNSWShl(Value *V1, Value *V2, const Twine &Name = "") { return CreateNSW(Instruction::Shl, V1, V2, Name); } static BinaryOperator *CreateNSWShl( Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return CreateNSW(Instruction::Shl, V1, V2, Name, BB); } static BinaryOperator *CreateNSWShl( Value *V1, Value *V2, const Twine &Name, Instruction *I) { return CreateNSW(Instruction::Shl, V1, V2, Name, I); } static BinaryOperator *CreateNUWShl(Value *V1, Value *V2, const Twine &Name = "") { return CreateNUW(Instruction::Shl, V1, V2, Name); } static BinaryOperator *CreateNUWShl( Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return CreateNUW(Instruction::Shl, V1, V2, Name, BB); } static BinaryOperator *CreateNUWShl( Value *V1, Value *V2, const Twine &Name, Instruction *I) { return CreateNUW(Instruction::Shl, V1, V2, Name, I); } static BinaryOperator *CreateExactSDiv(Value *V1, Value *V2, const Twine &Name = "") { return CreateExact(Instruction::SDiv, V1, V2, Name); } static BinaryOperator *CreateExactSDiv( Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return CreateExact(Instruction::SDiv, V1, V2, Name, BB); } static BinaryOperator *CreateExactSDiv( Value *V1, Value *V2, const Twine &Name, Instruction *I) { return CreateExact(Instruction::SDiv, V1, V2, Name, I); } static BinaryOperator *CreateExactUDiv(Value *V1, Value *V2, const Twine &Name = "") { return CreateExact(Instruction::UDiv, V1, V2, Name); } static BinaryOperator *CreateExactUDiv( Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return CreateExact(Instruction::UDiv, V1, V2, Name, BB); } static BinaryOperator *CreateExactUDiv( Value *V1, Value *V2, const Twine &Name, Instruction *I) { return CreateExact(Instruction::UDiv, V1, V2, Name, I); } static BinaryOperator *CreateExactAShr(Value *V1, Value *V2, const Twine &Name = "") { return CreateExact(Instruction::AShr, V1, V2, Name); } static BinaryOperator *CreateExactAShr( Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return CreateExact(Instruction::AShr, V1, V2, Name, BB); } static BinaryOperator *CreateExactAShr( Value *V1, Value *V2, const Twine &Name, Instruction *I) { return CreateExact(Instruction::AShr, V1, V2, Name, I); } static BinaryOperator *CreateExactLShr(Value *V1, Value *V2, const Twine &Name = "") { return CreateExact(Instruction::LShr, V1, V2, Name); } static BinaryOperator *CreateExactLShr( Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { return CreateExact(Instruction::LShr, V1, V2, Name, BB); } static BinaryOperator *CreateExactLShr( Value *V1, Value *V2, const Twine &Name, Instruction *I) { return CreateExact(Instruction::LShr, V1, V2, Name, I); } # 378 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" static BinaryOperator *CreateNeg(Value *Op, const Twine &Name = "", Instruction *InsertBefore = nullptr); static BinaryOperator *CreateNeg(Value *Op, const Twine &Name, BasicBlock *InsertAtEnd); static BinaryOperator *CreateNSWNeg(Value *Op, const Twine &Name = "", Instruction *InsertBefore = nullptr); static BinaryOperator *CreateNSWNeg(Value *Op, const Twine &Name, BasicBlock *InsertAtEnd); static BinaryOperator *CreateNUWNeg(Value *Op, const Twine &Name = "", Instruction *InsertBefore = nullptr); static BinaryOperator *CreateNUWNeg(Value *Op, const Twine &Name, BasicBlock *InsertAtEnd); static BinaryOperator *CreateNot(Value *Op, const Twine &Name = "", Instruction *InsertBefore = nullptr); static BinaryOperator *CreateNot(Value *Op, const Twine &Name, BasicBlock *InsertAtEnd); BinaryOps getOpcode() const { return static_cast<BinaryOps>(Instruction::getOpcode()); } bool swapOperands(); static bool classof(const Instruction *I) { return I->isBinaryOp(); } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; template <> struct OperandTraits<BinaryOperator> : public FixedNumOperandTraits<BinaryOperator, 2> { }; BinaryOperator::op_iterator BinaryOperator::op_begin() { return OperandTraits<BinaryOperator>::op_begin(this); } BinaryOperator::const_op_iterator BinaryOperator::op_begin() const { return OperandTraits<BinaryOperator>::op_begin(const_cast<BinaryOperator*>(this)); } BinaryOperator::op_iterator BinaryOperator::op_end() { return OperandTraits<BinaryOperator>::op_end(this); } BinaryOperator::const_op_iterator BinaryOperator::op_end() const { return OperandTraits<BinaryOperator>::op_end(const_cast<BinaryOperator*>(this)); } Value *BinaryOperator::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<BinaryOperator>::op_begin(const_cast<BinaryOperator*>(this))[i_nocapture].get()); } void BinaryOperator::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<BinaryOperator>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned BinaryOperator::getNumOperands() const { return OperandTraits<BinaryOperator>::operands(this); } template <int Idx_nocapture> Use &BinaryOperator::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &BinaryOperator::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 432 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" class CastInst : public UnaryInstruction { protected: CastInst(Type *Ty, unsigned iType, Value *S, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) : UnaryInstruction(Ty, iType, S, InsertBefore) { setName(NameStr); } CastInst(Type *Ty, unsigned iType, Value *S, const Twine &NameStr, BasicBlock *InsertAtEnd) : UnaryInstruction(Ty, iType, S, InsertAtEnd) { setName(NameStr); } public: static CastInst *Create( Instruction::CastOps, Value *S, Type *Ty, const Twine &Name = "", Instruction *InsertBefore = nullptr ); static CastInst *Create( Instruction::CastOps, Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd ); static CastInst *CreateZExtOrBitCast( Value *S, Type *Ty, const Twine &Name = "", Instruction *InsertBefore = nullptr ); static CastInst *CreateZExtOrBitCast( Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd ); static CastInst *CreateSExtOrBitCast( Value *S, Type *Ty, const Twine &Name = "", Instruction *InsertBefore = nullptr ); static CastInst *CreateSExtOrBitCast( Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd ); static CastInst *CreatePointerCast( Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd ); static CastInst *CreatePointerCast( Value *S, Type *Ty, const Twine &Name = "", Instruction *InsertBefore = nullptr ); static CastInst *CreatePointerBitCastOrAddrSpaceCast( Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd ); static CastInst *CreatePointerBitCastOrAddrSpaceCast( Value *S, Type *Ty, const Twine &Name = "", Instruction *InsertBefore = nullptr ); static CastInst *CreateBitOrPointerCast( Value *S, Type *Ty, const Twine &Name = "", Instruction *InsertBefore = nullptr ); static CastInst *CreateIntegerCast( Value *S, Type *Ty, bool isSigned, const Twine &Name = "", Instruction *InsertBefore = nullptr ); static CastInst *CreateIntegerCast( Value *S, Type *Ty, bool isSigned, const Twine &Name, BasicBlock *InsertAtEnd ); static CastInst *CreateFPCast( Value *S, Type *Ty, const Twine &Name = "", Instruction *InsertBefore = nullptr ); static CastInst *CreateFPCast( Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd ); static CastInst *CreateTruncOrBitCast( Value *S, Type *Ty, const Twine &Name = "", Instruction *InsertBefore = nullptr ); static CastInst *CreateTruncOrBitCast( Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd ); static bool isCastable( Type *SrcTy, Type *DestTy ); static bool isBitCastable( Type *SrcTy, Type *DestTy ); static bool isBitOrNoopPointerCastable( Type *SrcTy, Type *DestTy, const DataLayout &DL); static Instruction::CastOps getCastOpcode( const Value *Val, bool SrcIsSigned, Type *Ty, bool DstIsSigned ); bool isIntegerCast() const; bool isLosslessCast() const; # 655 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" static bool isNoopCast( Instruction::CastOps Opcode, Type *SrcTy, Type *DstTy, const DataLayout &DL ); bool isNoopCast(const DataLayout &DL) const; static unsigned isEliminableCastPair( Instruction::CastOps firstOpcode, Instruction::CastOps secondOpcode, Type *SrcTy, Type *MidTy, Type *DstTy, Type *SrcIntPtrTy, Type *MidIntPtrTy, Type *DstIntPtrTy ); Instruction::CastOps getOpcode() const { return Instruction::CastOps(Instruction::getOpcode()); } Type* getSrcTy() const { return getOperand(0)->getType(); } Type* getDestTy() const { return getType(); } static bool castIsValid(Instruction::CastOps op, Value *S, Type *DstTy); static bool classof(const Instruction *I) { return I->isCast(); } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class CmpInst : public Instruction { public: # 725 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" enum Predicate : unsigned { FCMP_FALSE = 0, FCMP_OEQ = 1, FCMP_OGT = 2, FCMP_OGE = 3, FCMP_OLT = 4, FCMP_OLE = 5, FCMP_ONE = 6, FCMP_ORD = 7, FCMP_UNO = 8, FCMP_UEQ = 9, FCMP_UGT = 10, FCMP_UGE = 11, FCMP_ULT = 12, FCMP_ULE = 13, FCMP_UNE = 14, FCMP_TRUE = 15, FIRST_FCMP_PREDICATE = FCMP_FALSE, LAST_FCMP_PREDICATE = FCMP_TRUE, BAD_FCMP_PREDICATE = FCMP_TRUE + 1, ICMP_EQ = 32, ICMP_NE = 33, ICMP_UGT = 34, ICMP_UGE = 35, ICMP_ULT = 36, ICMP_ULE = 37, ICMP_SGT = 38, ICMP_SGE = 39, ICMP_SLT = 40, ICMP_SLE = 41, FIRST_ICMP_PREDICATE = ICMP_EQ, LAST_ICMP_PREDICATE = ICMP_SLE, BAD_ICMP_PREDICATE = ICMP_SLE + 1 }; using PredicateField = Bitfield::Element<Predicate, 0, 6, LAST_ICMP_PREDICATE>; protected: CmpInst(Type *ty, Instruction::OtherOps op, Predicate pred, Value *LHS, Value *RHS, const Twine &Name = "", Instruction *InsertBefore = nullptr, Instruction *FlagsSource = nullptr); CmpInst(Type *ty, Instruction::OtherOps op, Predicate pred, Value *LHS, Value *RHS, const Twine &Name, BasicBlock *InsertAtEnd); public: void *operator new(size_t s) { return User::operator new(s, 2); } static CmpInst *Create(OtherOps Op, Predicate predicate, Value *S1, Value *S2, const Twine &Name = "", Instruction *InsertBefore = nullptr); static CmpInst *Create(OtherOps Op, Predicate predicate, Value *S1, Value *S2, const Twine &Name, BasicBlock *InsertAtEnd); OtherOps getOpcode() const { return static_cast<OtherOps>(Instruction::getOpcode()); } Predicate getPredicate() const { return getSubclassData<PredicateField>(); } void setPredicate(Predicate P) { setSubclassData<PredicateField>(P); } static bool isFPPredicate(Predicate P) { (static_cast<void> (0)); return P <= LAST_FCMP_PREDICATE; } static bool isIntPredicate(Predicate P) { return P >= FIRST_ICMP_PREDICATE && P <= LAST_ICMP_PREDICATE; } static StringRef getPredicateName(Predicate P); bool isFPPredicate() const { return isFPPredicate(getPredicate()); } bool isIntPredicate() const { return isIntPredicate(getPredicate()); } Predicate getInversePredicate() const { return getInversePredicate(getPredicate()); } static Predicate getInversePredicate(Predicate pred); Predicate getSwappedPredicate() const { return getSwappedPredicate(getPredicate()); } static Predicate getSwappedPredicate(Predicate pred); Predicate getFlippedStrictnessPredicate() const { return getFlippedStrictnessPredicate(getPredicate()); } static Predicate getFlippedStrictnessPredicate(Predicate pred); Predicate getNonStrictPredicate() const { return getNonStrictPredicate(getPredicate()); } static Predicate getNonStrictPredicate(Predicate pred); public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; void swapOperands(); bool isCommutative() const; bool isEquality() const; bool isSigned() const { return isSigned(getPredicate()); } bool isUnsigned() const { return isUnsigned(getPredicate()); } static Predicate getSignedPredicate(Predicate pred); Predicate getSignedPredicate() { return getSignedPredicate(getPredicate()); } bool isTrueWhenEqual() const { return isTrueWhenEqual(getPredicate()); } bool isFalseWhenEqual() const { return isFalseWhenEqual(getPredicate()); } static bool isUnsigned(Predicate predicate); static bool isSigned(Predicate predicate); static bool isOrdered(Predicate predicate); static bool isUnordered(Predicate predicate); static bool isTrueWhenEqual(Predicate predicate); static bool isFalseWhenEqual(Predicate predicate); static bool isImpliedTrueByMatchingCmp(Predicate Pred1, Predicate Pred2); static bool isImpliedFalseByMatchingCmp(Predicate Pred1, Predicate Pred2); static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::ICmp || I->getOpcode() == Instruction::FCmp; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } static Type* makeCmpResultType(Type* opnd_type) { if (VectorType* vt = dyn_cast<VectorType>(opnd_type)) { return VectorType::get(Type::getInt1Ty(opnd_type->getContext()), vt->getElementCount()); } return Type::getInt1Ty(opnd_type->getContext()); } private: void setValueSubclassData(unsigned short D) { Value::setValueSubclassData(D); } }; template <> struct OperandTraits<CmpInst> : public FixedNumOperandTraits<CmpInst, 2> { }; CmpInst::op_iterator CmpInst::op_begin() { return OperandTraits<CmpInst>::op_begin(this); } CmpInst::const_op_iterator CmpInst::op_begin() const { return OperandTraits<CmpInst>::op_begin(const_cast<CmpInst*>(this)); } CmpInst::op_iterator CmpInst::op_end() { return OperandTraits<CmpInst>::op_end(this); } CmpInst::const_op_iterator CmpInst::op_end() const { return OperandTraits<CmpInst>::op_end(const_cast<CmpInst*>(this)); } Value *CmpInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<CmpInst>::op_begin(const_cast<CmpInst*>(this))[i_nocapture].get()); } void CmpInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<CmpInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned CmpInst::getNumOperands() const { return OperandTraits<CmpInst>::operands(this); } template <int Idx_nocapture> Use &CmpInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &CmpInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } struct OperandBundleUse { ArrayRef<Use> Inputs; OperandBundleUse() = default; explicit OperandBundleUse(StringMapEntry<uint32_t> *Tag, ArrayRef<Use> Inputs) : Inputs(Inputs), Tag(Tag) {} bool operandHasAttr(unsigned Idx, Attribute::AttrKind A) const { if (isDeoptOperandBundle()) if (A == Attribute::ReadOnly || A == Attribute::NoCapture) return Inputs[Idx]->getType()->isPointerTy(); return false; } StringRef getTagName() const { return Tag->getKey(); } uint32_t getTagID() const { return Tag->getValue(); } bool isDeoptOperandBundle() const { return getTagID() == LLVMContext::OB_deopt; } bool isFuncletOperandBundle() const { return getTagID() == LLVMContext::OB_funclet; } bool isCFGuardTargetOperandBundle() const { return getTagID() == LLVMContext::OB_cfguardtarget; } private: StringMapEntry<uint32_t> *Tag; }; template <typename InputTy> class OperandBundleDefT { std::string Tag; std::vector<InputTy> Inputs; public: explicit OperandBundleDefT(std::string Tag, std::vector<InputTy> Inputs) : Tag(std::move(Tag)), Inputs(std::move(Inputs)) {} explicit OperandBundleDefT(std::string Tag, ArrayRef<InputTy> Inputs) : Tag(std::move(Tag)), Inputs(Inputs) {} explicit OperandBundleDefT(const OperandBundleUse &OBU) { Tag = std::string(OBU.getTagName()); Inputs.insert(Inputs.end(), OBU.Inputs.begin(), OBU.Inputs.end()); } ArrayRef<InputTy> inputs() const { return Inputs; } using input_iterator = typename std::vector<InputTy>::const_iterator; size_t input_size() const { return Inputs.size(); } input_iterator input_begin() const { return Inputs.begin(); } input_iterator input_end() const { return Inputs.end(); } StringRef getTag() const { return Tag; } }; using OperandBundleDef = OperandBundleDefT<Value *>; using ConstOperandBundleDef = OperandBundleDefT<const Value *>; # 1100 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" class CallBase : public Instruction { protected: using CallInstReservedField = Bitfield::Element<unsigned, 0, 2>; using CallingConvField = Bitfield::Element<CallingConv::ID, CallInstReservedField::NextBit, 10, CallingConv::MaxID>; static_assert( Bitfield::areContiguous<CallInstReservedField, CallingConvField>(), "Bitfields must be contiguous"); static constexpr int CalledOperandOpEndIdx = -1; AttributeList Attrs; FunctionType *FTy; template <class... ArgsTy> CallBase(AttributeList const &A, FunctionType *FT, ArgsTy &&... Args) : Instruction(std::forward<ArgsTy>(Args)...), Attrs(A), FTy(FT) {} using Instruction::Instruction; bool hasDescriptor() const { return Value::HasDescriptor; } unsigned getNumSubclassExtraOperands() const { switch (getOpcode()) { case Instruction::Call: return 0; case Instruction::Invoke: return 2; case Instruction::CallBr: return getNumSubclassExtraOperandsDynamic(); } __builtin_unreachable(); } unsigned getNumSubclassExtraOperandsDynamic() const; public: using Instruction::getContext; static CallBase *Create(CallBase *CB, ArrayRef<OperandBundleDef> Bundles, Instruction *InsertPt = nullptr); static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Call || I->getOpcode() == Instruction::Invoke || I->getOpcode() == Instruction::CallBr; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } FunctionType *getFunctionType() const { return FTy; } void mutateFunctionType(FunctionType *FTy) { Value::mutateType(FTy->getReturnType()); this->FTy = FTy; } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; User::op_iterator data_operands_begin() { return op_begin(); } User::const_op_iterator data_operands_begin() const { return const_cast<CallBase *>(this)->data_operands_begin(); } User::op_iterator data_operands_end() { return op_end() - getNumSubclassExtraOperands() - 1; } User::const_op_iterator data_operands_end() const { return const_cast<CallBase *>(this)->data_operands_end(); } iterator_range<User::op_iterator> data_ops() { return make_range(data_operands_begin(), data_operands_end()); } iterator_range<User::const_op_iterator> data_ops() const { return make_range(data_operands_begin(), data_operands_end()); } bool data_operands_empty() const { return data_operands_end() == data_operands_begin(); } unsigned data_operands_size() const { return std::distance(data_operands_begin(), data_operands_end()); } bool isDataOperand(const Use *U) const { (static_cast<void> (0)); return data_operands_begin() <= U && U < data_operands_end(); } bool isDataOperand(Value::const_user_iterator UI) const { return isDataOperand(&UI.getUse()); } unsigned getDataOperandNo(Value::const_user_iterator UI) const { return getDataOperandNo(&UI.getUse()); } unsigned getDataOperandNo(const Use *U) const { (static_cast<void> (0)); return U - data_operands_begin(); } User::op_iterator arg_begin() { return op_begin(); } User::const_op_iterator arg_begin() const { return const_cast<CallBase *>(this)->arg_begin(); } User::op_iterator arg_end() { return data_operands_end() - getNumTotalBundleOperands(); } User::const_op_iterator arg_end() const { return const_cast<CallBase *>(this)->arg_end(); } iterator_range<User::op_iterator> args() { return make_range(arg_begin(), arg_end()); } iterator_range<User::const_op_iterator> args() const { return make_range(arg_begin(), arg_end()); } bool arg_empty() const { return arg_end() == arg_begin(); } unsigned arg_size() const { return arg_end() - arg_begin(); } iterator_range<User::op_iterator> arg_operands() { return make_range(arg_begin(), arg_end()); } iterator_range<User::const_op_iterator> arg_operands() const { return make_range(arg_begin(), arg_end()); } unsigned getNumArgOperands() const { return arg_size(); } Value *getArgOperand(unsigned i) const { (static_cast<void> (0)); return getOperand(i); } void setArgOperand(unsigned i, Value *v) { (static_cast<void> (0)); setOperand(i, v); } const Use &getArgOperandUse(unsigned i) const { (static_cast<void> (0)); return User::getOperandUse(i); } Use &getArgOperandUse(unsigned i) { (static_cast<void> (0)); return User::getOperandUse(i); } bool isArgOperand(const Use *U) const { (static_cast<void> (0)); return arg_begin() <= U && U < arg_end(); } bool isArgOperand(Value::const_user_iterator UI) const { return isArgOperand(&UI.getUse()); } unsigned getArgOperandNo(const Use *U) const { (static_cast<void> (0)); return U - arg_begin(); } unsigned getArgOperandNo(Value::const_user_iterator UI) const { return getArgOperandNo(&UI.getUse()); } bool hasArgument(const Value *V) const { return llvm::any_of(args(), [V](const Value *Arg) { return Arg == V; }); } Value *getCalledOperand() const { return Op<CalledOperandOpEndIdx>(); } const Use &getCalledOperandUse() const { return Op<CalledOperandOpEndIdx>(); } Use &getCalledOperandUse() { return Op<CalledOperandOpEndIdx>(); } Function *getCalledFunction() const { return dyn_cast_or_null<Function>(getCalledOperand()); } bool isIndirectCall() const; bool isCallee(Value::const_user_iterator UI) const { return isCallee(&UI.getUse()); } bool isCallee(const Use *U) const { return &getCalledOperandUse() == U; } Function *getCaller(); const Function *getCaller() const { return const_cast<CallBase *>(this)->getCaller(); } bool isMustTailCall() const; bool isTailCall() const; Intrinsic::ID getIntrinsicID() const; void setCalledOperand(Value *V) { Op<CalledOperandOpEndIdx>() = V; } void setCalledFunction(Function *Fn) { setCalledFunction(Fn->getFunctionType(), Fn); } void setCalledFunction(FunctionCallee Fn) { setCalledFunction(Fn.getFunctionType(), Fn.getCallee()); } void setCalledFunction(FunctionType *FTy, Value *Fn) { this->FTy = FTy; (static_cast<void> (0)); (static_cast<void> (0)); setCalledOperand(Fn); } CallingConv::ID getCallingConv() const { return getSubclassData<CallingConvField>(); } void setCallingConv(CallingConv::ID CC) { setSubclassData<CallingConvField>(CC); } bool isInlineAsm() const { return isa<InlineAsm>(getCalledOperand()); } # 1390 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" AttributeList getAttributes() const { return Attrs; } void setAttributes(AttributeList A) { Attrs = A; } bool hasFnAttr(Attribute::AttrKind Kind) const { (static_cast<void> (0)); return hasFnAttrImpl(Kind); } bool hasFnAttr(StringRef Kind) const { return hasFnAttrImpl(Kind); } void addAttribute(unsigned i, Attribute::AttrKind Kind) { AttributeList PAL = getAttributes(); PAL = PAL.addAttribute(getContext(), i, Kind); setAttributes(PAL); } void addAttribute(unsigned i, Attribute Attr) { AttributeList PAL = getAttributes(); PAL = PAL.addAttribute(getContext(), i, Attr); setAttributes(PAL); } void addParamAttr(unsigned ArgNo, Attribute::AttrKind Kind) { (static_cast<void> (0)); AttributeList PAL = getAttributes(); PAL = PAL.addParamAttribute(getContext(), ArgNo, Kind); setAttributes(PAL); } void addParamAttr(unsigned ArgNo, Attribute Attr) { (static_cast<void> (0)); AttributeList PAL = getAttributes(); PAL = PAL.addParamAttribute(getContext(), ArgNo, Attr); setAttributes(PAL); } void removeAttribute(unsigned i, Attribute::AttrKind Kind) { AttributeList PAL = getAttributes(); PAL = PAL.removeAttribute(getContext(), i, Kind); setAttributes(PAL); } void removeAttribute(unsigned i, StringRef Kind) { AttributeList PAL = getAttributes(); PAL = PAL.removeAttribute(getContext(), i, Kind); setAttributes(PAL); } void removeParamAttr(unsigned ArgNo, Attribute::AttrKind Kind) { (static_cast<void> (0)); AttributeList PAL = getAttributes(); PAL = PAL.removeParamAttribute(getContext(), ArgNo, Kind); setAttributes(PAL); } void removeParamAttr(unsigned ArgNo, StringRef Kind) { (static_cast<void> (0)); AttributeList PAL = getAttributes(); PAL = PAL.removeParamAttribute(getContext(), ArgNo, Kind); setAttributes(PAL); } void addDereferenceableAttr(unsigned i, uint64_t Bytes) { AttributeList PAL = getAttributes(); PAL = PAL.addDereferenceableAttr(getContext(), i, Bytes); setAttributes(PAL); } void addDereferenceableOrNullAttr(unsigned i, uint64_t Bytes) { AttributeList PAL = getAttributes(); PAL = PAL.addDereferenceableOrNullAttr(getContext(), i, Bytes); setAttributes(PAL); } bool hasRetAttr(Attribute::AttrKind Kind) const; bool paramHasAttr(unsigned ArgNo, Attribute::AttrKind Kind) const; Attribute getAttribute(unsigned i, Attribute::AttrKind Kind) const { return getAttributes().getAttribute(i, Kind); } Attribute getAttribute(unsigned i, StringRef Kind) const { return getAttributes().getAttribute(i, Kind); } Attribute getParamAttr(unsigned ArgNo, Attribute::AttrKind Kind) const { (static_cast<void> (0)); return getAttributes().getParamAttr(ArgNo, Kind); } Attribute getParamAttr(unsigned ArgNo, StringRef Kind) const { (static_cast<void> (0)); return getAttributes().getParamAttr(ArgNo, Kind); } # 1522 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" bool dataOperandHasImpliedAttr(unsigned i, Attribute::AttrKind Kind) const { (static_cast<void> (0)); if (i == AttributeList::ReturnIndex) return hasRetAttr(Kind); if (i < (getNumArgOperands() + 1)) return paramHasAttr(i - 1, Kind); (static_cast<void> (0)); return bundleOperandHasAttr(i - 1, Kind); } bool doesNotCapture(unsigned OpNo) const { return dataOperandHasImpliedAttr(OpNo + 1, Attribute::NoCapture); } bool isByValArgument(unsigned ArgNo) const { return paramHasAttr(ArgNo, Attribute::ByVal); } bool isInAllocaArgument(unsigned ArgNo) const { return paramHasAttr(ArgNo, Attribute::InAlloca); } bool isPassPointeeByValueArgument(unsigned ArgNo) const { return paramHasAttr(ArgNo, Attribute::ByVal) || paramHasAttr(ArgNo, Attribute::InAlloca) || paramHasAttr(ArgNo, Attribute::Preallocated); } bool hasInAllocaArgument() const { return !arg_empty() && paramHasAttr(arg_size() - 1, Attribute::InAlloca); } bool doesNotAccessMemory(unsigned OpNo) const { return dataOperandHasImpliedAttr(OpNo + 1, Attribute::ReadNone); } bool onlyReadsMemory(unsigned OpNo) const { return dataOperandHasImpliedAttr(OpNo + 1, Attribute::ReadOnly) || dataOperandHasImpliedAttr(OpNo + 1, Attribute::ReadNone); } bool doesNotReadMemory(unsigned OpNo) const { return dataOperandHasImpliedAttr(OpNo + 1, Attribute::WriteOnly) || dataOperandHasImpliedAttr(OpNo + 1, Attribute::ReadNone); } unsigned getRetAlignment() const __attribute__((deprecated("Use getRetAlign() instead"))) { if (const auto MA = Attrs.getRetAlignment()) return MA->value(); return 0; } MaybeAlign getRetAlign() const { return Attrs.getRetAlignment(); } unsigned getParamAlignment(unsigned ArgNo) const __attribute__((deprecated("Use getParamAlign() instead"))) { if (const auto MA = Attrs.getParamAlignment(ArgNo)) return MA->value(); return 0; } MaybeAlign getParamAlign(unsigned ArgNo) const { return Attrs.getParamAlignment(ArgNo); } Type *getParamByValType(unsigned ArgNo) const { Type *Ty = Attrs.getParamByValType(ArgNo); return Ty ? Ty : getArgOperand(ArgNo)->getType()->getPointerElementType(); } Type *getParamPreallocatedType(unsigned ArgNo) const { Type *Ty = Attrs.getParamPreallocatedType(ArgNo); return Ty ? Ty : getArgOperand(ArgNo)->getType()->getPointerElementType(); } uint64_t getDereferenceableBytes(unsigned i) const { return Attrs.getDereferenceableBytes(i); } uint64_t getDereferenceableOrNullBytes(unsigned i) const { return Attrs.getDereferenceableOrNullBytes(i); } bool isReturnNonNull() const; bool returnDoesNotAlias() const { return Attrs.hasAttribute(AttributeList::ReturnIndex, Attribute::NoAlias); } Value *getReturnedArgOperand() const; bool isNoBuiltin() const { return hasFnAttrImpl(Attribute::NoBuiltin) && !hasFnAttrImpl(Attribute::Builtin); } bool isStrictFP() const { return hasFnAttr(Attribute::StrictFP); } bool isNoInline() const { return hasFnAttr(Attribute::NoInline); } void setIsNoInline() { addAttribute(AttributeList::FunctionIndex, Attribute::NoInline); } bool doesNotAccessMemory() const { return hasFnAttr(Attribute::ReadNone); } void setDoesNotAccessMemory() { addAttribute(AttributeList::FunctionIndex, Attribute::ReadNone); } bool onlyReadsMemory() const { return doesNotAccessMemory() || hasFnAttr(Attribute::ReadOnly); } void setOnlyReadsMemory() { addAttribute(AttributeList::FunctionIndex, Attribute::ReadOnly); } bool doesNotReadMemory() const { return doesNotAccessMemory() || hasFnAttr(Attribute::WriteOnly); } void setDoesNotReadMemory() { addAttribute(AttributeList::FunctionIndex, Attribute::WriteOnly); } bool onlyAccessesArgMemory() const { return hasFnAttr(Attribute::ArgMemOnly); } void setOnlyAccessesArgMemory() { addAttribute(AttributeList::FunctionIndex, Attribute::ArgMemOnly); } bool onlyAccessesInaccessibleMemory() const { return hasFnAttr(Attribute::InaccessibleMemOnly); } void setOnlyAccessesInaccessibleMemory() { addAttribute(AttributeList::FunctionIndex, Attribute::InaccessibleMemOnly); } bool onlyAccessesInaccessibleMemOrArgMem() const { return hasFnAttr(Attribute::InaccessibleMemOrArgMemOnly); } void setOnlyAccessesInaccessibleMemOrArgMem() { addAttribute(AttributeList::FunctionIndex, Attribute::InaccessibleMemOrArgMemOnly); } bool doesNotReturn() const { return hasFnAttr(Attribute::NoReturn); } void setDoesNotReturn() { addAttribute(AttributeList::FunctionIndex, Attribute::NoReturn); } bool doesNoCfCheck() const { return hasFnAttr(Attribute::NoCfCheck); } bool doesNotThrow() const { return hasFnAttr(Attribute::NoUnwind); } void setDoesNotThrow() { addAttribute(AttributeList::FunctionIndex, Attribute::NoUnwind); } bool cannotDuplicate() const { return hasFnAttr(Attribute::NoDuplicate); } void setCannotDuplicate() { addAttribute(AttributeList::FunctionIndex, Attribute::NoDuplicate); } bool cannotMerge() const { return hasFnAttr(Attribute::NoMerge); } void setCannotMerge() { addAttribute(AttributeList::FunctionIndex, Attribute::NoMerge); } bool isConvergent() const { return hasFnAttr(Attribute::Convergent); } void setConvergent() { addAttribute(AttributeList::FunctionIndex, Attribute::Convergent); } void setNotConvergent() { removeAttribute(AttributeList::FunctionIndex, Attribute::Convergent); } bool hasStructRetAttr() const { if (getNumArgOperands() == 0) return false; return paramHasAttr(0, Attribute::StructRet); } bool hasByValArgument() const { return Attrs.hasAttrSomewhere(Attribute::ByVal); } # 1781 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" unsigned getNumOperandBundles() const { return std::distance(bundle_op_info_begin(), bundle_op_info_end()); } bool hasOperandBundles() const { return getNumOperandBundles() != 0; } unsigned getBundleOperandsStartIndex() const { (static_cast<void> (0)); return bundle_op_info_begin()->Begin; } unsigned getBundleOperandsEndIndex() const { (static_cast<void> (0)); return bundle_op_info_end()[-1].End; } bool isBundleOperand(unsigned Idx) const { return hasOperandBundles() && Idx >= getBundleOperandsStartIndex() && Idx < getBundleOperandsEndIndex(); } bool isBundleOperand(const Use *U) const { (static_cast<void> (0)); return hasOperandBundles() && isBundleOperand(U - op_begin()); } bool isBundleOperand(Value::const_user_iterator UI) const { return isBundleOperand(&UI.getUse()); } unsigned getNumTotalBundleOperands() const { if (!hasOperandBundles()) return 0; unsigned Begin = getBundleOperandsStartIndex(); unsigned End = getBundleOperandsEndIndex(); (static_cast<void> (0)); return End - Begin; } OperandBundleUse getOperandBundleAt(unsigned Index) const { (static_cast<void> (0)); return operandBundleFromBundleOpInfo(*(bundle_op_info_begin() + Index)); } unsigned countOperandBundlesOfType(StringRef Name) const { unsigned Count = 0; for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i) if (getOperandBundleAt(i).getTagName() == Name) Count++; return Count; } unsigned countOperandBundlesOfType(uint32_t ID) const { unsigned Count = 0; for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i) if (getOperandBundleAt(i).getTagID() == ID) Count++; return Count; } Optional<OperandBundleUse> getOperandBundle(StringRef Name) const { (static_cast<void> (0)); for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i) { OperandBundleUse U = getOperandBundleAt(i); if (U.getTagName() == Name) return U; } return None; } Optional<OperandBundleUse> getOperandBundle(uint32_t ID) const { (static_cast<void> (0)); for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i) { OperandBundleUse U = getOperandBundleAt(i); if (U.getTagID() == ID) return U; } return None; } # 1896 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" void getOperandBundlesAsDefs(SmallVectorImpl<OperandBundleDef> &Defs) const; OperandBundleUse getOperandBundleForOperand(unsigned OpIdx) const { return operandBundleFromBundleOpInfo(getBundleOpInfoForOperand(OpIdx)); } bool hasReadingOperandBundles() const { return hasOperandBundles(); } bool hasClobberingOperandBundles() const { for (auto &BOI : bundle_op_infos()) { if (BOI.Tag->second == LLVMContext::OB_deopt || BOI.Tag->second == LLVMContext::OB_funclet) continue; return true; } return false; } bool bundleOperandHasAttr(unsigned OpIdx, Attribute::AttrKind A) const { auto &BOI = getBundleOpInfoForOperand(OpIdx); auto OBU = operandBundleFromBundleOpInfo(BOI); return OBU.operandHasAttr(OpIdx - BOI.Begin, A); } bool hasIdenticalOperandBundleSchema(const CallBase &Other) const { if (getNumOperandBundles() != Other.getNumOperandBundles()) return false; return std::equal(bundle_op_info_begin(), bundle_op_info_end(), Other.bundle_op_info_begin()); } bool hasOperandBundlesOtherThan(ArrayRef<uint32_t> IDs) const { for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i) { uint32_t ID = getOperandBundleAt(i).getTagID(); if (!is_contained(IDs, ID)) return true; } return false; } bool isFnAttrDisallowedByOpBundle(StringRef S) const { return false; } bool isFnAttrDisallowedByOpBundle(Attribute::AttrKind A) const { switch (A) { default: return false; case Attribute::InaccessibleMemOrArgMemOnly: return hasReadingOperandBundles(); case Attribute::InaccessibleMemOnly: return hasReadingOperandBundles(); case Attribute::ArgMemOnly: return hasReadingOperandBundles(); case Attribute::ReadNone: return hasReadingOperandBundles(); case Attribute::ReadOnly: return hasClobberingOperandBundles(); } __builtin_unreachable(); } struct BundleOpInfo { StringMapEntry<uint32_t> *Tag; uint32_t Begin; uint32_t End; bool operator==(const BundleOpInfo &Other) const { return Tag == Other.Tag && Begin == Other.Begin && End == Other.End; } }; OperandBundleUse operandBundleFromBundleOpInfo(const BundleOpInfo &BOI) const { auto begin = op_begin(); ArrayRef<Use> Inputs(begin + BOI.Begin, begin + BOI.End); return OperandBundleUse(BOI.Tag, Inputs); } using bundle_op_iterator = BundleOpInfo *; using const_bundle_op_iterator = const BundleOpInfo *; # 2073 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/InstrTypes.h" bundle_op_iterator bundle_op_info_begin() { if (!hasDescriptor()) return nullptr; uint8_t *BytesBegin = getDescriptor().begin(); return reinterpret_cast<bundle_op_iterator>(BytesBegin); } const_bundle_op_iterator bundle_op_info_begin() const { auto *NonConstThis = const_cast<CallBase *>(this); return NonConstThis->bundle_op_info_begin(); } bundle_op_iterator bundle_op_info_end() { if (!hasDescriptor()) return nullptr; uint8_t *BytesEnd = getDescriptor().end(); return reinterpret_cast<bundle_op_iterator>(BytesEnd); } const_bundle_op_iterator bundle_op_info_end() const { auto *NonConstThis = const_cast<CallBase *>(this); return NonConstThis->bundle_op_info_end(); } iterator_range<bundle_op_iterator> bundle_op_infos() { return make_range(bundle_op_info_begin(), bundle_op_info_end()); } iterator_range<const_bundle_op_iterator> bundle_op_infos() const { return make_range(bundle_op_info_begin(), bundle_op_info_end()); } op_iterator populateBundleOperandInfos(ArrayRef<OperandBundleDef> Bundles, const unsigned BeginIndex); public: BundleOpInfo &getBundleOpInfoForOperand(unsigned OpIdx); const BundleOpInfo &getBundleOpInfoForOperand(unsigned OpIdx) const { return const_cast<CallBase *>(this)->getBundleOpInfoForOperand(OpIdx); } protected: static unsigned CountBundleInputs(ArrayRef<OperandBundleDef> Bundles) { unsigned Total = 0; for (auto &B : Bundles) Total += B.input_size(); return Total; } private: bool hasFnAttrOnCalledFunction(Attribute::AttrKind Kind) const; bool hasFnAttrOnCalledFunction(StringRef Kind) const; template <typename AttrKind> bool hasFnAttrImpl(AttrKind Kind) const { if (Attrs.hasFnAttribute(Kind)) return true; if (isFnAttrDisallowedByOpBundle(Kind)) return false; return hasFnAttrOnCalledFunction(Kind); } }; template <> struct OperandTraits<CallBase> : public VariadicOperandTraits<CallBase, 1> {}; CallBase::op_iterator CallBase::op_begin() { return OperandTraits<CallBase>::op_begin(this); } CallBase::const_op_iterator CallBase::op_begin() const { return OperandTraits<CallBase>::op_begin(const_cast<CallBase*>(this)); } CallBase::op_iterator CallBase::op_end() { return OperandTraits<CallBase>::op_end(this); } CallBase::const_op_iterator CallBase::op_end() const { return OperandTraits<CallBase>::op_end(const_cast<CallBase*>(this)); } Value *CallBase::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<CallBase>::op_begin(const_cast<CallBase*>(this))[i_nocapture].get()); } void CallBase::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<CallBase>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned CallBase::getNumOperands() const { return OperandTraits<CallBase>::operands(this); } template <int Idx_nocapture> Use &CallBase::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &CallBase::Op() const { return this->OpFrom<Idx_nocapture>(this); } class FuncletPadInst : public Instruction { private: FuncletPadInst(const FuncletPadInst &CPI); explicit FuncletPadInst(Instruction::FuncletPadOps Op, Value *ParentPad, ArrayRef<Value *> Args, unsigned Values, const Twine &NameStr, Instruction *InsertBefore); explicit FuncletPadInst(Instruction::FuncletPadOps Op, Value *ParentPad, ArrayRef<Value *> Args, unsigned Values, const Twine &NameStr, BasicBlock *InsertAtEnd); void init(Value *ParentPad, ArrayRef<Value *> Args, const Twine &NameStr); protected: friend class Instruction; friend class CatchPadInst; friend class CleanupPadInst; FuncletPadInst *cloneImpl() const; public: public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; unsigned getNumArgOperands() const { return getNumOperands() - 1; } Value *getParentPad() const { return Op<-1>(); } void setParentPad(Value *ParentPad) { (static_cast<void> (0)); Op<-1>() = ParentPad; } Value *getArgOperand(unsigned i) const { return getOperand(i); } void setArgOperand(unsigned i, Value *v) { setOperand(i, v); } op_range arg_operands() { return op_range(op_begin(), op_end() - 1); } const_op_range arg_operands() const { return const_op_range(op_begin(), op_end() - 1); } static bool classof(const Instruction *I) { return I->isFuncletPad(); } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; template <> struct OperandTraits<FuncletPadInst> : public VariadicOperandTraits<FuncletPadInst, 1> {}; FuncletPadInst::op_iterator FuncletPadInst::op_begin() { return OperandTraits<FuncletPadInst>::op_begin(this); } FuncletPadInst::const_op_iterator FuncletPadInst::op_begin() const { return OperandTraits<FuncletPadInst>::op_begin(const_cast<FuncletPadInst*>(this)); } FuncletPadInst::op_iterator FuncletPadInst::op_end() { return OperandTraits<FuncletPadInst>::op_end(this); } FuncletPadInst::const_op_iterator FuncletPadInst::op_end() const { return OperandTraits<FuncletPadInst>::op_end(const_cast<FuncletPadInst*>(this)); } Value *FuncletPadInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<FuncletPadInst>::op_begin(const_cast<FuncletPadInst*>(this))[i_nocapture].get()); } void FuncletPadInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<FuncletPadInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned FuncletPadInst::getNumOperands() const { return OperandTraits<FuncletPadInst>::operands(this); } template <int Idx_nocapture> Use &FuncletPadInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &FuncletPadInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } } # 34 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" 2 # 43 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 44 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" 2 namespace llvm { class APInt; class ConstantInt; class DataLayout; class LLVMContext; class AllocaInst : public UnaryInstruction { Type *AllocatedType; using AlignmentField = AlignmentBitfieldElementT<0>; using UsedWithInAllocaField = BoolBitfieldElementT<AlignmentField::NextBit>; using SwiftErrorField = BoolBitfieldElementT<UsedWithInAllocaField::NextBit>; static_assert(Bitfield::areContiguous<AlignmentField, UsedWithInAllocaField, SwiftErrorField>(), "Bitfields must be contiguous"); protected: friend class Instruction; AllocaInst *cloneImpl() const; public: explicit AllocaInst(Type *Ty, unsigned AddrSpace, Value *ArraySize, const Twine &Name, Instruction *InsertBefore); AllocaInst(Type *Ty, unsigned AddrSpace, Value *ArraySize, const Twine &Name, BasicBlock *InsertAtEnd); AllocaInst(Type *Ty, unsigned AddrSpace, const Twine &Name, Instruction *InsertBefore); AllocaInst(Type *Ty, unsigned AddrSpace, const Twine &Name, BasicBlock *InsertAtEnd); AllocaInst(Type *Ty, unsigned AddrSpace, Value *ArraySize, Align Align, const Twine &Name = "", Instruction *InsertBefore = nullptr); AllocaInst(Type *Ty, unsigned AddrSpace, Value *ArraySize, Align Align, const Twine &Name, BasicBlock *InsertAtEnd); bool isArrayAllocation() const; const Value *getArraySize() const { return getOperand(0); } Value *getArraySize() { return getOperand(0); } PointerType *getType() const { return cast<PointerType>(Instruction::getType()); } Optional<uint64_t> getAllocationSizeInBits(const DataLayout &DL) const; Type *getAllocatedType() const { return AllocatedType; } void setAllocatedType(Type *Ty) { AllocatedType = Ty; } Align getAlign() const { return Align(1ULL << getSubclassData<AlignmentField>()); } void setAlignment(Align Align) { setSubclassData<AlignmentField>(Log2(Align)); } unsigned getAlignment() const { return getAlign().value(); } bool isStaticAlloca() const; bool isUsedWithInAlloca() const { return getSubclassData<UsedWithInAllocaField>(); } void setUsedWithInAlloca(bool V) { setSubclassData<UsedWithInAllocaField>(V); } bool isSwiftError() const { return getSubclassData<SwiftErrorField>(); } void setSwiftError(bool V) { setSubclassData<SwiftErrorField>(V); } static bool classof(const Instruction *I) { return (I->getOpcode() == Instruction::Alloca); } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } private: template <typename Bitfield> void setSubclassData(typename Bitfield::Type Value) { Instruction::setSubclassData<Bitfield>(Value); } }; class LoadInst : public UnaryInstruction { using VolatileField = BoolBitfieldElementT<0>; using AlignmentField = AlignmentBitfieldElementT<VolatileField::NextBit>; using OrderingField = AtomicOrderingBitfieldElementT<AlignmentField::NextBit>; static_assert( Bitfield::areContiguous<VolatileField, AlignmentField, OrderingField>(), "Bitfields must be contiguous"); void AssertOK(); protected: friend class Instruction; LoadInst *cloneImpl() const; public: LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, Instruction *InsertBefore); LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, BasicBlock *InsertAtEnd); LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile, Instruction *InsertBefore); LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile, BasicBlock *InsertAtEnd); LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile, Align Align, Instruction *InsertBefore = nullptr); LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile, Align Align, BasicBlock *InsertAtEnd); LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile, Align Align, AtomicOrdering Order, SyncScope::ID SSID = SyncScope::System, Instruction *InsertBefore = nullptr); LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile, Align Align, AtomicOrdering Order, SyncScope::ID SSID, BasicBlock *InsertAtEnd); bool isVolatile() const { return getSubclassData<VolatileField>(); } void setVolatile(bool V) { setSubclassData<VolatileField>(V); } unsigned getAlignment() const { return getAlign().value(); } Align getAlign() const { return Align(1ULL << (getSubclassData<AlignmentField>())); } void setAlignment(Align Align) { setSubclassData<AlignmentField>(Log2(Align)); } AtomicOrdering getOrdering() const { return getSubclassData<OrderingField>(); } void setOrdering(AtomicOrdering Ordering) { setSubclassData<OrderingField>(Ordering); } SyncScope::ID getSyncScopeID() const { return SSID; } void setSyncScopeID(SyncScope::ID SSID) { this->SSID = SSID; } void setAtomic(AtomicOrdering Ordering, SyncScope::ID SSID = SyncScope::System) { setOrdering(Ordering); setSyncScopeID(SSID); } bool isSimple() const { return !isAtomic() && !isVolatile(); } bool isUnordered() const { return (getOrdering() == AtomicOrdering::NotAtomic || getOrdering() == AtomicOrdering::Unordered) && !isVolatile(); } Value *getPointerOperand() { return getOperand(0); } const Value *getPointerOperand() const { return getOperand(0); } static unsigned getPointerOperandIndex() { return 0U; } Type *getPointerOperandType() const { return getPointerOperand()->getType(); } unsigned getPointerAddressSpace() const { return getPointerOperandType()->getPointerAddressSpace(); } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Load; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } private: template <typename Bitfield> void setSubclassData(typename Bitfield::Type Value) { Instruction::setSubclassData<Bitfield>(Value); } SyncScope::ID SSID; }; class StoreInst : public Instruction { using VolatileField = BoolBitfieldElementT<0>; using AlignmentField = AlignmentBitfieldElementT<VolatileField::NextBit>; using OrderingField = AtomicOrderingBitfieldElementT<AlignmentField::NextBit>; static_assert( Bitfield::areContiguous<VolatileField, AlignmentField, OrderingField>(), "Bitfields must be contiguous"); void AssertOK(); protected: friend class Instruction; StoreInst *cloneImpl() const; public: StoreInst(Value *Val, Value *Ptr, Instruction *InsertBefore); StoreInst(Value *Val, Value *Ptr, BasicBlock *InsertAtEnd); StoreInst(Value *Val, Value *Ptr, bool isVolatile, Instruction *InsertBefore); StoreInst(Value *Val, Value *Ptr, bool isVolatile, BasicBlock *InsertAtEnd); StoreInst(Value *Val, Value *Ptr, bool isVolatile, Align Align, Instruction *InsertBefore = nullptr); StoreInst(Value *Val, Value *Ptr, bool isVolatile, Align Align, BasicBlock *InsertAtEnd); StoreInst(Value *Val, Value *Ptr, bool isVolatile, Align Align, AtomicOrdering Order, SyncScope::ID SSID = SyncScope::System, Instruction *InsertBefore = nullptr); StoreInst(Value *Val, Value *Ptr, bool isVolatile, Align Align, AtomicOrdering Order, SyncScope::ID SSID, BasicBlock *InsertAtEnd); void *operator new(size_t s) { return User::operator new(s, 2); } bool isVolatile() const { return getSubclassData<VolatileField>(); } void setVolatile(bool V) { setSubclassData<VolatileField>(V); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; unsigned getAlignment() const { return getAlign().value(); } Align getAlign() const { return Align(1ULL << (getSubclassData<AlignmentField>())); } void setAlignment(Align Align) { setSubclassData<AlignmentField>(Log2(Align)); } AtomicOrdering getOrdering() const { return getSubclassData<OrderingField>(); } void setOrdering(AtomicOrdering Ordering) { setSubclassData<OrderingField>(Ordering); } SyncScope::ID getSyncScopeID() const { return SSID; } void setSyncScopeID(SyncScope::ID SSID) { this->SSID = SSID; } void setAtomic(AtomicOrdering Ordering, SyncScope::ID SSID = SyncScope::System) { setOrdering(Ordering); setSyncScopeID(SSID); } bool isSimple() const { return !isAtomic() && !isVolatile(); } bool isUnordered() const { return (getOrdering() == AtomicOrdering::NotAtomic || getOrdering() == AtomicOrdering::Unordered) && !isVolatile(); } Value *getValueOperand() { return getOperand(0); } const Value *getValueOperand() const { return getOperand(0); } Value *getPointerOperand() { return getOperand(1); } const Value *getPointerOperand() const { return getOperand(1); } static unsigned getPointerOperandIndex() { return 1U; } Type *getPointerOperandType() const { return getPointerOperand()->getType(); } unsigned getPointerAddressSpace() const { return getPointerOperandType()->getPointerAddressSpace(); } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Store; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } private: template <typename Bitfield> void setSubclassData(typename Bitfield::Type Value) { Instruction::setSubclassData<Bitfield>(Value); } SyncScope::ID SSID; }; template <> struct OperandTraits<StoreInst> : public FixedNumOperandTraits<StoreInst, 2> { }; StoreInst::op_iterator StoreInst::op_begin() { return OperandTraits<StoreInst>::op_begin(this); } StoreInst::const_op_iterator StoreInst::op_begin() const { return OperandTraits<StoreInst>::op_begin(const_cast<StoreInst*>(this)); } StoreInst::op_iterator StoreInst::op_end() { return OperandTraits<StoreInst>::op_end(this); } StoreInst::const_op_iterator StoreInst::op_end() const { return OperandTraits<StoreInst>::op_end(const_cast<StoreInst*>(this)); } Value *StoreInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<StoreInst>::op_begin(const_cast<StoreInst*>(this))[i_nocapture].get()); } void StoreInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<StoreInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned StoreInst::getNumOperands() const { return OperandTraits<StoreInst>::operands(this); } template <int Idx_nocapture> Use &StoreInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &StoreInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } class FenceInst : public Instruction { using OrderingField = AtomicOrderingBitfieldElementT<0>; void Init(AtomicOrdering Ordering, SyncScope::ID SSID); protected: friend class Instruction; FenceInst *cloneImpl() const; public: FenceInst(LLVMContext &C, AtomicOrdering Ordering, SyncScope::ID SSID = SyncScope::System, Instruction *InsertBefore = nullptr); FenceInst(LLVMContext &C, AtomicOrdering Ordering, SyncScope::ID SSID, BasicBlock *InsertAtEnd); void *operator new(size_t s) { return User::operator new(s, 0); } AtomicOrdering getOrdering() const { return getSubclassData<OrderingField>(); } void setOrdering(AtomicOrdering Ordering) { setSubclassData<OrderingField>(Ordering); } SyncScope::ID getSyncScopeID() const { return SSID; } void setSyncScopeID(SyncScope::ID SSID) { this->SSID = SSID; } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Fence; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } private: template <typename Bitfield> void setSubclassData(typename Bitfield::Type Value) { Instruction::setSubclassData<Bitfield>(Value); } SyncScope::ID SSID; }; # 521 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class AtomicCmpXchgInst : public Instruction { void Init(Value *Ptr, Value *Cmp, Value *NewVal, Align Align, AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering, SyncScope::ID SSID); template <unsigned Offset> using AtomicOrderingBitfieldElement = typename Bitfield::Element<AtomicOrdering, Offset, 3, AtomicOrdering::LAST>; protected: friend class Instruction; AtomicCmpXchgInst *cloneImpl() const; public: AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal, Align Alignment, AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering, SyncScope::ID SSID, Instruction *InsertBefore = nullptr); AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal, Align Alignment, AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering, SyncScope::ID SSID, BasicBlock *InsertAtEnd); void *operator new(size_t s) { return User::operator new(s, 3); } using VolatileField = BoolBitfieldElementT<0>; using WeakField = BoolBitfieldElementT<VolatileField::NextBit>; using SuccessOrderingField = AtomicOrderingBitfieldElementT<WeakField::NextBit>; using FailureOrderingField = AtomicOrderingBitfieldElementT<SuccessOrderingField::NextBit>; using AlignmentField = AlignmentBitfieldElementT<FailureOrderingField::NextBit>; static_assert( Bitfield::areContiguous<VolatileField, WeakField, SuccessOrderingField, FailureOrderingField, AlignmentField>(), "Bitfields must be contiguous"); Align getAlign() const { return Align(1ULL << getSubclassData<AlignmentField>()); } void setAlignment(Align Align) { setSubclassData<AlignmentField>(Log2(Align)); } bool isVolatile() const { return getSubclassData<VolatileField>(); } void setVolatile(bool V) { setSubclassData<VolatileField>(V); } bool isWeak() const { return getSubclassData<WeakField>(); } void setWeak(bool IsWeak) { setSubclassData<WeakField>(IsWeak); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; AtomicOrdering getSuccessOrdering() const { return getSubclassData<SuccessOrderingField>(); } void setSuccessOrdering(AtomicOrdering Ordering) { (static_cast<void> (0)); setSubclassData<SuccessOrderingField>(Ordering); } AtomicOrdering getFailureOrdering() const { return getSubclassData<FailureOrderingField>(); } void setFailureOrdering(AtomicOrdering Ordering) { (static_cast<void> (0)); setSubclassData<FailureOrderingField>(Ordering); } SyncScope::ID getSyncScopeID() const { return SSID; } void setSyncScopeID(SyncScope::ID SSID) { this->SSID = SSID; } Value *getPointerOperand() { return getOperand(0); } const Value *getPointerOperand() const { return getOperand(0); } static unsigned getPointerOperandIndex() { return 0U; } Value *getCompareOperand() { return getOperand(1); } const Value *getCompareOperand() const { return getOperand(1); } Value *getNewValOperand() { return getOperand(2); } const Value *getNewValOperand() const { return getOperand(2); } unsigned getPointerAddressSpace() const { return getPointerOperand()->getType()->getPointerAddressSpace(); } # 648 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" static AtomicOrdering getStrongestFailureOrdering(AtomicOrdering SuccessOrdering) { switch (SuccessOrdering) { default: __builtin_unreachable(); case AtomicOrdering::Release: case AtomicOrdering::Monotonic: return AtomicOrdering::Monotonic; case AtomicOrdering::AcquireRelease: case AtomicOrdering::Acquire: return AtomicOrdering::Acquire; case AtomicOrdering::SequentiallyConsistent: return AtomicOrdering::SequentiallyConsistent; } } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::AtomicCmpXchg; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } private: template <typename Bitfield> void setSubclassData(typename Bitfield::Type Value) { Instruction::setSubclassData<Bitfield>(Value); } SyncScope::ID SSID; }; template <> struct OperandTraits<AtomicCmpXchgInst> : public FixedNumOperandTraits<AtomicCmpXchgInst, 3> { }; AtomicCmpXchgInst::op_iterator AtomicCmpXchgInst::op_begin() { return OperandTraits<AtomicCmpXchgInst>::op_begin(this); } AtomicCmpXchgInst::const_op_iterator AtomicCmpXchgInst::op_begin() const { return OperandTraits<AtomicCmpXchgInst>::op_begin(const_cast<AtomicCmpXchgInst*>(this)); } AtomicCmpXchgInst::op_iterator AtomicCmpXchgInst::op_end() { return OperandTraits<AtomicCmpXchgInst>::op_end(this); } AtomicCmpXchgInst::const_op_iterator AtomicCmpXchgInst::op_end() const { return OperandTraits<AtomicCmpXchgInst>::op_end(const_cast<AtomicCmpXchgInst*>(this)); } Value *AtomicCmpXchgInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<AtomicCmpXchgInst>::op_begin(const_cast<AtomicCmpXchgInst*>(this))[i_nocapture].get()); } void AtomicCmpXchgInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<AtomicCmpXchgInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned AtomicCmpXchgInst::getNumOperands() const { return OperandTraits<AtomicCmpXchgInst>::operands(this); } template <int Idx_nocapture> Use &AtomicCmpXchgInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &AtomicCmpXchgInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 701 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class AtomicRMWInst : public Instruction { protected: friend class Instruction; AtomicRMWInst *cloneImpl() const; public: enum BinOp : unsigned { Xchg, Add, Sub, And, Nand, Or, Xor, Max, Min, UMax, UMin, FAdd, FSub, FIRST_BINOP = Xchg, LAST_BINOP = FSub, BAD_BINOP }; private: template <unsigned Offset> using AtomicOrderingBitfieldElement = typename Bitfield::Element<AtomicOrdering, Offset, 3, AtomicOrdering::LAST>; template <unsigned Offset> using BinOpBitfieldElement = typename Bitfield::Element<BinOp, Offset, 4, BinOp::LAST_BINOP>; public: AtomicRMWInst(BinOp Operation, Value *Ptr, Value *Val, Align Alignment, AtomicOrdering Ordering, SyncScope::ID SSID, Instruction *InsertBefore = nullptr); AtomicRMWInst(BinOp Operation, Value *Ptr, Value *Val, Align Alignment, AtomicOrdering Ordering, SyncScope::ID SSID, BasicBlock *InsertAtEnd); void *operator new(size_t s) { return User::operator new(s, 2); } using VolatileField = BoolBitfieldElementT<0>; using AtomicOrderingField = AtomicOrderingBitfieldElementT<VolatileField::NextBit>; using OperationField = BinOpBitfieldElement<AtomicOrderingField::NextBit>; using AlignmentField = AlignmentBitfieldElementT<OperationField::NextBit>; static_assert(Bitfield::areContiguous<VolatileField, AtomicOrderingField, OperationField, AlignmentField>(), "Bitfields must be contiguous"); BinOp getOperation() const { return getSubclassData<OperationField>(); } static StringRef getOperationName(BinOp Op); static bool isFPOperation(BinOp Op) { switch (Op) { case AtomicRMWInst::FAdd: case AtomicRMWInst::FSub: return true; default: return false; } } void setOperation(BinOp Operation) { setSubclassData<OperationField>(Operation); } Align getAlign() const { return Align(1ULL << getSubclassData<AlignmentField>()); } void setAlignment(Align Align) { setSubclassData<AlignmentField>(Log2(Align)); } bool isVolatile() const { return getSubclassData<VolatileField>(); } void setVolatile(bool V) { setSubclassData<VolatileField>(V); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; AtomicOrdering getOrdering() const { return getSubclassData<AtomicOrderingField>(); } void setOrdering(AtomicOrdering Ordering) { (static_cast<void> (0)); setSubclassData<AtomicOrderingField>(Ordering); } SyncScope::ID getSyncScopeID() const { return SSID; } void setSyncScopeID(SyncScope::ID SSID) { this->SSID = SSID; } Value *getPointerOperand() { return getOperand(0); } const Value *getPointerOperand() const { return getOperand(0); } static unsigned getPointerOperandIndex() { return 0U; } Value *getValOperand() { return getOperand(1); } const Value *getValOperand() const { return getOperand(1); } unsigned getPointerAddressSpace() const { return getPointerOperand()->getType()->getPointerAddressSpace(); } bool isFloatingPointOperation() const { return isFPOperation(getOperation()); } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::AtomicRMW; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } private: void Init(BinOp Operation, Value *Ptr, Value *Val, Align Align, AtomicOrdering Ordering, SyncScope::ID SSID); template <typename Bitfield> void setSubclassData(typename Bitfield::Type Value) { Instruction::setSubclassData<Bitfield>(Value); } SyncScope::ID SSID; }; template <> struct OperandTraits<AtomicRMWInst> : public FixedNumOperandTraits<AtomicRMWInst,2> { }; AtomicRMWInst::op_iterator AtomicRMWInst::op_begin() { return OperandTraits<AtomicRMWInst>::op_begin(this); } AtomicRMWInst::const_op_iterator AtomicRMWInst::op_begin() const { return OperandTraits<AtomicRMWInst>::op_begin(const_cast<AtomicRMWInst*>(this)); } AtomicRMWInst::op_iterator AtomicRMWInst::op_end() { return OperandTraits<AtomicRMWInst>::op_end(this); } AtomicRMWInst::const_op_iterator AtomicRMWInst::op_end() const { return OperandTraits<AtomicRMWInst>::op_end(const_cast<AtomicRMWInst*>(this)); } Value *AtomicRMWInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<AtomicRMWInst>::op_begin(const_cast<AtomicRMWInst*>(this))[i_nocapture].get()); } void AtomicRMWInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<AtomicRMWInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned AtomicRMWInst::getNumOperands() const { return OperandTraits<AtomicRMWInst>::operands(this); } template <int Idx_nocapture> Use &AtomicRMWInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &AtomicRMWInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 896 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" inline Type *checkGEPType(Type *Ty) { (static_cast<void> (0)); return Ty; } class GetElementPtrInst : public Instruction { Type *SourceElementType; Type *ResultElementType; GetElementPtrInst(const GetElementPtrInst &GEPI); inline GetElementPtrInst(Type *PointeeType, Value *Ptr, ArrayRef<Value *> IdxList, unsigned Values, const Twine &NameStr, Instruction *InsertBefore); inline GetElementPtrInst(Type *PointeeType, Value *Ptr, ArrayRef<Value *> IdxList, unsigned Values, const Twine &NameStr, BasicBlock *InsertAtEnd); void init(Value *Ptr, ArrayRef<Value *> IdxList, const Twine &NameStr); protected: friend class Instruction; GetElementPtrInst *cloneImpl() const; public: static GetElementPtrInst *Create(Type *PointeeType, Value *Ptr, ArrayRef<Value *> IdxList, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { unsigned Values = 1 + unsigned(IdxList.size()); if (!PointeeType) PointeeType = cast<PointerType>(Ptr->getType()->getScalarType())->getElementType(); else (static_cast<void> (0)); return new (Values) GetElementPtrInst(PointeeType, Ptr, IdxList, Values, NameStr, InsertBefore); } static GetElementPtrInst *Create(Type *PointeeType, Value *Ptr, ArrayRef<Value *> IdxList, const Twine &NameStr, BasicBlock *InsertAtEnd) { unsigned Values = 1 + unsigned(IdxList.size()); if (!PointeeType) PointeeType = cast<PointerType>(Ptr->getType()->getScalarType())->getElementType(); else (static_cast<void> (0)); return new (Values) GetElementPtrInst(PointeeType, Ptr, IdxList, Values, NameStr, InsertAtEnd); } static GetElementPtrInst *CreateInBounds(Value *Ptr, ArrayRef<Value *> IdxList, const Twine &NameStr = "", Instruction *InsertBefore = nullptr){ return CreateInBounds(nullptr, Ptr, IdxList, NameStr, InsertBefore); } static GetElementPtrInst * CreateInBounds(Type *PointeeType, Value *Ptr, ArrayRef<Value *> IdxList, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { GetElementPtrInst *GEP = Create(PointeeType, Ptr, IdxList, NameStr, InsertBefore); GEP->setIsInBounds(true); return GEP; } static GetElementPtrInst *CreateInBounds(Value *Ptr, ArrayRef<Value *> IdxList, const Twine &NameStr, BasicBlock *InsertAtEnd) { return CreateInBounds(nullptr, Ptr, IdxList, NameStr, InsertAtEnd); } static GetElementPtrInst *CreateInBounds(Type *PointeeType, Value *Ptr, ArrayRef<Value *> IdxList, const Twine &NameStr, BasicBlock *InsertAtEnd) { GetElementPtrInst *GEP = Create(PointeeType, Ptr, IdxList, NameStr, InsertAtEnd); GEP->setIsInBounds(true); return GEP; } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; Type *getSourceElementType() const { return SourceElementType; } void setSourceElementType(Type *Ty) { SourceElementType = Ty; } void setResultElementType(Type *Ty) { ResultElementType = Ty; } Type *getResultElementType() const { (static_cast<void> (0)); return ResultElementType; } unsigned getAddressSpace() const { return getPointerAddressSpace(); } static Type *getIndexedType(Type *Ty, ArrayRef<Value *> IdxList); static Type *getIndexedType(Type *Ty, ArrayRef<Constant *> IdxList); static Type *getIndexedType(Type *Ty, ArrayRef<uint64_t> IdxList); static Type *getTypeAtIndex(Type *Ty, Value *Idx); static Type *getTypeAtIndex(Type *Ty, uint64_t Idx); inline op_iterator idx_begin() { return op_begin()+1; } inline const_op_iterator idx_begin() const { return op_begin()+1; } inline op_iterator idx_end() { return op_end(); } inline const_op_iterator idx_end() const { return op_end(); } inline iterator_range<op_iterator> indices() { return make_range(idx_begin(), idx_end()); } inline iterator_range<const_op_iterator> indices() const { return make_range(idx_begin(), idx_end()); } Value *getPointerOperand() { return getOperand(0); } const Value *getPointerOperand() const { return getOperand(0); } static unsigned getPointerOperandIndex() { return 0U; } Type *getPointerOperandType() const { return getPointerOperand()->getType(); } unsigned getPointerAddressSpace() const { return getPointerOperandType()->getPointerAddressSpace(); } static Type *getGEPReturnType(Type *ElTy, Value *Ptr, ArrayRef<Value *> IdxList) { Type *PtrTy = PointerType::get(checkGEPType(getIndexedType(ElTy, IdxList)), Ptr->getType()->getPointerAddressSpace()); if (auto *PtrVTy = dyn_cast<VectorType>(Ptr->getType())) { ElementCount EltCount = PtrVTy->getElementCount(); return VectorType::get(PtrTy, EltCount); } for (Value *Index : IdxList) if (auto *IndexVTy = dyn_cast<VectorType>(Index->getType())) { ElementCount EltCount = IndexVTy->getElementCount(); return VectorType::get(PtrTy, EltCount); } return PtrTy; } unsigned getNumIndices() const { return getNumOperands() - 1; } bool hasIndices() const { return getNumOperands() > 1; } bool hasAllZeroIndices() const; bool hasAllConstantIndices() const; void setIsInBounds(bool b = true); bool isInBounds() const; # 1123 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" bool accumulateConstantOffset(const DataLayout &DL, APInt &Offset) const; static bool classof(const Instruction *I) { return (I->getOpcode() == Instruction::GetElementPtr); } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; template <> struct OperandTraits<GetElementPtrInst> : public VariadicOperandTraits<GetElementPtrInst, 1> { }; GetElementPtrInst::GetElementPtrInst(Type *PointeeType, Value *Ptr, ArrayRef<Value *> IdxList, unsigned Values, const Twine &NameStr, Instruction *InsertBefore) : Instruction(getGEPReturnType(PointeeType, Ptr, IdxList), GetElementPtr, OperandTraits<GetElementPtrInst>::op_end(this) - Values, Values, InsertBefore), SourceElementType(PointeeType), ResultElementType(getIndexedType(PointeeType, IdxList)) { (static_cast<void> (0)); init(Ptr, IdxList, NameStr); } GetElementPtrInst::GetElementPtrInst(Type *PointeeType, Value *Ptr, ArrayRef<Value *> IdxList, unsigned Values, const Twine &NameStr, BasicBlock *InsertAtEnd) : Instruction(getGEPReturnType(PointeeType, Ptr, IdxList), GetElementPtr, OperandTraits<GetElementPtrInst>::op_end(this) - Values, Values, InsertAtEnd), SourceElementType(PointeeType), ResultElementType(getIndexedType(PointeeType, IdxList)) { (static_cast<void> (0)); init(Ptr, IdxList, NameStr); } GetElementPtrInst::op_iterator GetElementPtrInst::op_begin() { return OperandTraits<GetElementPtrInst>::op_begin(this); } GetElementPtrInst::const_op_iterator GetElementPtrInst::op_begin() const { return OperandTraits<GetElementPtrInst>::op_begin(const_cast<GetElementPtrInst*>(this)); } GetElementPtrInst::op_iterator GetElementPtrInst::op_end() { return OperandTraits<GetElementPtrInst>::op_end(this); } GetElementPtrInst::const_op_iterator GetElementPtrInst::op_end() const { return OperandTraits<GetElementPtrInst>::op_end(const_cast<GetElementPtrInst*>(this)); } Value *GetElementPtrInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<GetElementPtrInst>::op_begin(const_cast<GetElementPtrInst*>(this))[i_nocapture].get()); } void GetElementPtrInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<GetElementPtrInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned GetElementPtrInst::getNumOperands() const { return OperandTraits<GetElementPtrInst>::operands(this); } template <int Idx_nocapture> Use &GetElementPtrInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &GetElementPtrInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 1177 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class ICmpInst: public CmpInst { void AssertOK() { (static_cast<void> (0)); (static_cast<void> (0)); (static_cast<void> (0)); } protected: friend class Instruction; ICmpInst *cloneImpl() const; public: ICmpInst( Instruction *InsertBefore, Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr = "" ) : CmpInst(makeCmpResultType(LHS->getType()), Instruction::ICmp, pred, LHS, RHS, NameStr, InsertBefore) { } ICmpInst( BasicBlock &InsertAtEnd, Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr = "" ) : CmpInst(makeCmpResultType(LHS->getType()), Instruction::ICmp, pred, LHS, RHS, NameStr, &InsertAtEnd) { } ICmpInst( Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr = "" ) : CmpInst(makeCmpResultType(LHS->getType()), Instruction::ICmp, pred, LHS, RHS, NameStr) { } Predicate getSignedPredicate() const { return getSignedPredicate(getPredicate()); } static Predicate getSignedPredicate(Predicate pred); Predicate getUnsignedPredicate() const { return getUnsignedPredicate(getPredicate()); } static Predicate getUnsignedPredicate(Predicate pred); static bool isEquality(Predicate P) { return P == ICMP_EQ || P == ICMP_NE; } bool isEquality() const { return isEquality(getPredicate()); } bool isCommutative() const { return isEquality(); } bool isRelational() const { return !isEquality(); } static bool isRelational(Predicate P) { return !isEquality(P); } void swapOperands() { setPredicate(getSwappedPredicate()); Op<0>().swap(Op<1>()); } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::ICmp; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; # 1319 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class FCmpInst: public CmpInst { void AssertOK() { (static_cast<void> (0)); (static_cast<void> (0)); (static_cast<void> (0)); } protected: friend class Instruction; FCmpInst *cloneImpl() const; public: FCmpInst( Instruction *InsertBefore, Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr = "" ) : CmpInst(makeCmpResultType(LHS->getType()), Instruction::FCmp, pred, LHS, RHS, NameStr, InsertBefore) { AssertOK(); } FCmpInst( BasicBlock &InsertAtEnd, Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr = "" ) : CmpInst(makeCmpResultType(LHS->getType()), Instruction::FCmp, pred, LHS, RHS, NameStr, &InsertAtEnd) { AssertOK(); } FCmpInst( Predicate Pred, Value *LHS, Value *RHS, const Twine &NameStr = "", Instruction *FlagsSource = nullptr ) : CmpInst(makeCmpResultType(LHS->getType()), Instruction::FCmp, Pred, LHS, RHS, NameStr, nullptr, FlagsSource) { AssertOK(); } static bool isEquality(Predicate Pred) { return Pred == FCMP_OEQ || Pred == FCMP_ONE || Pred == FCMP_UEQ || Pred == FCMP_UNE; } bool isEquality() const { return isEquality(getPredicate()); } bool isCommutative() const { return isEquality() || getPredicate() == FCMP_FALSE || getPredicate() == FCMP_TRUE || getPredicate() == FCMP_ORD || getPredicate() == FCMP_UNO; } bool isRelational() const { return !isEquality(); } void swapOperands() { setPredicate(getSwappedPredicate()); Op<0>().swap(Op<1>()); } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::FCmp; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class CallInst : public CallBase { CallInst(const CallInst &CI); inline CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr, Instruction *InsertBefore); inline CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args, const Twine &NameStr, Instruction *InsertBefore) : CallInst(Ty, Func, Args, None, NameStr, InsertBefore) {} inline CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr, BasicBlock *InsertAtEnd); explicit CallInst(FunctionType *Ty, Value *F, const Twine &NameStr, Instruction *InsertBefore); CallInst(FunctionType *ty, Value *F, const Twine &NameStr, BasicBlock *InsertAtEnd); void init(FunctionType *FTy, Value *Func, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr); void init(FunctionType *FTy, Value *Func, const Twine &NameStr); static int ComputeNumOperands(int NumArgs, int NumBundleInputs = 0) { return 1 + NumArgs + NumBundleInputs; } protected: friend class Instruction; CallInst *cloneImpl() const; public: static CallInst *Create(FunctionType *Ty, Value *F, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { return new (ComputeNumOperands(0)) CallInst(Ty, F, NameStr, InsertBefore); } static CallInst *Create(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args, const Twine &NameStr, Instruction *InsertBefore = nullptr) { return new (ComputeNumOperands(Args.size())) CallInst(Ty, Func, Args, None, NameStr, InsertBefore); } static CallInst *Create(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles = None, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { const int NumOperands = ComputeNumOperands(Args.size(), CountBundleInputs(Bundles)); const unsigned DescriptorBytes = Bundles.size() * sizeof(BundleOpInfo); return new (NumOperands, DescriptorBytes) CallInst(Ty, Func, Args, Bundles, NameStr, InsertBefore); } static CallInst *Create(FunctionType *Ty, Value *F, const Twine &NameStr, BasicBlock *InsertAtEnd) { return new (ComputeNumOperands(0)) CallInst(Ty, F, NameStr, InsertAtEnd); } static CallInst *Create(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args, const Twine &NameStr, BasicBlock *InsertAtEnd) { return new (ComputeNumOperands(Args.size())) CallInst(Ty, Func, Args, None, NameStr, InsertAtEnd); } static CallInst *Create(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr, BasicBlock *InsertAtEnd) { const int NumOperands = ComputeNumOperands(Args.size(), CountBundleInputs(Bundles)); const unsigned DescriptorBytes = Bundles.size() * sizeof(BundleOpInfo); return new (NumOperands, DescriptorBytes) CallInst(Ty, Func, Args, Bundles, NameStr, InsertAtEnd); } static CallInst *Create(FunctionCallee Func, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { return Create(Func.getFunctionType(), Func.getCallee(), NameStr, InsertBefore); } static CallInst *Create(FunctionCallee Func, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles = None, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { return Create(Func.getFunctionType(), Func.getCallee(), Args, Bundles, NameStr, InsertBefore); } static CallInst *Create(FunctionCallee Func, ArrayRef<Value *> Args, const Twine &NameStr, Instruction *InsertBefore = nullptr) { return Create(Func.getFunctionType(), Func.getCallee(), Args, NameStr, InsertBefore); } static CallInst *Create(FunctionCallee Func, const Twine &NameStr, BasicBlock *InsertAtEnd) { return Create(Func.getFunctionType(), Func.getCallee(), NameStr, InsertAtEnd); } static CallInst *Create(FunctionCallee Func, ArrayRef<Value *> Args, const Twine &NameStr, BasicBlock *InsertAtEnd) { return Create(Func.getFunctionType(), Func.getCallee(), Args, NameStr, InsertAtEnd); } static CallInst *Create(FunctionCallee Func, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr, BasicBlock *InsertAtEnd) { return Create(Func.getFunctionType(), Func.getCallee(), Args, Bundles, NameStr, InsertAtEnd); } static CallInst *Create(CallInst *CI, ArrayRef<OperandBundleDef> Bundles, Instruction *InsertPt = nullptr); static Instruction *CreateMalloc(Instruction *InsertBefore, Type *IntPtrTy, Type *AllocTy, Value *AllocSize, Value *ArraySize = nullptr, Function *MallocF = nullptr, const Twine &Name = ""); static Instruction *CreateMalloc(BasicBlock *InsertAtEnd, Type *IntPtrTy, Type *AllocTy, Value *AllocSize, Value *ArraySize = nullptr, Function *MallocF = nullptr, const Twine &Name = ""); static Instruction *CreateMalloc(Instruction *InsertBefore, Type *IntPtrTy, Type *AllocTy, Value *AllocSize, Value *ArraySize = nullptr, ArrayRef<OperandBundleDef> Bundles = None, Function *MallocF = nullptr, const Twine &Name = ""); static Instruction *CreateMalloc(BasicBlock *InsertAtEnd, Type *IntPtrTy, Type *AllocTy, Value *AllocSize, Value *ArraySize = nullptr, ArrayRef<OperandBundleDef> Bundles = None, Function *MallocF = nullptr, const Twine &Name = ""); static Instruction *CreateFree(Value *Source, Instruction *InsertBefore); static Instruction *CreateFree(Value *Source, BasicBlock *InsertAtEnd); static Instruction *CreateFree(Value *Source, ArrayRef<OperandBundleDef> Bundles, Instruction *InsertBefore); static Instruction *CreateFree(Value *Source, ArrayRef<OperandBundleDef> Bundles, BasicBlock *InsertAtEnd); enum TailCallKind : unsigned { TCK_None = 0, TCK_Tail = 1, TCK_MustTail = 2, TCK_NoTail = 3, TCK_LAST = TCK_NoTail }; using TailCallKindField = Bitfield::Element<TailCallKind, 0, 2, TCK_LAST>; static_assert( Bitfield::areContiguous<TailCallKindField, CallBase::CallingConvField>(), "Bitfields must be contiguous"); TailCallKind getTailCallKind() const { return getSubclassData<TailCallKindField>(); } bool isTailCall() const { TailCallKind Kind = getTailCallKind(); return Kind == TCK_Tail || Kind == TCK_MustTail; } bool isMustTailCall() const { return getTailCallKind() == TCK_MustTail; } bool isNoTailCall() const { return getTailCallKind() == TCK_NoTail; } void setTailCallKind(TailCallKind TCK) { setSubclassData<TailCallKindField>(TCK); } void setTailCall(bool IsTc = true) { setTailCallKind(IsTc ? TCK_Tail : TCK_None); } bool canReturnTwice() const { return hasFnAttr(Attribute::ReturnsTwice); } void setCanReturnTwice() { addAttribute(AttributeList::FunctionIndex, Attribute::ReturnsTwice); } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Call; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } void updateProfWeight(uint64_t S, uint64_t T); private: template <typename Bitfield> void setSubclassData(typename Bitfield::Type Value) { Instruction::setSubclassData<Bitfield>(Value); } }; CallInst::CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr, BasicBlock *InsertAtEnd) : CallBase(Ty->getReturnType(), Instruction::Call, OperandTraits<CallBase>::op_end(this) - (Args.size() + CountBundleInputs(Bundles) + 1), unsigned(Args.size() + CountBundleInputs(Bundles) + 1), InsertAtEnd) { init(Ty, Func, Args, Bundles, NameStr); } CallInst::CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr, Instruction *InsertBefore) : CallBase(Ty->getReturnType(), Instruction::Call, OperandTraits<CallBase>::op_end(this) - (Args.size() + CountBundleInputs(Bundles) + 1), unsigned(Args.size() + CountBundleInputs(Bundles) + 1), InsertBefore) { init(Ty, Func, Args, Bundles, NameStr); } class SelectInst : public Instruction { SelectInst(Value *C, Value *S1, Value *S2, const Twine &NameStr, Instruction *InsertBefore) : Instruction(S1->getType(), Instruction::Select, &Op<0>(), 3, InsertBefore) { init(C, S1, S2); setName(NameStr); } SelectInst(Value *C, Value *S1, Value *S2, const Twine &NameStr, BasicBlock *InsertAtEnd) : Instruction(S1->getType(), Instruction::Select, &Op<0>(), 3, InsertAtEnd) { init(C, S1, S2); setName(NameStr); } void init(Value *C, Value *S1, Value *S2) { (static_cast<void> (0)); Op<0>() = C; Op<1>() = S1; Op<2>() = S2; } protected: friend class Instruction; SelectInst *cloneImpl() const; public: static SelectInst *Create(Value *C, Value *S1, Value *S2, const Twine &NameStr = "", Instruction *InsertBefore = nullptr, Instruction *MDFrom = nullptr) { SelectInst *Sel = new(3) SelectInst(C, S1, S2, NameStr, InsertBefore); if (MDFrom) Sel->copyMetadata(*MDFrom); return Sel; } static SelectInst *Create(Value *C, Value *S1, Value *S2, const Twine &NameStr, BasicBlock *InsertAtEnd) { return new(3) SelectInst(C, S1, S2, NameStr, InsertAtEnd); } const Value *getCondition() const { return Op<0>(); } const Value *getTrueValue() const { return Op<1>(); } const Value *getFalseValue() const { return Op<2>(); } Value *getCondition() { return Op<0>(); } Value *getTrueValue() { return Op<1>(); } Value *getFalseValue() { return Op<2>(); } void setCondition(Value *V) { Op<0>() = V; } void setTrueValue(Value *V) { Op<1>() = V; } void setFalseValue(Value *V) { Op<2>() = V; } void swapValues() { Op<1>().swap(Op<2>()); } static const char *areInvalidOperands(Value *Cond, Value *True, Value *False); public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; OtherOps getOpcode() const { return static_cast<OtherOps>(Instruction::getOpcode()); } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Select; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; template <> struct OperandTraits<SelectInst> : public FixedNumOperandTraits<SelectInst, 3> { }; SelectInst::op_iterator SelectInst::op_begin() { return OperandTraits<SelectInst>::op_begin(this); } SelectInst::const_op_iterator SelectInst::op_begin() const { return OperandTraits<SelectInst>::op_begin(const_cast<SelectInst*>(this)); } SelectInst::op_iterator SelectInst::op_end() { return OperandTraits<SelectInst>::op_end(this); } SelectInst::const_op_iterator SelectInst::op_end() const { return OperandTraits<SelectInst>::op_end(const_cast<SelectInst*>(this)); } Value *SelectInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<SelectInst>::op_begin(const_cast<SelectInst*>(this))[i_nocapture].get()); } void SelectInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<SelectInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned SelectInst::getNumOperands() const { return OperandTraits<SelectInst>::operands(this); } template <int Idx_nocapture> Use &SelectInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &SelectInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 1785 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class VAArgInst : public UnaryInstruction { protected: friend class Instruction; VAArgInst *cloneImpl() const; public: VAArgInst(Value *List, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) : UnaryInstruction(Ty, VAArg, List, InsertBefore) { setName(NameStr); } VAArgInst(Value *List, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd) : UnaryInstruction(Ty, VAArg, List, InsertAtEnd) { setName(NameStr); } Value *getPointerOperand() { return getOperand(0); } const Value *getPointerOperand() const { return getOperand(0); } static unsigned getPointerOperandIndex() { return 0U; } static bool classof(const Instruction *I) { return I->getOpcode() == VAArg; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; # 1825 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class ExtractElementInst : public Instruction { ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr = "", Instruction *InsertBefore = nullptr); ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr, BasicBlock *InsertAtEnd); protected: friend class Instruction; ExtractElementInst *cloneImpl() const; public: static ExtractElementInst *Create(Value *Vec, Value *Idx, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { return new(2) ExtractElementInst(Vec, Idx, NameStr, InsertBefore); } static ExtractElementInst *Create(Value *Vec, Value *Idx, const Twine &NameStr, BasicBlock *InsertAtEnd) { return new(2) ExtractElementInst(Vec, Idx, NameStr, InsertAtEnd); } static bool isValidOperands(const Value *Vec, const Value *Idx); Value *getVectorOperand() { return Op<0>(); } Value *getIndexOperand() { return Op<1>(); } const Value *getVectorOperand() const { return Op<0>(); } const Value *getIndexOperand() const { return Op<1>(); } VectorType *getVectorOperandType() const { return cast<VectorType>(getVectorOperand()->getType()); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::ExtractElement; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; template <> struct OperandTraits<ExtractElementInst> : public FixedNumOperandTraits<ExtractElementInst, 2> { }; ExtractElementInst::op_iterator ExtractElementInst::op_begin() { return OperandTraits<ExtractElementInst>::op_begin(this); } ExtractElementInst::const_op_iterator ExtractElementInst::op_begin() const { return OperandTraits<ExtractElementInst>::op_begin(const_cast<ExtractElementInst*>(this)); } ExtractElementInst::op_iterator ExtractElementInst::op_end() { return OperandTraits<ExtractElementInst>::op_end(this); } ExtractElementInst::const_op_iterator ExtractElementInst::op_end() const { return OperandTraits<ExtractElementInst>::op_end(const_cast<ExtractElementInst*>(this)); } Value *ExtractElementInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<ExtractElementInst>::op_begin(const_cast<ExtractElementInst*>(this))[i_nocapture].get()); } void ExtractElementInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<ExtractElementInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ExtractElementInst::getNumOperands() const { return OperandTraits<ExtractElementInst>::operands(this); } template <int Idx_nocapture> Use &ExtractElementInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &ExtractElementInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 1889 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class InsertElementInst : public Instruction { InsertElementInst(Value *Vec, Value *NewElt, Value *Idx, const Twine &NameStr = "", Instruction *InsertBefore = nullptr); InsertElementInst(Value *Vec, Value *NewElt, Value *Idx, const Twine &NameStr, BasicBlock *InsertAtEnd); protected: friend class Instruction; InsertElementInst *cloneImpl() const; public: static InsertElementInst *Create(Value *Vec, Value *NewElt, Value *Idx, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { return new(3) InsertElementInst(Vec, NewElt, Idx, NameStr, InsertBefore); } static InsertElementInst *Create(Value *Vec, Value *NewElt, Value *Idx, const Twine &NameStr, BasicBlock *InsertAtEnd) { return new(3) InsertElementInst(Vec, NewElt, Idx, NameStr, InsertAtEnd); } static bool isValidOperands(const Value *Vec, const Value *NewElt, const Value *Idx); VectorType *getType() const { return cast<VectorType>(Instruction::getType()); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::InsertElement; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; template <> struct OperandTraits<InsertElementInst> : public FixedNumOperandTraits<InsertElementInst, 3> { }; InsertElementInst::op_iterator InsertElementInst::op_begin() { return OperandTraits<InsertElementInst>::op_begin(this); } InsertElementInst::const_op_iterator InsertElementInst::op_begin() const { return OperandTraits<InsertElementInst>::op_begin(const_cast<InsertElementInst*>(this)); } InsertElementInst::op_iterator InsertElementInst::op_end() { return OperandTraits<InsertElementInst>::op_end(this); } InsertElementInst::const_op_iterator InsertElementInst::op_end() const { return OperandTraits<InsertElementInst>::op_end(const_cast<InsertElementInst*>(this)); } Value *InsertElementInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<InsertElementInst>::op_begin(const_cast<InsertElementInst*>(this))[i_nocapture].get()); } void InsertElementInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<InsertElementInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned InsertElementInst::getNumOperands() const { return OperandTraits<InsertElementInst>::operands(this); } template <int Idx_nocapture> Use &InsertElementInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &InsertElementInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } constexpr int UndefMaskElem = -1; # 1961 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class ShuffleVectorInst : public Instruction { SmallVector<int, 4> ShuffleMask; Constant *ShuffleMaskForBitcode; protected: friend class Instruction; ShuffleVectorInst *cloneImpl() const; public: ShuffleVectorInst(Value *V1, Value *V2, Value *Mask, const Twine &NameStr = "", Instruction *InsertBefor = nullptr); ShuffleVectorInst(Value *V1, Value *V2, Value *Mask, const Twine &NameStr, BasicBlock *InsertAtEnd); ShuffleVectorInst(Value *V1, Value *V2, ArrayRef<int> Mask, const Twine &NameStr = "", Instruction *InsertBefor = nullptr); ShuffleVectorInst(Value *V1, Value *V2, ArrayRef<int> Mask, const Twine &NameStr, BasicBlock *InsertAtEnd); void *operator new(size_t s) { return User::operator new(s, 2); } void commute(); static bool isValidOperands(const Value *V1, const Value *V2, const Value *Mask); static bool isValidOperands(const Value *V1, const Value *V2, ArrayRef<int> Mask); VectorType *getType() const { return cast<VectorType>(Instruction::getType()); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; int getMaskValue(unsigned Elt) const { return ShuffleMask[Elt]; } static void getShuffleMask(const Constant *Mask, SmallVectorImpl<int> &Result); void getShuffleMask(SmallVectorImpl<int> &Result) const { Result.assign(ShuffleMask.begin(), ShuffleMask.end()); } Constant *getShuffleMaskForBitcode() const { return ShuffleMaskForBitcode; } static Constant *convertShuffleMaskForBitcode(ArrayRef<int> Mask, Type *ResultTy); void setShuffleMask(ArrayRef<int> Mask); ArrayRef<int> getShuffleMask() const { return ShuffleMask; } bool changesLength() const { unsigned NumSourceElts = cast<VectorType>(Op<0>()->getType())->getElementCount().Min; unsigned NumMaskElts = ShuffleMask.size(); return NumSourceElts != NumMaskElts; } bool increasesLength() const { unsigned NumSourceElts = cast<VectorType>(Op<0>()->getType())->getNumElements(); unsigned NumMaskElts = ShuffleMask.size(); return NumSourceElts < NumMaskElts; } static bool isSingleSourceMask(ArrayRef<int> Mask); static bool isSingleSourceMask(const Constant *Mask) { (static_cast<void> (0)); SmallVector<int, 16> MaskAsInts; getShuffleMask(Mask, MaskAsInts); return isSingleSourceMask(MaskAsInts); } bool isSingleSource() const { return !changesLength() && isSingleSourceMask(ShuffleMask); } static bool isIdentityMask(ArrayRef<int> Mask); static bool isIdentityMask(const Constant *Mask) { (static_cast<void> (0)); SmallVector<int, 16> MaskAsInts; getShuffleMask(Mask, MaskAsInts); return isIdentityMask(MaskAsInts); } bool isIdentity() const { return !changesLength() && isIdentityMask(ShuffleMask); } bool isIdentityWithPadding() const; bool isIdentityWithExtract() const; bool isConcat() const; # 2116 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" static bool isSelectMask(ArrayRef<int> Mask); static bool isSelectMask(const Constant *Mask) { (static_cast<void> (0)); SmallVector<int, 16> MaskAsInts; getShuffleMask(Mask, MaskAsInts); return isSelectMask(MaskAsInts); } # 2132 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" bool isSelect() const { return !changesLength() && isSelectMask(ShuffleMask); } static bool isReverseMask(ArrayRef<int> Mask); static bool isReverseMask(const Constant *Mask) { (static_cast<void> (0)); SmallVector<int, 16> MaskAsInts; getShuffleMask(Mask, MaskAsInts); return isReverseMask(MaskAsInts); } bool isReverse() const { return !changesLength() && isReverseMask(ShuffleMask); } static bool isZeroEltSplatMask(ArrayRef<int> Mask); static bool isZeroEltSplatMask(const Constant *Mask) { (static_cast<void> (0)); SmallVector<int, 16> MaskAsInts; getShuffleMask(Mask, MaskAsInts); return isZeroEltSplatMask(MaskAsInts); } bool isZeroEltSplat() const { return !changesLength() && isZeroEltSplatMask(ShuffleMask); } # 2210 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" static bool isTransposeMask(ArrayRef<int> Mask); static bool isTransposeMask(const Constant *Mask) { (static_cast<void> (0)); SmallVector<int, 16> MaskAsInts; getShuffleMask(Mask, MaskAsInts); return isTransposeMask(MaskAsInts); } bool isTranspose() const { return !changesLength() && isTransposeMask(ShuffleMask); } static bool isExtractSubvectorMask(ArrayRef<int> Mask, int NumSrcElts, int &Index); static bool isExtractSubvectorMask(const Constant *Mask, int NumSrcElts, int &Index) { (static_cast<void> (0)); SmallVector<int, 16> MaskAsInts; getShuffleMask(Mask, MaskAsInts); return isExtractSubvectorMask(MaskAsInts, NumSrcElts, Index); } bool isExtractSubvectorMask(int &Index) const { int NumSrcElts = cast<VectorType>(Op<0>()->getType())->getNumElements(); return isExtractSubvectorMask(ShuffleMask, NumSrcElts, Index); } static void commuteShuffleMask(MutableArrayRef<int> Mask, unsigned InVecNumElts) { for (int &Idx : Mask) { if (Idx == -1) continue; Idx = Idx < (int)InVecNumElts ? Idx + InVecNumElts : Idx - InVecNumElts; (static_cast<void> (0)); } } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::ShuffleVector; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; template <> struct OperandTraits<ShuffleVectorInst> : public FixedNumOperandTraits<ShuffleVectorInst, 2> {}; ShuffleVectorInst::op_iterator ShuffleVectorInst::op_begin() { return OperandTraits<ShuffleVectorInst>::op_begin(this); } ShuffleVectorInst::const_op_iterator ShuffleVectorInst::op_begin() const { return OperandTraits<ShuffleVectorInst>::op_begin(const_cast<ShuffleVectorInst*>(this)); } ShuffleVectorInst::op_iterator ShuffleVectorInst::op_end() { return OperandTraits<ShuffleVectorInst>::op_end(this); } ShuffleVectorInst::const_op_iterator ShuffleVectorInst::op_end() const { return OperandTraits<ShuffleVectorInst>::op_end(const_cast<ShuffleVectorInst*>(this)); } Value *ShuffleVectorInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<ShuffleVectorInst>::op_begin(const_cast<ShuffleVectorInst*>(this))[i_nocapture].get()); } void ShuffleVectorInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<ShuffleVectorInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ShuffleVectorInst::getNumOperands() const { return OperandTraits<ShuffleVectorInst>::operands(this); } template <int Idx_nocapture> Use &ShuffleVectorInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &ShuffleVectorInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 2281 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class ExtractValueInst : public UnaryInstruction { SmallVector<unsigned, 4> Indices; ExtractValueInst(const ExtractValueInst &EVI); inline ExtractValueInst(Value *Agg, ArrayRef<unsigned> Idxs, const Twine &NameStr, Instruction *InsertBefore); inline ExtractValueInst(Value *Agg, ArrayRef<unsigned> Idxs, const Twine &NameStr, BasicBlock *InsertAtEnd); void init(ArrayRef<unsigned> Idxs, const Twine &NameStr); protected: friend class Instruction; ExtractValueInst *cloneImpl() const; public: static ExtractValueInst *Create(Value *Agg, ArrayRef<unsigned> Idxs, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { return new ExtractValueInst(Agg, Idxs, NameStr, InsertBefore); } static ExtractValueInst *Create(Value *Agg, ArrayRef<unsigned> Idxs, const Twine &NameStr, BasicBlock *InsertAtEnd) { return new ExtractValueInst(Agg, Idxs, NameStr, InsertAtEnd); } static Type *getIndexedType(Type *Agg, ArrayRef<unsigned> Idxs); using idx_iterator = const unsigned*; inline idx_iterator idx_begin() const { return Indices.begin(); } inline idx_iterator idx_end() const { return Indices.end(); } inline iterator_range<idx_iterator> indices() const { return make_range(idx_begin(), idx_end()); } Value *getAggregateOperand() { return getOperand(0); } const Value *getAggregateOperand() const { return getOperand(0); } static unsigned getAggregateOperandIndex() { return 0U; } ArrayRef<unsigned> getIndices() const { return Indices; } unsigned getNumIndices() const { return (unsigned)Indices.size(); } bool hasIndices() const { return true; } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::ExtractValue; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; ExtractValueInst::ExtractValueInst(Value *Agg, ArrayRef<unsigned> Idxs, const Twine &NameStr, Instruction *InsertBefore) : UnaryInstruction(checkGEPType(getIndexedType(Agg->getType(), Idxs)), ExtractValue, Agg, InsertBefore) { init(Idxs, NameStr); } ExtractValueInst::ExtractValueInst(Value *Agg, ArrayRef<unsigned> Idxs, const Twine &NameStr, BasicBlock *InsertAtEnd) : UnaryInstruction(checkGEPType(getIndexedType(Agg->getType(), Idxs)), ExtractValue, Agg, InsertAtEnd) { init(Idxs, NameStr); } # 2392 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class InsertValueInst : public Instruction { SmallVector<unsigned, 4> Indices; InsertValueInst(const InsertValueInst &IVI); inline InsertValueInst(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs, const Twine &NameStr, Instruction *InsertBefore); inline InsertValueInst(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs, const Twine &NameStr, BasicBlock *InsertAtEnd); InsertValueInst(Value *Agg, Value *Val, unsigned Idx, const Twine &NameStr = "", Instruction *InsertBefore = nullptr); InsertValueInst(Value *Agg, Value *Val, unsigned Idx, const Twine &NameStr, BasicBlock *InsertAtEnd); void init(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs, const Twine &NameStr); protected: friend class Instruction; InsertValueInst *cloneImpl() const; public: void *operator new(size_t s) { return User::operator new(s, 2); } static InsertValueInst *Create(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { return new InsertValueInst(Agg, Val, Idxs, NameStr, InsertBefore); } static InsertValueInst *Create(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs, const Twine &NameStr, BasicBlock *InsertAtEnd) { return new InsertValueInst(Agg, Val, Idxs, NameStr, InsertAtEnd); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; using idx_iterator = const unsigned*; inline idx_iterator idx_begin() const { return Indices.begin(); } inline idx_iterator idx_end() const { return Indices.end(); } inline iterator_range<idx_iterator> indices() const { return make_range(idx_begin(), idx_end()); } Value *getAggregateOperand() { return getOperand(0); } const Value *getAggregateOperand() const { return getOperand(0); } static unsigned getAggregateOperandIndex() { return 0U; } Value *getInsertedValueOperand() { return getOperand(1); } const Value *getInsertedValueOperand() const { return getOperand(1); } static unsigned getInsertedValueOperandIndex() { return 1U; } ArrayRef<unsigned> getIndices() const { return Indices; } unsigned getNumIndices() const { return (unsigned)Indices.size(); } bool hasIndices() const { return true; } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::InsertValue; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; template <> struct OperandTraits<InsertValueInst> : public FixedNumOperandTraits<InsertValueInst, 2> { }; InsertValueInst::InsertValueInst(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs, const Twine &NameStr, Instruction *InsertBefore) : Instruction(Agg->getType(), InsertValue, OperandTraits<InsertValueInst>::op_begin(this), 2, InsertBefore) { init(Agg, Val, Idxs, NameStr); } InsertValueInst::InsertValueInst(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs, const Twine &NameStr, BasicBlock *InsertAtEnd) : Instruction(Agg->getType(), InsertValue, OperandTraits<InsertValueInst>::op_begin(this), 2, InsertAtEnd) { init(Agg, Val, Idxs, NameStr); } InsertValueInst::op_iterator InsertValueInst::op_begin() { return OperandTraits<InsertValueInst>::op_begin(this); } InsertValueInst::const_op_iterator InsertValueInst::op_begin() const { return OperandTraits<InsertValueInst>::op_begin(const_cast<InsertValueInst*>(this)); } InsertValueInst::op_iterator InsertValueInst::op_end() { return OperandTraits<InsertValueInst>::op_end(this); } InsertValueInst::const_op_iterator InsertValueInst::op_end() const { return OperandTraits<InsertValueInst>::op_end(const_cast<InsertValueInst*>(this)); } Value *InsertValueInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<InsertValueInst>::op_begin(const_cast<InsertValueInst*>(this))[i_nocapture].get()); } void InsertValueInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<InsertValueInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned InsertValueInst::getNumOperands() const { return OperandTraits<InsertValueInst>::operands(this); } template <int Idx_nocapture> Use &InsertValueInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &InsertValueInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 2535 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class PHINode : public Instruction { unsigned ReservedSpace; PHINode(const PHINode &PN); explicit PHINode(Type *Ty, unsigned NumReservedValues, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) : Instruction(Ty, Instruction::PHI, nullptr, 0, InsertBefore), ReservedSpace(NumReservedValues) { setName(NameStr); allocHungoffUses(ReservedSpace); } PHINode(Type *Ty, unsigned NumReservedValues, const Twine &NameStr, BasicBlock *InsertAtEnd) : Instruction(Ty, Instruction::PHI, nullptr, 0, InsertAtEnd), ReservedSpace(NumReservedValues) { setName(NameStr); allocHungoffUses(ReservedSpace); } protected: friend class Instruction; PHINode *cloneImpl() const; void allocHungoffUses(unsigned N) { User::allocHungoffUses(N, true); } public: static PHINode *Create(Type *Ty, unsigned NumReservedValues, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { return new PHINode(Ty, NumReservedValues, NameStr, InsertBefore); } static PHINode *Create(Type *Ty, unsigned NumReservedValues, const Twine &NameStr, BasicBlock *InsertAtEnd) { return new PHINode(Ty, NumReservedValues, NameStr, InsertAtEnd); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; using block_iterator = BasicBlock **; using const_block_iterator = BasicBlock * const *; block_iterator block_begin() { return reinterpret_cast<block_iterator>(op_begin() + ReservedSpace); } const_block_iterator block_begin() const { return reinterpret_cast<const_block_iterator>(op_begin() + ReservedSpace); } block_iterator block_end() { return block_begin() + getNumOperands(); } const_block_iterator block_end() const { return block_begin() + getNumOperands(); } iterator_range<block_iterator> blocks() { return make_range(block_begin(), block_end()); } iterator_range<const_block_iterator> blocks() const { return make_range(block_begin(), block_end()); } op_range incoming_values() { return operands(); } const_op_range incoming_values() const { return operands(); } unsigned getNumIncomingValues() const { return getNumOperands(); } Value *getIncomingValue(unsigned i) const { return getOperand(i); } void setIncomingValue(unsigned i, Value *V) { (static_cast<void> (0)); (static_cast<void> (0)); setOperand(i, V); } static unsigned getOperandNumForIncomingValue(unsigned i) { return i; } static unsigned getIncomingValueNumForOperand(unsigned i) { return i; } BasicBlock *getIncomingBlock(unsigned i) const { return block_begin()[i]; } BasicBlock *getIncomingBlock(const Use &U) const { (static_cast<void> (0)); return getIncomingBlock(unsigned(&U - op_begin())); } BasicBlock *getIncomingBlock(Value::const_user_iterator I) const { return getIncomingBlock(I.getUse()); } void setIncomingBlock(unsigned i, BasicBlock *BB) { (static_cast<void> (0)); block_begin()[i] = BB; } void replaceIncomingBlockWith(const BasicBlock *Old, BasicBlock *New) { (static_cast<void> (0)); for (unsigned Op = 0, NumOps = getNumOperands(); Op != NumOps; ++Op) if (getIncomingBlock(Op) == Old) setIncomingBlock(Op, New); } void addIncoming(Value *V, BasicBlock *BB) { if (getNumOperands() == ReservedSpace) growOperands(); setNumHungOffUseOperands(getNumOperands() + 1); setIncomingValue(getNumOperands() - 1, V); setIncomingBlock(getNumOperands() - 1, BB); } # 2700 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" Value *removeIncomingValue(unsigned Idx, bool DeletePHIIfEmpty = true); Value *removeIncomingValue(const BasicBlock *BB, bool DeletePHIIfEmpty=true) { int Idx = getBasicBlockIndex(BB); (static_cast<void> (0)); return removeIncomingValue(Idx, DeletePHIIfEmpty); } int getBasicBlockIndex(const BasicBlock *BB) const { for (unsigned i = 0, e = getNumOperands(); i != e; ++i) if (block_begin()[i] == BB) return i; return -1; } Value *getIncomingValueForBlock(const BasicBlock *BB) const { int Idx = getBasicBlockIndex(BB); (static_cast<void> (0)); return getIncomingValue(Idx); } void setIncomingValueForBlock(const BasicBlock *BB, Value *V) { (static_cast<void> (0)); bool Found = false; for (unsigned Op = 0, NumOps = getNumOperands(); Op != NumOps; ++Op) if (getIncomingBlock(Op) == BB) { Found = true; setIncomingValue(Op, V); } (void)Found; (static_cast<void> (0)); } Value *hasConstantValue() const; bool hasConstantOrUndefValue() const; static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::PHI; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } private: void growOperands(); }; template <> struct OperandTraits<PHINode> : public HungoffOperandTraits<2> { }; PHINode::op_iterator PHINode::op_begin() { return OperandTraits<PHINode>::op_begin(this); } PHINode::const_op_iterator PHINode::op_begin() const { return OperandTraits<PHINode>::op_begin(const_cast<PHINode*>(this)); } PHINode::op_iterator PHINode::op_end() { return OperandTraits<PHINode>::op_end(this); } PHINode::const_op_iterator PHINode::op_end() const { return OperandTraits<PHINode>::op_end(const_cast<PHINode*>(this)); } Value *PHINode::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<PHINode>::op_begin(const_cast<PHINode*>(this))[i_nocapture].get()); } void PHINode::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<PHINode>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned PHINode::getNumOperands() const { return OperandTraits<PHINode>::operands(this); } template <int Idx_nocapture> Use &PHINode::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &PHINode::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 2776 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class LandingPadInst : public Instruction { using CleanupField = BoolBitfieldElementT<0>; unsigned ReservedSpace; LandingPadInst(const LandingPadInst &LP); public: enum ClauseType { Catch, Filter }; private: explicit LandingPadInst(Type *RetTy, unsigned NumReservedValues, const Twine &NameStr, Instruction *InsertBefore); explicit LandingPadInst(Type *RetTy, unsigned NumReservedValues, const Twine &NameStr, BasicBlock *InsertAtEnd); void *operator new(size_t s) { return User::operator new(s); } void growOperands(unsigned Size); void init(unsigned NumReservedValues, const Twine &NameStr); protected: friend class Instruction; LandingPadInst *cloneImpl() const; public: static LandingPadInst *Create(Type *RetTy, unsigned NumReservedClauses, const Twine &NameStr = "", Instruction *InsertBefore = nullptr); static LandingPadInst *Create(Type *RetTy, unsigned NumReservedClauses, const Twine &NameStr, BasicBlock *InsertAtEnd); public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; bool isCleanup() const { return getSubclassData<CleanupField>(); } void setCleanup(bool V) { setSubclassData<CleanupField>(V); } void addClause(Constant *ClauseVal); Constant *getClause(unsigned Idx) const { return cast<Constant>(getOperandList()[Idx]); } bool isCatch(unsigned Idx) const { return !isa<ArrayType>(getOperandList()[Idx]->getType()); } bool isFilter(unsigned Idx) const { return isa<ArrayType>(getOperandList()[Idx]->getType()); } unsigned getNumClauses() const { return getNumOperands(); } void reserveClauses(unsigned Size) { growOperands(Size); } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::LandingPad; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; template <> struct OperandTraits<LandingPadInst> : public HungoffOperandTraits<1> { }; LandingPadInst::op_iterator LandingPadInst::op_begin() { return OperandTraits<LandingPadInst>::op_begin(this); } LandingPadInst::const_op_iterator LandingPadInst::op_begin() const { return OperandTraits<LandingPadInst>::op_begin(const_cast<LandingPadInst*>(this)); } LandingPadInst::op_iterator LandingPadInst::op_end() { return OperandTraits<LandingPadInst>::op_end(this); } LandingPadInst::const_op_iterator LandingPadInst::op_end() const { return OperandTraits<LandingPadInst>::op_end(const_cast<LandingPadInst*>(this)); } Value *LandingPadInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<LandingPadInst>::op_begin(const_cast<LandingPadInst*>(this))[i_nocapture].get()); } void LandingPadInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<LandingPadInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned LandingPadInst::getNumOperands() const { return OperandTraits<LandingPadInst>::operands(this); } template <int Idx_nocapture> Use &LandingPadInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &LandingPadInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 2877 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class ReturnInst : public Instruction { ReturnInst(const ReturnInst &RI); private: # 2892 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" explicit ReturnInst(LLVMContext &C, Value *retVal = nullptr, Instruction *InsertBefore = nullptr); ReturnInst(LLVMContext &C, Value *retVal, BasicBlock *InsertAtEnd); explicit ReturnInst(LLVMContext &C, BasicBlock *InsertAtEnd); protected: friend class Instruction; ReturnInst *cloneImpl() const; public: static ReturnInst* Create(LLVMContext &C, Value *retVal = nullptr, Instruction *InsertBefore = nullptr) { return new(!!retVal) ReturnInst(C, retVal, InsertBefore); } static ReturnInst* Create(LLVMContext &C, Value *retVal, BasicBlock *InsertAtEnd) { return new(!!retVal) ReturnInst(C, retVal, InsertAtEnd); } static ReturnInst* Create(LLVMContext &C, BasicBlock *InsertAtEnd) { return new(0) ReturnInst(C, InsertAtEnd); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; Value *getReturnValue() const { return getNumOperands() != 0 ? getOperand(0) : nullptr; } unsigned getNumSuccessors() const { return 0; } static bool classof(const Instruction *I) { return (I->getOpcode() == Instruction::Ret); } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } private: BasicBlock *getSuccessor(unsigned idx) const { __builtin_unreachable(); } void setSuccessor(unsigned idx, BasicBlock *B) { __builtin_unreachable(); } }; template <> struct OperandTraits<ReturnInst> : public VariadicOperandTraits<ReturnInst> { }; ReturnInst::op_iterator ReturnInst::op_begin() { return OperandTraits<ReturnInst>::op_begin(this); } ReturnInst::const_op_iterator ReturnInst::op_begin() const { return OperandTraits<ReturnInst>::op_begin(const_cast<ReturnInst*>(this)); } ReturnInst::op_iterator ReturnInst::op_end() { return OperandTraits<ReturnInst>::op_end(this); } ReturnInst::const_op_iterator ReturnInst::op_end() const { return OperandTraits<ReturnInst>::op_end(const_cast<ReturnInst*>(this)); } Value *ReturnInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<ReturnInst>::op_begin(const_cast<ReturnInst*>(this))[i_nocapture].get()); } void ReturnInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<ReturnInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ReturnInst::getNumOperands() const { return OperandTraits<ReturnInst>::operands(this); } template <int Idx_nocapture> Use &ReturnInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &ReturnInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 2959 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class BranchInst : public Instruction { BranchInst(const BranchInst &BI); explicit BranchInst(BasicBlock *IfTrue, Instruction *InsertBefore = nullptr); BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, Instruction *InsertBefore = nullptr); BranchInst(BasicBlock *IfTrue, BasicBlock *InsertAtEnd); BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, BasicBlock *InsertAtEnd); void AssertOK(); protected: friend class Instruction; BranchInst *cloneImpl() const; public: struct succ_op_iterator : iterator_adaptor_base<succ_op_iterator, value_op_iterator, std::random_access_iterator_tag, BasicBlock *, ptrdiff_t, BasicBlock *, BasicBlock *> { explicit succ_op_iterator(value_op_iterator I) : iterator_adaptor_base(I) {} BasicBlock *operator*() const { return cast<BasicBlock>(*I); } BasicBlock *operator->() const { return operator*(); } }; struct const_succ_op_iterator : iterator_adaptor_base<const_succ_op_iterator, const_value_op_iterator, std::random_access_iterator_tag, const BasicBlock *, ptrdiff_t, const BasicBlock *, const BasicBlock *> { explicit const_succ_op_iterator(const_value_op_iterator I) : iterator_adaptor_base(I) {} const BasicBlock *operator*() const { return cast<BasicBlock>(*I); } const BasicBlock *operator->() const { return operator*(); } }; static BranchInst *Create(BasicBlock *IfTrue, Instruction *InsertBefore = nullptr) { return new(1) BranchInst(IfTrue, InsertBefore); } static BranchInst *Create(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, Instruction *InsertBefore = nullptr) { return new(3) BranchInst(IfTrue, IfFalse, Cond, InsertBefore); } static BranchInst *Create(BasicBlock *IfTrue, BasicBlock *InsertAtEnd) { return new(1) BranchInst(IfTrue, InsertAtEnd); } static BranchInst *Create(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, BasicBlock *InsertAtEnd) { return new(3) BranchInst(IfTrue, IfFalse, Cond, InsertAtEnd); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; bool isUnconditional() const { return getNumOperands() == 1; } bool isConditional() const { return getNumOperands() == 3; } Value *getCondition() const { (static_cast<void> (0)); return Op<-3>(); } void setCondition(Value *V) { (static_cast<void> (0)); Op<-3>() = V; } unsigned getNumSuccessors() const { return 1+isConditional(); } BasicBlock *getSuccessor(unsigned i) const { (static_cast<void> (0)); return cast_or_null<BasicBlock>((&Op<-1>() - i)->get()); } void setSuccessor(unsigned idx, BasicBlock *NewSucc) { (static_cast<void> (0)); *(&Op<-1>() - idx) = NewSucc; } void swapSuccessors(); iterator_range<succ_op_iterator> successors() { return make_range( succ_op_iterator(std::next(value_op_begin(), isConditional() ? 1 : 0)), succ_op_iterator(value_op_end())); } iterator_range<const_succ_op_iterator> successors() const { return make_range(const_succ_op_iterator( std::next(value_op_begin(), isConditional() ? 1 : 0)), const_succ_op_iterator(value_op_end())); } static bool classof(const Instruction *I) { return (I->getOpcode() == Instruction::Br); } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; template <> struct OperandTraits<BranchInst> : public VariadicOperandTraits<BranchInst, 1> { }; BranchInst::op_iterator BranchInst::op_begin() { return OperandTraits<BranchInst>::op_begin(this); } BranchInst::const_op_iterator BranchInst::op_begin() const { return OperandTraits<BranchInst>::op_begin(const_cast<BranchInst*>(this)); } BranchInst::op_iterator BranchInst::op_end() { return OperandTraits<BranchInst>::op_end(this); } BranchInst::const_op_iterator BranchInst::op_end() const { return OperandTraits<BranchInst>::op_end(const_cast<BranchInst*>(this)); } Value *BranchInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<BranchInst>::op_begin(const_cast<BranchInst*>(this))[i_nocapture].get()); } void BranchInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<BranchInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned BranchInst::getNumOperands() const { return OperandTraits<BranchInst>::operands(this); } template <int Idx_nocapture> Use &BranchInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &BranchInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 3103 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class SwitchInst : public Instruction { unsigned ReservedSpace; SwitchInst(const SwitchInst &SI); SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases, Instruction *InsertBefore); SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases, BasicBlock *InsertAtEnd); void *operator new(size_t s) { return User::operator new(s); } void init(Value *Value, BasicBlock *Default, unsigned NumReserved); void growOperands(); protected: friend class Instruction; SwitchInst *cloneImpl() const; public: static const unsigned DefaultPseudoIndex = static_cast<unsigned>(~0L-1); template <typename CaseHandleT> class CaseIteratorImpl; template <typename SwitchInstT, typename ConstantIntT, typename BasicBlockT> class CaseHandleImpl { friend class SwitchInst::CaseIteratorImpl< CaseHandleImpl<SwitchInstT, ConstantIntT, BasicBlockT>>; protected: using SwitchInstType = SwitchInstT; SwitchInstT *SI; ptrdiff_t Index; CaseHandleImpl() = default; CaseHandleImpl(SwitchInstT *SI, ptrdiff_t Index) : SI(SI), Index(Index) {} public: ConstantIntT *getCaseValue() const { (static_cast<void> (0)); return reinterpret_cast<ConstantIntT *>(SI->getOperand(2 + Index * 2)); } BasicBlockT *getCaseSuccessor() const { (static_cast<void> (0)); return SI->getSuccessor(getSuccessorIndex()); } unsigned getCaseIndex() const { return Index; } unsigned getSuccessorIndex() const { (static_cast<void> (0)); return (unsigned)Index != DefaultPseudoIndex ? Index + 1 : 0; } bool operator==(const CaseHandleImpl &RHS) const { (static_cast<void> (0)); return Index == RHS.Index; } }; using ConstCaseHandle = CaseHandleImpl<const SwitchInst, const ConstantInt, const BasicBlock>; class CaseHandle : public CaseHandleImpl<SwitchInst, ConstantInt, BasicBlock> { friend class SwitchInst::CaseIteratorImpl<CaseHandle>; public: CaseHandle(SwitchInst *SI, ptrdiff_t Index) : CaseHandleImpl(SI, Index) {} void setValue(ConstantInt *V) { (static_cast<void> (0)); SI->setOperand(2 + Index*2, reinterpret_cast<Value*>(V)); } void setSuccessor(BasicBlock *S) { SI->setSuccessor(getSuccessorIndex(), S); } }; template <typename CaseHandleT> class CaseIteratorImpl : public iterator_facade_base<CaseIteratorImpl<CaseHandleT>, std::random_access_iterator_tag, CaseHandleT> { using SwitchInstT = typename CaseHandleT::SwitchInstType; CaseHandleT Case; public: CaseIteratorImpl() = default; CaseIteratorImpl(SwitchInstT *SI, unsigned CaseNum) : Case(SI, CaseNum) {} static CaseIteratorImpl fromSuccessorIndex(SwitchInstT *SI, unsigned SuccessorIndex) { (static_cast<void> (0)); return SuccessorIndex != 0 ? CaseIteratorImpl(SI, SuccessorIndex - 1) : CaseIteratorImpl(SI, DefaultPseudoIndex); } operator CaseIteratorImpl<ConstCaseHandle>() const { return CaseIteratorImpl<ConstCaseHandle>(Case.SI, Case.Index); } CaseIteratorImpl &operator+=(ptrdiff_t N) { (static_cast<void> (0)); Case.Index += N; return *this; } CaseIteratorImpl &operator-=(ptrdiff_t N) { (static_cast<void> (0)); Case.Index -= N; return *this; } ptrdiff_t operator-(const CaseIteratorImpl &RHS) const { (static_cast<void> (0)); return Case.Index - RHS.Case.Index; } bool operator==(const CaseIteratorImpl &RHS) const { return Case == RHS.Case; } bool operator<(const CaseIteratorImpl &RHS) const { (static_cast<void> (0)); return Case.Index < RHS.Case.Index; } CaseHandleT &operator*() { return Case; } const CaseHandleT &operator*() const { return Case; } }; using CaseIt = CaseIteratorImpl<CaseHandle>; using ConstCaseIt = CaseIteratorImpl<ConstCaseHandle>; static SwitchInst *Create(Value *Value, BasicBlock *Default, unsigned NumCases, Instruction *InsertBefore = nullptr) { return new SwitchInst(Value, Default, NumCases, InsertBefore); } static SwitchInst *Create(Value *Value, BasicBlock *Default, unsigned NumCases, BasicBlock *InsertAtEnd) { return new SwitchInst(Value, Default, NumCases, InsertAtEnd); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; Value *getCondition() const { return getOperand(0); } void setCondition(Value *V) { setOperand(0, V); } BasicBlock *getDefaultDest() const { return cast<BasicBlock>(getOperand(1)); } void setDefaultDest(BasicBlock *DefaultCase) { setOperand(1, reinterpret_cast<Value*>(DefaultCase)); } unsigned getNumCases() const { return getNumOperands()/2 - 1; } CaseIt case_begin() { return CaseIt(this, 0); } ConstCaseIt case_begin() const { return ConstCaseIt(this, 0); } CaseIt case_end() { return CaseIt(this, getNumCases()); } ConstCaseIt case_end() const { return ConstCaseIt(this, getNumCases()); } iterator_range<CaseIt> cases() { return make_range(case_begin(), case_end()); } iterator_range<ConstCaseIt> cases() const { return make_range(case_begin(), case_end()); } CaseIt case_default() { return CaseIt(this, DefaultPseudoIndex); } ConstCaseIt case_default() const { return ConstCaseIt(this, DefaultPseudoIndex); } CaseIt findCaseValue(const ConstantInt *C) { CaseIt I = llvm::find_if( cases(), [C](CaseHandle &Case) { return Case.getCaseValue() == C; }); if (I != case_end()) return I; return case_default(); } ConstCaseIt findCaseValue(const ConstantInt *C) const { ConstCaseIt I = llvm::find_if(cases(), [C](ConstCaseHandle &Case) { return Case.getCaseValue() == C; }); if (I != case_end()) return I; return case_default(); } ConstantInt *findCaseDest(BasicBlock *BB) { if (BB == getDefaultDest()) return nullptr; ConstantInt *CI = nullptr; for (auto Case : cases()) { if (Case.getCaseSuccessor() != BB) continue; if (CI) return nullptr; CI = Case.getCaseValue(); } return CI; } void addCase(ConstantInt *OnVal, BasicBlock *Dest); # 3426 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" CaseIt removeCase(CaseIt I); unsigned getNumSuccessors() const { return getNumOperands()/2; } BasicBlock *getSuccessor(unsigned idx) const { (static_cast<void> (0)); return cast<BasicBlock>(getOperand(idx*2+1)); } void setSuccessor(unsigned idx, BasicBlock *NewSucc) { (static_cast<void> (0)); setOperand(idx * 2 + 1, NewSucc); } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Switch; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class SwitchInstProfUpdateWrapper { SwitchInst &SI; Optional<SmallVector<uint32_t, 8> > Weights = None; bool Changed = false; protected: static MDNode *getProfBranchWeightsMD(const SwitchInst &SI); MDNode *buildProfBranchWeightsMD(); void init(); public: using CaseWeightOpt = Optional<uint32_t>; SwitchInst *operator->() { return &SI; } SwitchInst &operator*() { return SI; } operator SwitchInst *() { return &SI; } SwitchInstProfUpdateWrapper(SwitchInst &SI) : SI(SI) { init(); } ~SwitchInstProfUpdateWrapper() { if (Changed) SI.setMetadata(LLVMContext::MD_prof, buildProfBranchWeightsMD()); } SwitchInst::CaseIt removeCase(SwitchInst::CaseIt I); void addCase(ConstantInt *OnVal, BasicBlock *Dest, CaseWeightOpt W); SymbolTableList<Instruction>::iterator eraseFromParent(); void setSuccessorWeight(unsigned idx, CaseWeightOpt W); CaseWeightOpt getSuccessorWeight(unsigned idx); static CaseWeightOpt getSuccessorWeight(const SwitchInst &SI, unsigned idx); }; template <> struct OperandTraits<SwitchInst> : public HungoffOperandTraits<2> { }; SwitchInst::op_iterator SwitchInst::op_begin() { return OperandTraits<SwitchInst>::op_begin(this); } SwitchInst::const_op_iterator SwitchInst::op_begin() const { return OperandTraits<SwitchInst>::op_begin(const_cast<SwitchInst*>(this)); } SwitchInst::op_iterator SwitchInst::op_end() { return OperandTraits<SwitchInst>::op_end(this); } SwitchInst::const_op_iterator SwitchInst::op_end() const { return OperandTraits<SwitchInst>::op_end(const_cast<SwitchInst*>(this)); } Value *SwitchInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<SwitchInst>::op_begin(const_cast<SwitchInst*>(this))[i_nocapture].get()); } void SwitchInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<SwitchInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned SwitchInst::getNumOperands() const { return OperandTraits<SwitchInst>::operands(this); } template <int Idx_nocapture> Use &SwitchInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &SwitchInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 3505 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class IndirectBrInst : public Instruction { unsigned ReservedSpace; IndirectBrInst(const IndirectBrInst &IBI); IndirectBrInst(Value *Address, unsigned NumDests, Instruction *InsertBefore); IndirectBrInst(Value *Address, unsigned NumDests, BasicBlock *InsertAtEnd); void *operator new(size_t s) { return User::operator new(s); } void init(Value *Address, unsigned NumDests); void growOperands(); protected: friend class Instruction; IndirectBrInst *cloneImpl() const; public: struct succ_op_iterator : iterator_adaptor_base<succ_op_iterator, value_op_iterator, std::random_access_iterator_tag, BasicBlock *, ptrdiff_t, BasicBlock *, BasicBlock *> { explicit succ_op_iterator(value_op_iterator I) : iterator_adaptor_base(I) {} BasicBlock *operator*() const { return cast<BasicBlock>(*I); } BasicBlock *operator->() const { return operator*(); } }; struct const_succ_op_iterator : iterator_adaptor_base<const_succ_op_iterator, const_value_op_iterator, std::random_access_iterator_tag, const BasicBlock *, ptrdiff_t, const BasicBlock *, const BasicBlock *> { explicit const_succ_op_iterator(const_value_op_iterator I) : iterator_adaptor_base(I) {} const BasicBlock *operator*() const { return cast<BasicBlock>(*I); } const BasicBlock *operator->() const { return operator*(); } }; static IndirectBrInst *Create(Value *Address, unsigned NumDests, Instruction *InsertBefore = nullptr) { return new IndirectBrInst(Address, NumDests, InsertBefore); } static IndirectBrInst *Create(Value *Address, unsigned NumDests, BasicBlock *InsertAtEnd) { return new IndirectBrInst(Address, NumDests, InsertAtEnd); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; Value *getAddress() { return getOperand(0); } const Value *getAddress() const { return getOperand(0); } void setAddress(Value *V) { setOperand(0, V); } unsigned getNumDestinations() const { return getNumOperands()-1; } BasicBlock *getDestination(unsigned i) { return getSuccessor(i); } const BasicBlock *getDestination(unsigned i) const { return getSuccessor(i); } void addDestination(BasicBlock *Dest); void removeDestination(unsigned i); unsigned getNumSuccessors() const { return getNumOperands()-1; } BasicBlock *getSuccessor(unsigned i) const { return cast<BasicBlock>(getOperand(i+1)); } void setSuccessor(unsigned i, BasicBlock *NewSucc) { setOperand(i + 1, NewSucc); } iterator_range<succ_op_iterator> successors() { return make_range(succ_op_iterator(std::next(value_op_begin())), succ_op_iterator(value_op_end())); } iterator_range<const_succ_op_iterator> successors() const { return make_range(const_succ_op_iterator(std::next(value_op_begin())), const_succ_op_iterator(value_op_end())); } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::IndirectBr; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; template <> struct OperandTraits<IndirectBrInst> : public HungoffOperandTraits<1> { }; IndirectBrInst::op_iterator IndirectBrInst::op_begin() { return OperandTraits<IndirectBrInst>::op_begin(this); } IndirectBrInst::const_op_iterator IndirectBrInst::op_begin() const { return OperandTraits<IndirectBrInst>::op_begin(const_cast<IndirectBrInst*>(this)); } IndirectBrInst::op_iterator IndirectBrInst::op_end() { return OperandTraits<IndirectBrInst>::op_end(this); } IndirectBrInst::const_op_iterator IndirectBrInst::op_end() const { return OperandTraits<IndirectBrInst>::op_end(const_cast<IndirectBrInst*>(this)); } Value *IndirectBrInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<IndirectBrInst>::op_begin(const_cast<IndirectBrInst*>(this))[i_nocapture].get()); } void IndirectBrInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<IndirectBrInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned IndirectBrInst::getNumOperands() const { return OperandTraits<IndirectBrInst>::operands(this); } template <int Idx_nocapture> Use &IndirectBrInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &IndirectBrInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 3640 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class InvokeInst : public CallBase { static constexpr int NumExtraOperands = 2; static constexpr int NormalDestOpEndIdx = -3; static constexpr int UnwindDestOpEndIdx = -2; InvokeInst(const InvokeInst &BI); inline InvokeInst(FunctionType *Ty, Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, int NumOperands, const Twine &NameStr, Instruction *InsertBefore); inline InvokeInst(FunctionType *Ty, Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, int NumOperands, const Twine &NameStr, BasicBlock *InsertAtEnd); void init(FunctionType *Ty, Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr); static int ComputeNumOperands(int NumArgs, int NumBundleInputs = 0) { return 1 + NumExtraOperands + NumArgs + NumBundleInputs; } protected: friend class Instruction; InvokeInst *cloneImpl() const; public: static InvokeInst *Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef<Value *> Args, const Twine &NameStr, Instruction *InsertBefore = nullptr) { int NumOperands = ComputeNumOperands(Args.size()); return new (NumOperands) InvokeInst(Ty, Func, IfNormal, IfException, Args, None, NumOperands, NameStr, InsertBefore); } static InvokeInst *Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles = None, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { int NumOperands = ComputeNumOperands(Args.size(), CountBundleInputs(Bundles)); unsigned DescriptorBytes = Bundles.size() * sizeof(BundleOpInfo); return new (NumOperands, DescriptorBytes) InvokeInst(Ty, Func, IfNormal, IfException, Args, Bundles, NumOperands, NameStr, InsertBefore); } static InvokeInst *Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef<Value *> Args, const Twine &NameStr, BasicBlock *InsertAtEnd) { int NumOperands = ComputeNumOperands(Args.size()); return new (NumOperands) InvokeInst(Ty, Func, IfNormal, IfException, Args, None, NumOperands, NameStr, InsertAtEnd); } static InvokeInst *Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr, BasicBlock *InsertAtEnd) { int NumOperands = ComputeNumOperands(Args.size(), CountBundleInputs(Bundles)); unsigned DescriptorBytes = Bundles.size() * sizeof(BundleOpInfo); return new (NumOperands, DescriptorBytes) InvokeInst(Ty, Func, IfNormal, IfException, Args, Bundles, NumOperands, NameStr, InsertAtEnd); } static InvokeInst *Create(FunctionCallee Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef<Value *> Args, const Twine &NameStr, Instruction *InsertBefore = nullptr) { return Create(Func.getFunctionType(), Func.getCallee(), IfNormal, IfException, Args, None, NameStr, InsertBefore); } static InvokeInst *Create(FunctionCallee Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles = None, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { return Create(Func.getFunctionType(), Func.getCallee(), IfNormal, IfException, Args, Bundles, NameStr, InsertBefore); } static InvokeInst *Create(FunctionCallee Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef<Value *> Args, const Twine &NameStr, BasicBlock *InsertAtEnd) { return Create(Func.getFunctionType(), Func.getCallee(), IfNormal, IfException, Args, NameStr, InsertAtEnd); } static InvokeInst *Create(FunctionCallee Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr, BasicBlock *InsertAtEnd) { return Create(Func.getFunctionType(), Func.getCallee(), IfNormal, IfException, Args, Bundles, NameStr, InsertAtEnd); } static InvokeInst *Create(InvokeInst *II, ArrayRef<OperandBundleDef> Bundles, Instruction *InsertPt = nullptr); BasicBlock *getNormalDest() const { return cast<BasicBlock>(Op<NormalDestOpEndIdx>()); } BasicBlock *getUnwindDest() const { return cast<BasicBlock>(Op<UnwindDestOpEndIdx>()); } void setNormalDest(BasicBlock *B) { Op<NormalDestOpEndIdx>() = reinterpret_cast<Value *>(B); } void setUnwindDest(BasicBlock *B) { Op<UnwindDestOpEndIdx>() = reinterpret_cast<Value *>(B); } LandingPadInst *getLandingPadInst() const; BasicBlock *getSuccessor(unsigned i) const { (static_cast<void> (0)); return i == 0 ? getNormalDest() : getUnwindDest(); } void setSuccessor(unsigned i, BasicBlock *NewSucc) { (static_cast<void> (0)); if (i == 0) setNormalDest(NewSucc); else setUnwindDest(NewSucc); } unsigned getNumSuccessors() const { return 2; } static bool classof(const Instruction *I) { return (I->getOpcode() == Instruction::Invoke); } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } private: template <typename Bitfield> void setSubclassData(typename Bitfield::Type Value) { Instruction::setSubclassData<Bitfield>(Value); } }; InvokeInst::InvokeInst(FunctionType *Ty, Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, int NumOperands, const Twine &NameStr, Instruction *InsertBefore) : CallBase(Ty->getReturnType(), Instruction::Invoke, OperandTraits<CallBase>::op_end(this) - NumOperands, NumOperands, InsertBefore) { init(Ty, Func, IfNormal, IfException, Args, Bundles, NameStr); } InvokeInst::InvokeInst(FunctionType *Ty, Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, int NumOperands, const Twine &NameStr, BasicBlock *InsertAtEnd) : CallBase(Ty->getReturnType(), Instruction::Invoke, OperandTraits<CallBase>::op_end(this) - NumOperands, NumOperands, InsertAtEnd) { init(Ty, Func, IfNormal, IfException, Args, Bundles, NameStr); } # 3849 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class CallBrInst : public CallBase { unsigned NumIndirectDests; CallBrInst(const CallBrInst &BI); inline CallBrInst(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest, ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, int NumOperands, const Twine &NameStr, Instruction *InsertBefore); inline CallBrInst(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest, ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, int NumOperands, const Twine &NameStr, BasicBlock *InsertAtEnd); void init(FunctionType *FTy, Value *Func, BasicBlock *DefaultDest, ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr); void updateArgBlockAddresses(unsigned i, BasicBlock *B); static int ComputeNumOperands(int NumArgs, int NumIndirectDests, int NumBundleInputs = 0) { return 2 + NumIndirectDests + NumArgs + NumBundleInputs; } protected: friend class Instruction; CallBrInst *cloneImpl() const; public: static CallBrInst *Create(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest, ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args, const Twine &NameStr, Instruction *InsertBefore = nullptr) { int NumOperands = ComputeNumOperands(Args.size(), IndirectDests.size()); return new (NumOperands) CallBrInst(Ty, Func, DefaultDest, IndirectDests, Args, None, NumOperands, NameStr, InsertBefore); } static CallBrInst *Create(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest, ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles = None, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { int NumOperands = ComputeNumOperands(Args.size(), IndirectDests.size(), CountBundleInputs(Bundles)); unsigned DescriptorBytes = Bundles.size() * sizeof(BundleOpInfo); return new (NumOperands, DescriptorBytes) CallBrInst(Ty, Func, DefaultDest, IndirectDests, Args, Bundles, NumOperands, NameStr, InsertBefore); } static CallBrInst *Create(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest, ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args, const Twine &NameStr, BasicBlock *InsertAtEnd) { int NumOperands = ComputeNumOperands(Args.size(), IndirectDests.size()); return new (NumOperands) CallBrInst(Ty, Func, DefaultDest, IndirectDests, Args, None, NumOperands, NameStr, InsertAtEnd); } static CallBrInst *Create(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest, ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr, BasicBlock *InsertAtEnd) { int NumOperands = ComputeNumOperands(Args.size(), IndirectDests.size(), CountBundleInputs(Bundles)); unsigned DescriptorBytes = Bundles.size() * sizeof(BundleOpInfo); return new (NumOperands, DescriptorBytes) CallBrInst(Ty, Func, DefaultDest, IndirectDests, Args, Bundles, NumOperands, NameStr, InsertAtEnd); } static CallBrInst *Create(FunctionCallee Func, BasicBlock *DefaultDest, ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args, const Twine &NameStr, Instruction *InsertBefore = nullptr) { return Create(Func.getFunctionType(), Func.getCallee(), DefaultDest, IndirectDests, Args, NameStr, InsertBefore); } static CallBrInst *Create(FunctionCallee Func, BasicBlock *DefaultDest, ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles = None, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { return Create(Func.getFunctionType(), Func.getCallee(), DefaultDest, IndirectDests, Args, Bundles, NameStr, InsertBefore); } static CallBrInst *Create(FunctionCallee Func, BasicBlock *DefaultDest, ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args, const Twine &NameStr, BasicBlock *InsertAtEnd) { return Create(Func.getFunctionType(), Func.getCallee(), DefaultDest, IndirectDests, Args, NameStr, InsertAtEnd); } static CallBrInst *Create(FunctionCallee Func, BasicBlock *DefaultDest, ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr, BasicBlock *InsertAtEnd) { return Create(Func.getFunctionType(), Func.getCallee(), DefaultDest, IndirectDests, Args, Bundles, NameStr, InsertAtEnd); } static CallBrInst *Create(CallBrInst *CBI, ArrayRef<OperandBundleDef> Bundles, Instruction *InsertPt = nullptr); unsigned getNumIndirectDests() const { return NumIndirectDests; } Value *getIndirectDestLabel(unsigned i) const { (static_cast<void> (0)); return getOperand(i + getNumArgOperands() + getNumTotalBundleOperands() + 1); } Value *getIndirectDestLabelUse(unsigned i) const { (static_cast<void> (0)); return getOperandUse(i + getNumArgOperands() + getNumTotalBundleOperands() + 1); } BasicBlock *getDefaultDest() const { return cast<BasicBlock>(*(&Op<-1>() - getNumIndirectDests() - 1)); } BasicBlock *getIndirectDest(unsigned i) const { return cast_or_null<BasicBlock>(*(&Op<-1>() - getNumIndirectDests() + i)); } SmallVector<BasicBlock *, 16> getIndirectDests() const { SmallVector<BasicBlock *, 16> IndirectDests; for (unsigned i = 0, e = getNumIndirectDests(); i < e; ++i) IndirectDests.push_back(getIndirectDest(i)); return IndirectDests; } void setDefaultDest(BasicBlock *B) { *(&Op<-1>() - getNumIndirectDests() - 1) = reinterpret_cast<Value *>(B); } void setIndirectDest(unsigned i, BasicBlock *B) { updateArgBlockAddresses(i, B); *(&Op<-1>() - getNumIndirectDests() + i) = reinterpret_cast<Value *>(B); } BasicBlock *getSuccessor(unsigned i) const { (static_cast<void> (0)); return i == 0 ? getDefaultDest() : getIndirectDest(i - 1); } void setSuccessor(unsigned i, BasicBlock *NewSucc) { (static_cast<void> (0)); return i == 0 ? setDefaultDest(NewSucc) : setIndirectDest(i - 1, NewSucc); } unsigned getNumSuccessors() const { return getNumIndirectDests() + 1; } static bool classof(const Instruction *I) { return (I->getOpcode() == Instruction::CallBr); } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } private: template <typename Bitfield> void setSubclassData(typename Bitfield::Type Value) { Instruction::setSubclassData<Bitfield>(Value); } }; CallBrInst::CallBrInst(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest, ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, int NumOperands, const Twine &NameStr, Instruction *InsertBefore) : CallBase(Ty->getReturnType(), Instruction::CallBr, OperandTraits<CallBase>::op_end(this) - NumOperands, NumOperands, InsertBefore) { init(Ty, Func, DefaultDest, IndirectDests, Args, Bundles, NameStr); } CallBrInst::CallBrInst(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest, ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> Bundles, int NumOperands, const Twine &NameStr, BasicBlock *InsertAtEnd) : CallBase(Ty->getReturnType(), Instruction::CallBr, OperandTraits<CallBase>::op_end(this) - NumOperands, NumOperands, InsertAtEnd) { init(Ty, Func, DefaultDest, IndirectDests, Args, Bundles, NameStr); } # 4090 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class ResumeInst : public Instruction { ResumeInst(const ResumeInst &RI); explicit ResumeInst(Value *Exn, Instruction *InsertBefore=nullptr); ResumeInst(Value *Exn, BasicBlock *InsertAtEnd); protected: friend class Instruction; ResumeInst *cloneImpl() const; public: static ResumeInst *Create(Value *Exn, Instruction *InsertBefore = nullptr) { return new(1) ResumeInst(Exn, InsertBefore); } static ResumeInst *Create(Value *Exn, BasicBlock *InsertAtEnd) { return new(1) ResumeInst(Exn, InsertAtEnd); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; Value *getValue() const { return Op<0>(); } unsigned getNumSuccessors() const { return 0; } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Resume; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } private: BasicBlock *getSuccessor(unsigned idx) const { __builtin_unreachable(); } void setSuccessor(unsigned idx, BasicBlock *NewSucc) { __builtin_unreachable(); } }; template <> struct OperandTraits<ResumeInst> : public FixedNumOperandTraits<ResumeInst, 1> { }; ResumeInst::op_iterator ResumeInst::op_begin() { return OperandTraits<ResumeInst>::op_begin(this); } ResumeInst::const_op_iterator ResumeInst::op_begin() const { return OperandTraits<ResumeInst>::op_begin(const_cast<ResumeInst*>(this)); } ResumeInst::op_iterator ResumeInst::op_end() { return OperandTraits<ResumeInst>::op_end(this); } ResumeInst::const_op_iterator ResumeInst::op_end() const { return OperandTraits<ResumeInst>::op_end(const_cast<ResumeInst*>(this)); } Value *ResumeInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<ResumeInst>::op_begin(const_cast<ResumeInst*>(this))[i_nocapture].get()); } void ResumeInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<ResumeInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ResumeInst::getNumOperands() const { return OperandTraits<ResumeInst>::operands(this); } template <int Idx_nocapture> Use &ResumeInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &ResumeInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } class CatchSwitchInst : public Instruction { using UnwindDestField = BoolBitfieldElementT<0>; unsigned ReservedSpace; CatchSwitchInst(const CatchSwitchInst &CSI); CatchSwitchInst(Value *ParentPad, BasicBlock *UnwindDest, unsigned NumHandlers, const Twine &NameStr, Instruction *InsertBefore); CatchSwitchInst(Value *ParentPad, BasicBlock *UnwindDest, unsigned NumHandlers, const Twine &NameStr, BasicBlock *InsertAtEnd); void *operator new(size_t s) { return User::operator new(s); } void init(Value *ParentPad, BasicBlock *UnwindDest, unsigned NumReserved); void growOperands(unsigned Size); protected: friend class Instruction; CatchSwitchInst *cloneImpl() const; public: static CatchSwitchInst *Create(Value *ParentPad, BasicBlock *UnwindDest, unsigned NumHandlers, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { return new CatchSwitchInst(ParentPad, UnwindDest, NumHandlers, NameStr, InsertBefore); } static CatchSwitchInst *Create(Value *ParentPad, BasicBlock *UnwindDest, unsigned NumHandlers, const Twine &NameStr, BasicBlock *InsertAtEnd) { return new CatchSwitchInst(ParentPad, UnwindDest, NumHandlers, NameStr, InsertAtEnd); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; Value *getParentPad() const { return getOperand(0); } void setParentPad(Value *ParentPad) { setOperand(0, ParentPad); } bool hasUnwindDest() const { return getSubclassData<UnwindDestField>(); } bool unwindsToCaller() const { return !hasUnwindDest(); } BasicBlock *getUnwindDest() const { if (hasUnwindDest()) return cast<BasicBlock>(getOperand(1)); return nullptr; } void setUnwindDest(BasicBlock *UnwindDest) { (static_cast<void> (0)); (static_cast<void> (0)); setOperand(1, UnwindDest); } unsigned getNumHandlers() const { if (hasUnwindDest()) return getNumOperands() - 2; return getNumOperands() - 1; } private: static BasicBlock *handler_helper(Value *V) { return cast<BasicBlock>(V); } static const BasicBlock *handler_helper(const Value *V) { return cast<BasicBlock>(V); } public: using DerefFnTy = BasicBlock *(*)(Value *); using handler_iterator = mapped_iterator<op_iterator, DerefFnTy>; using handler_range = iterator_range<handler_iterator>; using ConstDerefFnTy = const BasicBlock *(*)(const Value *); using const_handler_iterator = mapped_iterator<const_op_iterator, ConstDerefFnTy>; using const_handler_range = iterator_range<const_handler_iterator>; handler_iterator handler_begin() { op_iterator It = op_begin() + 1; if (hasUnwindDest()) ++It; return handler_iterator(It, DerefFnTy(handler_helper)); } const_handler_iterator handler_begin() const { const_op_iterator It = op_begin() + 1; if (hasUnwindDest()) ++It; return const_handler_iterator(It, ConstDerefFnTy(handler_helper)); } handler_iterator handler_end() { return handler_iterator(op_end(), DerefFnTy(handler_helper)); } const_handler_iterator handler_end() const { return const_handler_iterator(op_end(), ConstDerefFnTy(handler_helper)); } handler_range handlers() { return make_range(handler_begin(), handler_end()); } const_handler_range handlers() const { return make_range(handler_begin(), handler_end()); } void addHandler(BasicBlock *Dest); void removeHandler(handler_iterator HI); unsigned getNumSuccessors() const { return getNumOperands() - 1; } BasicBlock *getSuccessor(unsigned Idx) const { (static_cast<void> (0)); return cast<BasicBlock>(getOperand(Idx + 1)); } void setSuccessor(unsigned Idx, BasicBlock *NewSucc) { (static_cast<void> (0)); setOperand(Idx + 1, NewSucc); } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::CatchSwitch; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; template <> struct OperandTraits<CatchSwitchInst> : public HungoffOperandTraits<2> {}; CatchSwitchInst::op_iterator CatchSwitchInst::op_begin() { return OperandTraits<CatchSwitchInst>::op_begin(this); } CatchSwitchInst::const_op_iterator CatchSwitchInst::op_begin() const { return OperandTraits<CatchSwitchInst>::op_begin(const_cast<CatchSwitchInst*>(this)); } CatchSwitchInst::op_iterator CatchSwitchInst::op_end() { return OperandTraits<CatchSwitchInst>::op_end(this); } CatchSwitchInst::const_op_iterator CatchSwitchInst::op_end() const { return OperandTraits<CatchSwitchInst>::op_end(const_cast<CatchSwitchInst*>(this)); } Value *CatchSwitchInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<CatchSwitchInst>::op_begin(const_cast<CatchSwitchInst*>(this))[i_nocapture].get()); } void CatchSwitchInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<CatchSwitchInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned CatchSwitchInst::getNumOperands() const { return OperandTraits<CatchSwitchInst>::operands(this); } template <int Idx_nocapture> Use &CatchSwitchInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &CatchSwitchInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } class CleanupPadInst : public FuncletPadInst { private: explicit CleanupPadInst(Value *ParentPad, ArrayRef<Value *> Args, unsigned Values, const Twine &NameStr, Instruction *InsertBefore) : FuncletPadInst(Instruction::CleanupPad, ParentPad, Args, Values, NameStr, InsertBefore) {} explicit CleanupPadInst(Value *ParentPad, ArrayRef<Value *> Args, unsigned Values, const Twine &NameStr, BasicBlock *InsertAtEnd) : FuncletPadInst(Instruction::CleanupPad, ParentPad, Args, Values, NameStr, InsertAtEnd) {} public: static CleanupPadInst *Create(Value *ParentPad, ArrayRef<Value *> Args = None, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { unsigned Values = 1 + Args.size(); return new (Values) CleanupPadInst(ParentPad, Args, Values, NameStr, InsertBefore); } static CleanupPadInst *Create(Value *ParentPad, ArrayRef<Value *> Args, const Twine &NameStr, BasicBlock *InsertAtEnd) { unsigned Values = 1 + Args.size(); return new (Values) CleanupPadInst(ParentPad, Args, Values, NameStr, InsertAtEnd); } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::CleanupPad; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class CatchPadInst : public FuncletPadInst { private: explicit CatchPadInst(Value *CatchSwitch, ArrayRef<Value *> Args, unsigned Values, const Twine &NameStr, Instruction *InsertBefore) : FuncletPadInst(Instruction::CatchPad, CatchSwitch, Args, Values, NameStr, InsertBefore) {} explicit CatchPadInst(Value *CatchSwitch, ArrayRef<Value *> Args, unsigned Values, const Twine &NameStr, BasicBlock *InsertAtEnd) : FuncletPadInst(Instruction::CatchPad, CatchSwitch, Args, Values, NameStr, InsertAtEnd) {} public: static CatchPadInst *Create(Value *CatchSwitch, ArrayRef<Value *> Args, const Twine &NameStr = "", Instruction *InsertBefore = nullptr) { unsigned Values = 1 + Args.size(); return new (Values) CatchPadInst(CatchSwitch, Args, Values, NameStr, InsertBefore); } static CatchPadInst *Create(Value *CatchSwitch, ArrayRef<Value *> Args, const Twine &NameStr, BasicBlock *InsertAtEnd) { unsigned Values = 1 + Args.size(); return new (Values) CatchPadInst(CatchSwitch, Args, Values, NameStr, InsertAtEnd); } CatchSwitchInst *getCatchSwitch() const { return cast<CatchSwitchInst>(Op<-1>()); } void setCatchSwitch(Value *CatchSwitch) { (static_cast<void> (0)); Op<-1>() = CatchSwitch; } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::CatchPad; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class CatchReturnInst : public Instruction { CatchReturnInst(const CatchReturnInst &RI); CatchReturnInst(Value *CatchPad, BasicBlock *BB, Instruction *InsertBefore); CatchReturnInst(Value *CatchPad, BasicBlock *BB, BasicBlock *InsertAtEnd); void init(Value *CatchPad, BasicBlock *BB); protected: friend class Instruction; CatchReturnInst *cloneImpl() const; public: static CatchReturnInst *Create(Value *CatchPad, BasicBlock *BB, Instruction *InsertBefore = nullptr) { (static_cast<void> (0)); (static_cast<void> (0)); return new (2) CatchReturnInst(CatchPad, BB, InsertBefore); } static CatchReturnInst *Create(Value *CatchPad, BasicBlock *BB, BasicBlock *InsertAtEnd) { (static_cast<void> (0)); (static_cast<void> (0)); return new (2) CatchReturnInst(CatchPad, BB, InsertAtEnd); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; CatchPadInst *getCatchPad() const { return cast<CatchPadInst>(Op<0>()); } void setCatchPad(CatchPadInst *CatchPad) { (static_cast<void> (0)); Op<0>() = CatchPad; } BasicBlock *getSuccessor() const { return cast<BasicBlock>(Op<1>()); } void setSuccessor(BasicBlock *NewSucc) { (static_cast<void> (0)); Op<1>() = NewSucc; } unsigned getNumSuccessors() const { return 1; } Value *getCatchSwitchParentPad() const { return getCatchPad()->getCatchSwitch()->getParentPad(); } static bool classof(const Instruction *I) { return (I->getOpcode() == Instruction::CatchRet); } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } private: BasicBlock *getSuccessor(unsigned Idx) const { (static_cast<void> (0)); return getSuccessor(); } void setSuccessor(unsigned Idx, BasicBlock *B) { (static_cast<void> (0)); setSuccessor(B); } }; template <> struct OperandTraits<CatchReturnInst> : public FixedNumOperandTraits<CatchReturnInst, 2> {}; CatchReturnInst::op_iterator CatchReturnInst::op_begin() { return OperandTraits<CatchReturnInst>::op_begin(this); } CatchReturnInst::const_op_iterator CatchReturnInst::op_begin() const { return OperandTraits<CatchReturnInst>::op_begin(const_cast<CatchReturnInst*>(this)); } CatchReturnInst::op_iterator CatchReturnInst::op_end() { return OperandTraits<CatchReturnInst>::op_end(this); } CatchReturnInst::const_op_iterator CatchReturnInst::op_end() const { return OperandTraits<CatchReturnInst>::op_end(const_cast<CatchReturnInst*>(this)); } Value *CatchReturnInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<CatchReturnInst>::op_begin(const_cast<CatchReturnInst*>(this))[i_nocapture].get()); } void CatchReturnInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<CatchReturnInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned CatchReturnInst::getNumOperands() const { return OperandTraits<CatchReturnInst>::operands(this); } template <int Idx_nocapture> Use &CatchReturnInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &CatchReturnInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } class CleanupReturnInst : public Instruction { using UnwindDestField = BoolBitfieldElementT<0>; private: CleanupReturnInst(const CleanupReturnInst &RI); CleanupReturnInst(Value *CleanupPad, BasicBlock *UnwindBB, unsigned Values, Instruction *InsertBefore = nullptr); CleanupReturnInst(Value *CleanupPad, BasicBlock *UnwindBB, unsigned Values, BasicBlock *InsertAtEnd); void init(Value *CleanupPad, BasicBlock *UnwindBB); protected: friend class Instruction; CleanupReturnInst *cloneImpl() const; public: static CleanupReturnInst *Create(Value *CleanupPad, BasicBlock *UnwindBB = nullptr, Instruction *InsertBefore = nullptr) { (static_cast<void> (0)); unsigned Values = 1; if (UnwindBB) ++Values; return new (Values) CleanupReturnInst(CleanupPad, UnwindBB, Values, InsertBefore); } static CleanupReturnInst *Create(Value *CleanupPad, BasicBlock *UnwindBB, BasicBlock *InsertAtEnd) { (static_cast<void> (0)); unsigned Values = 1; if (UnwindBB) ++Values; return new (Values) CleanupReturnInst(CleanupPad, UnwindBB, Values, InsertAtEnd); } public: inline Value *getOperand(unsigned) const; inline void setOperand(unsigned, Value*); inline op_iterator op_begin(); inline const_op_iterator op_begin() const; inline op_iterator op_end(); inline const_op_iterator op_end() const; protected: template <int> inline Use &Op(); template <int> inline const Use &Op() const; public: inline unsigned getNumOperands() const; bool hasUnwindDest() const { return getSubclassData<UnwindDestField>(); } bool unwindsToCaller() const { return !hasUnwindDest(); } CleanupPadInst *getCleanupPad() const { return cast<CleanupPadInst>(Op<0>()); } void setCleanupPad(CleanupPadInst *CleanupPad) { (static_cast<void> (0)); Op<0>() = CleanupPad; } unsigned getNumSuccessors() const { return hasUnwindDest() ? 1 : 0; } BasicBlock *getUnwindDest() const { return hasUnwindDest() ? cast<BasicBlock>(Op<1>()) : nullptr; } void setUnwindDest(BasicBlock *NewDest) { (static_cast<void> (0)); (static_cast<void> (0)); Op<1>() = NewDest; } static bool classof(const Instruction *I) { return (I->getOpcode() == Instruction::CleanupRet); } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } private: BasicBlock *getSuccessor(unsigned Idx) const { (static_cast<void> (0)); return getUnwindDest(); } void setSuccessor(unsigned Idx, BasicBlock *B) { (static_cast<void> (0)); setUnwindDest(B); } template <typename Bitfield> void setSubclassData(typename Bitfield::Type Value) { Instruction::setSubclassData<Bitfield>(Value); } }; template <> struct OperandTraits<CleanupReturnInst> : public VariadicOperandTraits<CleanupReturnInst, 1> {}; CleanupReturnInst::op_iterator CleanupReturnInst::op_begin() { return OperandTraits<CleanupReturnInst>::op_begin(this); } CleanupReturnInst::const_op_iterator CleanupReturnInst::op_begin() const { return OperandTraits<CleanupReturnInst>::op_begin(const_cast<CleanupReturnInst*>(this)); } CleanupReturnInst::op_iterator CleanupReturnInst::op_end() { return OperandTraits<CleanupReturnInst>::op_end(this); } CleanupReturnInst::const_op_iterator CleanupReturnInst::op_end() const { return OperandTraits<CleanupReturnInst>::op_end(const_cast<CleanupReturnInst*>(this)); } Value *CleanupReturnInst::getOperand(unsigned i_nocapture) const { (static_cast<void> (0)); return cast_or_null<Value>( OperandTraits<CleanupReturnInst>::op_begin(const_cast<CleanupReturnInst*>(this))[i_nocapture].get()); } void CleanupReturnInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { (static_cast<void> (0)); OperandTraits<CleanupReturnInst>::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned CleanupReturnInst::getNumOperands() const { return OperandTraits<CleanupReturnInst>::operands(this); } template <int Idx_nocapture> Use &CleanupReturnInst::Op() { return this->OpFrom<Idx_nocapture>(this); } template <int Idx_nocapture> const Use &CleanupReturnInst::Op() const { return this->OpFrom<Idx_nocapture>(this); } # 4604 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Instructions.h" class UnreachableInst : public Instruction { protected: friend class Instruction; UnreachableInst *cloneImpl() const; public: explicit UnreachableInst(LLVMContext &C, Instruction *InsertBefore = nullptr); explicit UnreachableInst(LLVMContext &C, BasicBlock *InsertAtEnd); void *operator new(size_t s) { return User::operator new(s, 0); } unsigned getNumSuccessors() const { return 0; } static bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Unreachable; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } private: BasicBlock *getSuccessor(unsigned idx) const { __builtin_unreachable(); } void setSuccessor(unsigned idx, BasicBlock *B) { __builtin_unreachable(); } }; class TruncInst : public CastInst { protected: friend class Instruction; TruncInst *cloneImpl() const; public: TruncInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = nullptr ); TruncInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static bool classof(const Instruction *I) { return I->getOpcode() == Trunc; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class ZExtInst : public CastInst { protected: friend class Instruction; ZExtInst *cloneImpl() const; public: ZExtInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = nullptr ); ZExtInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static bool classof(const Instruction *I) { return I->getOpcode() == ZExt; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class SExtInst : public CastInst { protected: friend class Instruction; SExtInst *cloneImpl() const; public: SExtInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = nullptr ); SExtInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static bool classof(const Instruction *I) { return I->getOpcode() == SExt; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class FPTruncInst : public CastInst { protected: friend class Instruction; FPTruncInst *cloneImpl() const; public: FPTruncInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = nullptr ); FPTruncInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static bool classof(const Instruction *I) { return I->getOpcode() == FPTrunc; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class FPExtInst : public CastInst { protected: friend class Instruction; FPExtInst *cloneImpl() const; public: FPExtInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = nullptr ); FPExtInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static bool classof(const Instruction *I) { return I->getOpcode() == FPExt; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class UIToFPInst : public CastInst { protected: friend class Instruction; UIToFPInst *cloneImpl() const; public: UIToFPInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = nullptr ); UIToFPInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static bool classof(const Instruction *I) { return I->getOpcode() == UIToFP; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class SIToFPInst : public CastInst { protected: friend class Instruction; SIToFPInst *cloneImpl() const; public: SIToFPInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = nullptr ); SIToFPInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static bool classof(const Instruction *I) { return I->getOpcode() == SIToFP; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class FPToUIInst : public CastInst { protected: friend class Instruction; FPToUIInst *cloneImpl() const; public: FPToUIInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = nullptr ); FPToUIInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static bool classof(const Instruction *I) { return I->getOpcode() == FPToUI; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class FPToSIInst : public CastInst { protected: friend class Instruction; FPToSIInst *cloneImpl() const; public: FPToSIInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = nullptr ); FPToSIInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static bool classof(const Instruction *I) { return I->getOpcode() == FPToSI; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class IntToPtrInst : public CastInst { public: friend class Instruction; IntToPtrInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = nullptr ); IntToPtrInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); IntToPtrInst *cloneImpl() const; unsigned getAddressSpace() const { return getType()->getPointerAddressSpace(); } static bool classof(const Instruction *I) { return I->getOpcode() == IntToPtr; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class PtrToIntInst : public CastInst { protected: friend class Instruction; PtrToIntInst *cloneImpl() const; public: PtrToIntInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = nullptr ); PtrToIntInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); Value *getPointerOperand() { return getOperand(0); } const Value *getPointerOperand() const { return getOperand(0); } static unsigned getPointerOperandIndex() { return 0U; } unsigned getPointerAddressSpace() const { return getPointerOperand()->getType()->getPointerAddressSpace(); } static bool classof(const Instruction *I) { return I->getOpcode() == PtrToInt; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class BitCastInst : public CastInst { protected: friend class Instruction; BitCastInst *cloneImpl() const; public: BitCastInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = nullptr ); BitCastInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static bool classof(const Instruction *I) { return I->getOpcode() == BitCast; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; class AddrSpaceCastInst : public CastInst { protected: friend class Instruction; AddrSpaceCastInst *cloneImpl() const; public: AddrSpaceCastInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = nullptr ); AddrSpaceCastInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static bool classof(const Instruction *I) { return I->getOpcode() == AddrSpaceCast; } static bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } Value *getPointerOperand() { return getOperand(0); } const Value *getPointerOperand() const { return getOperand(0); } static unsigned getPointerOperandIndex() { return 0U; } unsigned getSrcAddressSpace() const { return getPointerOperand()->getType()->getPointerAddressSpace(); } unsigned getDestAddressSpace() const { return getType()->getPointerAddressSpace(); } }; inline const Value *getLoadStorePointerOperand(const Value *V) { if (auto *Load = dyn_cast<LoadInst>(V)) return Load->getPointerOperand(); if (auto *Store = dyn_cast<StoreInst>(V)) return Store->getPointerOperand(); return nullptr; } inline Value *getLoadStorePointerOperand(Value *V) { return const_cast<Value *>( getLoadStorePointerOperand(static_cast<const Value *>(V))); } inline const Value *getPointerOperand(const Value *V) { if (auto *Ptr = getLoadStorePointerOperand(V)) return Ptr; if (auto *Gep = dyn_cast<GetElementPtrInst>(V)) return Gep->getPointerOperand(); return nullptr; } inline Value *getPointerOperand(Value *V) { return const_cast<Value *>(getPointerOperand(static_cast<const Value *>(V))); } inline Align getLoadStoreAlignment(Value *I) { (static_cast<void> (0)); if (auto *LI = dyn_cast<LoadInst>(I)) return LI->getAlign(); return cast<StoreInst>(I)->getAlign(); } inline unsigned getLoadStoreAddressSpace(Value *I) { (static_cast<void> (0)); if (auto *LI = dyn_cast<LoadInst>(I)) return LI->getPointerAddressSpace(); return cast<StoreInst>(I)->getPointerAddressSpace(); } class FreezeInst : public UnaryInstruction { protected: friend class Instruction; FreezeInst *cloneImpl() const; public: explicit FreezeInst(Value *S, const Twine &NameStr = "", Instruction *InsertBefore = nullptr); FreezeInst(Value *S, const Twine &NameStr, BasicBlock *InsertAtEnd); static inline bool classof(const Instruction *I) { return I->getOpcode() == Freeze; } static inline bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } }; } # 31 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" 1 # 24 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Comdat.h" 1 # 21 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Comdat.h" namespace llvm { class raw_ostream; class StringRef; template <typename ValueTy> class StringMapEntry; class Comdat { public: enum SelectionKind { Any, ExactMatch, Largest, NoDuplicates, SameSize, }; Comdat(const Comdat &) = delete; Comdat(Comdat &&C); SelectionKind getSelectionKind() const { return SK; } void setSelectionKind(SelectionKind Val) { SK = Val; } StringRef getName() const; void print(raw_ostream &OS, bool IsForDebug = false) const; void dump() const; private: friend class Module; Comdat(); StringMapEntry<Comdat> *Name = nullptr; SelectionKind SK = Any; }; inline Comdat *unwrap(LLVMComdatRef P) { return reinterpret_cast<Comdat*>(P); } inline LLVMComdatRef wrap(const Comdat *P) { return reinterpret_cast<LLVMComdatRef>(const_cast<Comdat*>(P)); } inline raw_ostream &operator<<(raw_ostream &OS, const Comdat &C) { C.print(OS); return OS; } } # 25 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DataLayout.h" 1 # 33 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DataLayout.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 34 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DataLayout.h" 2 using LLVMTargetDataRef = struct LLVMOpaqueTargetData *; namespace llvm { class GlobalVariable; class LLVMContext; class Module; class StructLayout; class Triple; class Value; enum AlignTypeEnum { INVALID_ALIGN = 0, INTEGER_ALIGN = 'i', VECTOR_ALIGN = 'v', FLOAT_ALIGN = 'f', AGGREGATE_ALIGN = 'a' }; # 71 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DataLayout.h" struct LayoutAlignElem { unsigned AlignType : 8; unsigned TypeBitWidth : 24; Align ABIAlign; Align PrefAlign; static LayoutAlignElem get(AlignTypeEnum align_type, Align abi_align, Align pref_align, uint32_t bit_width); bool operator==(const LayoutAlignElem &rhs) const; }; struct PointerAlignElem { Align ABIAlign; Align PrefAlign; uint32_t TypeByteWidth; uint32_t AddressSpace; uint32_t IndexWidth; static PointerAlignElem get(uint32_t AddressSpace, Align ABIAlign, Align PrefAlign, uint32_t TypeByteWidth, uint32_t IndexWidth); bool operator==(const PointerAlignElem &rhs) const; }; class DataLayout { public: enum class FunctionPtrAlignType { Independent, MultipleOfFunctionAlign, }; private: bool BigEndian; unsigned AllocaAddrSpace; MaybeAlign StackNaturalAlign; unsigned ProgramAddrSpace; MaybeAlign FunctionPtrAlign; FunctionPtrAlignType TheFunctionPtrAlignType; enum ManglingModeT { MM_None, MM_ELF, MM_MachO, MM_WinCOFF, MM_WinCOFFX86, MM_Mips, MM_XCOFF }; ManglingModeT ManglingMode; SmallVector<unsigned char, 8> LegalIntWidths; using AlignmentsTy = SmallVector<LayoutAlignElem, 16>; AlignmentsTy Alignments; AlignmentsTy::const_iterator findAlignmentLowerBound(AlignTypeEnum AlignType, uint32_t BitWidth) const { return const_cast<DataLayout *>(this)->findAlignmentLowerBound(AlignType, BitWidth); } AlignmentsTy::iterator findAlignmentLowerBound(AlignTypeEnum AlignType, uint32_t BitWidth); std::string StringRepresentation; using PointersTy = SmallVector<PointerAlignElem, 8>; PointersTy Pointers; PointersTy::const_iterator findPointerLowerBound(uint32_t AddressSpace) const { return const_cast<DataLayout *>(this)->findPointerLowerBound(AddressSpace); } PointersTy::iterator findPointerLowerBound(uint32_t AddressSpace); mutable void *LayoutMap = nullptr; SmallVector<unsigned, 8> NonIntegralAddressSpaces; void setAlignment(AlignTypeEnum align_type, Align abi_align, Align pref_align, uint32_t bit_width); Align getAlignmentInfo(AlignTypeEnum align_type, uint32_t bit_width, bool ABIAlign, Type *Ty) const; void setPointerAlignment(uint32_t AddrSpace, Align ABIAlign, Align PrefAlign, uint32_t TypeByteWidth, uint32_t IndexWidth); Align getAlignment(Type *Ty, bool abi_or_pref) const; void parseSpecifier(StringRef LayoutDescription); void clear(); public: explicit DataLayout(StringRef LayoutDescription) { reset(LayoutDescription); } explicit DataLayout(const Module *M); DataLayout(const DataLayout &DL) { *this = DL; } ~DataLayout(); DataLayout &operator=(const DataLayout &DL) { clear(); StringRepresentation = DL.StringRepresentation; BigEndian = DL.isBigEndian(); AllocaAddrSpace = DL.AllocaAddrSpace; StackNaturalAlign = DL.StackNaturalAlign; FunctionPtrAlign = DL.FunctionPtrAlign; TheFunctionPtrAlignType = DL.TheFunctionPtrAlignType; ProgramAddrSpace = DL.ProgramAddrSpace; ManglingMode = DL.ManglingMode; LegalIntWidths = DL.LegalIntWidths; Alignments = DL.Alignments; Pointers = DL.Pointers; NonIntegralAddressSpaces = DL.NonIntegralAddressSpaces; return *this; } bool operator==(const DataLayout &Other) const; bool operator!=(const DataLayout &Other) const { return !(*this == Other); } void init(const Module *M); void reset(StringRef LayoutDescription); bool isLittleEndian() const { return !BigEndian; } bool isBigEndian() const { return BigEndian; } const std::string &getStringRepresentation() const { return StringRepresentation; } bool isDefault() const { return StringRepresentation.empty(); } # 255 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DataLayout.h" bool isLegalInteger(uint64_t Width) const { for (unsigned LegalIntWidth : LegalIntWidths) if (LegalIntWidth == Width) return true; return false; } bool isIllegalInteger(uint64_t Width) const { return !isLegalInteger(Width); } bool exceedsNaturalStackAlignment(Align Alignment) const { return StackNaturalAlign && (Alignment > *StackNaturalAlign); } Align getStackAlignment() const { (static_cast<void> (0)); return *StackNaturalAlign; } unsigned getAllocaAddrSpace() const { return AllocaAddrSpace; } MaybeAlign getFunctionPtrAlign() const { return FunctionPtrAlign; } FunctionPtrAlignType getFunctionPtrAlignType() const { return TheFunctionPtrAlignType; } unsigned getProgramAddressSpace() const { return ProgramAddrSpace; } bool hasMicrosoftFastStdCallMangling() const { return ManglingMode == MM_WinCOFFX86; } bool doNotMangleLeadingQuestionMark() const { return ManglingMode == MM_WinCOFF || ManglingMode == MM_WinCOFFX86; } bool hasLinkerPrivateGlobalPrefix() const { return ManglingMode == MM_MachO; } StringRef getLinkerPrivateGlobalPrefix() const { if (ManglingMode == MM_MachO) return "l"; return ""; } char getGlobalPrefix() const { switch (ManglingMode) { case MM_None: case MM_ELF: case MM_Mips: case MM_WinCOFF: case MM_XCOFF: return '\0'; case MM_MachO: case MM_WinCOFFX86: return '_'; } __builtin_unreachable(); } StringRef getPrivateGlobalPrefix() const { switch (ManglingMode) { case MM_None: return ""; case MM_ELF: case MM_WinCOFF: return ".L"; case MM_Mips: return "$"; case MM_MachO: case MM_WinCOFFX86: return "L"; case MM_XCOFF: return "L.."; } __builtin_unreachable(); } static const char *getManglingComponent(const Triple &T); bool fitsInLegalInteger(unsigned Width) const { for (unsigned LegalIntWidth : LegalIntWidths) if (Width <= LegalIntWidth) return true; return false; } Align getPointerABIAlignment(unsigned AS) const; Align getPointerPrefAlignment(unsigned AS = 0) const; unsigned getPointerSize(unsigned AS = 0) const; unsigned getMaxPointerSize() const; unsigned getIndexSize(unsigned AS) const; ArrayRef<unsigned> getNonIntegralAddressSpaces() const { return NonIntegralAddressSpaces; } bool isNonIntegralAddressSpace(unsigned AddrSpace) const { ArrayRef<unsigned> NonIntegralSpaces = getNonIntegralAddressSpaces(); return find(NonIntegralSpaces, AddrSpace) != NonIntegralSpaces.end(); } bool isNonIntegralPointerType(PointerType *PT) const { return isNonIntegralAddressSpace(PT->getAddressSpace()); } bool isNonIntegralPointerType(Type *Ty) const { auto *PTy = dyn_cast<PointerType>(Ty); return PTy && isNonIntegralPointerType(PTy); } unsigned getPointerSizeInBits(unsigned AS = 0) const { return getPointerSize(AS) * 8; } unsigned getMaxPointerSizeInBits() const { return getMaxPointerSize() * 8; } unsigned getIndexSizeInBits(unsigned AS) const { return getIndexSize(AS) * 8; } unsigned getPointerTypeSizeInBits(Type *) const; unsigned getIndexTypeSizeInBits(Type *Ty) const; unsigned getPointerTypeSize(Type *Ty) const { return getPointerTypeSizeInBits(Ty) / 8; } # 449 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DataLayout.h" TypeSize getTypeSizeInBits(Type *Ty) const; # 458 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DataLayout.h" TypeSize getTypeStoreSize(Type *Ty) const { TypeSize BaseSize = getTypeSizeInBits(Ty); return { (BaseSize.getKnownMinSize() + 7) / 8, BaseSize.isScalable() }; } # 470 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DataLayout.h" TypeSize getTypeStoreSizeInBits(Type *Ty) const { return 8 * getTypeStoreSize(Ty); } bool typeSizeEqualsStoreSize(Type *Ty) const { return getTypeSizeInBits(Ty) == getTypeStoreSizeInBits(Ty); } # 490 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DataLayout.h" TypeSize getTypeAllocSize(Type *Ty) const { return alignTo(getTypeStoreSize(Ty), getABITypeAlignment(Ty)); } # 503 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/DataLayout.h" TypeSize getTypeAllocSizeInBits(Type *Ty) const { return 8 * getTypeAllocSize(Ty); } unsigned getABITypeAlignment(Type *Ty) const; Align getABITypeAlign(Type *Ty) const; inline Align getValueOrABITypeAlignment(MaybeAlign Alignment, Type *Ty) const { return Alignment ? *Alignment : getABITypeAlign(Ty); } Align getABIIntegerTypeAlignment(unsigned BitWidth) const; unsigned getPrefTypeAlignment(Type *Ty) const; Align getPrefTypeAlign(Type *Ty) const; IntegerType *getIntPtrType(LLVMContext &C, unsigned AddressSpace = 0) const; Type *getIntPtrType(Type *) const; Type *getSmallestLegalIntType(LLVMContext &C, unsigned Width = 0) const; Type *getLargestLegalIntType(LLVMContext &C) const { unsigned LargestSize = getLargestLegalIntTypeSizeInBits(); return (LargestSize == 0) ? nullptr : Type::getIntNTy(C, LargestSize); } unsigned getLargestLegalIntTypeSizeInBits() const; Type *getIndexType(Type *PtrTy) const; int64_t getIndexedOffsetInType(Type *ElemTy, ArrayRef<Value *> Indices) const; const StructLayout *getStructLayout(StructType *Ty) const; Align getPreferredAlign(const GlobalVariable *GV) const; inline unsigned getPreferredAlignment(const GlobalVariable *GV) const __attribute__((deprecated("Use getPreferredAlign instead"))) { return getPreferredAlign(GV).value(); } inline unsigned getPreferredAlignmentLog(const GlobalVariable *GV) const __attribute__((deprecated("Inline where needed"))) { return Log2(getPreferredAlign(GV)); } }; inline DataLayout *unwrap(LLVMTargetDataRef P) { return reinterpret_cast<DataLayout *>(P); } inline LLVMTargetDataRef wrap(const DataLayout *P) { return reinterpret_cast<LLVMTargetDataRef>(const_cast<DataLayout *>(P)); } class StructLayout { uint64_t StructSize; Align StructAlignment; unsigned IsPadded : 1; unsigned NumElements : 31; uint64_t MemberOffsets[1]; public: uint64_t getSizeInBytes() const { return StructSize; } uint64_t getSizeInBits() const { return 8 * StructSize; } Align getAlignment() const { return StructAlignment; } bool hasPadding() const { return IsPadded; } unsigned getElementContainingOffset(uint64_t Offset) const; uint64_t getElementOffset(unsigned Idx) const { (static_cast<void> (0)); return MemberOffsets[Idx]; } uint64_t getElementOffsetInBits(unsigned Idx) const { return getElementOffset(Idx) * 8; } private: friend class DataLayout; StructLayout(StructType *ST, const DataLayout &DL); }; inline TypeSize DataLayout::getTypeSizeInBits(Type *Ty) const { (static_cast<void> (0)); switch (Ty->getTypeID()) { case Type::LabelTyID: return TypeSize::Fixed(getPointerSizeInBits(0)); case Type::PointerTyID: return TypeSize::Fixed(getPointerSizeInBits(Ty->getPointerAddressSpace())); case Type::ArrayTyID: { ArrayType *ATy = cast<ArrayType>(Ty); return ATy->getNumElements() * getTypeAllocSizeInBits(ATy->getElementType()); } case Type::StructTyID: return TypeSize::Fixed( getStructLayout(cast<StructType>(Ty))->getSizeInBits()); case Type::IntegerTyID: return TypeSize::Fixed(Ty->getIntegerBitWidth()); case Type::HalfTyID: case Type::BFloatTyID: return TypeSize::Fixed(16); case Type::FloatTyID: return TypeSize::Fixed(32); case Type::DoubleTyID: case Type::X86_MMXTyID: return TypeSize::Fixed(64); case Type::PPC_FP128TyID: case Type::FP128TyID: return TypeSize::Fixed(128); case Type::X86_FP80TyID: return TypeSize::Fixed(80); case Type::FixedVectorTyID: case Type::ScalableVectorTyID: { VectorType *VTy = cast<VectorType>(Ty); auto EltCnt = VTy->getElementCount(); uint64_t MinBits = EltCnt.Min * getTypeSizeInBits(VTy->getElementType()).getFixedSize(); return TypeSize(MinBits, EltCnt.Scalable); } default: __builtin_unreachable(); } } } # 26 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/ProfileSummary.h" 1 # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/ProfileSummary.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 18 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/ProfileSummary.h" 2 namespace llvm { class LLVMContext; class Metadata; class raw_ostream; struct ProfileSummaryEntry { uint32_t Cutoff; uint64_t MinCount; uint64_t NumCounts; ProfileSummaryEntry(uint32_t TheCutoff, uint64_t TheMinCount, uint64_t TheNumCounts) : Cutoff(TheCutoff), MinCount(TheMinCount), NumCounts(TheNumCounts) {} }; using SummaryEntryVector = std::vector<ProfileSummaryEntry>; class ProfileSummary { public: enum Kind { PSK_Instr, PSK_CSInstr, PSK_Sample }; private: const Kind PSK; SummaryEntryVector DetailedSummary; uint64_t TotalCount, MaxCount, MaxInternalCount, MaxFunctionCount; uint32_t NumCounts, NumFunctions; bool Partial = false; double PartialProfileRatio = 0; Metadata *getDetailedSummaryMD(LLVMContext &Context); public: static const int Scale = 1000000; ProfileSummary(Kind K, SummaryEntryVector DetailedSummary, uint64_t TotalCount, uint64_t MaxCount, uint64_t MaxInternalCount, uint64_t MaxFunctionCount, uint32_t NumCounts, uint32_t NumFunctions, bool Partial = false, double PartialProfileRatio = 0) : PSK(K), DetailedSummary(std::move(DetailedSummary)), TotalCount(TotalCount), MaxCount(MaxCount), MaxInternalCount(MaxInternalCount), MaxFunctionCount(MaxFunctionCount), NumCounts(NumCounts), NumFunctions(NumFunctions), Partial(Partial), PartialProfileRatio(PartialProfileRatio) {} Kind getKind() const { return PSK; } Metadata *getMD(LLVMContext &Context, bool AddPartialField = true, bool AddPartialProfileRatioField = true); static ProfileSummary *getFromMD(Metadata *MD); SummaryEntryVector &getDetailedSummary() { return DetailedSummary; } uint32_t getNumFunctions() { return NumFunctions; } uint64_t getMaxFunctionCount() { return MaxFunctionCount; } uint32_t getNumCounts() { return NumCounts; } uint64_t getTotalCount() { return TotalCount; } uint64_t getMaxCount() { return MaxCount; } uint64_t getMaxInternalCount() { return MaxInternalCount; } void setPartialProfile(bool PP) { Partial = PP; } bool isPartialProfile() { return Partial; } double getPartialProfileRatio() { return PartialProfileRatio; } void setPartialProfileRatio(double R) { (static_cast<void> (0)); PartialProfileRatio = R; } void printSummary(raw_ostream &OS); void printDetailedSummary(raw_ostream &OS); }; } # 32 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/CodeGen.h" 1 # 17 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/CodeGen.h" namespace llvm { namespace Reloc { enum Model { Static, PIC_, DynamicNoPIC, ROPI, RWPI, ROPI_RWPI }; } namespace CodeModel { enum Model { Tiny, Small, Kernel, Medium, Large }; } namespace PICLevel { enum Level { NotPIC=0, SmallPIC=1, BigPIC=2 }; } namespace PIELevel { enum Level { Default=0, Small=1, Large=2 }; } namespace TLSModel { enum Model { GeneralDynamic, LocalDynamic, InitialExec, LocalExec }; } namespace CodeGenOpt { enum Level { None = 0, Less = 1, Default = 2, Aggressive = 3 }; } enum CodeGenFileType { CGFT_AssemblyFile, CGFT_ObjectFile, CGFT_Null }; namespace FramePointer { enum FP {All, NonLeaf, None}; } } # 35 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" 2 namespace llvm { class Error; class FunctionType; class GVMaterializer; class LLVMContext; class MemoryBuffer; class ModuleSummaryIndex; class Pass; class RandomNumberGenerator; template <class PtrType> class SmallPtrSetImpl; class StructType; class VersionTuple; # 67 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" class Module { public: using GlobalListType = SymbolTableList<GlobalVariable>; using FunctionListType = SymbolTableList<Function>; using AliasListType = SymbolTableList<GlobalAlias>; using IFuncListType = SymbolTableList<GlobalIFunc>; using NamedMDListType = ilist<NamedMDNode>; using ComdatSymTabType = StringMap<Comdat>; using NamedMDSymTabType = StringMap<NamedMDNode *>; using global_iterator = GlobalListType::iterator; using const_global_iterator = GlobalListType::const_iterator; using iterator = FunctionListType::iterator; using const_iterator = FunctionListType::const_iterator; using reverse_iterator = FunctionListType::reverse_iterator; using const_reverse_iterator = FunctionListType::const_reverse_iterator; using alias_iterator = AliasListType::iterator; using const_alias_iterator = AliasListType::const_iterator; using ifunc_iterator = IFuncListType::iterator; using const_ifunc_iterator = IFuncListType::const_iterator; using named_metadata_iterator = NamedMDListType::iterator; using const_named_metadata_iterator = NamedMDListType::const_iterator; enum ModFlagBehavior { Error = 1, Warning = 2, # 133 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" Require = 3, Override = 4, Append = 5, AppendUnique = 6, Max = 7, ModFlagBehaviorFirstVal = Error, ModFlagBehaviorLastVal = Max }; static bool isValidModFlagBehavior(Metadata *MD, ModFlagBehavior &MFB); static bool isValidModuleFlag(const MDNode &ModFlag, ModFlagBehavior &MFB, MDString *&Key, Metadata *&Val); struct ModuleFlagEntry { ModFlagBehavior Behavior; MDString *Key; Metadata *Val; ModuleFlagEntry(ModFlagBehavior B, MDString *K, Metadata *V) : Behavior(B), Key(K), Val(V) {} }; private: LLVMContext &Context; GlobalListType GlobalList; FunctionListType FunctionList; AliasListType AliasList; IFuncListType IFuncList; NamedMDListType NamedMDList; std::string GlobalScopeAsm; std::unique_ptr<ValueSymbolTable> ValSymTab; ComdatSymTabType ComdatSymTab; std::unique_ptr<MemoryBuffer> OwnedMemoryBuffer; std::unique_ptr<GVMaterializer> Materializer; std::string ModuleID; std::string SourceFileName; std::string TargetTriple; NamedMDSymTabType NamedMDSymTab; DataLayout DL; friend class Constant; public: explicit Module(StringRef ModuleID, LLVMContext& C); ~Module(); const std::string &getModuleIdentifier() const { return ModuleID; } unsigned getInstructionCount(); const std::string &getSourceFileName() const { return SourceFileName; } StringRef getName() const { return ModuleID; } const std::string &getDataLayoutStr() const { return DL.getStringRepresentation(); } const DataLayout &getDataLayout() const; const std::string &getTargetTriple() const { return TargetTriple; } LLVMContext &getContext() const { return Context; } const std::string &getModuleInlineAsm() const { return GlobalScopeAsm; } # 268 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" std::unique_ptr<RandomNumberGenerator> createRNG(const StringRef Name) const; bool shouldEmitInstrCountChangedRemark() { return getContext().getDiagHandlerPtr()->isAnalysisRemarkEnabled( "size-info"); } void setModuleIdentifier(StringRef ID) { ModuleID = std::string(ID); } void setSourceFileName(StringRef Name) { SourceFileName = std::string(Name); } void setDataLayout(StringRef Desc); void setDataLayout(const DataLayout &Other); void setTargetTriple(StringRef T) { TargetTriple = std::string(T); } void setModuleInlineAsm(StringRef Asm) { GlobalScopeAsm = std::string(Asm); if (!GlobalScopeAsm.empty() && GlobalScopeAsm.back() != '\n') GlobalScopeAsm += '\n'; } void appendModuleInlineAsm(StringRef Asm) { GlobalScopeAsm += Asm; if (!GlobalScopeAsm.empty() && GlobalScopeAsm.back() != '\n') GlobalScopeAsm += '\n'; } # 317 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" GlobalValue *getNamedValue(StringRef Name) const; unsigned getMDKindID(StringRef Name) const; void getMDKindNames(SmallVectorImpl<StringRef> &Result) const; void getOperandBundleTags(SmallVectorImpl<StringRef> &Result) const; StructType *getTypeByName(StringRef Name) const; std::vector<StructType *> getIdentifiedStructTypes() const; # 353 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" FunctionCallee getOrInsertFunction(StringRef Name, FunctionType *T, AttributeList AttributeList); FunctionCallee getOrInsertFunction(StringRef Name, FunctionType *T); template <typename... ArgsTy> FunctionCallee getOrInsertFunction(StringRef Name, AttributeList AttributeList, Type *RetTy, ArgsTy... Args) { SmallVector<Type*, sizeof...(ArgsTy)> ArgTys{Args...}; return getOrInsertFunction(Name, FunctionType::get(RetTy, ArgTys, false), AttributeList); } template <typename... ArgsTy> FunctionCallee getOrInsertFunction(StringRef Name, Type *RetTy, ArgsTy... Args) { return getOrInsertFunction(Name, AttributeList{}, RetTy, Args...); } template <typename... ArgsTy> FunctionCallee getOrInsertFunction(StringRef Name, AttributeList AttributeList, FunctionType *Invalid, ArgsTy... Args) = delete; Function *getFunction(StringRef Name) const; # 399 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" GlobalVariable *getGlobalVariable(StringRef Name) const { return getGlobalVariable(Name, false); } GlobalVariable *getGlobalVariable(StringRef Name, bool AllowInternal) const; GlobalVariable *getGlobalVariable(StringRef Name, bool AllowInternal = false) { return static_cast<const Module *>(this)->getGlobalVariable(Name, AllowInternal); } const GlobalVariable *getNamedGlobal(StringRef Name) const { return getGlobalVariable(Name, true); } GlobalVariable *getNamedGlobal(StringRef Name) { return const_cast<GlobalVariable *>( static_cast<const Module *>(this)->getNamedGlobal(Name)); } Constant * getOrInsertGlobal(StringRef Name, Type *Ty, function_ref<GlobalVariable *()> CreateGlobalCallback); Constant *getOrInsertGlobal(StringRef Name, Type *Ty); # 441 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" GlobalAlias *getNamedAlias(StringRef Name) const; # 450 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" GlobalIFunc *getNamedIFunc(StringRef Name) const; NamedMDNode *getNamedMetadata(const Twine &Name) const; NamedMDNode *getOrInsertNamedMetadata(StringRef Name); void eraseNamedMetadata(NamedMDNode *NMD); Comdat *getOrInsertComdat(StringRef Name); void getModuleFlagsMetadata(SmallVectorImpl<ModuleFlagEntry> &Flags) const; Metadata *getModuleFlag(StringRef Key) const; NamedMDNode *getModuleFlagsMetadata() const; NamedMDNode *getOrInsertModuleFlagsMetadata(); void addModuleFlag(ModFlagBehavior Behavior, StringRef Key, Metadata *Val); void addModuleFlag(ModFlagBehavior Behavior, StringRef Key, Constant *Val); void addModuleFlag(ModFlagBehavior Behavior, StringRef Key, uint32_t Val); void addModuleFlag(MDNode *Node); void setModuleFlag(ModFlagBehavior Behavior, StringRef Key, Metadata *Val); # 516 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" void setMaterializer(GVMaterializer *GVM); GVMaterializer *getMaterializer() const { return Materializer.get(); } bool isMaterialized() const { return !getMaterializer(); } llvm::Error materialize(GlobalValue *GV); llvm::Error materializeAll(); llvm::Error materializeMetadata(); const GlobalListType &getGlobalList() const { return GlobalList; } GlobalListType &getGlobalList() { return GlobalList; } static GlobalListType Module::*getSublistAccess(GlobalVariable*) { return &Module::GlobalList; } const FunctionListType &getFunctionList() const { return FunctionList; } FunctionListType &getFunctionList() { return FunctionList; } static FunctionListType Module::*getSublistAccess(Function*) { return &Module::FunctionList; } const AliasListType &getAliasList() const { return AliasList; } AliasListType &getAliasList() { return AliasList; } static AliasListType Module::*getSublistAccess(GlobalAlias*) { return &Module::AliasList; } const IFuncListType &getIFuncList() const { return IFuncList; } IFuncListType &getIFuncList() { return IFuncList; } static IFuncListType Module::*getSublistAccess(GlobalIFunc*) { return &Module::IFuncList; } const NamedMDListType &getNamedMDList() const { return NamedMDList; } NamedMDListType &getNamedMDList() { return NamedMDList; } static NamedMDListType Module::*getSublistAccess(NamedMDNode*) { return &Module::NamedMDList; } const ValueSymbolTable &getValueSymbolTable() const { return *ValSymTab; } ValueSymbolTable &getValueSymbolTable() { return *ValSymTab; } const ComdatSymTabType &getComdatSymbolTable() const { return ComdatSymTab; } ComdatSymTabType &getComdatSymbolTable() { return ComdatSymTab; } global_iterator global_begin() { return GlobalList.begin(); } const_global_iterator global_begin() const { return GlobalList.begin(); } global_iterator global_end () { return GlobalList.end(); } const_global_iterator global_end () const { return GlobalList.end(); } size_t global_size () const { return GlobalList.size(); } bool global_empty() const { return GlobalList.empty(); } iterator_range<global_iterator> globals() { return make_range(global_begin(), global_end()); } iterator_range<const_global_iterator> globals() const { return make_range(global_begin(), global_end()); } iterator begin() { return FunctionList.begin(); } const_iterator begin() const { return FunctionList.begin(); } iterator end () { return FunctionList.end(); } const_iterator end () const { return FunctionList.end(); } reverse_iterator rbegin() { return FunctionList.rbegin(); } const_reverse_iterator rbegin() const{ return FunctionList.rbegin(); } reverse_iterator rend() { return FunctionList.rend(); } const_reverse_iterator rend() const { return FunctionList.rend(); } size_t size() const { return FunctionList.size(); } bool empty() const { return FunctionList.empty(); } iterator_range<iterator> functions() { return make_range(begin(), end()); } iterator_range<const_iterator> functions() const { return make_range(begin(), end()); } alias_iterator alias_begin() { return AliasList.begin(); } const_alias_iterator alias_begin() const { return AliasList.begin(); } alias_iterator alias_end () { return AliasList.end(); } const_alias_iterator alias_end () const { return AliasList.end(); } size_t alias_size () const { return AliasList.size(); } bool alias_empty() const { return AliasList.empty(); } iterator_range<alias_iterator> aliases() { return make_range(alias_begin(), alias_end()); } iterator_range<const_alias_iterator> aliases() const { return make_range(alias_begin(), alias_end()); } ifunc_iterator ifunc_begin() { return IFuncList.begin(); } const_ifunc_iterator ifunc_begin() const { return IFuncList.begin(); } ifunc_iterator ifunc_end () { return IFuncList.end(); } const_ifunc_iterator ifunc_end () const { return IFuncList.end(); } size_t ifunc_size () const { return IFuncList.size(); } bool ifunc_empty() const { return IFuncList.empty(); } iterator_range<ifunc_iterator> ifuncs() { return make_range(ifunc_begin(), ifunc_end()); } iterator_range<const_ifunc_iterator> ifuncs() const { return make_range(ifunc_begin(), ifunc_end()); } using global_object_iterator = concat_iterator<GlobalObject, iterator, global_iterator>; using const_global_object_iterator = concat_iterator<const GlobalObject, const_iterator, const_global_iterator>; iterator_range<global_object_iterator> global_objects(); iterator_range<const_global_object_iterator> global_objects() const; using global_value_iterator = concat_iterator<GlobalValue, iterator, global_iterator, alias_iterator, ifunc_iterator>; using const_global_value_iterator = concat_iterator<const GlobalValue, const_iterator, const_global_iterator, const_alias_iterator, const_ifunc_iterator>; iterator_range<global_value_iterator> global_values(); iterator_range<const_global_value_iterator> global_values() const; named_metadata_iterator named_metadata_begin() { return NamedMDList.begin(); } const_named_metadata_iterator named_metadata_begin() const { return NamedMDList.begin(); } named_metadata_iterator named_metadata_end() { return NamedMDList.end(); } const_named_metadata_iterator named_metadata_end() const { return NamedMDList.end(); } size_t named_metadata_size() const { return NamedMDList.size(); } bool named_metadata_empty() const { return NamedMDList.empty(); } iterator_range<named_metadata_iterator> named_metadata() { return make_range(named_metadata_begin(), named_metadata_end()); } iterator_range<const_named_metadata_iterator> named_metadata() const { return make_range(named_metadata_begin(), named_metadata_end()); } class debug_compile_units_iterator : public std::iterator<std::input_iterator_tag, DICompileUnit *> { NamedMDNode *CUs; unsigned Idx; void SkipNoDebugCUs(); public: explicit debug_compile_units_iterator(NamedMDNode *CUs, unsigned Idx) : CUs(CUs), Idx(Idx) { SkipNoDebugCUs(); } debug_compile_units_iterator &operator++() { ++Idx; SkipNoDebugCUs(); return *this; } debug_compile_units_iterator operator++(int) { debug_compile_units_iterator T(*this); ++Idx; return T; } bool operator==(const debug_compile_units_iterator &I) const { return Idx == I.Idx; } bool operator!=(const debug_compile_units_iterator &I) const { return Idx != I.Idx; } DICompileUnit *operator*() const; DICompileUnit *operator->() const; }; debug_compile_units_iterator debug_compile_units_begin() const { auto *CUs = getNamedMetadata("llvm.dbg.cu"); return debug_compile_units_iterator(CUs, 0); } debug_compile_units_iterator debug_compile_units_end() const { auto *CUs = getNamedMetadata("llvm.dbg.cu"); return debug_compile_units_iterator(CUs, CUs ? CUs->getNumOperands() : 0); } iterator_range<debug_compile_units_iterator> debug_compile_units() const { auto *CUs = getNamedMetadata("llvm.dbg.cu"); return make_range( debug_compile_units_iterator(CUs, 0), debug_compile_units_iterator(CUs, CUs ? CUs->getNumOperands() : 0)); } # 777 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" void dropTriviallyDeadConstantArrays(); # 786 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/Module.h" void print(raw_ostream &OS, AssemblyAnnotationWriter *AAW, bool ShouldPreserveUseListOrder = false, bool IsForDebug = false) const; void dump() const; void dropAllReferences(); unsigned getNumberRegisterParameters() const; unsigned getDwarfVersion() const; unsigned getCodeViewFlag() const; PICLevel::Level getPICLevel() const; void setPICLevel(PICLevel::Level PL); PIELevel::Level getPIELevel() const; void setPIELevel(PIELevel::Level PL); Optional<CodeModel::Model> getCodeModel() const; void setCodeModel(CodeModel::Model CL); void setProfileSummary(Metadata *M, ProfileSummary::Kind Kind); Metadata *getProfileSummary(bool IsCS); bool getSemanticInterposition() const; bool noSemanticInterposition() const; void setSemanticInterposition(bool); bool getRtLibUseGOT() const; void setRtLibUseGOT(); void setSDKVersion(const VersionTuple &V); VersionTuple getSDKVersion() const; void setOwnedMemoryBuffer(std::unique_ptr<MemoryBuffer> MB); void setPartialSampleProfileRatio(const ModuleSummaryIndex &Index); }; GlobalVariable *collectUsedGlobalVariables(const Module &M, SmallPtrSetImpl<GlobalValue *> &Set, bool CompilerUsed); inline raw_ostream &operator<<(raw_ostream &O, const Module &M) { M.print(O, nullptr); return O; } inline Module *unwrap(LLVMModuleRef P) { return reinterpret_cast<Module*>(P); } inline LLVMModuleRef wrap(const Module *P) { return reinterpret_cast<LLVMModuleRef>(const_cast<Module*>(P)); } inline Module *unwrap(LLVMModuleProviderRef MP) { return reinterpret_cast<Module*>(MP); } } # 33 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/ValueSymbolTable.h" 1 # 21 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/ValueSymbolTable.h" namespace llvm { class Argument; class BasicBlock; class Function; class GlobalAlias; class GlobalIFunc; class GlobalVariable; class Instruction; template <unsigned InternalLen> class SmallString; template <typename ValueSubClass> class SymbolTableListTraits; class ValueSymbolTable { friend class SymbolTableListTraits<Argument>; friend class SymbolTableListTraits<BasicBlock>; friend class SymbolTableListTraits<Function>; friend class SymbolTableListTraits<GlobalAlias>; friend class SymbolTableListTraits<GlobalIFunc>; friend class SymbolTableListTraits<GlobalVariable>; friend class SymbolTableListTraits<Instruction>; friend class Value; public: using ValueMap = StringMap<Value*>; using iterator = ValueMap::iterator; using const_iterator = ValueMap::const_iterator; ValueSymbolTable() : vmap(0) {} ~ValueSymbolTable(); # 74 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/IR/ValueSymbolTable.h" Value *lookup(StringRef Name) const { return vmap.lookup(Name); } inline bool empty() const { return vmap.empty(); } inline unsigned size() const { return unsigned(vmap.size()); } void dump() const; inline iterator begin() { return vmap.begin(); } inline const_iterator begin() const { return vmap.begin(); } inline iterator end() { return vmap.end(); } inline const_iterator end() const { return vmap.end(); } private: ValueName *makeUniqueName(Value *V, SmallString<256> &UniqueName); void reinsertValue(Value *V); ValueName *createValueName(StringRef Name, Value *V); void removeValueName(ValueName *V); ValueMap vmap; mutable uint32_t LastUnique = 0; }; } # 39 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" 2 # 1 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Debug.h" 1 # 31 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Debug.h" namespace llvm { class raw_ostream; # 79 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Debug.h" extern bool DebugFlag; # 90 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Debug.h" extern bool VerifyDomInfo; extern bool VerifyLoopInfo; extern bool VerifyMemorySSA; # 108 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Debug.h" extern bool EnableDebugBuffering; raw_ostream &dbgs(); # 124 "/root/llvm-project-llvmorg-11.0.0/llvm/include/llvm/Support/Debug.h" } # 42 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 1 3 # 42 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/cassert" 2 3 # 46 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" 2 using namespace llvm; namespace { struct OrderMap { DenseMap<const Value *, std::pair<unsigned, bool>> IDs; unsigned LastGlobalConstantID = 0; unsigned LastGlobalValueID = 0; OrderMap() = default; bool isGlobalConstant(unsigned ID) const { return ID <= LastGlobalConstantID; } bool isGlobalValue(unsigned ID) const { return ID <= LastGlobalValueID && !isGlobalConstant(ID); } unsigned size() const { return IDs.size(); } std::pair<unsigned, bool> &operator[](const Value *V) { return IDs[V]; } std::pair<unsigned, bool> lookup(const Value *V) const { return IDs.lookup(V); } void index(const Value *V) { unsigned ID = IDs.size() + 1; IDs[V].first = ID; } }; } static void orderValue(const Value *V, OrderMap &OM) { if (OM.lookup(V).first) return; if (const Constant *C = dyn_cast<Constant>(V)) { if (C->getNumOperands() && !isa<GlobalValue>(C)) { for (const Value *Op : C->operands()) if (!isa<BasicBlock>(Op) && !isa<GlobalValue>(Op)) orderValue(Op, OM); if (auto *CE = dyn_cast<ConstantExpr>(C)) if (CE->getOpcode() == Instruction::ShuffleVector) orderValue(CE->getShuffleMaskForBitcode(), OM); } } OM.index(V); } static OrderMap orderModule(const Module &M) { OrderMap OM; for (const GlobalVariable &G : M.globals()) if (G.hasInitializer()) if (!isa<GlobalValue>(G.getInitializer())) orderValue(G.getInitializer(), OM); for (const GlobalAlias &A : M.aliases()) if (!isa<GlobalValue>(A.getAliasee())) orderValue(A.getAliasee(), OM); for (const GlobalIFunc &I : M.ifuncs()) if (!isa<GlobalValue>(I.getResolver())) orderValue(I.getResolver(), OM); for (const Function &F : M) { for (const Use &U : F.operands()) if (!isa<GlobalValue>(U.get())) orderValue(U.get(), OM); } OM.LastGlobalConstantID = OM.size(); # 142 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" for (const Function &F : M) orderValue(&F, OM); for (const GlobalAlias &A : M.aliases()) orderValue(&A, OM); for (const GlobalIFunc &I : M.ifuncs()) orderValue(&I, OM); for (const GlobalVariable &G : M.globals()) orderValue(&G, OM); OM.LastGlobalValueID = OM.size(); for (const Function &F : M) { if (F.isDeclaration()) continue; for (const BasicBlock &BB : F) orderValue(&BB, OM); for (const Argument &A : F.args()) orderValue(&A, OM); for (const BasicBlock &BB : F) for (const Instruction &I : BB) { for (const Value *Op : I.operands()) if ((isa<Constant>(*Op) && !isa<GlobalValue>(*Op)) || isa<InlineAsm>(*Op)) orderValue(Op, OM); if (auto *SVI = dyn_cast<ShuffleVectorInst>(&I)) orderValue(SVI->getShuffleMaskForBitcode(), OM); } for (const BasicBlock &BB : F) for (const Instruction &I : BB) orderValue(&I, OM); } return OM; } static void predictValueUseListOrderImpl(const Value *V, const Function *F, unsigned ID, const OrderMap &OM, UseListOrderStack &Stack) { using Entry = std::pair<const Use *, unsigned>; SmallVector<Entry, 64> List; for (const Use &U : V->uses()) if (OM.lookup(U.getUser()).first) List.push_back(std::make_pair(&U, List.size())); if (List.size() < 2) return; bool IsGlobalValue = OM.isGlobalValue(ID); llvm::sort(List, [&](const Entry &L, const Entry &R) { const Use *LU = L.first; const Use *RU = R.first; if (LU == RU) return false; auto LID = OM.lookup(LU->getUser()).first; auto RID = OM.lookup(RU->getUser()).first; if (OM.isGlobalValue(LID) && OM.isGlobalValue(RID)) return LID < RID; if (LID < RID) { if (RID <= ID) if (!IsGlobalValue) return true; return false; } if (RID < LID) { if (LID <= ID) if (!IsGlobalValue) return false; return true; } if (LID <= ID) if (!IsGlobalValue) return LU->getOperandNo() < RU->getOperandNo(); return LU->getOperandNo() > RU->getOperandNo(); }); if (llvm::is_sorted(List, [](const Entry &L, const Entry &R) { return L.second < R.second; })) return; Stack.emplace_back(V, F, List.size()); (static_cast<void> (0)); for (size_t I = 0, E = List.size(); I != E; ++I) Stack.back().Shuffle[I] = List[I].second; } static void predictValueUseListOrder(const Value *V, const Function *F, OrderMap &OM, UseListOrderStack &Stack) { auto &IDPair = OM[V]; (static_cast<void> (0)); if (IDPair.second) return; IDPair.second = true; if (!V->use_empty() && std::next(V->use_begin()) != V->use_end()) predictValueUseListOrderImpl(V, F, IDPair.first, OM, Stack); if (const Constant *C = dyn_cast<Constant>(V)) { if (C->getNumOperands()) { for (const Value *Op : C->operands()) if (isa<Constant>(Op)) predictValueUseListOrder(Op, F, OM, Stack); if (auto *CE = dyn_cast<ConstantExpr>(C)) if (CE->getOpcode() == Instruction::ShuffleVector) predictValueUseListOrder(CE->getShuffleMaskForBitcode(), F, OM, Stack); } } } static UseListOrderStack predictUseListOrder(const Module &M) { OrderMap OM = orderModule(M); UseListOrderStack Stack; for (auto I = M.rbegin(), E = M.rend(); I != E; ++I) { const Function &F = *I; if (F.isDeclaration()) continue; for (const BasicBlock &BB : F) predictValueUseListOrder(&BB, &F, OM, Stack); for (const Argument &A : F.args()) predictValueUseListOrder(&A, &F, OM, Stack); for (const BasicBlock &BB : F) for (const Instruction &I : BB) { for (const Value *Op : I.operands()) if (isa<Constant>(*Op) || isa<InlineAsm>(*Op)) predictValueUseListOrder(Op, &F, OM, Stack); if (auto *SVI = dyn_cast<ShuffleVectorInst>(&I)) predictValueUseListOrder(SVI->getShuffleMaskForBitcode(), &F, OM, Stack); } for (const BasicBlock &BB : F) for (const Instruction &I : BB) predictValueUseListOrder(&I, &F, OM, Stack); } for (const GlobalVariable &G : M.globals()) predictValueUseListOrder(&G, nullptr, OM, Stack); for (const Function &F : M) predictValueUseListOrder(&F, nullptr, OM, Stack); for (const GlobalAlias &A : M.aliases()) predictValueUseListOrder(&A, nullptr, OM, Stack); for (const GlobalIFunc &I : M.ifuncs()) predictValueUseListOrder(&I, nullptr, OM, Stack); for (const GlobalVariable &G : M.globals()) if (G.hasInitializer()) predictValueUseListOrder(G.getInitializer(), nullptr, OM, Stack); for (const GlobalAlias &A : M.aliases()) predictValueUseListOrder(A.getAliasee(), nullptr, OM, Stack); for (const GlobalIFunc &I : M.ifuncs()) predictValueUseListOrder(I.getResolver(), nullptr, OM, Stack); for (const Function &F : M) { for (const Use &U : F.operands()) predictValueUseListOrder(U.get(), nullptr, OM, Stack); } return Stack; } static bool isIntOrIntVectorValue(const std::pair<const Value*, unsigned> &V) { return V.first->getType()->isIntOrIntVectorTy(); } ValueEnumerator::ValueEnumerator(const Module &M, bool ShouldPreserveUseListOrder) : ShouldPreserveUseListOrder(ShouldPreserveUseListOrder) { if (ShouldPreserveUseListOrder) UseListOrders = predictUseListOrder(M); for (const GlobalVariable &GV : M.globals()) EnumerateValue(&GV); for (const Function & F : M) { EnumerateValue(&F); EnumerateAttributes(F.getAttributes()); } for (const GlobalAlias &GA : M.aliases()) EnumerateValue(&GA); for (const GlobalIFunc &GIF : M.ifuncs()) EnumerateValue(&GIF); unsigned FirstConstant = Values.size(); for (const GlobalVariable &GV : M.globals()) { if (GV.hasInitializer()) EnumerateValue(GV.getInitializer()); if (GV.hasAttributes()) EnumerateAttributes(GV.getAttributesAsList(AttributeList::FunctionIndex)); } for (const GlobalAlias &GA : M.aliases()) EnumerateValue(GA.getAliasee()); for (const GlobalIFunc &GIF : M.ifuncs()) EnumerateValue(GIF.getResolver()); for (const Function &F : M) for (const Use &U : F.operands()) EnumerateValue(U.get()); EnumerateType(Type::getMetadataTy(M.getContext())); EnumerateValueSymbolTable(M.getValueSymbolTable()); EnumerateNamedMetadata(M); SmallVector<std::pair<unsigned, MDNode *>, 8> MDs; for (const GlobalVariable &GV : M.globals()) { MDs.clear(); GV.getAllMetadata(MDs); for (const auto &I : MDs) EnumerateMetadata(nullptr, I.second); } for (const Function &F : M) { for (const Argument &A : F.args()) EnumerateType(A.getType()); MDs.clear(); F.getAllMetadata(MDs); for (const auto &I : MDs) EnumerateMetadata(F.isDeclaration() ? nullptr : &F, I.second); for (const BasicBlock &BB : F) for (const Instruction &I : BB) { for (const Use &Op : I.operands()) { auto *MD = dyn_cast<MetadataAsValue>(&Op); if (!MD) { EnumerateOperandType(Op); continue; } if (isa<LocalAsMetadata>(MD->getMetadata())) continue; EnumerateMetadata(&F, MD->getMetadata()); } if (auto *SVI = dyn_cast<ShuffleVectorInst>(&I)) EnumerateType(SVI->getShuffleMaskForBitcode()->getType()); EnumerateType(I.getType()); if (const auto *Call = dyn_cast<CallBase>(&I)) EnumerateAttributes(Call->getAttributes()); MDs.clear(); I.getAllMetadataOtherThanDebugLoc(MDs); for (unsigned i = 0, e = MDs.size(); i != e; ++i) EnumerateMetadata(&F, MDs[i].second); if (DILocation *L = I.getDebugLoc()) for (const Metadata *Op : L->operands()) EnumerateMetadata(&F, Op); } } OptimizeConstants(FirstConstant, Values.size()); organizeMetadata(); } unsigned ValueEnumerator::getInstructionID(const Instruction *Inst) const { InstructionMapType::const_iterator I = InstructionMap.find(Inst); (static_cast<void> (0)); return I->second; } unsigned ValueEnumerator::getComdatID(const Comdat *C) const { unsigned ComdatID = Comdats.idFor(C); (static_cast<void> (0)); return ComdatID; } void ValueEnumerator::setInstructionID(const Instruction *I) { InstructionMap[I] = InstructionCount++; } unsigned ValueEnumerator::getValueID(const Value *V) const { if (auto *MD = dyn_cast<MetadataAsValue>(V)) return getMetadataID(MD->getMetadata()); ValueMapType::const_iterator I = ValueMap.find(V); (static_cast<void> (0)); return I->second-1; } # 495 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" void ValueEnumerator::print(raw_ostream &OS, const ValueMapType &Map, const char *Name) const { OS << "Map Name: " << Name << "\n"; OS << "Size: " << Map.size() << "\n"; for (ValueMapType::const_iterator I = Map.begin(), E = Map.end(); I != E; ++I) { const Value *V = I->first; if (V->hasName()) OS << "Value: " << V->getName(); else OS << "Value: [null]\n"; V->print(errs()); errs() << '\n'; OS << " Uses(" << V->getNumUses() << "):"; for (const Use &U : V->uses()) { if (&U != &*V->use_begin()) OS << ","; if(U->hasName()) OS << " " << U->getName(); else OS << " [null]"; } OS << "\n\n"; } } void ValueEnumerator::print(raw_ostream &OS, const MetadataMapType &Map, const char *Name) const { OS << "Map Name: " << Name << "\n"; OS << "Size: " << Map.size() << "\n"; for (auto I = Map.begin(), E = Map.end(); I != E; ++I) { const Metadata *MD = I->first; OS << "Metadata: slot = " << I->second.ID << "\n"; OS << "Metadata: function = " << I->second.F << "\n"; MD->print(OS); OS << "\n"; } } void ValueEnumerator::OptimizeConstants(unsigned CstStart, unsigned CstEnd) { if (CstStart == CstEnd || CstStart+1 == CstEnd) return; if (ShouldPreserveUseListOrder) return; std::stable_sort(Values.begin() + CstStart, Values.begin() + CstEnd, [this](const std::pair<const Value *, unsigned> &LHS, const std::pair<const Value *, unsigned> &RHS) { if (LHS.first->getType() != RHS.first->getType()) return getTypeID(LHS.first->getType()) < getTypeID(RHS.first->getType()); return LHS.second > RHS.second; }); std::stable_partition(Values.begin() + CstStart, Values.begin() + CstEnd, isIntOrIntVectorValue); for (; CstStart != CstEnd; ++CstStart) ValueMap[Values[CstStart].first] = CstStart+1; } void ValueEnumerator::EnumerateValueSymbolTable(const ValueSymbolTable &VST) { for (ValueSymbolTable::const_iterator VI = VST.begin(), VE = VST.end(); VI != VE; ++VI) EnumerateValue(VI->getValue()); } void ValueEnumerator::EnumerateNamedMetadata(const Module &M) { for (const auto &I : M.named_metadata()) EnumerateNamedMDNode(&I); } void ValueEnumerator::EnumerateNamedMDNode(const NamedMDNode *MD) { for (unsigned i = 0, e = MD->getNumOperands(); i != e; ++i) EnumerateMetadata(nullptr, MD->getOperand(i)); } unsigned ValueEnumerator::getMetadataFunctionID(const Function *F) const { return F ? getValueID(F) + 1 : 0; } void ValueEnumerator::EnumerateMetadata(const Function *F, const Metadata *MD) { EnumerateMetadata(getMetadataFunctionID(F), MD); } void ValueEnumerator::EnumerateFunctionLocalMetadata( const Function &F, const LocalAsMetadata *Local) { EnumerateFunctionLocalMetadata(getMetadataFunctionID(&F), Local); } void ValueEnumerator::dropFunctionFromMetadata( MetadataMapType::value_type &FirstMD) { SmallVector<const MDNode *, 64> Worklist; auto push = [&Worklist](MetadataMapType::value_type &MD) { auto &Entry = MD.second; if (!Entry.F) return; Entry.F = 0; if (Entry.ID) if (auto *N = dyn_cast<MDNode>(MD.first)) Worklist.push_back(N); }; push(FirstMD); while (!Worklist.empty()) for (const Metadata *Op : Worklist.pop_back_val()->operands()) { if (!Op) continue; auto MD = MetadataMap.find(Op); if (MD != MetadataMap.end()) push(*MD); } } void ValueEnumerator::EnumerateMetadata(unsigned F, const Metadata *MD) { SmallVector<const MDNode *, 32> DelayedDistinctNodes; SmallVector<std::pair<const MDNode *, MDNode::op_iterator>, 32> Worklist; if (const MDNode *N = enumerateMetadataImpl(F, MD)) Worklist.push_back(std::make_pair(N, N->op_begin())); while (!Worklist.empty()) { const MDNode *N = Worklist.back().first; MDNode::op_iterator I = std::find_if( Worklist.back().second, N->op_end(), [&](const Metadata *MD) { return enumerateMetadataImpl(F, MD); }); if (I != N->op_end()) { auto *Op = cast<MDNode>(*I); Worklist.back().second = ++I; if (Op->isDistinct() && !N->isDistinct()) DelayedDistinctNodes.push_back(Op); else Worklist.push_back(std::make_pair(Op, Op->op_begin())); continue; } Worklist.pop_back(); MDs.push_back(N); MetadataMap[N].ID = MDs.size(); if (Worklist.empty() || Worklist.back().first->isDistinct()) { for (const MDNode *N : DelayedDistinctNodes) Worklist.push_back(std::make_pair(N, N->op_begin())); DelayedDistinctNodes.clear(); } } } const MDNode *ValueEnumerator::enumerateMetadataImpl(unsigned F, const Metadata *MD) { if (!MD) return nullptr; (static_cast<void> (0)); auto Insertion = MetadataMap.insert(std::make_pair(MD, MDIndex(F))); MDIndex &Entry = Insertion.first->second; if (!Insertion.second) { if (Entry.hasDifferentFunction(F)) dropFunctionFromMetadata(*Insertion.first); return nullptr; } if (auto *N = dyn_cast<MDNode>(MD)) return N; MDs.push_back(MD); Entry.ID = MDs.size(); if (auto *C = dyn_cast<ConstantAsMetadata>(MD)) EnumerateValue(C->getValue()); return nullptr; } void ValueEnumerator::EnumerateFunctionLocalMetadata( unsigned F, const LocalAsMetadata *Local) { (static_cast<void> (0)); MDIndex &Index = MetadataMap[Local]; if (Index.ID) { (static_cast<void> (0)); return; } MDs.push_back(Local); Index.F = F; Index.ID = MDs.size(); EnumerateValue(Local->getValue()); } static unsigned getMetadataTypeOrder(const Metadata *MD) { if (isa<MDString>(MD)) return 0; auto *N = dyn_cast<MDNode>(MD); if (!N) return 1; return N->isDistinct() ? 2 : 3; } void ValueEnumerator::organizeMetadata() { (static_cast<void> (0)); if (MDs.empty()) return; SmallVector<MDIndex, 64> Order; Order.reserve(MetadataMap.size()); for (const Metadata *MD : MDs) Order.push_back(MetadataMap.lookup(MD)); llvm::sort(Order, [this](MDIndex LHS, MDIndex RHS) { return std::make_tuple(LHS.F, getMetadataTypeOrder(LHS.get(MDs)), LHS.ID) < std::make_tuple(RHS.F, getMetadataTypeOrder(RHS.get(MDs)), RHS.ID); }); std::vector<const Metadata *> OldMDs; MDs.swap(OldMDs); MDs.reserve(OldMDs.size()); for (unsigned I = 0, E = Order.size(); I != E && !Order[I].F; ++I) { auto *MD = Order[I].get(OldMDs); MDs.push_back(MD); MetadataMap[MD].ID = I + 1; if (isa<MDString>(MD)) ++NumMDStrings; } if (MDs.size() == Order.size()) return; MDRange R; FunctionMDs.reserve(OldMDs.size()); unsigned PrevF = 0; for (unsigned I = MDs.size(), E = Order.size(), ID = MDs.size(); I != E; ++I) { unsigned F = Order[I].F; if (!PrevF) { PrevF = F; } else if (PrevF != F) { R.Last = FunctionMDs.size(); std::swap(R, FunctionMDInfo[PrevF]); R.First = FunctionMDs.size(); ID = MDs.size(); PrevF = F; } auto *MD = Order[I].get(OldMDs); FunctionMDs.push_back(MD); MetadataMap[MD].ID = ++ID; if (isa<MDString>(MD)) ++R.NumStrings; } R.Last = FunctionMDs.size(); FunctionMDInfo[PrevF] = R; } void ValueEnumerator::incorporateFunctionMetadata(const Function &F) { NumModuleMDs = MDs.size(); auto R = FunctionMDInfo.lookup(getValueID(&F) + 1); NumMDStrings = R.NumStrings; MDs.insert(MDs.end(), FunctionMDs.begin() + R.First, FunctionMDs.begin() + R.Last); } void ValueEnumerator::EnumerateValue(const Value *V) { (static_cast<void> (0)); (static_cast<void> (0)); unsigned &ValueID = ValueMap[V]; if (ValueID) { Values[ValueID-1].second++; return; } if (auto *GO = dyn_cast<GlobalObject>(V)) if (const Comdat *C = GO->getComdat()) Comdats.insert(C); EnumerateType(V->getType()); if (const Constant *C = dyn_cast<Constant>(V)) { if (isa<GlobalValue>(C)) { } else if (C->getNumOperands()) { # 855 "/root/llvm-project-llvmorg-11.0.0/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp" for (User::const_op_iterator I = C->op_begin(), E = C->op_end(); I != E; ++I) if (!isa<BasicBlock>(*I)) EnumerateValue(*I); if (auto *CE = dyn_cast<ConstantExpr>(C)) if (CE->getOpcode() == Instruction::ShuffleVector) EnumerateValue(CE->getShuffleMaskForBitcode()); Values.push_back(std::make_pair(V, 1U)); ValueMap[V] = Values.size(); return; } } Values.push_back(std::make_pair(V, 1U)); ValueID = Values.size(); } void ValueEnumerator::EnumerateType(Type *Ty) { unsigned *TypeID = &TypeMap[Ty]; if (*TypeID) return; if (StructType *STy = dyn_cast<StructType>(Ty)) if (!STy->isLiteral()) *TypeID = ~0U; for (Type *SubTy : Ty->subtypes()) EnumerateType(SubTy); TypeID = &TypeMap[Ty]; if (*TypeID && *TypeID != ~0U) return; Types.push_back(Ty); *TypeID = Types.size(); } void ValueEnumerator::EnumerateOperandType(const Value *V) { EnumerateType(V->getType()); (static_cast<void> (0)); const Constant *C = dyn_cast<Constant>(V); if (!C) return; if (ValueMap.count(C)) return; for (const Value *Op : C->operands()) { if (isa<BasicBlock>(Op)) continue; EnumerateOperandType(Op); } if (auto *CE = dyn_cast<ConstantExpr>(C)) if (CE->getOpcode() == Instruction::ShuffleVector) EnumerateOperandType(CE->getShuffleMaskForBitcode()); } void ValueEnumerator::EnumerateAttributes(AttributeList PAL) { if (PAL.isEmpty()) return; unsigned &Entry = AttributeListMap[PAL]; if (Entry == 0) { AttributeLists.push_back(PAL); Entry = AttributeLists.size(); } for (unsigned i = PAL.index_begin(), e = PAL.index_end(); i != e; ++i) { AttributeSet AS = PAL.getAttributes(i); if (!AS.hasAttributes()) continue; IndexAndAttrSet Pair = {i, AS}; unsigned &Entry = AttributeGroupMap[Pair]; if (Entry == 0) { AttributeGroups.push_back(Pair); Entry = AttributeGroups.size(); } } } void ValueEnumerator::incorporateFunction(const Function &F) { InstructionCount = 0; NumModuleValues = Values.size(); incorporateFunctionMetadata(F); for (const auto &I : F.args()) { EnumerateValue(&I); if (I.hasAttribute(Attribute::ByVal)) EnumerateType(I.getParamByValType()); } FirstFuncConstantID = Values.size(); for (const BasicBlock &BB : F) { for (const Instruction &I : BB) { for (const Use &OI : I.operands()) { if ((isa<Constant>(OI) && !isa<GlobalValue>(OI)) || isa<InlineAsm>(OI)) EnumerateValue(OI); } if (auto *SVI = dyn_cast<ShuffleVectorInst>(&I)) EnumerateValue(SVI->getShuffleMaskForBitcode()); } BasicBlocks.push_back(&BB); ValueMap[&BB] = BasicBlocks.size(); } OptimizeConstants(FirstFuncConstantID, Values.size()); EnumerateAttributes(F.getAttributes()); FirstInstID = Values.size(); SmallVector<LocalAsMetadata *, 8> FnLocalMDVector; for (const BasicBlock &BB : F) { for (const Instruction &I : BB) { for (const Use &OI : I.operands()) { if (auto *MD = dyn_cast<MetadataAsValue>(&OI)) if (auto *Local = dyn_cast<LocalAsMetadata>(MD->getMetadata())) FnLocalMDVector.push_back(Local); } if (!I.getType()->isVoidTy()) EnumerateValue(&I); } } for (unsigned i = 0, e = FnLocalMDVector.size(); i != e; ++i) { (static_cast<void> (0)); EnumerateFunctionLocalMetadata(F, FnLocalMDVector[i]); } } void ValueEnumerator::purgeFunction() { for (unsigned i = NumModuleValues, e = Values.size(); i != e; ++i) ValueMap.erase(Values[i].first); for (unsigned i = NumModuleMDs, e = MDs.size(); i != e; ++i) MetadataMap.erase(MDs[i]); for (unsigned i = 0, e = BasicBlocks.size(); i != e; ++i) ValueMap.erase(BasicBlocks[i]); Values.resize(NumModuleValues); MDs.resize(NumModuleMDs); BasicBlocks.clear(); NumMDStrings = 0; } static void IncorporateFunctionInfoGlobalBBIDs(const Function *F, DenseMap<const BasicBlock*, unsigned> &IDMap) { unsigned Counter = 0; for (const BasicBlock &BB : *F) IDMap[&BB] = ++Counter; } unsigned ValueEnumerator::getGlobalBasicBlockID(const BasicBlock *BB) const { unsigned &Idx = GlobalBasicBlockIDs[BB]; if (Idx != 0) return Idx-1; IncorporateFunctionInfoGlobalBBIDs(BB->getParent(), GlobalBasicBlockIDs); return getGlobalBasicBlockID(BB); } uint64_t ValueEnumerator::computeBitsRequiredForTypeIndicies() const { return Log2_32_Ceil(getTypes().size() + 1); }
Become a Patron
Sponsor on GitHub
Donate via PayPal
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
CE on Mastodon
CE on Bluesky
About the author
Statistics
Changelog
Version tree