# 1 "../llvm/lib/VMCore/Type2.cpp" # 1 "/home/nobled/code/llvm-b3//" # 1 "" # 1 "" # 1 "../llvm/lib/VMCore/Type2.cpp" # 14 "../llvm/lib/VMCore/Type2.cpp" # 1 "../llvm/lib/VMCore/LLVMContextImpl.h" 1 # 18 "../llvm/lib/VMCore/LLVMContextImpl.h" # 1 "../llvm/include/llvm/LLVMContext.h" 1 # 18 "../llvm/include/llvm/LLVMContext.h" namespace llvm { class LLVMContextImpl; class StringRef; class Instruction; class Module; class SMDiagnostic; template class SmallVectorImpl; class LLVMContext { public: LLVMContextImpl *const pImpl; LLVMContext(); ~LLVMContext(); enum { MD_dbg = 0, MD_tbaa = 1, MD_prof = 2, MD_fpaccuracy = 3 }; unsigned getMDKindID(StringRef Name) const; void getMDKindNames(SmallVectorImpl &Result) const; typedef void (*InlineAsmDiagHandlerTy)(const SMDiagnostic&, void *Context, unsigned LocCookie); # 66 "../llvm/include/llvm/LLVMContext.h" void setInlineAsmDiagnosticHandler(InlineAsmDiagHandlerTy DiagHandler, void *DiagContext = 0); InlineAsmDiagHandlerTy getInlineAsmDiagnosticHandler() const; void *getInlineAsmDiagnosticContext() const; void emitError(unsigned LocCookie, StringRef ErrorStr); void emitError(const Instruction *I, StringRef ErrorStr); void emitError(StringRef ErrorStr); private: LLVMContext(LLVMContext&); void operator=(LLVMContext&); void addModule(Module*); void removeModule(Module*); friend class Module; }; extern LLVMContext &getGlobalContext(); } # 19 "../llvm/lib/VMCore/LLVMContextImpl.h" 2 # 1 "../llvm/lib/VMCore/ConstantsContext.h" 1 # 18 "../llvm/lib/VMCore/ConstantsContext.h" # 1 "../llvm/include/llvm/InlineAsm.h" 1 # 19 "../llvm/include/llvm/InlineAsm.h" # 1 "../llvm/include/llvm/Value.h" 1 # 17 "../llvm/include/llvm/Value.h" # 1 "../llvm/include/llvm/Use.h" 1 # 28 "../llvm/include/llvm/Use.h" # 1 "../llvm/include/llvm/ADT/PointerIntPair.h" 1 # 17 "../llvm/include/llvm/ADT/PointerIntPair.h" # 1 "../llvm/include/llvm/Support/PointerLikeTypeTraits.h" 1 # 18 "../llvm/include/llvm/Support/PointerLikeTypeTraits.h" # 1 "include/llvm/Support/DataTypes.h" 1 # 36 "include/llvm/Support/DataTypes.h" # 1 "/usr/include/c++/4.5/cmath" 1 3 # 41 "/usr/include/c++/4.5/cmath" 3 # 42 "/usr/include/c++/4.5/cmath" 3 # 1 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/c++config.h" 1 3 # 275 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/c++config.h" 3 # 1 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/os_defines.h" 1 3 # 39 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/os_defines.h" 3 # 1 "/usr/include/features.h" 1 3 4 # 323 "/usr/include/features.h" 3 4 # 1 "/usr/include/bits/predefs.h" 1 3 4 # 324 "/usr/include/features.h" 2 3 4 # 356 "/usr/include/features.h" 3 4 # 1 "/usr/include/sys/cdefs.h" 1 3 4 # 353 "/usr/include/sys/cdefs.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 354 "/usr/include/sys/cdefs.h" 2 3 4 # 357 "/usr/include/features.h" 2 3 4 # 388 "/usr/include/features.h" 3 4 # 1 "/usr/include/gnu/stubs.h" 1 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 5 "/usr/include/gnu/stubs.h" 2 3 4 # 1 "/usr/include/gnu/stubs-64.h" 1 3 4 # 10 "/usr/include/gnu/stubs.h" 2 3 4 # 389 "/usr/include/features.h" 2 3 4 # 40 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/os_defines.h" 2 3 # 276 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/c++config.h" 2 3 # 1 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/cpu_defines.h" 1 3 # 279 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/c++config.h" 2 3 # 44 "/usr/include/c++/4.5/cmath" 2 3 # 1 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 1 3 # 36 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 # 37 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 # 69 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template class __normal_iterator; } namespace std __attribute__ ((__visibility__ ("default"))) { struct __true_type { }; struct __false_type { }; template struct __truth_type { typedef __false_type __type; }; template<> struct __truth_type { typedef __true_type __type; }; template struct __traitor { enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; typedef typename __truth_type<__value>::__type __type; }; template struct __are_same { enum { __value = 0 }; typedef __false_type __type; }; template struct __are_same<_Tp, _Tp> { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_void { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_void { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_integer { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; # 194 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_floating { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_floating { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_floating { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_floating { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_pointer { enum { __value = 0 }; typedef __false_type __type; }; template struct __is_pointer<_Tp*> { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_normal_iterator { enum { __value = 0 }; typedef __false_type __type; }; template struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, _Container> > { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_arithmetic : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > { }; template struct __is_fundamental : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > { }; template struct __is_scalar : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > { }; template struct __is_char { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_char { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_char { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_byte { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_byte { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_byte { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_byte { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_move_iterator { enum { __value = 0 }; typedef __false_type __type; }; # 417 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template class __is_iterator_helper { typedef char __one; typedef struct { char __arr[2]; } __two; template struct _Wrap_type { }; template static __one __test(_Wrap_type*); template static __two __test(...); public: static const bool __value = (sizeof(__test<_Tp>(0)) == 1 || __is_pointer<_Tp>::__value); }; template struct __is_iterator { enum { __value = __is_iterator_helper<_Tp>::__value }; typedef typename __truth_type<__value>::__type __type; }; } # 45 "/usr/include/c++/4.5/cmath" 2 3 # 1 "/usr/include/c++/4.5/ext/type_traits.h" 1 3 # 32 "/usr/include/c++/4.5/ext/type_traits.h" 3 # 33 "/usr/include/c++/4.5/ext/type_traits.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template struct __enable_if { }; template struct __enable_if { typedef _Tp __type; }; template struct __conditional_type { typedef _Iftrue __type; }; template struct __conditional_type { typedef _Iffalse __type; }; template struct __add_unsigned { private: typedef __enable_if::__value, _Tp> __if_type; public: typedef typename __if_type::__type __type; }; template<> struct __add_unsigned { typedef unsigned char __type; }; template<> struct __add_unsigned { typedef unsigned char __type; }; template<> struct __add_unsigned { typedef unsigned short __type; }; template<> struct __add_unsigned { typedef unsigned int __type; }; template<> struct __add_unsigned { typedef unsigned long __type; }; template<> struct __add_unsigned { typedef unsigned long long __type; }; template<> struct __add_unsigned; template<> struct __add_unsigned; template struct __remove_unsigned { private: typedef __enable_if::__value, _Tp> __if_type; public: typedef typename __if_type::__type __type; }; template<> struct __remove_unsigned { typedef signed char __type; }; template<> struct __remove_unsigned { typedef signed char __type; }; template<> struct __remove_unsigned { typedef short __type; }; template<> struct __remove_unsigned { typedef int __type; }; template<> struct __remove_unsigned { typedef long __type; }; template<> struct __remove_unsigned { typedef long long __type; }; template<> struct __remove_unsigned; template<> struct __remove_unsigned; template inline bool __is_null_pointer(_Type* __ptr) { return __ptr == 0; } template inline bool __is_null_pointer(_Type) { return false; } template::__value> struct __promote { typedef double __type; }; template struct __promote<_Tp, false> { typedef _Tp __type; }; template struct __promote_2 { private: typedef typename __promote<_Tp>::__type __type1; typedef typename __promote<_Up>::__type __type2; public: typedef __typeof__(__type1() + __type2()) __type; }; template struct __promote_3 { private: typedef typename __promote<_Tp>::__type __type1; typedef typename __promote<_Up>::__type __type2; typedef typename __promote<_Vp>::__type __type3; public: typedef __typeof__(__type1() + __type2() + __type3()) __type; }; template struct __promote_4 { private: typedef typename __promote<_Tp>::__type __type1; typedef typename __promote<_Up>::__type __type2; typedef typename __promote<_Vp>::__type __type3; typedef typename __promote<_Wp>::__type __type4; public: typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type; }; } # 46 "/usr/include/c++/4.5/cmath" 2 3 # 1 "/usr/include/math.h" 1 3 4 # 30 "/usr/include/math.h" 3 4 extern "C" { # 1 "/usr/include/bits/huge_val.h" 1 3 4 # 35 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/huge_valf.h" 1 3 4 # 37 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/huge_vall.h" 1 3 4 # 38 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/inf.h" 1 3 4 # 41 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/nan.h" 1 3 4 # 44 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/mathdef.h" 1 3 4 # 26 "/usr/include/bits/mathdef.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 27 "/usr/include/bits/mathdef.h" 2 3 4 typedef float float_t; typedef double double_t; # 48 "/usr/include/math.h" 2 3 4 # 71 "/usr/include/math.h" 3 4 # 1 "/usr/include/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/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 (); extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); extern double pow10 (double __x) throw (); extern double __pow10 (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 (); extern int __isinf (double __value) throw () __attribute__ ((__const__)); extern int __finite (double __value) throw () __attribute__ ((__const__)); extern int isinf (double __value) throw () __attribute__ ((__const__)); 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 () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnan (double __value) throw () __attribute__ ((__const__)); extern int isnan (double __value) throw () __attribute__ ((__const__)); 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 () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); 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 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 (); 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 (); 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 (); extern double __fmax (double __x, double __y) throw (); extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw (); extern int __fpclassify (double __value) throw () __attribute__ ((__const__)); extern int __signbit (double __value) 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 scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); # 72 "/usr/include/math.h" 2 3 4 # 94 "/usr/include/math.h" 3 4 # 1 "/usr/include/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/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 # 82 "/usr/include/bits/mathcalls.h" 3 4 (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf # 82 "/usr/include/bits/mathcalls.h" 3 4 (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 (); extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); extern float pow10f (float __x) throw (); extern float __pow10f (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 (); extern int __isinff (float __value) throw () __attribute__ ((__const__)); extern int __finitef (float __value) throw () __attribute__ ((__const__)); 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 () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnanf (float __value) throw () __attribute__ ((__const__)); 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 () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); 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 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 (); 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 (); 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 (); extern float __fmaxf (float __x, float __y) throw (); extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw (); extern int __fpclassifyf (float __value) throw () __attribute__ ((__const__)); extern int __signbitf (float __value) 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 scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); # 95 "/usr/include/math.h" 2 3 4 # 145 "/usr/include/math.h" 3 4 # 1 "/usr/include/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/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 # 82 "/usr/include/bits/mathcalls.h" 3 4 (long double __x, long double *__sinx, long double *__cosx) throw (); extern void __sincosl # 82 "/usr/include/bits/mathcalls.h" 3 4 (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 (); extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); extern long double pow10l (long double __x) throw (); extern long double __pow10l (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 (); extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); extern int __finitel (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 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 () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); 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 () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); 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 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 (); 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 (); 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 (); extern long double __fmaxl (long double __x, long double __y) throw (); extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw (); extern int __fpclassifyl (long double __value) throw () __attribute__ ((__const__)); extern int __signbitl (long double __value) 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 scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); # 146 "/usr/include/math.h" 2 3 4 # 161 "/usr/include/math.h" 3 4 extern int signgam; # 202 "/usr/include/math.h" 3 4 enum { FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL }; # 295 "/usr/include/math.h" 3 4 typedef enum { _IEEE_ = -1, _SVID_, _XOPEN_, _POSIX_, _ISOC_ } _LIB_VERSION_TYPE; extern _LIB_VERSION_TYPE _LIB_VERSION; # 318 "/usr/include/math.h" 3 4 struct __exception { int type; char *name; double arg1; double arg2; double retval; }; extern int matherr (struct __exception *__exc) throw (); # 476 "/usr/include/math.h" 3 4 } # 47 "/usr/include/c++/4.5/cmath" 2 3 # 77 "/usr/include/c++/4.5/cmath" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template _Tp __cmath_power(_Tp, unsigned int); template inline _Tp __pow_helper(_Tp __x, int __n) { return __n < 0 ? _Tp(1)/__cmath_power(__x, -__n) : __cmath_power(__x, __n); } inline double abs(double __x) { return __builtin_fabs(__x); } inline float abs(float __x) { return __builtin_fabsf(__x); } inline long double abs(long double __x) { return __builtin_fabsl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type abs(_Tp __x) { return __builtin_fabs(__x); } using ::acos; inline float acos(float __x) { return __builtin_acosf(__x); } inline long double acos(long double __x) { return __builtin_acosl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type acos(_Tp __x) { return __builtin_acos(__x); } using ::asin; inline float asin(float __x) { return __builtin_asinf(__x); } inline long double asin(long double __x) { return __builtin_asinl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type asin(_Tp __x) { return __builtin_asin(__x); } using ::atan; inline float atan(float __x) { return __builtin_atanf(__x); } inline long double atan(long double __x) { return __builtin_atanl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type atan(_Tp __x) { return __builtin_atan(__x); } using ::atan2; inline float atan2(float __y, float __x) { return __builtin_atan2f(__y, __x); } inline long double atan2(long double __y, long double __x) { return __builtin_atan2l(__y, __x); } template inline typename __gnu_cxx::__promote_2< typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value && __is_arithmetic<_Up>::__value, _Tp>::__type, _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 float ceil(float __x) { return __builtin_ceilf(__x); } inline long double ceil(long double __x) { return __builtin_ceill(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type ceil(_Tp __x) { return __builtin_ceil(__x); } using ::cos; inline float cos(float __x) { return __builtin_cosf(__x); } inline long double cos(long double __x) { return __builtin_cosl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type cos(_Tp __x) { return __builtin_cos(__x); } using ::cosh; inline float cosh(float __x) { return __builtin_coshf(__x); } inline long double cosh(long double __x) { return __builtin_coshl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type cosh(_Tp __x) { return __builtin_cosh(__x); } using ::exp; inline float exp(float __x) { return __builtin_expf(__x); } inline long double exp(long double __x) { return __builtin_expl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type exp(_Tp __x) { return __builtin_exp(__x); } using ::fabs; inline float fabs(float __x) { return __builtin_fabsf(__x); } inline long double fabs(long double __x) { return __builtin_fabsl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type fabs(_Tp __x) { return __builtin_fabs(__x); } using ::floor; inline float floor(float __x) { return __builtin_floorf(__x); } inline long double floor(long double __x) { return __builtin_floorl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type floor(_Tp __x) { return __builtin_floor(__x); } using ::fmod; inline float fmod(float __x, float __y) { return __builtin_fmodf(__x, __y); } inline long double fmod(long double __x, long double __y) { return __builtin_fmodl(__x, __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 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type frexp(_Tp __x, int* __exp) { return __builtin_frexp(__x, __exp); } using ::ldexp; inline float ldexp(float __x, int __exp) { return __builtin_ldexpf(__x, __exp); } inline long double ldexp(long double __x, int __exp) { return __builtin_ldexpl(__x, __exp); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type ldexp(_Tp __x, int __exp) { return __builtin_ldexp(__x, __exp); } using ::log; inline float log(float __x) { return __builtin_logf(__x); } inline long double log(long double __x) { return __builtin_logl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log(_Tp __x) { return __builtin_log(__x); } using ::log10; inline float log10(float __x) { return __builtin_log10f(__x); } inline long double log10(long double __x) { return __builtin_log10l(__x); } template inline 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 float pow(float __x, float __y) { return __builtin_powf(__x, __y); } inline long double pow(long double __x, long double __y) { return __builtin_powl(__x, __y); } inline double pow(double __x, int __i) { return __builtin_powi(__x, __i); } inline float pow(float __x, int __n) { return __builtin_powif(__x, __n); } inline long double pow(long double __x, int __n) { return __builtin_powil(__x, __n); } template inline typename __gnu_cxx::__promote_2< typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value && __is_arithmetic<_Up>::__value, _Tp>::__type, _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 float sin(float __x) { return __builtin_sinf(__x); } inline long double sin(long double __x) { return __builtin_sinl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sin(_Tp __x) { return __builtin_sin(__x); } using ::sinh; inline float sinh(float __x) { return __builtin_sinhf(__x); } inline long double sinh(long double __x) { return __builtin_sinhl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sinh(_Tp __x) { return __builtin_sinh(__x); } using ::sqrt; inline float sqrt(float __x) { return __builtin_sqrtf(__x); } inline long double sqrt(long double __x) { return __builtin_sqrtl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sqrt(_Tp __x) { return __builtin_sqrt(__x); } using ::tan; inline float tan(float __x) { return __builtin_tanf(__x); } inline long double tan(long double __x) { return __builtin_tanl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type tan(_Tp __x) { return __builtin_tan(__x); } using ::tanh; inline float tanh(float __x) { return __builtin_tanhf(__x); } inline long double tanh(long double __x) { return __builtin_tanhl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type tanh(_Tp __x) { return __builtin_tanh(__x); } } # 498 "/usr/include/c++/4.5/cmath" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type fpclassify(_Tp __f) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __type(__f)); } template inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isfinite(_Tp __f) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isfinite(__type(__f)); } template inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isinf(_Tp __f) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isinf(__type(__f)); } template inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isnan(_Tp __f) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isnan(__type(__f)); } template inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isnormal(_Tp __f) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isnormal(__type(__f)); } template inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type signbit(_Tp __f) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_signbit(__type(__f)); } template inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isgreater(_Tp __f1, _Tp __f2) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isgreater(__type(__f1), __type(__f2)); } template inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isgreaterequal(_Tp __f1, _Tp __f2) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isgreaterequal(__type(__f1), __type(__f2)); } template inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isless(_Tp __f1, _Tp __f2) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isless(__type(__f1), __type(__f2)); } template inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type islessequal(_Tp __f1, _Tp __f2) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_islessequal(__type(__f1), __type(__f2)); } template inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type islessgreater(_Tp __f1, _Tp __f2) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_islessgreater(__type(__f1), __type(__f2)); } template inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isunordered(_Tp __f1, _Tp __f2) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isunordered(__type(__f1), __type(__f2)); } } # 1 "/usr/include/c++/4.5/bits/cmath.tcc" 1 3 # 35 "/usr/include/c++/4.5/bits/cmath.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline _Tp __cmath_power(_Tp __x, unsigned int __n) { _Tp __y = __n % 2 ? __x : _Tp(1); while (__n >>= 1) { __x = __x * __x; if (__n % 2) __y = __y * __x; } return __y; } } # 616 "/usr/include/c++/4.5/cmath" 2 3 # 37 "include/llvm/Support/DataTypes.h" 2 # 58 "include/llvm/Support/DataTypes.h" # 1 "/usr/include/sys/types.h" 1 3 4 # 28 "/usr/include/sys/types.h" 3 4 extern "C" { # 1 "/usr/include/bits/types.h" 1 3 4 # 28 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 29 "/usr/include/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 long int __quad_t; typedef unsigned long int __u_quad_t; # 131 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/typesizes.h" 1 3 4 # 132 "/usr/include/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 long int __swblk_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 __ssize_t; typedef __off64_t __loff_t; typedef __quad_t *__qaddr_t; typedef char *__caddr_t; typedef long int __intptr_t; typedef unsigned int __socklen_t; # 31 "/usr/include/sys/types.h" 2 3 4 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; # 133 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 # 58 "/usr/include/time.h" 3 4 typedef __clock_t clock_t; # 74 "/usr/include/time.h" 3 4 typedef __time_t time_t; # 92 "/usr/include/time.h" 3 4 typedef __clockid_t clockid_t; # 104 "/usr/include/time.h" 3 4 typedef __timer_t timer_t; # 134 "/usr/include/sys/types.h" 2 3 4 typedef __useconds_t useconds_t; typedef __suseconds_t suseconds_t; # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 211 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 3 4 typedef long unsigned int size_t; # 148 "/usr/include/sys/types.h" 2 3 4 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 195 "/usr/include/sys/types.h" 3 4 typedef int int8_t __attribute__ ((__mode__ (__QI__))); typedef int int16_t __attribute__ ((__mode__ (__HI__))); typedef int int32_t __attribute__ ((__mode__ (__SI__))); typedef int int64_t __attribute__ ((__mode__ (__DI__))); 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__))); # 217 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/endian.h" 1 3 4 # 37 "/usr/include/endian.h" 3 4 # 1 "/usr/include/bits/endian.h" 1 3 4 # 38 "/usr/include/endian.h" 2 3 4 # 61 "/usr/include/endian.h" 3 4 # 1 "/usr/include/bits/byteswap.h" 1 3 4 # 28 "/usr/include/bits/byteswap.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 29 "/usr/include/bits/byteswap.h" 2 3 4 # 62 "/usr/include/endian.h" 2 3 4 # 218 "/usr/include/sys/types.h" 2 3 4 # 1 "/usr/include/sys/select.h" 1 3 4 # 31 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/bits/select.h" 1 3 4 # 23 "/usr/include/bits/select.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 24 "/usr/include/bits/select.h" 2 3 4 # 32 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 24 "/usr/include/bits/sigset.h" 3 4 typedef int __sig_atomic_t; typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 35 "/usr/include/sys/select.h" 2 3 4 typedef __sigset_t sigset_t; # 1 "/usr/include/time.h" 1 3 4 # 120 "/usr/include/time.h" 3 4 struct timespec { __time_t tv_sec; long int tv_nsec; }; # 45 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/time.h" 1 3 4 # 75 "/usr/include/bits/time.h" 3 4 struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; # 47 "/usr/include/sys/select.h" 2 3 4 # 55 "/usr/include/sys/select.h" 3 4 typedef long int __fd_mask; # 67 "/usr/include/sys/select.h" 3 4 typedef struct { __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; } fd_set; typedef __fd_mask fd_mask; # 99 "/usr/include/sys/select.h" 3 4 extern "C" { # 109 "/usr/include/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); # 121 "/usr/include/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); } # 221 "/usr/include/sys/types.h" 2 3 4 # 1 "/usr/include/sys/sysmacros.h" 1 3 4 # 30 "/usr/include/sys/sysmacros.h" 3 4 __extension__ extern unsigned int gnu_dev_major (unsigned long long int __dev) throw (); __extension__ extern unsigned int gnu_dev_minor (unsigned long long int __dev) throw (); __extension__ extern unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw (); # 224 "/usr/include/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; # 263 "/usr/include/sys/types.h" 3 4 typedef __blkcnt64_t blkcnt64_t; typedef __fsblkcnt64_t fsblkcnt64_t; typedef __fsfilcnt64_t fsfilcnt64_t; # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 # 23 "/usr/include/bits/pthreadtypes.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 24 "/usr/include/bits/pthreadtypes.h" 2 3 4 # 50 "/usr/include/bits/pthreadtypes.h" 3 4 typedef unsigned long int pthread_t; typedef union { char __size[56]; long int __align; } pthread_attr_t; typedef struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __pthread_list_t; # 76 "/usr/include/bits/pthreadtypes.h" 3 4 typedef union { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; int __spins; __pthread_list_t __list; # 101 "/usr/include/bits/pthreadtypes.h" 3 4 } __data; char __size[40]; long int __align; } pthread_mutex_t; typedef union { char __size[4]; int __align; } pthread_mutexattr_t; typedef union { struct { int __lock; unsigned int __futex; __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; __extension__ unsigned long long int __woken_seq; void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; typedef union { char __size[4]; int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; typedef union { struct { int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; int __writer; int __shared; unsigned long int __pad1; unsigned long int __pad2; unsigned int __flags; } __data; # 187 "/usr/include/bits/pthreadtypes.h" 3 4 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; # 272 "/usr/include/sys/types.h" 2 3 4 } # 59 "include/llvm/Support/DataTypes.h" 2 # 1 "/usr/include/inttypes.h" 1 3 4 # 28 "/usr/include/inttypes.h" 3 4 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stdint.h" 1 3 4 # 1 "/usr/include/stdint.h" 1 3 4 # 27 "/usr/include/stdint.h" 3 4 # 1 "/usr/include/bits/wchar.h" 1 3 4 # 28 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 29 "/usr/include/stdint.h" 2 3 4 # 49 "/usr/include/stdint.h" 3 4 typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; typedef unsigned long int uint64_t; # 66 "/usr/include/stdint.h" 3 4 typedef signed char int_least8_t; typedef short int int_least16_t; typedef int int_least32_t; typedef long int int_least64_t; typedef unsigned char uint_least8_t; typedef unsigned short int uint_least16_t; typedef unsigned int uint_least32_t; typedef unsigned long int uint_least64_t; # 91 "/usr/include/stdint.h" 3 4 typedef signed char int_fast8_t; typedef long int int_fast16_t; typedef long int int_fast32_t; typedef long int int_fast64_t; # 104 "/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; # 120 "/usr/include/stdint.h" 3 4 typedef long int intptr_t; typedef unsigned long int uintptr_t; # 135 "/usr/include/stdint.h" 3 4 typedef long int intmax_t; typedef unsigned long int uintmax_t; # 4 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stdint.h" 2 3 4 # 29 "/usr/include/inttypes.h" 2 3 4 # 274 "/usr/include/inttypes.h" 3 4 extern "C" { typedef struct { long int quot; long int rem; } imaxdiv_t; # 298 "/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 (); # 442 "/usr/include/inttypes.h" 3 4 } # 63 "include/llvm/Support/DataTypes.h" 2 # 19 "../llvm/include/llvm/Support/PointerLikeTypeTraits.h" 2 namespace llvm { template class PointerLikeTypeTraits { }; template class PointerLikeTypeTraits { public: static inline void *getAsVoidPointer(T* P) { return P; } static inline T *getFromVoidPointer(void *P) { return static_cast(P); } enum { NumLowBitsAvailable = 2 }; }; template class PointerLikeTypeTraits { typedef PointerLikeTypeTraits NonConst; public: static inline const void *getAsVoidPointer(const T* P) { return NonConst::getAsVoidPointer(const_cast(P)); } static inline const T *getFromVoidPointer(const void *P) { return NonConst::getFromVoidPointer(const_cast(P)); } enum { NumLowBitsAvailable = NonConst::NumLowBitsAvailable }; }; template<> class PointerLikeTypeTraits { public: static inline void *getAsVoidPointer(uintptr_t P) { return reinterpret_cast(P); } static inline uintptr_t getFromVoidPointer(void *P) { return reinterpret_cast(P); } enum { NumLowBitsAvailable = 0 }; }; } # 18 "../llvm/include/llvm/ADT/PointerIntPair.h" 2 # 1 "/usr/include/c++/4.5/cassert" 1 3 # 43 "/usr/include/c++/4.5/cassert" 3 # 44 "/usr/include/c++/4.5/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 68 "/usr/include/assert.h" 3 4 extern "C" { extern void __assert_fail (__const char *__assertion, __const char *__file, unsigned int __line, __const char *__function) throw () __attribute__ ((__noreturn__)); extern void __assert_perror_fail (int __errnum, __const char *__file, unsigned int __line, __const char *__function) throw () __attribute__ ((__noreturn__)); extern void __assert (const char *__assertion, const char *__file, int __line) throw () __attribute__ ((__noreturn__)); } # 45 "/usr/include/c++/4.5/cassert" 2 3 # 19 "../llvm/include/llvm/ADT/PointerIntPair.h" 2 namespace llvm { template struct DenseMapInfo; # 39 "../llvm/include/llvm/ADT/PointerIntPair.h" template > class PointerIntPair { intptr_t Value; enum { 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) }; public: PointerIntPair() : Value(0) {} PointerIntPair(PointerTy Ptr, IntType Int) : Value(0) { ((IntBits <= PtrTraits::NumLowBitsAvailable && "PointerIntPair formed with integer size too large for pointer") ? static_cast (0) : __assert_fail ("IntBits <= PtrTraits::NumLowBitsAvailable && \"PointerIntPair formed with integer size too large for pointer\"", "../llvm/include/llvm/ADT/PointerIntPair.h" # 61 "../llvm/include/llvm/ADT/PointerIntPair.h" , 62 # 61 "../llvm/include/llvm/ADT/PointerIntPair.h" , __PRETTY_FUNCTION__)) ; setPointer(Ptr); setInt(Int); } PointerTy getPointer() const { return PtrTraits::getFromVoidPointer( reinterpret_cast(Value & PointerBitMask)); } IntType getInt() const { return (IntType)((Value >> IntShift) & IntMask); } void setPointer(PointerTy Ptr) { intptr_t PtrVal = reinterpret_cast(PtrTraits::getAsVoidPointer(Ptr)); (((PtrVal & ((1 << PtrTraits::NumLowBitsAvailable)-1)) == 0 && "Pointer is not sufficiently aligned") ? static_cast (0) : __assert_fail ("(PtrVal & ((1 << PtrTraits::NumLowBitsAvailable)-1)) == 0 && \"Pointer is not sufficiently aligned\"", "../llvm/include/llvm/ADT/PointerIntPair.h" # 79 "../llvm/include/llvm/ADT/PointerIntPair.h" , 80 # 79 "../llvm/include/llvm/ADT/PointerIntPair.h" , __PRETTY_FUNCTION__)) ; Value = PtrVal | (Value & ~PointerBitMask); } void setInt(IntType Int) { intptr_t IntVal = Int; ((IntVal < (1 << IntBits) && "Integer too large for field") ? static_cast (0) : __assert_fail ("IntVal < (1 << IntBits) && \"Integer too large for field\"", "../llvm/include/llvm/ADT/PointerIntPair.h", 87, __PRETTY_FUNCTION__)); Value &= ~ShiftedIntMask; Value |= IntVal << IntShift; } PointerTy const *getAddrOfPointer() const { ((Value == reinterpret_cast(getPointer()) && "Can only return the address if IntBits is cleared and " "PtrTraits doesn't change the pointer") ? static_cast (0) : __assert_fail ("Value == reinterpret_cast(getPointer()) && \"Can only return the address if IntBits is cleared and \" \"PtrTraits doesn't change the pointer\"", "../llvm/include/llvm/ADT/PointerIntPair.h" # 95 "../llvm/include/llvm/ADT/PointerIntPair.h" , 97 # 95 "../llvm/include/llvm/ADT/PointerIntPair.h" , __PRETTY_FUNCTION__)) ; return reinterpret_cast(&Value); } void *getOpaqueValue() const { return reinterpret_cast(Value); } void setFromOpaqueValue(void *Val) { Value = reinterpret_cast(Val);} static PointerIntPair getFromOpaqueValue(void *V) { PointerIntPair P; P.setFromOpaqueValue(V); return P; } 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 struct isPodLike; template struct isPodLike > { static const bool value = true; }; template struct DenseMapInfo > { typedef PointerIntPair Ty; static Ty getEmptyKey() { intptr_t Val = -1; Val <<= PointerLikeTypeTraits::NumLowBitsAvailable; return Ty(reinterpret_cast(Val), IntType((1 << IntBits)-1)); } static Ty getTombstoneKey() { intptr_t Val = -2; Val <<= PointerLikeTypeTraits::NumLowBitsAvailable; return Ty(reinterpret_cast(Val), IntType(0)); } static unsigned getHashValue(Ty V) { uintptr_t IV = reinterpret_cast(V.getOpaqueValue()); return unsigned(IV) ^ unsigned(IV >> 9); } static bool isEqual(const Ty &LHS, const Ty &RHS) { return LHS == RHS; } }; template class PointerLikeTypeTraits > { public: static inline void * getAsVoidPointer(const PointerIntPair &P) { return P.getOpaqueValue(); } static inline PointerIntPair getFromVoidPointer(void *P) { return PointerIntPair::getFromOpaqueValue(P); } enum { NumLowBitsAvailable = PtrTraits::NumLowBitsAvailable - IntBits }; }; } # 29 "../llvm/include/llvm/Use.h" 2 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 149 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 3 4 typedef long int ptrdiff_t; # 45 "/usr/include/c++/4.5/cstddef" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::ptrdiff_t; using ::size_t; } # 30 "../llvm/include/llvm/Use.h" 2 # 1 "/usr/include/c++/4.5/iterator" 1 3 # 58 "/usr/include/c++/4.5/iterator" 3 # 59 "/usr/include/c++/4.5/iterator" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 62 "/usr/include/c++/4.5/iterator" 2 3 # 1 "/usr/include/c++/4.5/bits/stl_iterator_base_types.h" 1 3 # 63 "/usr/include/c++/4.5/bits/stl_iterator_base_types.h" 3 # 64 "/usr/include/c++/4.5/bits/stl_iterator_base_types.h" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 67 "/usr/include/c++/4.5/bits/stl_iterator_base_types.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 85 "/usr/include/c++/4.5/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 { }; # 112 "/usr/include/c++/4.5/bits/stl_iterator_base_types.h" 3 template struct iterator { typedef _Category iterator_category; typedef _Tp value_type; typedef _Distance difference_type; typedef _Pointer pointer; typedef _Reference reference; }; # 136 "/usr/include/c++/4.5/bits/stl_iterator_base_types.h" 3 template struct iterator_traits { 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 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 struct iterator_traits { 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 inline typename iterator_traits<_Iter>::iterator_category __iterator_category(const _Iter&) { return typename iterator_traits<_Iter>::iterator_category(); } } # 63 "/usr/include/c++/4.5/iterator" 2 3 # 1 "/usr/include/c++/4.5/bits/stl_iterator_base_funcs.h" 1 3 # 63 "/usr/include/c++/4.5/bits/stl_iterator_base_funcs.h" 3 # 64 "/usr/include/c++/4.5/bits/stl_iterator_base_funcs.h" 3 # 1 "/usr/include/c++/4.5/bits/concept_check.h" 1 3 # 33 "/usr/include/c++/4.5/bits/concept_check.h" 3 # 34 "/usr/include/c++/4.5/bits/concept_check.h" 3 # 66 "/usr/include/c++/4.5/bits/stl_iterator_base_funcs.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline 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 inline typename iterator_traits<_RandomAccessIterator>::difference_type __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag) { return __last - __first; } # 109 "/usr/include/c++/4.5/bits/stl_iterator_base_funcs.h" 3 template inline typename iterator_traits<_InputIterator>::difference_type distance(_InputIterator __first, _InputIterator __last) { return std::__distance(__first, __last, std::__iterator_category(__first)); } template inline void __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) { while (__n--) ++__i; } template inline void __advance(_BidirectionalIterator& __i, _Distance __n, bidirectional_iterator_tag) { if (__n > 0) while (__n--) ++__i; else while (__n++) --__i; } template inline void __advance(_RandomAccessIterator& __i, _Distance __n, random_access_iterator_tag) { __i += __n; } # 167 "/usr/include/c++/4.5/bits/stl_iterator_base_funcs.h" 3 template inline void advance(_InputIterator& __i, _Distance __n) { typename iterator_traits<_InputIterator>::difference_type __d = __n; std::__advance(__i, __d, std::__iterator_category(__i)); } } # 64 "/usr/include/c++/4.5/iterator" 2 3 # 1 "/usr/include/c++/4.5/bits/stl_iterator.h" 1 3 # 66 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 # 1 "/usr/include/c++/4.5/bits/move.h" 1 3 # 34 "/usr/include/c++/4.5/bits/move.h" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 35 "/usr/include/c++/4.5/bits/move.h" 2 3 # 95 "/usr/include/c++/4.5/bits/move.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 104 "/usr/include/c++/4.5/bits/move.h" 3 template inline void swap(_Tp& __a, _Tp& __b) { _Tp __tmp = (__a); __a = (__b); __b = (__tmp); } template inline void swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) { for (size_t __n = 0; __n < _Nm; ++__n) swap(__a[__n], __b[__n]); } } # 67 "/usr/include/c++/4.5/bits/stl_iterator.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 94 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 template class reverse_iterator : public 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; reverse_iterator() : current() { } explicit reverse_iterator(iterator_type __x) : current(__x) { } reverse_iterator(const reverse_iterator& __x) : current(__x.current) { } template reverse_iterator(const reverse_iterator<_Iter>& __x) : current(__x.base()) { } iterator_type base() const { return current; } reference operator*() const { _Iterator __tmp = current; return *--__tmp; } pointer operator->() const { return &(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); } }; # 281 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 template inline bool operator==(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __x.base() == __y.base(); } template inline bool operator<(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() < __x.base(); } template inline bool operator!=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__x == __y); } template inline bool operator>(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y < __x; } template inline bool operator<=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__y < __x); } template inline bool operator>=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__x < __y); } template inline typename reverse_iterator<_Iterator>::difference_type operator-(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() - __x.base(); } template 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 inline bool operator==(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __x.base() == __y.base(); } template inline bool operator<(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y.base() < __x.base(); } template inline bool operator!=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__x == __y); } template inline bool operator>(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y < __x; } template inline bool operator<=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__y < __x); } template inline bool operator>=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__x < __y); } template inline typename reverse_iterator<_IteratorL>::difference_type operator-(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y.base() - __x.base(); } # 393 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 template class back_insert_iterator : public iterator { protected: _Container* container; public: typedef _Container container_type; explicit back_insert_iterator(_Container& __x) : container(&__x) { } # 420 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 back_insert_iterator& operator=(typename _Container::const_reference __value) { container->push_back(__value); return *this; } # 443 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 back_insert_iterator& operator*() { return *this; } back_insert_iterator& operator++() { return *this; } back_insert_iterator operator++(int) { return *this; } }; # 469 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 template inline back_insert_iterator<_Container> back_inserter(_Container& __x) { return back_insert_iterator<_Container>(__x); } # 484 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 template class front_insert_iterator : public iterator { protected: _Container* container; public: typedef _Container container_type; explicit front_insert_iterator(_Container& __x) : container(&__x) { } # 510 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 front_insert_iterator& operator=(typename _Container::const_reference __value) { container->push_front(__value); return *this; } # 533 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 front_insert_iterator& operator*() { return *this; } front_insert_iterator& operator++() { return *this; } front_insert_iterator operator++(int) { return *this; } }; # 559 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 template inline front_insert_iterator<_Container> front_inserter(_Container& __x) { return front_insert_iterator<_Container>(__x); } # 578 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 template class insert_iterator : public iterator { protected: _Container* container; typename _Container::iterator iter; public: typedef _Container container_type; insert_iterator(_Container& __x, typename _Container::iterator __i) : container(&__x), iter(__i) {} # 621 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 insert_iterator& operator=(typename _Container::const_reference __value) { iter = container->insert(iter, __value); ++iter; return *this; } # 647 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 insert_iterator& operator*() { return *this; } insert_iterator& operator++() { return *this; } insert_iterator& operator++(int) { return *this; } }; # 673 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 template inline insert_iterator<_Container> inserter(_Container& __x, _Iterator __i) { return insert_iterator<_Container>(__x, typename _Container::iterator(__i)); } } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 694 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 using std::iterator_traits; using std::iterator; template 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; __normal_iterator() : _M_current(_Iterator()) { } explicit __normal_iterator(const _Iterator& __i) : _M_current(__i) { } template __normal_iterator(const __normal_iterator<_Iter, typename __enable_if< (std::__are_same<_Iter, typename _Container::pointer>::__value), _Container>::__type>& __i) : _M_current(__i.base()) { } reference operator*() const { return *_M_current; } pointer operator->() const { return _M_current; } __normal_iterator& operator++() { ++_M_current; return *this; } __normal_iterator operator++(int) { return __normal_iterator(_M_current++); } __normal_iterator& operator--() { --_M_current; return *this; } __normal_iterator operator--(int) { return __normal_iterator(_M_current--); } reference operator[](const difference_type& __n) const { return _M_current[__n]; } __normal_iterator& operator+=(const difference_type& __n) { _M_current += __n; return *this; } __normal_iterator operator+(const difference_type& __n) const { return __normal_iterator(_M_current + __n); } __normal_iterator& operator-=(const difference_type& __n) { _M_current -= __n; return *this; } __normal_iterator operator-(const difference_type& __n) const { return __normal_iterator(_M_current - __n); } const _Iterator& base() const { return _M_current; } }; # 792 "/usr/include/c++/4.5/bits/stl_iterator.h" 3 template inline bool operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() == __rhs.base(); } template inline bool operator==(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() == __rhs.base(); } template inline bool operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() != __rhs.base(); } template inline bool operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() != __rhs.base(); } template inline bool operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() < __rhs.base(); } template inline bool operator<(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() < __rhs.base(); } template inline bool operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() > __rhs.base(); } template inline bool operator>(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() > __rhs.base(); } template inline bool operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() <= __rhs.base(); } template inline bool operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() <= __rhs.base(); } template inline bool operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() >= __rhs.base(); } template inline bool operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() >= __rhs.base(); } template inline typename __normal_iterator<_IteratorL, _Container>::difference_type operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() - __rhs.base(); } template inline typename __normal_iterator<_Iterator, _Container>::difference_type operator-(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() - __rhs.base(); } template inline __normal_iterator<_Iterator, _Container> operator+(typename __normal_iterator<_Iterator, _Container>::difference_type __n, const __normal_iterator<_Iterator, _Container>& __i) { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } } # 65 "/usr/include/c++/4.5/iterator" 2 3 # 1 "/usr/include/c++/4.5/ostream" 1 3 # 38 "/usr/include/c++/4.5/ostream" 3 # 39 "/usr/include/c++/4.5/ostream" 3 # 1 "/usr/include/c++/4.5/ios" 1 3 # 37 "/usr/include/c++/4.5/ios" 3 # 38 "/usr/include/c++/4.5/ios" 3 # 1 "/usr/include/c++/4.5/iosfwd" 1 3 # 38 "/usr/include/c++/4.5/iosfwd" 3 # 39 "/usr/include/c++/4.5/iosfwd" 3 # 1 "/usr/include/c++/4.5/bits/stringfwd.h" 1 3 # 39 "/usr/include/c++/4.5/bits/stringfwd.h" 3 # 40 "/usr/include/c++/4.5/bits/stringfwd.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template class allocator; template struct char_traits; template, typename _Alloc = allocator<_CharT> > class basic_string; template<> struct char_traits; typedef basic_string string; template<> struct char_traits; typedef basic_string wstring; # 83 "/usr/include/c++/4.5/bits/stringfwd.h" 3 } # 42 "/usr/include/c++/4.5/iosfwd" 2 3 # 1 "/usr/include/c++/4.5/bits/postypes.h" 1 3 # 40 "/usr/include/c++/4.5/bits/postypes.h" 3 # 41 "/usr/include/c++/4.5/bits/postypes.h" 3 # 1 "/usr/include/c++/4.5/cwchar" 1 3 # 41 "/usr/include/c++/4.5/cwchar" 3 # 42 "/usr/include/c++/4.5/cwchar" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 45 "/usr/include/c++/4.5/cwchar" 2 3 # 1 "/usr/include/wchar.h" 1 3 4 # 37 "/usr/include/wchar.h" 3 4 # 1 "/usr/include/stdio.h" 1 3 4 # 45 "/usr/include/stdio.h" 3 4 struct _IO_FILE; typedef struct _IO_FILE FILE; # 65 "/usr/include/stdio.h" 3 4 typedef struct _IO_FILE __FILE; # 38 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stdarg.h" 1 3 4 # 40 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 41 "/usr/include/wchar.h" 2 3 4 # 52 "/usr/include/wchar.h" 3 4 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 352 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 3 4 typedef unsigned int wint_t; # 53 "/usr/include/wchar.h" 2 3 4 # 83 "/usr/include/wchar.h" 3 4 typedef struct { int __count; union { unsigned int __wch; char __wchb[4]; } __value; } __mbstate_t; # 104 "/usr/include/wchar.h" 3 4 typedef __mbstate_t mbstate_t; # 129 "/usr/include/wchar.h" 3 4 extern "C" { struct tm; extern wchar_t *wcscpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw (); extern wchar_t *wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw (); extern wchar_t *wcscat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw (); extern wchar_t *wcsncat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw (); extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) throw () __attribute__ ((__pure__)); extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw () __attribute__ ((__pure__)); 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 (); # 1 "/usr/include/xlocale.h" 1 3 4 # 28 "/usr/include/xlocale.h" 3 4 typedef 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]; } *__locale_t; typedef __locale_t locale_t; # 178 "/usr/include/wchar.h" 2 3 4 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__)); extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) throw () __asm ("wcschr") __attribute__ ((__pure__)); extern "C++" __const wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) throw () __asm ("wcschr") __attribute__ ((__pure__)); extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) throw () __asm ("wcsrchr") __attribute__ ((__pure__)); extern "C++" __const wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) throw () __asm ("wcsrchr") __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__)); extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, __const wchar_t *__accept) throw () __asm ("wcspbrk") __attribute__ ((__pure__)); extern "C++" __const wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept) throw () __asm ("wcspbrk") __attribute__ ((__pure__)); extern "C++" wchar_t *wcsstr (wchar_t *__haystack, __const wchar_t *__needle) throw () __asm ("wcsstr") __attribute__ ((__pure__)); extern "C++" __const wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle) throw () __asm ("wcsstr") __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__)); extern "C++" wchar_t *wcswcs (wchar_t *__haystack, __const wchar_t *__needle) throw () __asm ("wcswcs") __attribute__ ((__pure__)); extern "C++" __const wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle) throw () __asm ("wcswcs") __attribute__ ((__pure__)); # 303 "/usr/include/wchar.h" 3 4 extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) throw () __attribute__ ((__pure__)); extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) throw () __asm ("wmemchr") __attribute__ ((__pure__)); extern "C++" __const wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n) throw () __asm ("wmemchr") __attribute__ ((__pure__)); extern int wmemcmp (__const wchar_t *__restrict __s1, __const wchar_t *__restrict __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 *__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 (); # 403 "/usr/include/wchar.h" 3 4 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 (); 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 (); # 528 "/usr/include/wchar.h" 3 4 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 (); 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 (); # 578 "/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 () ; # 678 "/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 () ; # 734 "/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); # 799 "/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); # 825 "/usr/include/wchar.h" 3 4 extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); extern wint_t putwchar_unlocked (wchar_t __wc); # 835 "/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 (); # 882 "/usr/include/wchar.h" 3 4 # 1 "/usr/include/bits/wchar2.h" 1 3 4 # 25 "/usr/include/bits/wchar2.h" 3 4 extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw (); extern wchar_t *__wmemcpy_alias (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmemcpy") ; extern wchar_t *__wmemcpy_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemcpy_chk") __attribute__((__warning__ ("wmemcpy called with length bigger than size of destination " "buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * wmemcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () { if (__builtin_object_size (__s1, 0) != (size_t) -1) { if (!__builtin_constant_p (__n)) return __wmemcpy_chk (__s1, __s2, __n, __builtin_object_size (__s1, 0) / sizeof (wchar_t)); if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) return __wmemcpy_chk_warn (__s1, __s2, __n, __builtin_object_size (__s1, 0) / sizeof (wchar_t)); } return __wmemcpy_alias (__s1, __s2, __n); } extern wchar_t *__wmemmove_chk (wchar_t *__s1, __const wchar_t *__s2, size_t __n, size_t __ns1) throw (); extern wchar_t *__wmemmove_alias (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw () __asm__ ("" "wmemmove") ; extern wchar_t *__wmemmove_chk_warn (wchar_t *__s1, __const wchar_t *__s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemmove_chk") __attribute__((__warning__ ("wmemmove called with length bigger than size of destination " "buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw () { if (__builtin_object_size (__s1, 0) != (size_t) -1) { if (!__builtin_constant_p (__n)) return __wmemmove_chk (__s1, __s2, __n, __builtin_object_size (__s1, 0) / sizeof (wchar_t)); if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) return __wmemmove_chk_warn (__s1, __s2, __n, __builtin_object_size (__s1, 0) / sizeof (wchar_t)); } return __wmemmove_alias (__s1, __s2, __n); } extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw (); extern wchar_t *__wmempcpy_alias (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmempcpy") ; extern wchar_t *__wmempcpy_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmempcpy_chk") __attribute__((__warning__ ("wmempcpy called with length bigger than size of destination " "buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * wmempcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () { if (__builtin_object_size (__s1, 0) != (size_t) -1) { if (!__builtin_constant_p (__n)) return __wmempcpy_chk (__s1, __s2, __n, __builtin_object_size (__s1, 0) / sizeof (wchar_t)); if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) return __wmempcpy_chk_warn (__s1, __s2, __n, __builtin_object_size (__s1, 0) / sizeof (wchar_t)); } return __wmempcpy_alias (__s1, __s2, __n); } extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) throw (); extern wchar_t *__wmemset_alias (wchar_t *__s, wchar_t __c, size_t __n) throw () __asm__ ("" "wmemset") ; extern wchar_t *__wmemset_chk_warn (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) throw () __asm__ ("" "__wmemset_chk") __attribute__((__warning__ ("wmemset called with length bigger than size of destination " "buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw () { if (__builtin_object_size (__s, 0) != (size_t) -1) { if (!__builtin_constant_p (__n)) return __wmemset_chk (__s, __c, __n, __builtin_object_size (__s, 0) / sizeof (wchar_t)); if (__n > __builtin_object_size (__s, 0) / sizeof (wchar_t)) return __wmemset_chk_warn (__s, __c, __n, __builtin_object_size (__s, 0) / sizeof (wchar_t)); } return __wmemset_alias (__s, __c, __n); } extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw (); extern wchar_t *__wcscpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcscpy") ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * wcscpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () { if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) return __wcscpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); return __wcscpy_alias (__dest, __src); } extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __destlen) throw (); extern wchar_t *__wcpcpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcpcpy") ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * wcpcpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () { if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) return __wcpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); return __wcpcpy_alias (__dest, __src); } extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw (); extern wchar_t *__wcsncpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncpy") ; extern wchar_t *__wcsncpy_chk_warn (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcsncpy_chk") __attribute__((__warning__ ("wcsncpy called with length bigger than size of destination " "buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () { if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__n)) return __wcsncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) return __wcsncpy_chk_warn (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); } return __wcsncpy_alias (__dest, __src, __n); } extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw (); extern wchar_t *__wcpncpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcpncpy") ; extern wchar_t *__wcpncpy_chk_warn (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcpncpy_chk") __attribute__((__warning__ ("wcpncpy called with length bigger than size of destination " "buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * wcpncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () { if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__n)) return __wcpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) return __wcpncpy_chk_warn (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); } return __wcpncpy_alias (__dest, __src, __n); } extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __destlen) throw (); extern wchar_t *__wcscat_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcscat") ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * wcscat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () { if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) return __wcscat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); return __wcscat_alias (__dest, __src); } extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw (); extern wchar_t *__wcsncat_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncat") ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * wcsncat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () { if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) return __wcsncat_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); return __wcsncat_alias (__dest, __src, __n); } extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n, int __flag, size_t __s_len, __const wchar_t *__restrict __format, ...) throw () ; extern int __swprintf_alias (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, ...) throw () __asm__ ("" "swprintf") ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int swprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, ...) throw () { if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) return __swprintf_chk (__s, __n, 2 - 1, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), __fmt, __builtin_va_arg_pack ()); return __swprintf_alias (__s, __n, __fmt, __builtin_va_arg_pack ()); } # 304 "/usr/include/bits/wchar2.h" 3 4 extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, int __flag, size_t __s_len, __const wchar_t *__restrict __format, __gnuc_va_list __arg) throw () ; extern int __vswprintf_alias (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () __asm__ ("" "vswprintf") ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int vswprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () { if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) return __vswprintf_chk (__s, __n, 2 - 1, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), __fmt, __ap); return __vswprintf_alias (__s, __n, __fmt, __ap); } extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag, __const wchar_t *__restrict __format, ...); extern int __wprintf_chk (int __flag, __const wchar_t *__restrict __format, ...); extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag, __const wchar_t *__restrict __format, __gnuc_va_list __ap); extern int __vwprintf_chk (int __flag, __const wchar_t *__restrict __format, __gnuc_va_list __ap); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int wprintf (__const wchar_t *__restrict __fmt, ...) { return __wprintf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int fwprintf (__FILE *__restrict __stream, __const wchar_t *__restrict __fmt, ...) { return __fwprintf_chk (__stream, 2 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int vwprintf (__const wchar_t *__restrict __fmt, __gnuc_va_list __ap) { return __vwprintf_chk (2 - 1, __fmt, __ap); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int vfwprintf (__FILE *__restrict __stream, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) { return __vfwprintf_chk (__stream, 2 - 1, __fmt, __ap); } extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern wchar_t *__fgetws_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws") __attribute__ ((__warn_unused_result__)); extern wchar_t *__fgetws_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws called with bigger size than length " "of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) { if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__n) || __n <= 0) return __fgetws_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), __n, __stream); if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) return __fgetws_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), __n, __stream); } return __fgetws_alias (__s, __n, __stream); } extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern wchar_t *__fgetws_unlocked_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws_unlocked") __attribute__ ((__warn_unused_result__)); extern wchar_t *__fgetws_unlocked_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_unlocked_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws_unlocked called with bigger size than length " "of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) { if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__n) || __n <= 0) return __fgetws_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), __n, __stream); if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) return __fgetws_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), __n, __stream); } return __fgetws_unlocked_alias (__s, __n, __stream); } extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __p, size_t __buflen) throw () __attribute__ ((__warn_unused_result__)); extern size_t __wcrtomb_alias (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcrtomb") __attribute__ ((__warn_unused_result__)); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t wcrtomb (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () { if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) return __wcrtomb_chk (__s, __wchar, __ps, __builtin_object_size (__s, 2 > 1)); return __wcrtomb_alias (__s, __wchar, __ps); } extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw (); extern size_t __mbsrtowcs_alias (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsrtowcs") ; extern size_t __mbsrtowcs_chk_warn (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsrtowcs_chk") __attribute__((__warning__ ("mbsrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t mbsrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () { if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __mbsrtowcs_chk (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) return __mbsrtowcs_chk_warn (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); } return __mbsrtowcs_alias (__dst, __src, __len, __ps); } extern size_t __wcsrtombs_chk (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw (); extern size_t __wcsrtombs_alias (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsrtombs") ; extern size_t __wcsrtombs_chk_warn (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsrtombs_chk") __attribute__((__warning__ ("wcsrtombs called with dst buffer smaller than len"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t wcsrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () { if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __wcsrtombs_chk (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); if (__len > __builtin_object_size (__dst, 2 > 1)) return __wcsrtombs_chk_warn (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); } return __wcsrtombs_alias (__dst, __src, __len, __ps); } extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw (); extern size_t __mbsnrtowcs_alias (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsnrtowcs") ; extern size_t __mbsnrtowcs_chk_warn (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsnrtowcs_chk") __attribute__((__warning__ ("mbsnrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t mbsnrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () { if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __mbsnrtowcs_chk (__dst, __src, __nmc, __len, __ps, __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) return __mbsnrtowcs_chk_warn (__dst, __src, __nmc, __len, __ps, __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); } return __mbsnrtowcs_alias (__dst, __src, __nmc, __len, __ps); } extern size_t __wcsnrtombs_chk (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw (); extern size_t __wcsnrtombs_alias (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsnrtombs") ; extern size_t __wcsnrtombs_chk_warn (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsnrtombs_chk") __attribute__((__warning__ ("wcsnrtombs called with dst buffer smaller than len"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t wcsnrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () { if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __wcsnrtombs_chk (__dst, __src, __nwc, __len, __ps, __builtin_object_size (__dst, 2 > 1)); if (__len > __builtin_object_size (__dst, 2 > 1)) return __wcsnrtombs_chk_warn (__dst, __src, __nwc, __len, __ps, __builtin_object_size (__dst, 2 > 1)); } return __wcsnrtombs_alias (__dst, __src, __nwc, __len, __ps); } # 883 "/usr/include/wchar.h" 2 3 4 } # 48 "/usr/include/c++/4.5/cwchar" 2 3 # 65 "/usr/include/c++/4.5/cwchar" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::mbstate_t; } # 139 "/usr/include/c++/4.5/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; # 234 "/usr/include/c++/4.5/cwchar" 3 } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { using ::wcstold; # 258 "/usr/include/c++/4.5/cwchar" 3 using ::wcstoll; using ::wcstoull; } namespace std __attribute__ ((__visibility__ ("default"))) { using ::__gnu_cxx::wcstold; using ::__gnu_cxx::wcstoll; using ::__gnu_cxx::wcstoull; } # 43 "/usr/include/c++/4.5/bits/postypes.h" 2 3 # 70 "/usr/include/c++/4.5/bits/postypes.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 88 "/usr/include/c++/4.5/bits/postypes.h" 3 typedef long streamoff; # 98 "/usr/include/c++/4.5/bits/postypes.h" 3 typedef ptrdiff_t streamsize; # 111 "/usr/include/c++/4.5/bits/postypes.h" 3 template class fpos { private: streamoff _M_off; _StateT _M_state; public: fpos() : _M_off(0), _M_state() { } # 133 "/usr/include/c++/4.5/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 inline bool operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) { return streamoff(__lhs) == streamoff(__rhs); } template inline bool operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) { return streamoff(__lhs) != streamoff(__rhs); } typedef fpos streampos; typedef fpos wstreampos; # 239 "/usr/include/c++/4.5/bits/postypes.h" 3 } # 43 "/usr/include/c++/4.5/iosfwd" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 74 "/usr/include/c++/4.5/iosfwd" 3 class ios_base; template > class basic_ios; template > class basic_streambuf; template > class basic_istream; template > class basic_ostream; template > class basic_iostream; template, typename _Alloc = allocator<_CharT> > class basic_stringbuf; template, typename _Alloc = allocator<_CharT> > class basic_istringstream; template, typename _Alloc = allocator<_CharT> > class basic_ostringstream; template, typename _Alloc = allocator<_CharT> > class basic_stringstream; template > class basic_filebuf; template > class basic_ifstream; template > class basic_ofstream; template > class basic_fstream; template > class istreambuf_iterator; template > class ostreambuf_iterator; typedef basic_ios ios; typedef basic_streambuf streambuf; typedef basic_istream istream; typedef basic_ostream ostream; typedef basic_iostream iostream; typedef basic_stringbuf stringbuf; typedef basic_istringstream istringstream; typedef basic_ostringstream ostringstream; typedef basic_stringstream stringstream; typedef basic_filebuf filebuf; typedef basic_ifstream ifstream; typedef basic_ofstream ofstream; typedef basic_fstream fstream; typedef basic_ios wios; typedef basic_streambuf wstreambuf; typedef basic_istream wistream; typedef basic_ostream wostream; typedef basic_iostream wiostream; typedef basic_stringbuf wstringbuf; typedef basic_istringstream wistringstream; typedef basic_ostringstream wostringstream; typedef basic_stringstream wstringstream; typedef basic_filebuf wfilebuf; typedef basic_ifstream wifstream; typedef basic_ofstream wofstream; typedef basic_fstream wfstream; } # 40 "/usr/include/c++/4.5/ios" 2 3 # 1 "/usr/include/c++/4.5/exception" 1 3 # 35 "/usr/include/c++/4.5/exception" 3 # 36 "/usr/include/c++/4.5/exception" 3 #pragma GCC visibility push(default) extern "C++" { namespace std { # 61 "/usr/include/c++/4.5/exception" 3 class exception { public: exception() throw() { } virtual ~exception() throw(); virtual const char* what() const throw(); }; class bad_exception : public exception { public: bad_exception() throw() { } virtual ~bad_exception() throw(); virtual const char* what() const throw(); }; typedef void (*terminate_handler) (); typedef void (*unexpected_handler) (); terminate_handler set_terminate(terminate_handler) throw(); void terminate() throw() __attribute__ ((__noreturn__)); unexpected_handler set_unexpected(unexpected_handler) throw(); void unexpected() __attribute__ ((__noreturn__)); # 118 "/usr/include/c++/4.5/exception" 3 bool uncaught_exception() throw() __attribute__ ((__pure__)); } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 141 "/usr/include/c++/4.5/exception" 3 void __verbose_terminate_handler(); } } #pragma GCC visibility pop # 41 "/usr/include/c++/4.5/ios" 2 3 # 1 "/usr/include/c++/4.5/bits/char_traits.h" 1 3 # 39 "/usr/include/c++/4.5/bits/char_traits.h" 3 # 40 "/usr/include/c++/4.5/bits/char_traits.h" 3 # 1 "/usr/include/c++/4.5/bits/stl_algobase.h" 1 3 # 61 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 62 "/usr/include/c++/4.5/bits/stl_algobase.h" 2 3 # 1 "/usr/include/c++/4.5/bits/functexcept.h" 1 3 # 37 "/usr/include/c++/4.5/bits/functexcept.h" 3 # 1 "/usr/include/c++/4.5/exception_defines.h" 1 3 # 38 "/usr/include/c++/4.5/bits/functexcept.h" 2 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_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__)); } # 63 "/usr/include/c++/4.5/bits/stl_algobase.h" 2 3 # 1 "/usr/include/c++/4.5/ext/numeric_traits.h" 1 3 # 32 "/usr/include/c++/4.5/ext/numeric_traits.h" 3 # 33 "/usr/include/c++/4.5/ext/numeric_traits.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 52 "/usr/include/c++/4.5/ext/numeric_traits.h" 3 template 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 const _Value __numeric_traits_integer<_Value>::__min; template const _Value __numeric_traits_integer<_Value>::__max; template const bool __numeric_traits_integer<_Value>::__is_signed; template const int __numeric_traits_integer<_Value>::__digits; # 97 "/usr/include/c++/4.5/ext/numeric_traits.h" 3 template 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) * 3010 / 10000); 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 const int __numeric_traits_floating<_Value>::__max_digits10; template const bool __numeric_traits_floating<_Value>::__is_signed; template const int __numeric_traits_floating<_Value>::__digits10; template const int __numeric_traits_floating<_Value>::__max_exponent10; template struct __numeric_traits : public __conditional_type::__value, __numeric_traits_integer<_Value>, __numeric_traits_floating<_Value> >::__type { }; } # 66 "/usr/include/c++/4.5/bits/stl_algobase.h" 2 3 # 1 "/usr/include/c++/4.5/bits/stl_pair.h" 1 3 # 67 "/usr/include/c++/4.5/bits/stl_pair.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct pair { typedef _T1 first_type; typedef _T2 second_type; _T1 first; _T2 second; pair() : first(), second() { } pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } # 113 "/usr/include/c++/4.5/bits/stl_pair.h" 3 template pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) { } # 149 "/usr/include/c++/4.5/bits/stl_pair.h" 3 }; template inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first == __y.first && __x.second == __y.second; } template inline 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 inline bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x == __y); } template inline bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __y < __x; } template inline bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__y < __x); } template inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x < __y); } # 211 "/usr/include/c++/4.5/bits/stl_pair.h" 3 template inline pair<_T1, _T2> make_pair(_T1 __x, _T2 __y) { return pair<_T1, _T2>(__x, __y); } # 257 "/usr/include/c++/4.5/bits/stl_pair.h" 3 } # 67 "/usr/include/c++/4.5/bits/stl_algobase.h" 2 3 # 1 "/usr/include/c++/4.5/debug/debug.h" 1 3 # 47 "/usr/include/c++/4.5/debug/debug.h" 3 namespace std { namespace __debug { } } namespace __gnu_debug { using namespace std::__debug; } # 72 "/usr/include/c++/4.5/bits/stl_algobase.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct __iter_swap { template static void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { typedef typename iterator_traits<_ForwardIterator1>::value_type _ValueType1; _ValueType1 __tmp = (*__a); *__a = (*__b); *__b = (__tmp); } }; template<> struct __iter_swap { template static void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { swap(*__a, *__b); } }; # 115 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template inline void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { typedef typename iterator_traits<_ForwardIterator1>::value_type _ValueType1; typedef typename iterator_traits<_ForwardIterator2>::value_type _ValueType2; typedef typename iterator_traits<_ForwardIterator1>::reference _ReferenceType1; typedef typename iterator_traits<_ForwardIterator2>::reference _ReferenceType2; std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value && __are_same<_ValueType1&, _ReferenceType1>::__value && __are_same<_ValueType2&, _ReferenceType2>::__value>:: iter_swap(__a, __b); } # 156 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template _ForwardIterator2 swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) { ; for (; __first1 != __last1; ++__first1, ++__first2) std::iter_swap(__first1, __first2); return __first2; } # 184 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template inline const _Tp& min(const _Tp& __a, const _Tp& __b) { if (__b < __a) return __b; return __a; } # 207 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template inline const _Tp& max(const _Tp& __a, const _Tp& __b) { if (__a < __b) return __b; return __a; } # 230 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template inline const _Tp& min(const _Tp& __a, const _Tp& __b, _Compare __comp) { if (__comp(__b, __a)) return __b; return __a; } # 251 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template inline const _Tp& max(const _Tp& __a, const _Tp& __b, _Compare __comp) { if (__comp(__a, __b)) return __b; return __a; } template struct _Iter_base { typedef _Iterator iterator_type; static iterator_type _S_base(_Iterator __it) { return __it; } }; template struct _Iter_base<_Iterator, true> { typedef typename _Iterator::iterator_type iterator_type; static iterator_type _S_base(_Iterator __it) { return __it.base(); } }; template struct _Niter_base : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value> { }; template inline typename _Niter_base<_Iterator>::iterator_type __niter_base(_Iterator __it) { return std::_Niter_base<_Iterator>::_S_base(__it); } template struct _Miter_base : _Iter_base<_Iterator, __is_move_iterator<_Iterator>::__value> { }; template inline typename _Miter_base<_Iterator>::iterator_type __miter_base(_Iterator __it) { return std::_Miter_base<_Iterator>::_S_base(__it); } template struct __copy_move { template static _OI __copy_m(_II __first, _II __last, _OI __result) { for (; __first != __last; ++__result, ++__first) *__result = *__first; return __result; } }; # 339 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template<> struct __copy_move { template 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; } }; # 377 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template struct __copy_move<_IsMove, true, random_access_iterator_tag> { template static _Tp* __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) { const ptrdiff_t _Num = __last - __first; if (_Num) __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); return __result + _Num; } }; template 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_pod(_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 struct char_traits; template class istreambuf_iterator; template class ostreambuf_iterator; template 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 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 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 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))); } # 462 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template 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)); } # 514 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template struct __copy_move_backward { template static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { while (__first != __last) *--__result = *--__last; return __result; } }; # 542 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template<> struct __copy_move_backward { template 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; } }; # 572 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> { template static _Tp* __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) { const ptrdiff_t _Num = __last - __first; if (_Num) __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); return __result - _Num; } }; template 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_pod(_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 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))); } # 631 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template 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)); } # 689 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template inline typename __gnu_cxx::__enable_if::__value, void>::__type __fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { for (; __first != __last; ++__first) *__first = __value; } template 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 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; __builtin_memset(__first, static_cast(__tmp), __last - __first); } # 733 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template inline void fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { ; std::__fill_a(std::__niter_base(__first), std::__niter_base(__last), __value); } template inline typename __gnu_cxx::__enable_if::__value, _OutputIterator>::__type __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) { for (; __n > 0; --__n, ++__first) *__first = __value; return __first; } template 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 (; __n > 0; --__n, ++__first) *__first = __tmp; return __first; } template 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; } # 791 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template inline _OI fill_n(_OI __first, _Size __n, const _Tp& __value) { return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value)); } template struct __equal { template static bool equal(_II1 __first1, _II1 __last1, _II2 __first2) { for (; __first1 != __last1; ++__first1, ++__first2) if (!(*__first1 == *__first2)) return false; return true; } }; template<> struct __equal { template static bool equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) { return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) * (__last1 - __first1)); } }; template 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<_II1>::__value && __is_pointer<_II2>::__value && __are_same<_ValueType1, _ValueType2>::__value); return std::__equal<__simple>::equal(__first1, __last1, __first2); } template struct __lc_rai { template static _II1 __newlast1(_II1, _II1 __last1, _II2, _II2) { return __last1; } template static bool __cnd2(_II __first, _II __last) { return __first != __last; } }; template<> struct __lc_rai { template 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 static bool __cnd2(_RAI, _RAI) { return true; } }; template struct __lexicographical_compare { template static bool __lc(_II1, _II1, _II2, _II2); }; template template bool __lexicographical_compare<_BoolType>:: __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { 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, ++__first2) { if (*__first1 < *__first2) return true; if (*__first2 < *__first1) return false; } return __first1 == __last1 && __first2 != __last2; } template<> struct __lexicographical_compare { template 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; const int __result = __builtin_memcmp(__first1, __first2, std::min(__len1, __len2)); return __result != 0 ? __result < 0 : __len1 < __len2; } }; template 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); } # 952 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; 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 (*__middle < __val) { __first = __middle; ++__first; __len = __len - __half - 1; } else __len = __half; } return __first; } template inline _Size __lg(_Size __n) { _Size __k; for (__k = 0; __n != 0; __n >>= 1) ++__k; return __k - 1; } inline int __lg(int __n) { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } inline long __lg(long __n) { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } inline long long __lg(long long __n) { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } } namespace std __attribute__ ((__visibility__ ("default"))) { # 1028 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template 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)); } # 1060 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template inline bool equal(_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _BinaryPredicate __binary_pred) { ; for (; __first1 != __last1; ++__first1, ++__first2) if (!bool(__binary_pred(*__first1, *__first2))) return false; return true; } # 1091 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template inline bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; ; ; return std::__lexicographical_compare_aux(std::__niter_base(__first1), std::__niter_base(__last1), std::__niter_base(__first2), std::__niter_base(__last2)); } # 1125 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template bool lexicographical_compare(_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, ++__first2) { if (__comp(*__first1, *__first2)) return true; if (__comp(*__first2, *__first1)) return false; } return __first1 == __last1 && __first2 != __last2; } # 1165 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) { ; while (__first1 != __last1 && *__first1 == *__first2) { ++__first1; ++__first2; } return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } # 1202 "/usr/include/c++/4.5/bits/stl_algobase.h" 3 template pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __binary_pred) { ; while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2))) { ++__first1; ++__first2; } return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } } # 42 "/usr/include/c++/4.5/bits/char_traits.h" 2 3 # 1 "/usr/include/c++/4.5/cwchar" 1 3 # 41 "/usr/include/c++/4.5/cwchar" 3 # 42 "/usr/include/c++/4.5/cwchar" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 45 "/usr/include/c++/4.5/cwchar" 2 3 # 1 "/usr/include/wchar.h" 1 3 4 # 48 "/usr/include/c++/4.5/cwchar" 2 3 # 44 "/usr/include/c++/4.5/bits/char_traits.h" 2 3 # 52 "/usr/include/c++/4.5/bits/char_traits.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 64 "/usr/include/c++/4.5/bits/char_traits.h" 3 template struct _Char_types { typedef unsigned long int_type; typedef std::streampos pos_type; typedef std::streamoff off_type; typedef std::mbstate_t state_type; }; # 89 "/usr/include/c++/4.5/bits/char_traits.h" 3 template 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 void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } static bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } static bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, std::size_t __n); static std::size_t length(const char_type* __s); static 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 char_type to_char_type(const int_type& __c) { return static_cast(__c); } static int_type to_int_type(const char_type& __c) { return static_cast(__c); } static bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } static int_type eof() { return static_cast((-1)); } static int_type not_eof(const int_type& __c) { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } }; template 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 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 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 char_traits<_CharT>::char_type* char_traits<_CharT>:: move(char_type* __s1, const char_type* __s2, std::size_t __n) { return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, __n * sizeof(char_type))); } template 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 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"))) { # 230 "/usr/include/c++/4.5/bits/char_traits.h" 3 template struct char_traits : public __gnu_cxx::char_traits<_CharT> { }; template<> struct char_traits { 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) { __c1 = __c2; } static bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } static bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { 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) { return static_cast(__builtin_memchr(__s, __a, __n)); } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return static_cast(__builtin_memmove(__s1, __s2, __n)); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return static_cast(__builtin_memcpy(__s1, __s2, __n)); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { return static_cast(__builtin_memset(__s, __a, __n)); } static char_type to_char_type(const int_type& __c) { return static_cast(__c); } static int_type to_int_type(const char_type& __c) { return static_cast(static_cast(__c)); } static bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } static int_type eof() { return static_cast((-1)); } static int_type not_eof(const int_type& __c) { return (__c == eof()) ? 0 : __c; } }; template<> struct char_traits { 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) { __c1 = __c2; } static bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } static bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { 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) { return wmemchr(__s, __a, __n); } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return wmemmove(__s1, __s2, __n); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return wmemcpy(__s1, __s2, __n); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { return wmemset(__s, __a, __n); } static char_type to_char_type(const int_type& __c) { return char_type(__c); } static int_type to_int_type(const char_type& __c) { return int_type(__c); } static bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } static int_type eof() { return static_cast((0xffffffffu)); } static int_type not_eof(const int_type& __c) { return eq_int_type(__c, eof()) ? 0 : __c; } }; } # 42 "/usr/include/c++/4.5/ios" 2 3 # 1 "/usr/include/c++/4.5/bits/localefwd.h" 1 3 # 39 "/usr/include/c++/4.5/bits/localefwd.h" 3 # 40 "/usr/include/c++/4.5/bits/localefwd.h" 3 # 1 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/c++locale.h" 1 3 # 40 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/c++locale.h" 3 # 41 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/c++locale.h" 3 # 1 "/usr/include/c++/4.5/clocale" 1 3 # 41 "/usr/include/c++/4.5/clocale" 3 # 42 "/usr/include/c++/4.5/clocale" 3 # 1 "/usr/include/locale.h" 1 3 4 # 29 "/usr/include/locale.h" 3 4 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 30 "/usr/include/locale.h" 2 3 4 # 1 "/usr/include/bits/locale.h" 1 3 4 # 27 "/usr/include/bits/locale.h" 3 4 enum { __LC_CTYPE = 0, __LC_NUMERIC = 1, __LC_TIME = 2, __LC_COLLATE = 3, __LC_MONETARY = 4, __LC_MESSAGES = 5, __LC_ALL = 6, __LC_PAPER = 7, __LC_NAME = 8, __LC_ADDRESS = 9, __LC_TELEPHONE = 10, __LC_MEASUREMENT = 11, __LC_IDENTIFICATION = 12 }; # 31 "/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; # 121 "/usr/include/locale.h" 3 4 }; extern char *setlocale (int __category, __const char *__locale) throw (); extern struct lconv *localeconv (void) throw (); # 152 "/usr/include/locale.h" 3 4 extern __locale_t newlocale (int __category_mask, __const char *__locale, __locale_t __base) throw (); # 187 "/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 (); } # 45 "/usr/include/c++/4.5/clocale" 2 3 # 53 "/usr/include/c++/4.5/clocale" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::lconv; using ::setlocale; using ::localeconv; } # 43 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/c++locale.h" 2 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 44 "/usr/include/c++/4.5/x86_64-linux-gnu/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); # 85 "/usr/include/c++/4.5/x86_64-linux-gnu/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; } } # 43 "/usr/include/c++/4.5/bits/localefwd.h" 2 3 # 1 "/usr/include/c++/4.5/cctype" 1 3 # 41 "/usr/include/c++/4.5/cctype" 3 # 42 "/usr/include/c++/4.5/cctype" 3 # 1 "/usr/include/ctype.h" 1 3 4 # 30 "/usr/include/ctype.h" 3 4 extern "C" { # 48 "/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)) }; # 81 "/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)); # 96 "/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 (); # 247 "/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 (); # 323 "/usr/include/ctype.h" 3 4 } # 45 "/usr/include/c++/4.5/cctype" 2 3 # 64 "/usr/include/c++/4.5/cctype" 3 namespace std __attribute__ ((__visibility__ ("default"))) { 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; } # 45 "/usr/include/c++/4.5/bits/localefwd.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 55 "/usr/include/c++/4.5/bits/localefwd.h" 3 class locale; template bool has_facet(const locale&) throw(); template const _Facet& use_facet(const locale&); template bool isspace(_CharT, const locale&); template bool isprint(_CharT, const locale&); template bool iscntrl(_CharT, const locale&); template bool isupper(_CharT, const locale&); template bool islower(_CharT, const locale&); template bool isalpha(_CharT, const locale&); template bool isdigit(_CharT, const locale&); template bool ispunct(_CharT, const locale&); template bool isxdigit(_CharT, const locale&); template bool isalnum(_CharT, const locale&); template bool isgraph(_CharT, const locale&); template _CharT toupper(_CharT, const locale&); template _CharT tolower(_CharT, const locale&); class ctype_base; template class ctype; template<> class ctype; template<> class ctype; template class ctype_byname; class codecvt_base; template class codecvt; template<> class codecvt; template<> class codecvt; template class codecvt_byname; template > class num_get; template > class num_put; template class numpunct; template class numpunct_byname; template class collate; template class collate_byname; class time_base; template > class time_get; template > class time_get_byname; template > class time_put; template > class time_put_byname; class money_base; template > class money_get; template > class money_put; template class moneypunct; template class moneypunct_byname; class messages_base; template class messages; template class messages_byname; } # 43 "/usr/include/c++/4.5/ios" 2 3 # 1 "/usr/include/c++/4.5/bits/ios_base.h" 1 3 # 39 "/usr/include/c++/4.5/bits/ios_base.h" 3 # 40 "/usr/include/c++/4.5/bits/ios_base.h" 3 # 1 "/usr/include/c++/4.5/ext/atomicity.h" 1 3 # 34 "/usr/include/c++/4.5/ext/atomicity.h" 3 # 1 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/gthr.h" 1 3 # 30 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/gthr.h" 3 #pragma GCC visibility push(default) # 162 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/gthr.h" 3 # 1 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/gthr-default.h" 1 3 # 41 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/gthr-default.h" 3 # 1 "/usr/include/pthread.h" 1 3 4 # 25 "/usr/include/pthread.h" 3 4 # 1 "/usr/include/sched.h" 1 3 4 # 30 "/usr/include/sched.h" 3 4 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 31 "/usr/include/sched.h" 2 3 4 # 1 "/usr/include/time.h" 1 3 4 # 35 "/usr/include/sched.h" 2 3 4 # 43 "/usr/include/sched.h" 3 4 # 1 "/usr/include/bits/sched.h" 1 3 4 # 74 "/usr/include/bits/sched.h" 3 4 struct sched_param { int __sched_priority; }; 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 (); } struct __sched_param { int __sched_priority; }; # 116 "/usr/include/bits/sched.h" 3 4 typedef unsigned long int __cpu_mask; typedef struct { __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; } cpu_set_t; # 199 "/usr/include/bits/sched.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 () __attribute__ ((__warn_unused_result__)); extern void __sched_cpufree (cpu_set_t *__set) throw (); } # 44 "/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 (); # 118 "/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 (); } # 26 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/time.h" 1 3 4 # 30 "/usr/include/time.h" 3 4 extern "C" { # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 39 "/usr/include/time.h" 2 3 4 # 1 "/usr/include/bits/time.h" 1 3 4 # 43 "/usr/include/time.h" 2 3 4 # 131 "/usr/include/time.h" 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; }; struct itimerspec { struct timespec it_interval; struct timespec it_value; }; struct sigevent; # 180 "/usr/include/time.h" 3 4 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 (); # 313 "/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__)); # 328 "/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 (); # 390 "/usr/include/time.h" 3 4 extern int getdate_err; # 399 "/usr/include/time.h" 3 4 extern struct tm *getdate (__const char *__string); # 413 "/usr/include/time.h" 3 4 extern int getdate_r (__const char *__restrict __string, struct tm *__restrict __resbufp); } # 27 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/bits/setjmp.h" 1 3 4 # 27 "/usr/include/bits/setjmp.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 28 "/usr/include/bits/setjmp.h" 2 3 4 typedef long int __jmp_buf[8]; # 30 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 31 "/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 }; # 147 "/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 }; # 182 "/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 }; # 220 "/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 (); 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_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))); # 478 "/usr/include/pthread.h" 3 4 extern int pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); # 490 "/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__)); # 524 "/usr/include/pthread.h" 3 4 struct __pthread_cleanup_frame { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; }; # 664 "/usr/include/pthread.h" 3 4 extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) ; # 676 "/usr/include/pthread.h" 3 4 extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) ; # 699 "/usr/include/pthread.h" 3 4 extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) ; # 712 "/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))); # 790 "/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))); # 872 "/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))); # 984 "/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))); # 1028 "/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))); # 1095 "/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))); # 1129 "/usr/include/pthread.h" 3 4 extern int pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) throw (); # 1143 "/usr/include/pthread.h" 3 4 } # 42 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/gthr-default.h" 2 3 # 1 "/usr/include/unistd.h" 1 3 4 # 28 "/usr/include/unistd.h" 3 4 extern "C" { # 203 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/bits/posix_opt.h" 1 3 4 # 204 "/usr/include/unistd.h" 2 3 4 # 1 "/usr/include/bits/environments.h" 1 3 4 # 23 "/usr/include/bits/environments.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 24 "/usr/include/bits/environments.h" 2 3 4 # 208 "/usr/include/unistd.h" 2 3 4 # 227 "/usr/include/unistd.h" 3 4 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 228 "/usr/include/unistd.h" 2 3 4 # 275 "/usr/include/unistd.h" 3 4 typedef __socklen_t socklen_t; # 288 "/usr/include/unistd.h" 3 4 extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); extern int euidaccess (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); extern int eaccess (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); extern int faccessat (int __fd, __const char *__file, int __type, int __flag) throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); # 331 "/usr/include/unistd.h" 3 4 extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); # 342 "/usr/include/unistd.h" 3 4 extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) throw (); extern int close (int __fd); extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)); extern ssize_t write (int __fd, __const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)); # 373 "/usr/include/unistd.h" 3 4 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __attribute__ ((__warn_unused_result__)); extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, __off_t __offset) __attribute__ ((__warn_unused_result__)); # 401 "/usr/include/unistd.h" 3 4 extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __attribute__ ((__warn_unused_result__)); extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, __off64_t __offset) __attribute__ ((__warn_unused_result__)); extern int pipe (int __pipedes[2]) throw () __attribute__ ((__warn_unused_result__)); extern int pipe2 (int __pipedes[2], int __flags) throw () __attribute__ ((__warn_unused_result__)); # 429 "/usr/include/unistd.h" 3 4 extern unsigned int alarm (unsigned int __seconds) throw (); # 441 "/usr/include/unistd.h" 3 4 extern unsigned int sleep (unsigned int __seconds); extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) throw (); extern int usleep (__useconds_t __useconds); # 466 "/usr/include/unistd.h" 3 4 extern int pause (void); extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__warn_unused_result__)); extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchownat (int __fd, __const char *__file, __uid_t __owner, __gid_t __group, int __flag) throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchdir (int __fd) throw () __attribute__ ((__warn_unused_result__)); # 508 "/usr/include/unistd.h" 3 4 extern char *getcwd (char *__buf, size_t __size) throw () __attribute__ ((__warn_unused_result__)); extern char *get_current_dir_name (void) throw (); extern char *getwd (char *__buf) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)); extern int dup (int __fd) throw () __attribute__ ((__warn_unused_result__)); extern int dup2 (int __fd, int __fd2) throw (); extern int dup3 (int __fd, int __fd2, int __flags) throw (); extern char **__environ; extern char **environ; extern int execve (__const char *__path, char *__const __argv[], char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2))); extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) throw () __attribute__ ((__nonnull__ (2))); extern int execv (__const char *__path, char *__const __argv[]) throw () __attribute__ ((__nonnull__ (1, 2))); extern int execle (__const char *__path, __const char *__arg, ...) throw () __attribute__ ((__nonnull__ (1, 2))); extern int execl (__const char *__path, __const char *__arg, ...) throw () __attribute__ ((__nonnull__ (1, 2))); extern int execvp (__const char *__file, char *__const __argv[]) throw () __attribute__ ((__nonnull__ (1, 2))); extern int execlp (__const char *__file, __const char *__arg, ...) throw () __attribute__ ((__nonnull__ (1, 2))); extern int execvpe (__const char *__file, char *__const __argv[], char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2))); extern int nice (int __inc) throw () __attribute__ ((__warn_unused_result__)); extern void _exit (int __status) __attribute__ ((__noreturn__)); # 1 "/usr/include/bits/confname.h" 1 3 4 # 26 "/usr/include/bits/confname.h" 3 4 enum { _PC_LINK_MAX, _PC_MAX_CANON, _PC_MAX_INPUT, _PC_NAME_MAX, _PC_PATH_MAX, _PC_PIPE_BUF, _PC_CHOWN_RESTRICTED, _PC_NO_TRUNC, _PC_VDISABLE, _PC_SYNC_IO, _PC_ASYNC_IO, _PC_PRIO_IO, _PC_SOCK_MAXBUF, _PC_FILESIZEBITS, _PC_REC_INCR_XFER_SIZE, _PC_REC_MAX_XFER_SIZE, _PC_REC_MIN_XFER_SIZE, _PC_REC_XFER_ALIGN, _PC_ALLOC_SIZE_MIN, _PC_SYMLINK_MAX, _PC_2_SYMLINKS }; enum { _SC_ARG_MAX, _SC_CHILD_MAX, _SC_CLK_TCK, _SC_NGROUPS_MAX, _SC_OPEN_MAX, _SC_STREAM_MAX, _SC_TZNAME_MAX, _SC_JOB_CONTROL, _SC_SAVED_IDS, _SC_REALTIME_SIGNALS, _SC_PRIORITY_SCHEDULING, _SC_TIMERS, _SC_ASYNCHRONOUS_IO, _SC_PRIORITIZED_IO, _SC_SYNCHRONIZED_IO, _SC_FSYNC, _SC_MAPPED_FILES, _SC_MEMLOCK, _SC_MEMLOCK_RANGE, _SC_MEMORY_PROTECTION, _SC_MESSAGE_PASSING, _SC_SEMAPHORES, _SC_SHARED_MEMORY_OBJECTS, _SC_AIO_LISTIO_MAX, _SC_AIO_MAX, _SC_AIO_PRIO_DELTA_MAX, _SC_DELAYTIMER_MAX, _SC_MQ_OPEN_MAX, _SC_MQ_PRIO_MAX, _SC_VERSION, _SC_PAGESIZE, _SC_RTSIG_MAX, _SC_SEM_NSEMS_MAX, _SC_SEM_VALUE_MAX, _SC_SIGQUEUE_MAX, _SC_TIMER_MAX, _SC_BC_BASE_MAX, _SC_BC_DIM_MAX, _SC_BC_SCALE_MAX, _SC_BC_STRING_MAX, _SC_COLL_WEIGHTS_MAX, _SC_EQUIV_CLASS_MAX, _SC_EXPR_NEST_MAX, _SC_LINE_MAX, _SC_RE_DUP_MAX, _SC_CHARCLASS_NAME_MAX, _SC_2_VERSION, _SC_2_C_BIND, _SC_2_C_DEV, _SC_2_FORT_DEV, _SC_2_FORT_RUN, _SC_2_SW_DEV, _SC_2_LOCALEDEF, _SC_PII, _SC_PII_XTI, _SC_PII_SOCKET, _SC_PII_INTERNET, _SC_PII_OSI, _SC_POLL, _SC_SELECT, _SC_UIO_MAXIOV, _SC_IOV_MAX = _SC_UIO_MAXIOV, _SC_PII_INTERNET_STREAM, _SC_PII_INTERNET_DGRAM, _SC_PII_OSI_COTS, _SC_PII_OSI_CLTS, _SC_PII_OSI_M, _SC_T_IOV_MAX, _SC_THREADS, _SC_THREAD_SAFE_FUNCTIONS, _SC_GETGR_R_SIZE_MAX, _SC_GETPW_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_TTY_NAME_MAX, _SC_THREAD_DESTRUCTOR_ITERATIONS, _SC_THREAD_KEYS_MAX, _SC_THREAD_STACK_MIN, _SC_THREAD_THREADS_MAX, _SC_THREAD_ATTR_STACKADDR, _SC_THREAD_ATTR_STACKSIZE, _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PRIO_INHERIT, _SC_THREAD_PRIO_PROTECT, _SC_THREAD_PROCESS_SHARED, _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES, _SC_AVPHYS_PAGES, _SC_ATEXIT_MAX, _SC_PASS_MAX, _SC_XOPEN_VERSION, _SC_XOPEN_XCU_VERSION, _SC_XOPEN_UNIX, _SC_XOPEN_CRYPT, _SC_XOPEN_ENH_I18N, _SC_XOPEN_SHM, _SC_2_CHAR_TERM, _SC_2_C_VERSION, _SC_2_UPE, _SC_XOPEN_XPG2, _SC_XOPEN_XPG3, _SC_XOPEN_XPG4, _SC_CHAR_BIT, _SC_CHAR_MAX, _SC_CHAR_MIN, _SC_INT_MAX, _SC_INT_MIN, _SC_LONG_BIT, _SC_WORD_BIT, _SC_MB_LEN_MAX, _SC_NZERO, _SC_SSIZE_MAX, _SC_SCHAR_MAX, _SC_SCHAR_MIN, _SC_SHRT_MAX, _SC_SHRT_MIN, _SC_UCHAR_MAX, _SC_UINT_MAX, _SC_ULONG_MAX, _SC_USHRT_MAX, _SC_NL_ARGMAX, _SC_NL_LANGMAX, _SC_NL_MSGMAX, _SC_NL_NMAX, _SC_NL_SETMAX, _SC_NL_TEXTMAX, _SC_XBS5_ILP32_OFF32, _SC_XBS5_ILP32_OFFBIG, _SC_XBS5_LP64_OFF64, _SC_XBS5_LPBIG_OFFBIG, _SC_XOPEN_LEGACY, _SC_XOPEN_REALTIME, _SC_XOPEN_REALTIME_THREADS, _SC_ADVISORY_INFO, _SC_BARRIERS, _SC_BASE, _SC_C_LANG_SUPPORT, _SC_C_LANG_SUPPORT_R, _SC_CLOCK_SELECTION, _SC_CPUTIME, _SC_THREAD_CPUTIME, _SC_DEVICE_IO, _SC_DEVICE_SPECIFIC, _SC_DEVICE_SPECIFIC_R, _SC_FD_MGMT, _SC_FIFO, _SC_PIPE, _SC_FILE_ATTRIBUTES, _SC_FILE_LOCKING, _SC_FILE_SYSTEM, _SC_MONOTONIC_CLOCK, _SC_MULTI_PROCESS, _SC_SINGLE_PROCESS, _SC_NETWORKING, _SC_READER_WRITER_LOCKS, _SC_SPIN_LOCKS, _SC_REGEXP, _SC_REGEX_VERSION, _SC_SHELL, _SC_SIGNALS, _SC_SPAWN, _SC_SPORADIC_SERVER, _SC_THREAD_SPORADIC_SERVER, _SC_SYSTEM_DATABASE, _SC_SYSTEM_DATABASE_R, _SC_TIMEOUTS, _SC_TYPED_MEMORY_OBJECTS, _SC_USER_GROUPS, _SC_USER_GROUPS_R, _SC_2_PBS, _SC_2_PBS_ACCOUNTING, _SC_2_PBS_LOCATE, _SC_2_PBS_MESSAGE, _SC_2_PBS_TRACK, _SC_SYMLOOP_MAX, _SC_STREAMS, _SC_2_PBS_CHECKPOINT, _SC_V6_ILP32_OFF32, _SC_V6_ILP32_OFFBIG, _SC_V6_LP64_OFF64, _SC_V6_LPBIG_OFFBIG, _SC_HOST_NAME_MAX, _SC_TRACE, _SC_TRACE_EVENT_FILTER, _SC_TRACE_INHERIT, _SC_TRACE_LOG, _SC_LEVEL1_ICACHE_SIZE, _SC_LEVEL1_ICACHE_ASSOC, _SC_LEVEL1_ICACHE_LINESIZE, _SC_LEVEL1_DCACHE_SIZE, _SC_LEVEL1_DCACHE_ASSOC, _SC_LEVEL1_DCACHE_LINESIZE, _SC_LEVEL2_CACHE_SIZE, _SC_LEVEL2_CACHE_ASSOC, _SC_LEVEL2_CACHE_LINESIZE, _SC_LEVEL3_CACHE_SIZE, _SC_LEVEL3_CACHE_ASSOC, _SC_LEVEL3_CACHE_LINESIZE, _SC_LEVEL4_CACHE_SIZE, _SC_LEVEL4_CACHE_ASSOC, _SC_LEVEL4_CACHE_LINESIZE, _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, _SC_RAW_SOCKETS, _SC_V7_ILP32_OFF32, _SC_V7_ILP32_OFFBIG, _SC_V7_LP64_OFF64, _SC_V7_LPBIG_OFFBIG, _SC_SS_REPL_MAX, _SC_TRACE_EVENT_NAME_MAX, _SC_TRACE_NAME_MAX, _SC_TRACE_SYS_MAX, _SC_TRACE_USER_EVENT_MAX, _SC_XOPEN_STREAMS, _SC_THREAD_ROBUST_PRIO_INHERIT, _SC_THREAD_ROBUST_PRIO_PROTECT }; enum { _CS_PATH, _CS_V6_WIDTH_RESTRICTED_ENVS, _CS_GNU_LIBC_VERSION, _CS_GNU_LIBPTHREAD_VERSION, _CS_V5_WIDTH_RESTRICTED_ENVS, _CS_V7_WIDTH_RESTRICTED_ENVS, _CS_LFS_CFLAGS = 1000, _CS_LFS_LDFLAGS, _CS_LFS_LIBS, _CS_LFS_LINTFLAGS, _CS_LFS64_CFLAGS, _CS_LFS64_LDFLAGS, _CS_LFS64_LIBS, _CS_LFS64_LINTFLAGS, _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, _CS_XBS5_ILP32_OFF32_LDFLAGS, _CS_XBS5_ILP32_OFF32_LIBS, _CS_XBS5_ILP32_OFF32_LINTFLAGS, _CS_XBS5_ILP32_OFFBIG_CFLAGS, _CS_XBS5_ILP32_OFFBIG_LDFLAGS, _CS_XBS5_ILP32_OFFBIG_LIBS, _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, _CS_XBS5_LP64_OFF64_CFLAGS, _CS_XBS5_LP64_OFF64_LDFLAGS, _CS_XBS5_LP64_OFF64_LIBS, _CS_XBS5_LP64_OFF64_LINTFLAGS, _CS_XBS5_LPBIG_OFFBIG_CFLAGS, _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, _CS_XBS5_LPBIG_OFFBIG_LIBS, _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V6_ILP32_OFF32_CFLAGS, _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, _CS_POSIX_V6_ILP32_OFF32_LIBS, _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LIBS, _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V6_LP64_OFF64_CFLAGS, _CS_POSIX_V6_LP64_OFF64_LDFLAGS, _CS_POSIX_V6_LP64_OFF64_LIBS, _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V7_ILP32_OFF32_CFLAGS, _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, _CS_POSIX_V7_ILP32_OFF32_LIBS, _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_LIBS, _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V7_LP64_OFF64_CFLAGS, _CS_POSIX_V7_LP64_OFF64_LDFLAGS, _CS_POSIX_V7_LP64_OFF64_LIBS, _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, _CS_V6_ENV, _CS_V7_ENV }; # 607 "/usr/include/unistd.h" 2 3 4 extern long int pathconf (__const char *__path, int __name) throw () __attribute__ ((__nonnull__ (1))); extern long int fpathconf (int __fd, int __name) throw (); extern long int sysconf (int __name) throw (); extern size_t confstr (int __name, char *__buf, size_t __len) throw (); extern __pid_t getpid (void) throw (); extern __pid_t getppid (void) throw (); extern __pid_t getpgrp (void) throw (); # 643 "/usr/include/unistd.h" 3 4 extern __pid_t __getpgid (__pid_t __pid) throw (); extern __pid_t getpgid (__pid_t __pid) throw (); extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); # 669 "/usr/include/unistd.h" 3 4 extern int setpgrp (void) throw (); # 686 "/usr/include/unistd.h" 3 4 extern __pid_t setsid (void) throw (); extern __pid_t getsid (__pid_t __pid) throw (); extern __uid_t getuid (void) throw (); extern __uid_t geteuid (void) throw (); extern __gid_t getgid (void) throw (); extern __gid_t getegid (void) throw (); extern int getgroups (int __size, __gid_t __list[]) throw () __attribute__ ((__warn_unused_result__)); extern int group_member (__gid_t __gid) throw (); extern int setuid (__uid_t __uid) throw (); extern int setreuid (__uid_t __ruid, __uid_t __euid) throw (); extern int seteuid (__uid_t __uid) throw (); extern int setgid (__gid_t __gid) throw (); extern int setregid (__gid_t __rgid, __gid_t __egid) throw (); extern int setegid (__gid_t __gid) throw (); extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) throw (); extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) throw (); extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) throw (); extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) throw (); extern __pid_t fork (void) throw (); extern __pid_t vfork (void) throw (); extern char *ttyname (int __fd) throw (); extern int ttyname_r (int __fd, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); extern int isatty (int __fd) throw (); extern int ttyslot (void) throw (); extern int link (__const char *__from, __const char *__to) throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern int linkat (int __fromfd, __const char *__from, int __tofd, __const char *__to, int __flags) throw () __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); extern int symlink (__const char *__from, __const char *__to) throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern ssize_t readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern int symlinkat (__const char *__from, int __tofd, __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); extern ssize_t readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); extern int unlinkat (int __fd, __const char *__name, int __flag) throw () __attribute__ ((__nonnull__ (2))); extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))); extern __pid_t tcgetpgrp (int __fd) throw (); extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); extern char *getlogin (void); extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); # 890 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/getopt.h" 1 3 4 # 50 "/usr/include/getopt.h" 3 4 extern "C" { # 59 "/usr/include/getopt.h" 3 4 extern char *optarg; # 73 "/usr/include/getopt.h" 3 4 extern int optind; extern int opterr; extern int optopt; # 152 "/usr/include/getopt.h" 3 4 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) throw (); # 187 "/usr/include/getopt.h" 3 4 } # 891 "/usr/include/unistd.h" 2 3 4 extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); extern int sethostname (__const char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int sethostid (long int __id) throw () __attribute__ ((__warn_unused_result__)); extern int getdomainname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int setdomainname (__const char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int vhangup (void) throw (); extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int profil (unsigned short int *__sample_buffer, size_t __size, size_t __offset, unsigned int __scale) throw () __attribute__ ((__nonnull__ (1))); extern int acct (__const char *__name) throw (); extern char *getusershell (void) throw (); extern void endusershell (void) throw (); extern void setusershell (void) throw (); extern int daemon (int __nochdir, int __noclose) throw () __attribute__ ((__warn_unused_result__)); extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); # 976 "/usr/include/unistd.h" 3 4 extern int fsync (int __fd); extern long int gethostid (void); extern void sync (void) throw (); extern int getpagesize (void) throw () __attribute__ ((__const__)); extern int getdtablesize (void) throw (); # 1007 "/usr/include/unistd.h" 3 4 extern int truncate (__const char *__file, __off_t __length) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 1019 "/usr/include/unistd.h" 3 4 extern int truncate64 (__const char *__file, __off64_t __length) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 1029 "/usr/include/unistd.h" 3 4 extern int ftruncate (int __fd, __off_t __length) throw () __attribute__ ((__warn_unused_result__)); # 1039 "/usr/include/unistd.h" 3 4 extern int ftruncate64 (int __fd, __off64_t __length) throw () __attribute__ ((__warn_unused_result__)); # 1050 "/usr/include/unistd.h" 3 4 extern int brk (void *__addr) throw () __attribute__ ((__warn_unused_result__)); extern void *sbrk (intptr_t __delta) throw (); # 1071 "/usr/include/unistd.h" 3 4 extern long int syscall (long int __sysno, ...) throw (); # 1094 "/usr/include/unistd.h" 3 4 extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__)); # 1104 "/usr/include/unistd.h" 3 4 extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__)); # 1125 "/usr/include/unistd.h" 3 4 extern int fdatasync (int __fildes); extern char *crypt (__const char *__key, __const char *__salt) throw () __attribute__ ((__nonnull__ (1, 2))); extern void encrypt (char *__libc_block, int __edflag) throw () __attribute__ ((__nonnull__ (1))); extern void swab (__const void *__restrict __from, void *__restrict __to, ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *ctermid (char *__s) throw (); # 1 "/usr/include/bits/unistd.h" 1 3 4 # 24 "/usr/include/bits/unistd.h" 3 4 extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __attribute__ ((__warn_unused_result__)); extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") __attribute__ ((__warn_unused_result__)); extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t read (int __fd, void *__buf, size_t __nbytes) { if (__builtin_object_size (__buf, 0) != (size_t) -1) { if (!__builtin_constant_p (__nbytes)) return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); if (__nbytes > __builtin_object_size (__buf, 0)) return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); } return __read_alias (__fd, __buf, __nbytes); } extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") __attribute__ ((__warn_unused_result__)); extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") __attribute__ ((__warn_unused_result__)); extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer"))) ; extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) { if (__builtin_object_size (__buf, 0) != (size_t) -1) { if (!__builtin_constant_p (__nbytes)) return __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); if ( __nbytes > __builtin_object_size (__buf, 0)) return __pread_chk_warn (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); } return __pread_alias (__fd, __buf, __nbytes, __offset); } # 105 "/usr/include/bits/unistd.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) { if (__builtin_object_size (__buf, 0) != (size_t) -1) { if (!__builtin_constant_p (__nbytes)) return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); if ( __nbytes > __builtin_object_size (__buf, 0)) return __pread64_chk_warn (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); } return __pread64_alias (__fd, __buf, __nbytes, __offset); } extern ssize_t __readlink_chk (__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern ssize_t __readlink_alias (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlink") __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern ssize_t __readlink_chk_warn (__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlink_chk") __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); if ( __len > __builtin_object_size (__buf, 2 > 1)) return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); } return __readlink_alias (__path, __buf, __len); } extern ssize_t __readlinkat_chk (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); extern ssize_t __readlinkat_alias (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlinkat") __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); extern ssize_t __readlinkat_chk_warn (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlinkat_chk") __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); if (__len > __builtin_object_size (__buf, 2 > 1)) return __readlinkat_chk_warn (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); } return __readlinkat_alias (__fd, __path, __buf, __len); } extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) throw () __attribute__ ((__warn_unused_result__)); extern char *__getcwd_alias (char *__buf, size_t __size) throw () __asm__ ("" "getcwd") __attribute__ ((__warn_unused_result__)); extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) throw () __asm__ ("" "__getcwd_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * getcwd (char *__buf, size_t __size) throw () { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__size)) return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)); if (__size > __builtin_object_size (__buf, 2 > 1)) return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)); } return __getcwd_alias (__buf, __size); } extern char *__getwd_chk (char *__buf, size_t buflen) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern char *__getwd_warn (char *__buf) throw () __asm__ ("" "getwd") __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * getwd (char *__buf) throw () { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); return __getwd_warn (__buf); } extern size_t __confstr_chk (int __name, char *__buf, size_t __len, size_t __buflen) throw (); extern size_t __confstr_alias (int __name, char *__buf, size_t __len) throw () __asm__ ("" "confstr") ; extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__confstr_chk") __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t confstr (int __name, char *__buf, size_t __len) throw () { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); if (__builtin_object_size (__buf, 2 > 1) < __len) return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); } return __confstr_alias (__name, __buf, __len); } extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) throw () __attribute__ ((__warn_unused_result__)); extern int __getgroups_alias (int __size, __gid_t __list[]) throw () __asm__ ("" "getgroups") __attribute__ ((__warn_unused_result__)); extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) throw () __asm__ ("" "__getgroups_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int getgroups (int __size, __gid_t __list[]) throw () { if (__builtin_object_size (__list, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__size) || __size < 0) return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)); if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1)) return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)); } return __getgroups_alias (__size, __list); } extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ttyname_r") __attribute__ ((__nonnull__ (2))); extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int ttyname_r (int __fd, char *__buf, size_t __buflen) throw () { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__buflen)) return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); if (__buflen > __builtin_object_size (__buf, 2 > 1)) return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); } return __ttyname_r_alias (__fd, __buf, __buflen); } extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nonnull__ (1))); extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") __attribute__ ((__nonnull__ (1))); extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int getlogin_r (char *__buf, size_t __buflen) { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__buflen)) return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); if (__buflen > __builtin_object_size (__buf, 2 > 1)) return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); } return __getlogin_r_alias (__buf, __buflen); } extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) throw () __attribute__ ((__nonnull__ (1))); extern int __gethostname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "gethostname") __attribute__ ((__nonnull__ (1))); extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__gethostname_chk") __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int gethostname (char *__buf, size_t __buflen) throw () { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__buflen)) return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); if (__buflen > __builtin_object_size (__buf, 2 > 1)) return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); } return __gethostname_alias (__buf, __buflen); } extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int __getdomainname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "getdomainname") __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__getdomainname_chk") __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int getdomainname (char *__buf, size_t __buflen) throw () { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__buflen)) return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); if (__buflen > __builtin_object_size (__buf, 2 > 1)) return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); } return __getdomainname_alias (__buf, __buflen); } # 1161 "/usr/include/unistd.h" 2 3 4 } # 43 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/gthr-default.h" 2 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; # 118 "/usr/include/c++/4.5/x86_64-linux-gnu/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_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"))); # 237 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/gthr-default.h" 3 static inline int __gthread_active_p (void) { static void *const __gthread_active_ptr = __extension__ (void *) &__gthrw_pthread_cancel; return __gthread_active_ptr != 0; } # 648 "/usr/include/c++/4.5/x86_64-linux-gnu/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 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; } # 791 "/usr/include/c++/4.5/x86_64-linux-gnu/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_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_timedwait_recursive (__gthread_cond_t *__cond, __gthread_recursive_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout); } static inline int __gthread_cond_destroy (__gthread_cond_t* __cond) { return __gthrw_pthread_cond_destroy (__cond); } # 163 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/gthr.h" 2 3 #pragma GCC visibility pop # 35 "/usr/include/c++/4.5/ext/atomicity.h" 2 3 # 1 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/atomic_word.h" 1 3 # 32 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/atomic_word.h" 3 typedef int _Atomic_word; # 36 "/usr/include/c++/4.5/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 __sync_fetch_and_add(__mem, __val); } static inline void __atomic_add(volatile _Atomic_word* __mem, int __val) { __sync_fetch_and_add(__mem, __val); } # 61 "/usr/include/c++/4.5/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); } } # 42 "/usr/include/c++/4.5/bits/ios_base.h" 2 3 # 1 "/usr/include/c++/4.5/bits/locale_classes.h" 1 3 # 39 "/usr/include/c++/4.5/bits/locale_classes.h" 3 # 40 "/usr/include/c++/4.5/bits/locale_classes.h" 3 # 1 "/usr/include/c++/4.5/string" 1 3 # 38 "/usr/include/c++/4.5/string" 3 # 39 "/usr/include/c++/4.5/string" 3 # 1 "/usr/include/c++/4.5/bits/allocator.h" 1 3 # 48 "/usr/include/c++/4.5/bits/allocator.h" 3 # 1 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/c++allocator.h" 1 3 # 34 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/c++allocator.h" 3 # 1 "/usr/include/c++/4.5/ext/new_allocator.h" 1 3 # 33 "/usr/include/c++/4.5/ext/new_allocator.h" 3 # 1 "/usr/include/c++/4.5/new" 1 3 # 39 "/usr/include/c++/4.5/new" 3 # 40 "/usr/include/c++/4.5/new" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 42 "/usr/include/c++/4.5/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(); }; struct nothrow_t { }; extern const nothrow_t nothrow; typedef void (*new_handler)(); new_handler set_new_handler(new_handler) throw(); } # 93 "/usr/include/c++/4.5/new" 3 void* operator new(std::size_t) throw (std::bad_alloc); void* operator new[](std::size_t) throw (std::bad_alloc); void operator delete(void*) throw(); void operator delete[](void*) throw(); void* operator new(std::size_t, const std::nothrow_t&) throw(); void* operator new[](std::size_t, const std::nothrow_t&) throw(); void operator delete(void*, const std::nothrow_t&) throw(); void operator delete[](void*, const std::nothrow_t&) throw(); inline void* operator new(std::size_t, void* __p) throw() { return __p; } inline void* operator new[](std::size_t, void* __p) throw() { return __p; } inline void operator delete (void*, void*) throw() { } inline void operator delete[](void*, void*) throw() { } } #pragma GCC visibility pop # 34 "/usr/include/c++/4.5/ext/new_allocator.h" 2 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { using std::size_t; using std::ptrdiff_t; # 50 "/usr/include/c++/4.5/ext/new_allocator.h" 3 template 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 struct rebind { typedef new_allocator<_Tp1> other; }; new_allocator() throw() { } new_allocator(const new_allocator&) throw() { } template new_allocator(const new_allocator<_Tp1>&) throw() { } ~new_allocator() throw() { } pointer address(reference __x) const { return &__x; } const_pointer address(const_reference __x) const { return &__x; } pointer allocate(size_type __n, const void* = 0) { if (__n > this->max_size()) std::__throw_bad_alloc(); return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); } void deallocate(pointer __p, size_type) { ::operator delete(__p); } size_type max_size() const throw() { return size_t(-1) / sizeof(_Tp); } void construct(pointer __p, const _Tp& __val) { ::new((void *)__p) _Tp(__val); } # 114 "/usr/include/c++/4.5/ext/new_allocator.h" 3 void destroy(pointer __p) { __p->~_Tp(); } }; template inline bool operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) { return true; } template inline bool operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) { return false; } } # 35 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/c++allocator.h" 2 3 # 49 "/usr/include/c++/4.5/bits/allocator.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 59 "/usr/include/c++/4.5/bits/allocator.h" 3 template class allocator; template<> class allocator { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef void* pointer; typedef const void* const_pointer; typedef void value_type; template struct rebind { typedef allocator<_Tp1> other; }; }; # 85 "/usr/include/c++/4.5/bits/allocator.h" 3 template class allocator: public __gnu_cxx::new_allocator<_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 struct rebind { typedef allocator<_Tp1> other; }; allocator() throw() { } allocator(const allocator& __a) throw() : __gnu_cxx::new_allocator<_Tp>(__a) { } template allocator(const allocator<_Tp1>&) throw() { } ~allocator() throw() { } }; template inline bool operator==(const allocator<_T1>&, const allocator<_T2>&) { return true; } template inline bool operator==(const allocator<_Tp>&, const allocator<_Tp>&) { return true; } template inline bool operator!=(const allocator<_T1>&, const allocator<_T2>&) { return false; } template inline bool operator!=(const allocator<_Tp>&, const allocator<_Tp>&) { return false; } extern template class allocator; extern template class allocator; template struct __alloc_swap { static void _S_do_it(_Alloc&, _Alloc&) { } }; template struct __alloc_swap<_Alloc, false> { static void _S_do_it(_Alloc& __one, _Alloc& __two) { if (__one != __two) swap(__one, __two); } }; template struct __alloc_neq { static bool _S_do_it(const _Alloc&, const _Alloc&) { return false; } }; template struct __alloc_neq<_Alloc, false> { static bool _S_do_it(const _Alloc& __one, const _Alloc& __two) { return __one != __two; } }; # 204 "/usr/include/c++/4.5/bits/allocator.h" 3 } # 44 "/usr/include/c++/4.5/string" 2 3 # 1 "/usr/include/c++/4.5/bits/ostream_insert.h" 1 3 # 33 "/usr/include/c++/4.5/bits/ostream_insert.h" 3 # 34 "/usr/include/c++/4.5/bits/ostream_insert.h" 3 # 1 "/usr/include/c++/4.5/cxxabi-forced.h" 1 3 # 33 "/usr/include/c++/4.5/cxxabi-forced.h" 3 # 34 "/usr/include/c++/4.5/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/include/c++/4.5/bits/ostream_insert.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template 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 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 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); } # 47 "/usr/include/c++/4.5/string" 2 3 # 1 "/usr/include/c++/4.5/bits/stl_function.h" 1 3 # 60 "/usr/include/c++/4.5/bits/stl_function.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 99 "/usr/include/c++/4.5/bits/stl_function.h" 3 template struct unary_function { typedef _Arg argument_type; typedef _Result result_type; }; template struct binary_function { typedef _Arg1 first_argument_type; typedef _Arg2 second_argument_type; typedef _Result result_type; }; # 134 "/usr/include/c++/4.5/bits/stl_function.h" 3 template struct plus : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; } }; template struct minus : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; } }; template struct multiplies : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; } }; template struct divides : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; } }; template struct modulus : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; } }; template struct negate : public unary_function<_Tp, _Tp> { _Tp operator()(const _Tp& __x) const { return -__x; } }; # 198 "/usr/include/c++/4.5/bits/stl_function.h" 3 template struct equal_to : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; } }; template struct not_equal_to : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; } }; template struct greater : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; } }; template struct less : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; } }; template struct greater_equal : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; } }; template struct less_equal : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; } }; # 262 "/usr/include/c++/4.5/bits/stl_function.h" 3 template struct logical_and : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; } }; template struct logical_or : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; } }; template struct logical_not : public unary_function<_Tp, bool> { bool operator()(const _Tp& __x) const { return !__x; } }; template struct bit_and : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x & __y; } }; template struct bit_or : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x | __y; } }; template struct bit_xor : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x ^ __y; } }; # 345 "/usr/include/c++/4.5/bits/stl_function.h" 3 template class unary_negate : public unary_function { protected: _Predicate _M_pred; public: explicit unary_negate(const _Predicate& __x) : _M_pred(__x) { } bool operator()(const typename _Predicate::argument_type& __x) const { return !_M_pred(__x); } }; template inline unary_negate<_Predicate> not1(const _Predicate& __pred) { return unary_negate<_Predicate>(__pred); } template class binary_negate : public binary_function { protected: _Predicate _M_pred; public: explicit binary_negate(const _Predicate& __x) : _M_pred(__x) { } bool operator()(const typename _Predicate::first_argument_type& __x, const typename _Predicate::second_argument_type& __y) const { return !_M_pred(__x, __y); } }; template inline binary_negate<_Predicate> not2(const _Predicate& __pred) { return binary_negate<_Predicate>(__pred); } # 416 "/usr/include/c++/4.5/bits/stl_function.h" 3 template 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 inline pointer_to_unary_function<_Arg, _Result> ptr_fun(_Result (*__x)(_Arg)) { return pointer_to_unary_function<_Arg, _Result>(__x); } template 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 inline pointer_to_binary_function<_Arg1, _Arg2, _Result> ptr_fun(_Result (*__x)(_Arg1, _Arg2)) { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } template struct _Identity : public unary_function<_Tp,_Tp> { _Tp& operator()(_Tp& __x) const { return __x; } const _Tp& operator()(const _Tp& __x) const { return __x; } }; template 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 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; } }; # 523 "/usr/include/c++/4.5/bits/stl_function.h" 3 template 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 class const_mem_fun_t : public unary_function { 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 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 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 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 class const_mem_fun1_t : public binary_function { 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 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 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 inline mem_fun_t<_Ret, _Tp> mem_fun(_Ret (_Tp::*__f)()) { return mem_fun_t<_Ret, _Tp>(__f); } template inline const_mem_fun_t<_Ret, _Tp> mem_fun(_Ret (_Tp::*__f)() const) { return const_mem_fun_t<_Ret, _Tp>(__f); } template inline mem_fun_ref_t<_Ret, _Tp> mem_fun_ref(_Ret (_Tp::*__f)()) { return mem_fun_ref_t<_Ret, _Tp>(__f); } template 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 inline mem_fun1_t<_Ret, _Tp, _Arg> mem_fun(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } template 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 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 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/include/c++/4.5/backward/binders.h" 1 3 # 60 "/usr/include/c++/4.5/backward/binders.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 97 "/usr/include/c++/4.5/backward/binders.h" 3 template class binder1st : public unary_function { 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); } } ; template 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 class binder2nd : public unary_function { 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); } } ; template 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)); } } # 713 "/usr/include/c++/4.5/bits/stl_function.h" 2 3 # 51 "/usr/include/c++/4.5/string" 2 3 # 1 "/usr/include/c++/4.5/bits/basic_string.h" 1 3 # 39 "/usr/include/c++/4.5/bits/basic_string.h" 3 # 40 "/usr/include/c++/4.5/bits/basic_string.h" 3 # 1 "/usr/include/c++/4.5/initializer_list" 1 3 # 33 "/usr/include/c++/4.5/initializer_list" 3 # 34 "/usr/include/c++/4.5/initializer_list" 3 # 44 "/usr/include/c++/4.5/bits/basic_string.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 104 "/usr/include/c++/4.5/bits/basic_string.h" 3 template class basic_string { typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; public: typedef _Traits traits_type; typedef typename _Traits::char_type value_type; typedef _Alloc allocator_type; typedef typename _CharT_alloc_type::size_type size_type; typedef typename _CharT_alloc_type::difference_type difference_type; typedef typename _CharT_alloc_type::reference reference; typedef typename _CharT_alloc_type::const_reference const_reference; typedef typename _CharT_alloc_type::pointer pointer; typedef typename _CharT_alloc_type::const_pointer const_pointer; typedef __gnu_cxx::__normal_iterator iterator; typedef __gnu_cxx::__normal_iterator const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; private: # 141 "/usr/include/c++/4.5/bits/basic_string.h" 3 struct _Rep_base { size_type _M_length; size_type _M_capacity; _Atomic_word _M_refcount; }; struct _Rep : _Rep_base { typedef typename _Alloc::template rebind::other _Raw_bytes_alloc; # 166 "/usr/include/c++/4.5/bits/basic_string.h" 3 static const size_type _S_max_size; static const _CharT _S_terminal; static size_type _S_empty_rep_storage[]; static _Rep& _S_empty_rep() { void* __p = reinterpret_cast(&_S_empty_rep_storage); return *reinterpret_cast<_Rep*>(__p); } bool _M_is_leaked() const { return this->_M_refcount < 0; } bool _M_is_shared() const { return this->_M_refcount > 0; } void _M_set_leaked() { this->_M_refcount = -1; } void _M_set_sharable() { this->_M_refcount = 0; } void _M_set_length_and_sharable(size_type __n) { if (__builtin_expect(this != &_S_empty_rep(), false)) { this->_M_set_sharable(); this->_M_length = __n; traits_type::assign(this->_M_refdata()[__n], _S_terminal); } } _CharT* _M_refdata() throw() { return reinterpret_cast<_CharT*>(this + 1); } _CharT* _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) { return (!_M_is_leaked() && __alloc1 == __alloc2) ? _M_refcopy() : _M_clone(__alloc1); } static _Rep* _S_create(size_type, size_type, const _Alloc&); void _M_dispose(const _Alloc& __a) { if (__builtin_expect(this != &_S_empty_rep(), false)) if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0) _M_destroy(__a); } void _M_destroy(const _Alloc&) throw(); _CharT* _M_refcopy() throw() { if (__builtin_expect(this != &_S_empty_rep(), false)) __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1); return _M_refdata(); } _CharT* _M_clone(const _Alloc&, size_type __res = 0); }; struct _Alloc_hider : _Alloc { _Alloc_hider(_CharT* __dat, const _Alloc& __a) : _Alloc(__a), _M_p(__dat) { } _CharT* _M_p; }; public: static const size_type npos = static_cast(-1); private: mutable _Alloc_hider _M_dataplus; _CharT* _M_data() const { return _M_dataplus._M_p; } _CharT* _M_data(_CharT* __p) { return (_M_dataplus._M_p = __p); } _Rep* _M_rep() const { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } iterator _M_ibegin() const { return iterator(_M_data()); } iterator _M_iend() const { return iterator(_M_data() + this->size()); } void _M_leak() { if (!_M_rep()->_M_is_leaked()) _M_leak_hard(); } size_type _M_check(size_type __pos, const char* __s) const { if (__pos > this->size()) __throw_out_of_range((__s)); 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 { const bool __testoff = __off < this->size() - __pos; return __testoff ? __off : this->size() - __pos; } bool _M_disjunct(const _CharT* __s) const { return (less()(__s, _M_data()) || less()(_M_data() + this->size(), __s)); } static void _M_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 _M_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 _M_assign(_CharT* __d, size_type __n, _CharT __c) { if (__n == 1) traits_type::assign(*__d, __c); else traits_type::assign(__d, __n, __c); } template static void _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) { for (; __k1 != __k2; ++__k1, ++__p) traits_type::assign(*__p, *__k1); } static void _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) { _S_copy_chars(__p, __k1.base(), __k2.base()); } static void _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) { _S_copy_chars(__p, __k1.base(), __k2.base()); } static void _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) { _M_copy(__p, __k1, __k2 - __k1); } static void _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) { _M_copy(__p, __k1, __k2 - __k1); } static int _S_compare(size_type __n1, size_type __n2) { const difference_type __d = difference_type(__n1 - __n2); if (__d > __gnu_cxx::__numeric_traits::__max) return __gnu_cxx::__numeric_traits::__max; else if (__d < __gnu_cxx::__numeric_traits::__min) return __gnu_cxx::__numeric_traits::__min; else return int(__d); } void _M_mutate(size_type __pos, size_type __len1, size_type __len2); void _M_leak_hard(); static _Rep& _S_empty_rep() { return _Rep::_S_empty_rep(); } public: basic_string() : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } explicit basic_string(const _Alloc& __a); basic_string(const basic_string& __str); basic_string(const basic_string& __str, size_type __pos, size_type __n = npos); basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Alloc& __a); # 469 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string(const _CharT* __s, size_type __n, const _Alloc& __a = _Alloc()); basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); # 517 "/usr/include/c++/4.5/bits/basic_string.h" 3 template basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a = _Alloc()); ~basic_string() { _M_rep()->_M_dispose(this->get_allocator()); } basic_string& operator=(const basic_string& __str) { return this->assign(__str); } basic_string& operator=(const _CharT* __s) { return this->assign(__s); } # 550 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& operator=(_CharT __c) { this->assign(1, __c); return *this; } # 590 "/usr/include/c++/4.5/bits/basic_string.h" 3 iterator begin() { _M_leak(); return iterator(_M_data()); } const_iterator begin() const { return const_iterator(_M_data()); } iterator end() { _M_leak(); return iterator(_M_data() + this->size()); } const_iterator end() const { return const_iterator(_M_data() + this->size()); } reverse_iterator rbegin() { return reverse_iterator(this->end()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(this->end()); } reverse_iterator rend() { return reverse_iterator(this->begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(this->begin()); } # 696 "/usr/include/c++/4.5/bits/basic_string.h" 3 public: size_type size() const { return _M_rep()->_M_length; } size_type length() const { return _M_rep()->_M_length; } size_type max_size() const { return _Rep::_S_max_size; } # 725 "/usr/include/c++/4.5/bits/basic_string.h" 3 void resize(size_type __n, _CharT __c); # 738 "/usr/include/c++/4.5/bits/basic_string.h" 3 void resize(size_type __n) { this->resize(__n, _CharT()); } # 758 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type capacity() const { return _M_rep()->_M_capacity; } # 779 "/usr/include/c++/4.5/bits/basic_string.h" 3 void reserve(size_type __res_arg = 0); void clear() { _M_mutate(0, this->size(), 0); } bool empty() const { return this->size() == 0; } # 808 "/usr/include/c++/4.5/bits/basic_string.h" 3 const_reference operator[] (size_type __pos) const { ; return _M_data()[__pos]; } # 825 "/usr/include/c++/4.5/bits/basic_string.h" 3 reference operator[](size_type __pos) { ; ; _M_leak(); return _M_data()[__pos]; } # 846 "/usr/include/c++/4.5/bits/basic_string.h" 3 const_reference at(size_type __n) const { if (__n >= this->size()) __throw_out_of_range(("basic_string::at")); return _M_data()[__n]; } # 865 "/usr/include/c++/4.5/bits/basic_string.h" 3 reference at(size_type __n) { if (__n >= size()) __throw_out_of_range(("basic_string::at")); _M_leak(); return _M_data()[__n]; } 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; } # 921 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& append(const basic_string& __str); # 936 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& append(const basic_string& __str, size_type __pos, size_type __n); basic_string& append(const _CharT* __s, size_type __n); basic_string& append(const _CharT* __s) { ; return this->append(__s, traits_type::length(__s)); } # 968 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& append(size_type __n, _CharT __c); # 990 "/usr/include/c++/4.5/bits/basic_string.h" 3 template basic_string& append(_InputIterator __first, _InputIterator __last) { return this->replace(_M_iend(), _M_iend(), __first, __last); } void push_back(_CharT __c) { const size_type __len = 1 + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); traits_type::assign(_M_data()[this->size()], __c); _M_rep()->_M_set_length_and_sharable(__len); } basic_string& assign(const basic_string& __str); # 1046 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& assign(const basic_string& __str, size_type __pos, size_type __n) { return this->assign(__str._M_data() + __str._M_check(__pos, "basic_string::assign"), __str._M_limit(__pos, __n)); } # 1062 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& assign(const _CharT* __s, size_type __n); # 1074 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& assign(const _CharT* __s) { ; return this->assign(__s, traits_type::length(__s)); } # 1090 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& assign(size_type __n, _CharT __c) { return _M_replace_aux(size_type(0), this->size(), __n, __c); } # 1102 "/usr/include/c++/4.5/bits/basic_string.h" 3 template basic_string& assign(_InputIterator __first, _InputIterator __last) { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } # 1130 "/usr/include/c++/4.5/bits/basic_string.h" 3 void insert(iterator __p, size_type __n, _CharT __c) { this->replace(__p, __p, __n, __c); } # 1145 "/usr/include/c++/4.5/bits/basic_string.h" 3 template void insert(iterator __p, _InputIterator __beg, _InputIterator __end) { this->replace(__p, __p, __beg, __end); } # 1176 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& insert(size_type __pos1, const basic_string& __str) { return this->insert(__pos1, __str, size_type(0), __str.size()); } # 1198 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n) { return this->insert(__pos1, __str._M_data() + __str._M_check(__pos2, "basic_string::insert"), __str._M_limit(__pos2, __n)); } # 1221 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& insert(size_type __pos, const _CharT* __s, size_type __n); # 1239 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& insert(size_type __pos, const _CharT* __s) { ; return this->insert(__pos, __s, traits_type::length(__s)); } # 1262 "/usr/include/c++/4.5/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); } # 1279 "/usr/include/c++/4.5/bits/basic_string.h" 3 iterator insert(iterator __p, _CharT __c) { ; const size_type __pos = __p - _M_ibegin(); _M_replace_aux(__pos, size_type(0), size_type(1), __c); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } # 1303 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& erase(size_type __pos = 0, size_type __n = npos) { _M_mutate(_M_check(__pos, "basic_string::erase"), _M_limit(__pos, __n), size_type(0)); return *this; } # 1319 "/usr/include/c++/4.5/bits/basic_string.h" 3 iterator erase(iterator __position) { ; const size_type __pos = __position - _M_ibegin(); _M_mutate(__pos, size_type(1), size_type(0)); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } # 1339 "/usr/include/c++/4.5/bits/basic_string.h" 3 iterator erase(iterator __first, iterator __last); # 1358 "/usr/include/c++/4.5/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()); } # 1380 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) { return this->replace(__pos1, __n1, __str._M_data() + __str._M_check(__pos2, "basic_string::replace"), __str._M_limit(__pos2, __n2)); } # 1404 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2); # 1423 "/usr/include/c++/4.5/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)); } # 1446 "/usr/include/c++/4.5/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); } # 1464 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& replace(iterator __i1, iterator __i2, const basic_string& __str) { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } # 1482 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) { ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); } # 1503 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& replace(iterator __i1, iterator __i2, const _CharT* __s) { ; return this->replace(__i1, __i2, __s, traits_type::length(__s)); } # 1524 "/usr/include/c++/4.5/bits/basic_string.h" 3 basic_string& replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) { ; return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); } # 1546 "/usr/include/c++/4.5/bits/basic_string.h" 3 template basic_string& replace(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2) { ; ; typedef typename std::__is_integer<_InputIterator>::__type _Integral; return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); } basic_string& replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) { ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1, __k2 - __k1); } basic_string& replace(iterator __i1, iterator __i2, const _CharT* __k1, const _CharT* __k2) { ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1, __k2 - __k1); } basic_string& replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) { ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1.base(), __k2 - __k1); } basic_string& replace(iterator __i1, iterator __i2, const_iterator __k1, const_iterator __k2) { ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1.base(), __k2 - __k1); } # 1621 "/usr/include/c++/4.5/bits/basic_string.h" 3 private: template basic_string& _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, _Integer __val, __true_type) { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } template basic_string& _M_replace_dispatch(iterator __i1, 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_safe(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2); template static _CharT* _S_construct_aux(_InIterator __beg, _InIterator __end, const _Alloc& __a, __false_type) { typedef typename iterator_traits<_InIterator>::iterator_category _Tag; return _S_construct(__beg, __end, __a, _Tag()); } template static _CharT* _S_construct_aux(_Integer __beg, _Integer __end, const _Alloc& __a, __true_type) { return _S_construct_aux_2(static_cast(__beg), __end, __a); } static _CharT* _S_construct_aux_2(size_type __req, _CharT __c, const _Alloc& __a) { return _S_construct(__req, __c, __a); } template static _CharT* _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) { typedef typename std::__is_integer<_InIterator>::__type _Integral; return _S_construct_aux(__beg, __end, __a, _Integral()); } template static _CharT* _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, input_iterator_tag); template static _CharT* _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, forward_iterator_tag); static _CharT* _S_construct(size_type __req, _CharT __c, const _Alloc& __a); public: # 1702 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const; # 1712 "/usr/include/c++/4.5/bits/basic_string.h" 3 void swap(basic_string& __s); # 1722 "/usr/include/c++/4.5/bits/basic_string.h" 3 const _CharT* c_str() const { return _M_data(); } const _CharT* data() const { return _M_data(); } allocator_type get_allocator() const { return _M_dataplus; } # 1754 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find(const _CharT* __s, size_type __pos, size_type __n) const; # 1767 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find(const basic_string& __str, size_type __pos = 0) const { return this->find(__str.data(), __pos, __str.size()); } # 1781 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find(const _CharT* __s, size_type __pos = 0) const { ; return this->find(__s, __pos, traits_type::length(__s)); } # 1798 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find(_CharT __c, size_type __pos = 0) const; # 1811 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type rfind(const basic_string& __str, size_type __pos = npos) const { return this->rfind(__str.data(), __pos, __str.size()); } # 1826 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const; # 1839 "/usr/include/c++/4.5/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)); } # 1856 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type rfind(_CharT __c, size_type __pos = npos) const; # 1869 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_first_of(const basic_string& __str, size_type __pos = 0) const { return this->find_first_of(__str.data(), __pos, __str.size()); } # 1884 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; # 1897 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_first_of(const _CharT* __s, size_type __pos = 0) const { ; return this->find_first_of(__s, __pos, traits_type::length(__s)); } # 1916 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_first_of(_CharT __c, size_type __pos = 0) const { return this->find(__c, __pos); } # 1930 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_last_of(const basic_string& __str, size_type __pos = npos) const { return this->find_last_of(__str.data(), __pos, __str.size()); } # 1945 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; # 1958 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_last_of(const _CharT* __s, size_type __pos = npos) const { ; return this->find_last_of(__s, __pos, traits_type::length(__s)); } # 1977 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_last_of(_CharT __c, size_type __pos = npos) const { return this->rfind(__c, __pos); } # 1991 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const { return this->find_first_not_of(__str.data(), __pos, __str.size()); } # 2006 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const; # 2020 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const { ; return this->find_first_not_of(__s, __pos, traits_type::length(__s)); } # 2037 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_first_not_of(_CharT __c, size_type __pos = 0) const; # 2050 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const { return this->find_last_not_of(__str.data(), __pos, __str.size()); } # 2066 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const; # 2079 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const { ; return this->find_last_not_of(__s, __pos, traits_type::length(__s)); } # 2096 "/usr/include/c++/4.5/bits/basic_string.h" 3 size_type find_last_not_of(_CharT __c, size_type __pos = npos) const; # 2111 "/usr/include/c++/4.5/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); } # 2129 "/usr/include/c++/4.5/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; } # 2159 "/usr/include/c++/4.5/bits/basic_string.h" 3 int compare(size_type __pos, size_type __n, const basic_string& __str) const; # 2183 "/usr/include/c++/4.5/bits/basic_string.h" 3 int compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) const; # 2201 "/usr/include/c++/4.5/bits/basic_string.h" 3 int compare(const _CharT* __s) const; # 2224 "/usr/include/c++/4.5/bits/basic_string.h" 3 int compare(size_type __pos, size_type __n1, const _CharT* __s) const; # 2249 "/usr/include/c++/4.5/bits/basic_string.h" 3 int compare(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) const; }; # 2261 "/usr/include/c++/4.5/bits/basic_string.h" 3 template 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 basic_string<_CharT,_Traits,_Alloc> operator+(const _CharT* __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); template basic_string<_CharT,_Traits,_Alloc> operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); template 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 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; } # 2332 "/usr/include/c++/4.5/bits/basic_string.h" 3 template inline bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) == 0; } template inline typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type operator==(const basic_string<_CharT>& __lhs, const basic_string<_CharT>& __rhs) { return (__lhs.size() == __rhs.size() && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), __lhs.size())); } template inline bool operator==(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) == 0; } template inline bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) == 0; } # 2378 "/usr/include/c++/4.5/bits/basic_string.h" 3 template inline bool operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return !(__lhs == __rhs); } template inline bool operator!=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return !(__lhs == __rhs); } template inline bool operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return !(__lhs == __rhs); } # 2415 "/usr/include/c++/4.5/bits/basic_string.h" 3 template inline bool operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) < 0; } template inline bool operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) < 0; } template inline bool operator<(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) > 0; } # 2452 "/usr/include/c++/4.5/bits/basic_string.h" 3 template inline bool operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) > 0; } template inline bool operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) > 0; } template inline bool operator>(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) < 0; } # 2489 "/usr/include/c++/4.5/bits/basic_string.h" 3 template inline bool operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) <= 0; } template inline bool operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) <= 0; } template inline bool operator<=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) >= 0; } # 2526 "/usr/include/c++/4.5/bits/basic_string.h" 3 template inline bool operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) >= 0; } template inline bool operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) >= 0; } template inline bool operator>=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) <= 0; } # 2563 "/usr/include/c++/4.5/bits/basic_string.h" 3 template inline void swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, basic_string<_CharT, _Traits, _Alloc>& __rhs) { __lhs.swap(__rhs); } # 2580 "/usr/include/c++/4.5/bits/basic_string.h" 3 template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str); template<> basic_istream& operator>>(basic_istream& __is, basic_string& __str); # 2598 "/usr/include/c++/4.5/bits/basic_string.h" 3 template 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()); } # 2621 "/usr/include/c++/4.5/bits/basic_string.h" 3 template basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); # 2639 "/usr/include/c++/4.5/bits/basic_string.h" 3 template inline basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str) { return getline(__is, __str, __is.widen('\n')); } template<> basic_istream& getline(basic_istream& __in, basic_string& __str, char __delim); template<> basic_istream& getline(basic_istream& __in, basic_string& __str, wchar_t __delim); } # 54 "/usr/include/c++/4.5/string" 2 3 # 1 "/usr/include/c++/4.5/bits/basic_string.tcc" 1 3 # 42 "/usr/include/c++/4.5/bits/basic_string.tcc" 3 # 43 "/usr/include/c++/4.5/bits/basic_string.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template const typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; template const _CharT basic_string<_CharT, _Traits, _Alloc>:: _Rep::_S_terminal = _CharT(); template const typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>::npos; template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / sizeof(size_type)]; template template _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, input_iterator_tag) { if (__beg == __end && __a == _Alloc()) return _S_empty_rep()._M_refdata(); _CharT __buf[128]; size_type __len = 0; while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) { __buf[__len++] = *__beg; ++__beg; } _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); _M_copy(__r->_M_refdata(), __buf, __len); if (true) { while (__beg != __end) { if (__len == __r->_M_capacity) { _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); __r->_M_destroy(__a); __r = __another; } __r->_M_refdata()[__len++] = *__beg; ++__beg; } } if (false) { __r->_M_destroy(__a); ; } __r->_M_set_length_and_sharable(__len); return __r->_M_refdata(); } template template _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, forward_iterator_tag) { if (__beg == __end && __a == _Alloc()) return _S_empty_rep()._M_refdata(); if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) __throw_logic_error(("basic_string::_S_construct NULL not valid")); const size_type __dnew = static_cast(std::distance(__beg, __end)); _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); if (true) { _S_copy_chars(__r->_M_refdata(), __beg, __end); } if (false) { __r->_M_destroy(__a); ; } __r->_M_set_length_and_sharable(__dnew); return __r->_M_refdata(); } template _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(size_type __n, _CharT __c, const _Alloc& __a) { if (__n == 0 && __a == _Alloc()) return _S_empty_rep()._M_refdata(); _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); if (__n) _M_assign(__r->_M_refdata(), __n, __c); __r->_M_set_length_and_sharable(__n); return __r->_M_refdata(); } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str) : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), __str.get_allocator()), __str.get_allocator()) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _Alloc& __a) : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str, size_type __pos, size_type __n) : _M_dataplus(_S_construct(__str._M_data() + __str._M_check(__pos, "basic_string::basic_string"), __str._M_data() + __str._M_limit(__pos, __n) + __pos, _Alloc()), _Alloc()) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Alloc& __a) : _M_dataplus(_S_construct(__str._M_data() + __str._M_check(__pos, "basic_string::basic_string"), __str._M_data() + __str._M_limit(__pos, __n) + __pos, __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _CharT* __s, const _Alloc& __a) : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : __s + npos, __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(size_type __n, _CharT __c, const _Alloc& __a) : _M_dataplus(_S_construct(__n, __c, __a), __a) { } template template basic_string<_CharT, _Traits, _Alloc>:: basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) : _M_dataplus(_S_construct(__beg, __end, __a), __a) { } # 240 "/usr/include/c++/4.5/bits/basic_string.tcc" 3 template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: assign(const basic_string& __str) { if (_M_rep() != __str._M_rep()) { const allocator_type __a = this->get_allocator(); _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); _M_rep()->_M_dispose(__a); _M_data(__tmp); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: assign(const _CharT* __s, size_type __n) { ; _M_check_length(this->size(), __n, "basic_string::assign"); if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(size_type(0), this->size(), __s, __n); else { const size_type __pos = __s - _M_data(); if (__pos >= __n) _M_copy(_M_data(), __s, __n); else if (__pos) _M_move(_M_data(), __s, __n); _M_rep()->_M_set_length_and_sharable(__n); return *this; } } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(size_type __n, _CharT __c) { if (__n) { _M_check_length(size_type(0), __n, "basic_string::append"); const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_assign(_M_data() + this->size(), __n, __c); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const _CharT* __s, size_type __n) { ; if (__n) { _M_check_length(size_type(0), __n, "basic_string::append"); const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) { if (_M_disjunct(__s)) this->reserve(__len); else { const size_type __off = __s - _M_data(); this->reserve(__len); __s = _M_data() + __off; } } _M_copy(_M_data() + this->size(), __s, __n); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const basic_string& __str) { const size_type __size = __str.size(); if (__size) { const size_type __len = __size + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_copy(_M_data() + this->size(), __str._M_data(), __size); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const basic_string& __str, size_type __pos, size_type __n) { __str._M_check(__pos, "basic_string::append"); __n = __str._M_limit(__pos, __n); if (__n) { const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: insert(size_type __pos, const _CharT* __s, size_type __n) { ; _M_check(__pos, "basic_string::insert"); _M_check_length(size_type(0), __n, "basic_string::insert"); if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(__pos, size_type(0), __s, __n); else { const size_type __off = __s - _M_data(); _M_mutate(__pos, 0, __n); __s = _M_data() + __off; _CharT* __p = _M_data() + __pos; if (__s + __n <= __p) _M_copy(__p, __s, __n); else if (__s >= __p) _M_copy(__p, __s + __n, __n); else { const size_type __nleft = __p - __s; _M_copy(__p, __s, __nleft); _M_copy(__p + __nleft, __p + __n, __n - __nleft); } return *this; } } template typename basic_string<_CharT, _Traits, _Alloc>::iterator basic_string<_CharT, _Traits, _Alloc>:: erase(iterator __first, iterator __last) { ; const size_type __size = __last - __first; if (__size) { const size_type __pos = __first - _M_ibegin(); _M_mutate(__pos, __size, size_type(0)); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } else return __first; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) { ; _M_check(__pos, "basic_string::replace"); __n1 = _M_limit(__pos, __n1); _M_check_length(__n1, __n2, "basic_string::replace"); bool __left; if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(__pos, __n1, __s, __n2); else if ((__left = __s + __n2 <= _M_data() + __pos) || _M_data() + __pos + __n1 <= __s) { size_type __off = __s - _M_data(); __left ? __off : (__off += __n2 - __n1); _M_mutate(__pos, __n1, __n2); _M_copy(_M_data() + __pos, _M_data() + __off, __n2); return *this; } else { const basic_string __tmp(__s, __n2); return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); } } template void basic_string<_CharT, _Traits, _Alloc>::_Rep:: _M_destroy(const _Alloc& __a) throw () { const size_type __size = sizeof(_Rep_base) + (this->_M_capacity + 1) * sizeof(_CharT); _Raw_bytes_alloc(__a).deallocate(reinterpret_cast(this), __size); } template void basic_string<_CharT, _Traits, _Alloc>:: _M_leak_hard() { if (_M_rep() == &_S_empty_rep()) return; if (_M_rep()->_M_is_shared()) _M_mutate(0, 0, 0); _M_rep()->_M_set_leaked(); } template void basic_string<_CharT, _Traits, _Alloc>:: _M_mutate(size_type __pos, size_type __len1, size_type __len2) { const size_type __old_size = this->size(); const size_type __new_size = __old_size + __len2 - __len1; const size_type __how_much = __old_size - __pos - __len1; if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) { const allocator_type __a = get_allocator(); _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); if (__pos) _M_copy(__r->_M_refdata(), _M_data(), __pos); if (__how_much) _M_copy(__r->_M_refdata() + __pos + __len2, _M_data() + __pos + __len1, __how_much); _M_rep()->_M_dispose(__a); _M_data(__r->_M_refdata()); } else if (__how_much && __len1 != __len2) { _M_move(_M_data() + __pos + __len2, _M_data() + __pos + __len1, __how_much); } _M_rep()->_M_set_length_and_sharable(__new_size); } template void basic_string<_CharT, _Traits, _Alloc>:: reserve(size_type __res) { if (__res != this->capacity() || _M_rep()->_M_is_shared()) { if (__res < this->size()) __res = this->size(); const allocator_type __a = get_allocator(); _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); _M_rep()->_M_dispose(__a); _M_data(__tmp); } } template void basic_string<_CharT, _Traits, _Alloc>:: swap(basic_string& __s) { if (_M_rep()->_M_is_leaked()) _M_rep()->_M_set_sharable(); if (__s._M_rep()->_M_is_leaked()) __s._M_rep()->_M_set_sharable(); if (this->get_allocator() == __s.get_allocator()) { _CharT* __tmp = _M_data(); _M_data(__s._M_data()); __s._M_data(__tmp); } else { const basic_string __tmp1(_M_ibegin(), _M_iend(), __s.get_allocator()); const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), this->get_allocator()); *this = __tmp2; __s = __tmp1; } } template typename basic_string<_CharT, _Traits, _Alloc>::_Rep* basic_string<_CharT, _Traits, _Alloc>::_Rep:: _S_create(size_type __capacity, size_type __old_capacity, const _Alloc& __alloc) { if (__capacity > _S_max_size) __throw_length_error(("basic_string::_S_create")); # 577 "/usr/include/c++/4.5/bits/basic_string.tcc" 3 const size_type __pagesize = 4096; const size_type __malloc_header_size = 4 * sizeof(void*); if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) __capacity = 2 * __old_capacity; size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); const size_type __adj_size = __size + __malloc_header_size; if (__adj_size > __pagesize && __capacity > __old_capacity) { const size_type __extra = __pagesize - __adj_size % __pagesize; __capacity += __extra / sizeof(_CharT); if (__capacity > _S_max_size) __capacity = _S_max_size; __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); } void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); _Rep *__p = new (__place) _Rep; __p->_M_capacity = __capacity; __p->_M_set_sharable(); return __p; } template _CharT* basic_string<_CharT, _Traits, _Alloc>::_Rep:: _M_clone(const _Alloc& __alloc, size_type __res) { const size_type __requested_cap = this->_M_length + __res; _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, __alloc); if (this->_M_length) _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); __r->_M_set_length_and_sharable(this->_M_length); return __r->_M_refdata(); } template void basic_string<_CharT, _Traits, _Alloc>:: resize(size_type __n, _CharT __c) { const size_type __size = this->size(); _M_check_length(__size, __n, "basic_string::resize"); if (__size < __n) this->append(__n - __size, __c); else if (__n < __size) this->erase(__n); } template template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2, __false_type) { const basic_string __s(__k1, __k2); const size_type __n1 = __i2 - __i1; _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), __s.size()); } template 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"); _M_mutate(__pos1, __n1, __n2); if (__n2) _M_assign(_M_data() + __pos1, __n2, __c); return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) { _M_mutate(__pos1, __n1, __n2); if (__n2) _M_copy(_M_data() + __pos1, __s, __n2); return *this; } template 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 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 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) _M_copy(__s, _M_data() + __pos, __n); return __n; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find(const _CharT* __s, size_type __pos, size_type __n) const { ; const size_type __size = this->size(); const _CharT* __data = _M_data(); if (__n == 0) return __pos <= __size ? __pos : npos; if (__n <= __size) { for (; __pos <= __size - __n; ++__pos) if (traits_type::eq(__data[__pos], __s[0]) && traits_type::compare(__data + __pos + 1, __s + 1, __n - 1) == 0) return __pos; } return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find(_CharT __c, size_type __pos) const { 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 basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(const _CharT* __s, size_type __pos, size_type __n) const { ; 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 basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(_CharT __c, size_type __pos) const { 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 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 { ; 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 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 { ; 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 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 { ; for (; __pos < this->size(); ++__pos) if (!traits_type::find(__s, __n, _M_data()[__pos])) return __pos; return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_not_of(_CharT __c, size_type __pos) const { for (; __pos < this->size(); ++__pos) if (!traits_type::eq(_M_data()[__pos], __c)) return __pos; return npos; } template 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 { ; 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 basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_not_of(_CharT __c, size_type __pos) const { 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 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 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 int basic_string<_CharT, _Traits, _Alloc>:: compare(const _CharT* __s) const { ; 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 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 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 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 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; } extern template class basic_string; extern template basic_istream& operator>>(basic_istream&, string&); extern template basic_ostream& operator<<(basic_ostream&, const string&); extern template basic_istream& getline(basic_istream&, string&, char); extern template basic_istream& getline(basic_istream&, string&); extern template class basic_string; extern template basic_istream& operator>>(basic_istream&, wstring&); extern template basic_ostream& operator<<(basic_ostream&, const wstring&); extern template basic_istream& getline(basic_istream&, wstring&, wchar_t); extern template basic_istream& getline(basic_istream&, wstring&); } # 57 "/usr/include/c++/4.5/string" 2 3 # 43 "/usr/include/c++/4.5/bits/locale_classes.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 62 "/usr/include/c++/4.5/bits/locale_classes.h" 3 class locale { public: typedef int category; class facet; class id; class _Impl; friend class facet; friend class _Impl; template friend bool has_facet(const locale&) throw(); template friend const _Facet& use_facet(const locale&); template friend struct __use_cache; # 98 "/usr/include/c++/4.5/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/include/c++/4.5/bits/locale_classes.h" 3 locale() throw(); # 126 "/usr/include/c++/4.5/bits/locale_classes.h" 3 locale(const locale& __other) throw(); # 136 "/usr/include/c++/4.5/bits/locale_classes.h" 3 explicit locale(const char* __s); # 151 "/usr/include/c++/4.5/bits/locale_classes.h" 3 locale(const locale& __base, const char* __s, category __cat); # 164 "/usr/include/c++/4.5/bits/locale_classes.h" 3 locale(const locale& __base, const locale& __add, category __cat); # 176 "/usr/include/c++/4.5/bits/locale_classes.h" 3 template locale(const locale& __other, _Facet* __f); ~locale() throw(); # 190 "/usr/include/c++/4.5/bits/locale_classes.h" 3 const locale& operator=(const locale& __other) throw(); # 205 "/usr/include/c++/4.5/bits/locale_classes.h" 3 template locale combine(const locale& __other) const; string name() const; # 224 "/usr/include/c++/4.5/bits/locale_classes.h" 3 bool operator==(const locale& __other) const throw(); bool operator!=(const locale& __other) const throw() { return !(this->operator==(__other)); } # 252 "/usr/include/c++/4.5/bits/locale_classes.h" 3 template bool operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, const basic_string<_Char, _Traits, _Alloc>& __s2) const; # 268 "/usr/include/c++/4.5/bits/locale_classes.h" 3 static locale global(const locale&); static const locale& classic(); private: _Impl* _M_impl; static _Impl* _S_classic; static _Impl* _S_global; static const char* const* const _S_categories; # 303 "/usr/include/c++/4.5/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); }; # 337 "/usr/include/c++/4.5/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: # 368 "/usr/include/c++/4.5/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(); 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) { } } } facet(const facet&); facet& operator=(const facet&); }; # 432 "/usr/include/c++/4.5/bits/locale_classes.h" 3 class locale::id { private: friend class locale; friend class locale::_Impl; template friend const _Facet& use_facet(const locale&); template 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 friend bool has_facet(const locale&) throw(); template friend const _Facet& use_facet(const locale&); template 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 void _M_init_facet(_Facet* __facet) { _M_install_facet(&_Facet::id, __facet); } void _M_install_cache(const facet*, size_t); }; # 575 "/usr/include/c++/4.5/bits/locale_classes.h" 3 template bool has_facet(const locale& __loc) throw(); # 592 "/usr/include/c++/4.5/bits/locale_classes.h" 3 template const _Facet& use_facet(const locale& __loc); # 609 "/usr/include/c++/4.5/bits/locale_classes.h" 3 template class 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; # 636 "/usr/include/c++/4.5/bits/locale_classes.h" 3 explicit collate(size_t __refs = 0) : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) { } # 650 "/usr/include/c++/4.5/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)) { } # 667 "/usr/include/c++/4.5/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); } # 686 "/usr/include/c++/4.5/bits/locale_classes.h" 3 string_type transform(const _CharT* __lo, const _CharT* __hi) const { return this->do_transform(__lo, __hi); } # 700 "/usr/include/c++/4.5/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); } # 729 "/usr/include/c++/4.5/bits/locale_classes.h" 3 virtual int do_compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const; # 745 "/usr/include/c++/4.5/bits/locale_classes.h" 3 virtual string_type do_transform(const _CharT* __lo, const _CharT* __hi) const; # 758 "/usr/include/c++/4.5/bits/locale_classes.h" 3 virtual long do_hash(const _CharT* __lo, const _CharT* __hi) const; }; template locale::id collate<_CharT>::id; template<> int collate::_M_compare(const char*, const char*) const throw(); template<> size_t collate::_M_transform(char*, const char*, size_t) const throw(); template<> int collate::_M_compare(const wchar_t*, const wchar_t*) const throw(); template<> size_t collate::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); template class 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); } } protected: virtual ~collate_byname() { } }; } # 1 "/usr/include/c++/4.5/bits/locale_classes.tcc" 1 3 # 37 "/usr/include/c++/4.5/bits/locale_classes.tcc" 3 # 38 "/usr/include/c++/4.5/bits/locale_classes.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template 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 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 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); } template 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 && dynamic_cast(__facets[__i])); } template 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 dynamic_cast(*__facets[__i]); } template int collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () { return 0; } template size_t collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () { return 0; } template 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 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 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:: __digits - 7))); return static_cast(__val); } extern template class collate; extern template class collate_byname; extern template const collate& use_facet >(const locale&); extern template bool has_facet >(const locale&); extern template class collate; extern template class collate_byname; extern template const collate& use_facet >(const locale&); extern template bool has_facet >(const locale&); } # 816 "/usr/include/c++/4.5/bits/locale_classes.h" 2 3 # 44 "/usr/include/c++/4.5/bits/ios_base.h" 2 3 # 54 "/usr/include/c++/4.5/bits/ios_base.h" 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 }; inline _Ios_Fmtflags operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } inline _Ios_Fmtflags operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } inline _Ios_Fmtflags operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } inline _Ios_Fmtflags& operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a | __b; } inline _Ios_Fmtflags& operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a & __b; } inline _Ios_Fmtflags& operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a ^ __b; } inline _Ios_Fmtflags operator~(_Ios_Fmtflags __a) { return _Ios_Fmtflags(~static_cast(__a)); } 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 }; inline _Ios_Openmode operator&(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } inline _Ios_Openmode operator|(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } inline _Ios_Openmode operator^(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } inline _Ios_Openmode& operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a | __b; } inline _Ios_Openmode& operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a & __b; } inline _Ios_Openmode& operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a ^ __b; } inline _Ios_Openmode operator~(_Ios_Openmode __a) { return _Ios_Openmode(~static_cast(__a)); } enum _Ios_Iostate { _S_goodbit = 0, _S_badbit = 1L << 0, _S_eofbit = 1L << 1, _S_failbit = 1L << 2, _S_ios_iostate_end = 1L << 16 }; inline _Ios_Iostate operator&(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } inline _Ios_Iostate operator|(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } inline _Ios_Iostate operator^(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } inline _Ios_Iostate& operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a | __b; } inline _Ios_Iostate& operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a & __b; } inline _Ios_Iostate& operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a ^ __b; } inline _Ios_Iostate operator~(_Ios_Iostate __a) { return _Ios_Iostate(~static_cast(__a)); } enum _Ios_Seekdir { _S_beg = 0, _S_cur = 1, _S_end = 2, _S_ios_seekdir_end = 1L << 16 }; # 207 "/usr/include/c++/4.5/bits/ios_base.h" 3 class ios_base { public: class failure : public exception { public: explicit failure(const string& __str) throw(); virtual ~failure() throw(); virtual const char* what() const throw(); private: string _M_msg; }; # 263 "/usr/include/c++/4.5/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; # 338 "/usr/include/c++/4.5/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; # 369 "/usr/include/c++/4.5/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; # 401 "/usr/include/c++/4.5/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; # 427 "/usr/include/c++/4.5/bits/ios_base.h" 3 enum event { erase_event, imbue_event, copyfmt_event }; # 444 "/usr/include/c++/4.5/bits/ios_base.h" 3 typedef void (*event_callback) (event, ios_base&, int); # 456 "/usr/include/c++/4.5/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() { return __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); } }; _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; } # 560 "/usr/include/c++/4.5/bits/ios_base.h" 3 fmtflags flags(fmtflags __fmtfl) { fmtflags __old = _M_flags; _M_flags = __fmtfl; return __old; } # 576 "/usr/include/c++/4.5/bits/ios_base.h" 3 fmtflags setf(fmtflags __fmtfl) { fmtflags __old = _M_flags; _M_flags |= __fmtfl; return __old; } # 593 "/usr/include/c++/4.5/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; } # 619 "/usr/include/c++/4.5/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; } # 670 "/usr/include/c++/4.5/bits/ios_base.h" 3 static bool sync_with_stdio(bool __sync = true); # 682 "/usr/include/c++/4.5/bits/ios_base.h" 3 locale imbue(const locale& __loc) throw(); # 693 "/usr/include/c++/4.5/bits/ios_base.h" 3 locale getloc() const { return _M_ios_locale; } # 704 "/usr/include/c++/4.5/bits/ios_base.h" 3 const locale& _M_getloc() const { return _M_ios_locale; } # 723 "/usr/include/c++/4.5/bits/ios_base.h" 3 static int xalloc() throw(); # 739 "/usr/include/c++/4.5/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; } # 760 "/usr/include/c++/4.5/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; } # 777 "/usr/include/c++/4.5/bits/ios_base.h" 3 virtual ~ios_base(); protected: ios_base() throw (); private: ios_base(const ios_base&); ios_base& operator=(const ios_base&); }; 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; } } # 44 "/usr/include/c++/4.5/ios" 2 3 # 1 "/usr/include/c++/4.5/streambuf" 1 3 # 37 "/usr/include/c++/4.5/streambuf" 3 # 38 "/usr/include/c++/4.5/streambuf" 3 # 46 "/usr/include/c++/4.5/streambuf" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template streamsize __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, basic_streambuf<_CharT, _Traits>*, bool&); # 114 "/usr/include/c++/4.5/streambuf" 3 template 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 __streambuf_type; friend class basic_ios; friend class basic_istream; friend class basic_ostream; friend class istreambuf_iterator; friend class ostreambuf_iterator; friend streamsize __copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, bool&); template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, _CharT2*>::__type __copy_move_a2(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, _CharT2*); template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, istreambuf_iterator<_CharT2> >::__type find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, const _CharT2&); template friend basic_istream<_CharT2, _Traits2>& operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); template friend basic_istream<_CharT2, _Traits2>& operator>>(basic_istream<_CharT2, _Traits2>&, basic_string<_CharT2, _Traits2, _Alloc>&); template friend basic_istream<_CharT2, _Traits2>& getline(basic_istream<_CharT2, _Traits2>&, basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); protected: # 180 "/usr/include/c++/4.5/streambuf" 3 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() { } # 204 "/usr/include/c++/4.5/streambuf" 3 locale pubimbue(const locale &__loc) { locale __tmp(this->getloc()); this->imbue(__loc); _M_buf_locale = __loc; return __tmp; } # 221 "/usr/include/c++/4.5/streambuf" 3 locale getloc() const { return _M_buf_locale; } # 234 "/usr/include/c++/4.5/streambuf" 3 __streambuf_type* pubsetbuf(char_type* __s, streamsize __n) { return this->setbuf(__s, __n); } 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); } 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(); } # 261 "/usr/include/c++/4.5/streambuf" 3 streamsize in_avail() { const streamsize __ret = this->egptr() - this->gptr(); return __ret ? __ret : this->showmanyc(); } # 275 "/usr/include/c++/4.5/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; } # 293 "/usr/include/c++/4.5/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; } # 315 "/usr/include/c++/4.5/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; } # 334 "/usr/include/c++/4.5/streambuf" 3 streamsize sgetn(char_type* __s, streamsize __n) { return this->xsgetn(__s, __n); } # 349 "/usr/include/c++/4.5/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; } # 374 "/usr/include/c++/4.5/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; } # 401 "/usr/include/c++/4.5/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; } # 427 "/usr/include/c++/4.5/streambuf" 3 streamsize sputn(const char_type* __s, streamsize __n) { return this->xsputn(__s, __n); } protected: # 441 "/usr/include/c++/4.5/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()) { } # 459 "/usr/include/c++/4.5/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; } # 475 "/usr/include/c++/4.5/streambuf" 3 void gbump(int __n) { _M_in_cur += __n; } # 486 "/usr/include/c++/4.5/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; } # 506 "/usr/include/c++/4.5/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; } # 522 "/usr/include/c++/4.5/streambuf" 3 void pbump(int __n) { _M_out_cur += __n; } # 532 "/usr/include/c++/4.5/streambuf" 3 void setp(char_type* __pbeg, char_type* __pend) { _M_out_beg = _M_out_cur = __pbeg; _M_out_end = __pend; } # 553 "/usr/include/c++/4.5/streambuf" 3 virtual void imbue(const locale&) { } # 568 "/usr/include/c++/4.5/streambuf" 3 virtual basic_streambuf* setbuf(char_type*, streamsize) { return this; } # 579 "/usr/include/c++/4.5/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)); } # 591 "/usr/include/c++/4.5/streambuf" 3 virtual pos_type seekpos(pos_type, ios_base::openmode = ios_base::in | ios_base::out) { return pos_type(off_type(-1)); } # 604 "/usr/include/c++/4.5/streambuf" 3 virtual int sync() { return 0; } # 626 "/usr/include/c++/4.5/streambuf" 3 virtual streamsize showmanyc() { return 0; } # 642 "/usr/include/c++/4.5/streambuf" 3 virtual streamsize xsgetn(char_type* __s, streamsize __n); # 664 "/usr/include/c++/4.5/streambuf" 3 virtual int_type underflow() { return traits_type::eof(); } # 677 "/usr/include/c++/4.5/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; } # 701 "/usr/include/c++/4.5/streambuf" 3 virtual int_type pbackfail(int_type = traits_type::eof()) { return traits_type::eof(); } # 719 "/usr/include/c++/4.5/streambuf" 3 virtual streamsize xsputn(const char_type* __s, streamsize __n); # 745 "/usr/include/c++/4.5/streambuf" 3 virtual int_type overflow(int_type = traits_type::eof()) { return traits_type::eof(); } public: # 760 "/usr/include/c++/4.5/streambuf" 3 void stossc() { if (this->gptr() < this->egptr()) this->gbump(1); else this->uflow(); } private: basic_streambuf(const __streambuf_type& __sb) : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur), _M_buf_locale(__sb._M_buf_locale) { } __streambuf_type& operator=(const __streambuf_type&) { return *this; }; }; template<> streamsize __copy_streambufs_eof(basic_streambuf* __sbin, basic_streambuf* __sbout, bool& __ineof); template<> streamsize __copy_streambufs_eof(basic_streambuf* __sbin, basic_streambuf* __sbout, bool& __ineof); } # 1 "/usr/include/c++/4.5/bits/streambuf.tcc" 1 3 # 38 "/usr/include/c++/4.5/bits/streambuf.tcc" 3 # 39 "/usr/include/c++/4.5/bits/streambuf.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template 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->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 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->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 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 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; extern template streamsize __copy_streambufs(basic_streambuf*, basic_streambuf*); extern template streamsize __copy_streambufs_eof(basic_streambuf*, basic_streambuf*, bool&); extern template class basic_streambuf; extern template streamsize __copy_streambufs(basic_streambuf*, basic_streambuf*); extern template streamsize __copy_streambufs_eof(basic_streambuf*, basic_streambuf*, bool&); } # 800 "/usr/include/c++/4.5/streambuf" 2 3 # 45 "/usr/include/c++/4.5/ios" 2 3 # 1 "/usr/include/c++/4.5/bits/basic_ios.h" 1 3 # 35 "/usr/include/c++/4.5/bits/basic_ios.h" 3 # 36 "/usr/include/c++/4.5/bits/basic_ios.h" 3 # 1 "/usr/include/c++/4.5/bits/locale_facets.h" 1 3 # 39 "/usr/include/c++/4.5/bits/locale_facets.h" 3 # 40 "/usr/include/c++/4.5/bits/locale_facets.h" 3 # 1 "/usr/include/c++/4.5/cwctype" 1 3 # 41 "/usr/include/c++/4.5/cwctype" 3 # 42 "/usr/include/c++/4.5/cwctype" 3 # 1 "/usr/include/wctype.h" 1 3 4 # 34 "/usr/include/wctype.h" 3 4 # 1 "/usr/include/wchar.h" 1 3 4 # 35 "/usr/include/wctype.h" 2 3 4 # 50 "/usr/include/wctype.h" 3 4 typedef unsigned long int wctype_t; # 72 "/usr/include/wctype.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 (); # 172 "/usr/include/wctype.h" 3 4 extern wctype_t wctype (__const char *__property) throw (); extern int iswctype (wint_t __wc, wctype_t __desc) throw (); typedef __const __int32_t *wctrans_t; extern wint_t towlower (wint_t __wc) throw (); extern wint_t towupper (wint_t __wc) throw (); } # 214 "/usr/include/wctype.h" 3 4 extern "C" { 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 (); } # 47 "/usr/include/c++/4.5/cwctype" 2 3 # 76 "/usr/include/c++/4.5/cwctype" 3 namespace std __attribute__ ((__visibility__ ("default"))) { 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; } # 42 "/usr/include/c++/4.5/bits/locale_facets.h" 2 3 # 1 "/usr/include/c++/4.5/cctype" 1 3 # 41 "/usr/include/c++/4.5/cctype" 3 # 42 "/usr/include/c++/4.5/cctype" 3 # 43 "/usr/include/c++/4.5/bits/locale_facets.h" 2 3 # 1 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/ctype_base.h" 1 3 # 37 "/usr/include/c++/4.5/x86_64-linux-gnu/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; }; } # 44 "/usr/include/c++/4.5/bits/locale_facets.h" 2 3 # 1 "/usr/include/c++/4.5/bits/streambuf_iterator.h" 1 3 # 35 "/usr/include/c++/4.5/bits/streambuf_iterator.h" 3 # 36 "/usr/include/c++/4.5/bits/streambuf_iterator.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 49 "/usr/include/c++/4.5/bits/streambuf_iterator.h" 3 template class istreambuf_iterator : public iterator { 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 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 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, _CharT2*>::__type __copy_move_a2(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, _CharT2*); template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, istreambuf_iterator<_CharT2> >::__type find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, const _CharT2&); private: mutable streambuf_type* _M_sbuf; mutable int_type _M_c; public: istreambuf_iterator() throw() : _M_sbuf(0), _M_c(traits_type::eof()) { } istreambuf_iterator(istream_type& __s) throw() : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } istreambuf_iterator(streambuf_type* __s) throw() : _M_sbuf(__s), _M_c(traits_type::eof()) { } char_type operator*() const { return traits_type::to_char_type(_M_get()); } istreambuf_iterator& operator++() { ; if (_M_sbuf) { _M_sbuf->sbumpc(); _M_c = traits_type::eof(); } return *this; } istreambuf_iterator operator++(int) { ; istreambuf_iterator __old = *this; if (_M_sbuf) { __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 { const int_type __eof = traits_type::eof(); int_type __ret = __eof; if (_M_sbuf) { if (!traits_type::eq_int_type(_M_c, __eof)) __ret = _M_c; else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), __eof)) _M_c = __ret; else _M_sbuf = 0; } return __ret; } bool _M_at_eof() const { const int_type __eof = traits_type::eof(); return traits_type::eq_int_type(_M_get(), __eof); } }; template inline bool operator==(const istreambuf_iterator<_CharT, _Traits>& __a, const istreambuf_iterator<_CharT, _Traits>& __b) { return __a.equal(__b); } template inline bool operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, const istreambuf_iterator<_CharT, _Traits>& __b) { return !__a.equal(__b); } template class ostreambuf_iterator : public iterator { public: typedef _CharT char_type; typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> streambuf_type; typedef basic_ostream<_CharT, _Traits> ostream_type; template 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) throw () : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } ostreambuf_iterator(streambuf_type* __s) throw () : _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 throw() { 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 __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 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 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 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->gbump(__n); __result += __n; __c = __sb->underflow(); } else { *__result++ = traits_type::to_char_type(__c); __c = __sb->snextc(); } } } return __result; } template 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; 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, traits_type::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->gbump(__n); __c = __sb->sgetc(); } else __c = __sb->snextc(); } if (!traits_type::eq_int_type(__c, traits_type::eof())) __first._M_c = __c; else __first._M_sbuf = 0; } return __first; } } # 51 "/usr/include/c++/4.5/bits/locale_facets.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 64 "/usr/include/c++/4.5/bits/locale_facets.h" 3 template 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 struct __pad { static void _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, const _CharT* __olds, streamsize __newlen, streamsize __oldlen); }; template _CharT* __add_grouping(_CharT* __s, _CharT __sep, const char* __gbeg, size_t __gsize, const _CharT* __first, const _CharT* __last); template inline ostreambuf_iterator<_CharT> __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) { __s._M_put(__ws, __len); return __s; } template inline _OutIter __write(_OutIter __s, const _CharT* __ws, int __len) { for (int __j = 0; __j < __len; __j++, ++__s) *__s = __ws[__j]; return __s; } # 142 "/usr/include/c++/4.5/bits/locale_facets.h" 3 template class __ctype_abstract_base : public locale::facet, public ctype_base { public: typedef _CharT char_type; # 160 "/usr/include/c++/4.5/bits/locale_facets.h" 3 bool is(mask __m, char_type __c) const { return this->do_is(__m, __c); } # 177 "/usr/include/c++/4.5/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); } # 193 "/usr/include/c++/4.5/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); } # 209 "/usr/include/c++/4.5/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); } # 223 "/usr/include/c++/4.5/bits/locale_facets.h" 3 char_type toupper(char_type __c) const { return this->do_toupper(__c); } # 238 "/usr/include/c++/4.5/bits/locale_facets.h" 3 const char_type* toupper(char_type *__lo, const char_type* __hi) const { return this->do_toupper(__lo, __hi); } # 252 "/usr/include/c++/4.5/bits/locale_facets.h" 3 char_type tolower(char_type __c) const { return this->do_tolower(__c); } # 267 "/usr/include/c++/4.5/bits/locale_facets.h" 3 const char_type* tolower(char_type* __lo, const char_type* __hi) const { return this->do_tolower(__lo, __hi); } # 284 "/usr/include/c++/4.5/bits/locale_facets.h" 3 char_type widen(char __c) const { return this->do_widen(__c); } # 303 "/usr/include/c++/4.5/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); } # 322 "/usr/include/c++/4.5/bits/locale_facets.h" 3 char narrow(char_type __c, char __dfault) const { return this->do_narrow(__c, __dfault); } # 344 "/usr/include/c++/4.5/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() { } # 369 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual bool do_is(mask __m, char_type __c) const = 0; # 388 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const = 0; # 407 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const = 0; # 426 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const = 0; # 444 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual char_type do_toupper(char_type) const = 0; # 461 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const = 0; # 477 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual char_type do_tolower(char_type) const = 0; # 494 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const = 0; # 513 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual char_type do_widen(char) const = 0; # 534 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __dest) const = 0; # 556 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual char do_narrow(char_type, char __dfault) const = 0; # 580 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __dest) const = 0; }; # 603 "/usr/include/c++/4.5/bits/locale_facets.h" 3 template 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* __dest) const; }; template locale::id ctype<_CharT>::id; # 672 "/usr/include/c++/4.5/bits/locale_facets.h" 3 template<> class ctype : 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(-1)]; mutable char _M_narrow[1 + static_cast(-1)]; mutable char _M_narrow_ok; public: static locale::id id; static const size_t table_size = 1 + static_cast(-1); # 709 "/usr/include/c++/4.5/bits/locale_facets.h" 3 explicit ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); # 722 "/usr/include/c++/4.5/bits/locale_facets.h" 3 explicit ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, size_t __refs = 0); # 735 "/usr/include/c++/4.5/bits/locale_facets.h" 3 inline bool is(mask __m, char __c) const; # 750 "/usr/include/c++/4.5/bits/locale_facets.h" 3 inline const char* is(const char* __lo, const char* __hi, mask* __vec) const; # 764 "/usr/include/c++/4.5/bits/locale_facets.h" 3 inline const char* scan_is(mask __m, const char* __lo, const char* __hi) const; # 778 "/usr/include/c++/4.5/bits/locale_facets.h" 3 inline const char* scan_not(mask __m, const char* __lo, const char* __hi) const; # 793 "/usr/include/c++/4.5/bits/locale_facets.h" 3 char_type toupper(char_type __c) const { return this->do_toupper(__c); } # 810 "/usr/include/c++/4.5/bits/locale_facets.h" 3 const char_type* toupper(char_type *__lo, const char_type* __hi) const { return this->do_toupper(__lo, __hi); } # 826 "/usr/include/c++/4.5/bits/locale_facets.h" 3 char_type tolower(char_type __c) const { return this->do_tolower(__c); } # 843 "/usr/include/c++/4.5/bits/locale_facets.h" 3 const char_type* tolower(char_type* __lo, const char_type* __hi) const { return this->do_tolower(__lo, __hi); } # 863 "/usr/include/c++/4.5/bits/locale_facets.h" 3 char_type widen(char __c) const { if (_M_widen_ok) return _M_widen[static_cast(__c)]; this->_M_widen_init(); return this->do_widen(__c); } # 890 "/usr/include/c++/4.5/bits/locale_facets.h" 3 const char* widen(const char* __lo, const char* __hi, char_type* __to) const { if (_M_widen_ok == 1) { __builtin_memcpy(__to, __lo, __hi - __lo); return __hi; } if (!_M_widen_ok) _M_widen_init(); return this->do_widen(__lo, __hi, __to); } # 921 "/usr/include/c++/4.5/bits/locale_facets.h" 3 char narrow(char_type __c, char __dfault) const { if (_M_narrow[static_cast(__c)]) return _M_narrow[static_cast(__c)]; const char __t = do_narrow(__c, __dfault); if (__t != __dfault) _M_narrow[static_cast(__c)] = __t; return __t; } # 954 "/usr/include/c++/4.5/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)) { __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(); # 1003 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual char_type do_toupper(char_type) const; # 1020 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; # 1036 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual char_type do_tolower(char_type) const; # 1053 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; # 1073 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual char_type do_widen(char __c) const { return __c; } # 1096 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __dest) const { __builtin_memcpy(__dest, __lo, __hi - __lo); return __hi; } # 1122 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual char do_narrow(char_type __c, char) const { return __c; } # 1148 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char, char* __dest) const { __builtin_memcpy(__dest, __lo, __hi - __lo); return __hi; } private: void _M_narrow_init() const; void _M_widen_init() const; }; # 1173 "/usr/include/c++/4.5/bits/locale_facets.h" 3 template<> class ctype : public __ctype_abstract_base { 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(-1)]; mask _M_bit[16]; __wmask_type _M_wmask[16]; public: static locale::id id; # 1206 "/usr/include/c++/4.5/bits/locale_facets.h" 3 explicit ctype(size_t __refs = 0); # 1217 "/usr/include/c++/4.5/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(); # 1241 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual bool do_is(mask __m, char_type __c) const; # 1260 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; # 1278 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; # 1296 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const; # 1313 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual char_type do_toupper(char_type) const; # 1330 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; # 1346 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual char_type do_tolower(char_type) const; # 1363 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; # 1383 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual char_type do_widen(char) const; # 1405 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __dest) const; # 1428 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual char do_narrow(char_type, char __dfault) const; # 1454 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __dest) const; void _M_initialize_ctype() throw(); }; template class ctype_byname : public ctype<_CharT> { public: typedef typename ctype<_CharT>::mask mask; explicit ctype_byname(const char* __s, size_t __refs = 0); protected: virtual ~ctype_byname() { }; }; template<> class ctype_byname : public ctype { public: explicit ctype_byname(const char* __s, size_t __refs = 0); protected: virtual ~ctype_byname(); }; template<> class ctype_byname : public ctype { public: explicit ctype_byname(const char* __s, size_t __refs = 0); protected: virtual ~ctype_byname(); }; } # 1 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/ctype_inline.h" 1 3 # 37 "/usr/include/c++/4.5/x86_64-linux-gnu/bits/ctype_inline.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { bool ctype:: is(mask __m, char __c) const { return _M_table[static_cast(__c)] & __m; } const char* ctype:: is(const char* __low, const char* __high, mask* __vec) const { while (__low < __high) *__vec++ = _M_table[static_cast(*__low++)]; return __high; } const char* ctype:: scan_is(mask __m, const char* __low, const char* __high) const { while (__low < __high && !(_M_table[static_cast(*__low)] & __m)) ++__low; return __low; } const char* ctype:: scan_not(mask __m, const char* __low, const char* __high) const { while (__low < __high && (_M_table[static_cast(*__low)] & __m) != 0) ++__low; return __low; } } # 1510 "/usr/include/c++/4.5/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 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(__null), _M_grouping_size(0), _M_use_grouping(false), _M_truename(__null), _M_truename_size(0), _M_falsename(__null), _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 __numpunct_cache<_CharT>::~__numpunct_cache() { if (_M_allocated) { delete [] _M_grouping; delete [] _M_truename; delete [] _M_falsename; } } # 1635 "/usr/include/c++/4.5/bits/locale_facets.h" 3 template 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(__null) { _M_initialize_numpunct(); } # 1672 "/usr/include/c++/4.5/bits/locale_facets.h" 3 explicit numpunct(__cache_type* __cache, size_t __refs = 0) : facet(__refs), _M_data(__cache) { _M_initialize_numpunct(); } # 1686 "/usr/include/c++/4.5/bits/locale_facets.h" 3 explicit numpunct(__c_locale __cloc, size_t __refs = 0) : facet(__refs), _M_data(__null) { _M_initialize_numpunct(__cloc); } # 1700 "/usr/include/c++/4.5/bits/locale_facets.h" 3 char_type decimal_point() const { return this->do_decimal_point(); } # 1713 "/usr/include/c++/4.5/bits/locale_facets.h" 3 char_type thousands_sep() const { return this->do_thousands_sep(); } # 1744 "/usr/include/c++/4.5/bits/locale_facets.h" 3 string grouping() const { return this->do_grouping(); } # 1757 "/usr/include/c++/4.5/bits/locale_facets.h" 3 string_type truename() const { return this->do_truename(); } # 1770 "/usr/include/c++/4.5/bits/locale_facets.h" 3 string_type falsename() const { return this->do_falsename(); } protected: virtual ~numpunct(); # 1787 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual char_type do_decimal_point() const { return _M_data->_M_decimal_point; } # 1799 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual char_type do_thousands_sep() const { return _M_data->_M_thousands_sep; } # 1812 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual string do_grouping() const { return _M_data->_M_grouping; } # 1825 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual string_type do_truename() const { return _M_data->_M_truename; } # 1838 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual string_type do_falsename() const { return _M_data->_M_falsename; } void _M_initialize_numpunct(__c_locale __cloc = __null); }; template locale::id numpunct<_CharT>::id; template<> numpunct::~numpunct(); template<> void numpunct::_M_initialize_numpunct(__c_locale __cloc); template<> numpunct::~numpunct(); template<> void numpunct::_M_initialize_numpunct(__c_locale __cloc); template 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); } } protected: virtual ~numpunct_byname() { } }; # 1908 "/usr/include/c++/4.5/bits/locale_facets.h" 3 template class num_get : public locale::facet { public: typedef _CharT char_type; typedef _InIter iter_type; static locale::id id; # 1929 "/usr/include/c++/4.5/bits/locale_facets.h" 3 explicit num_get(size_t __refs = 0) : facet(__refs) { } # 1955 "/usr/include/c++/4.5/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); } # 1991 "/usr/include/c++/4.5/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); } # 2050 "/usr/include/c++/4.5/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); } # 2092 "/usr/include/c++/4.5/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() { } iter_type _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, string&) const; template iter_type _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, _ValueT&) const; template 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 __gnu_cxx::__enable_if::__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; } # 2163 "/usr/include/c++/4.5/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& __err, float&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, double&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, long double&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, void*&) const; # 2228 "/usr/include/c++/4.5/bits/locale_facets.h" 3 }; template locale::id num_get<_CharT, _InIter>::id; # 2246 "/usr/include/c++/4.5/bits/locale_facets.h" 3 template class num_put : public locale::facet { public: typedef _CharT char_type; typedef _OutIter iter_type; static locale::id id; # 2267 "/usr/include/c++/4.5/bits/locale_facets.h" 3 explicit num_put(size_t __refs = 0) : facet(__refs) { } # 2285 "/usr/include/c++/4.5/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const { return this->do_put(__s, __f, __fill, __v); } # 2327 "/usr/include/c++/4.5/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __f, char_type __fill, long __v) const { return this->do_put(__s, __f, __fill, __v); } iter_type put(iter_type __s, ios_base& __f, char_type __fill, unsigned long __v) const { return this->do_put(__s, __f, __fill, __v); } iter_type put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const { return this->do_put(__s, __f, __fill, __v); } iter_type put(iter_type __s, ios_base& __f, char_type __fill, unsigned long long __v) const { return this->do_put(__s, __f, __fill, __v); } # 2390 "/usr/include/c++/4.5/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __f, char_type __fill, double __v) const { return this->do_put(__s, __f, __fill, __v); } iter_type put(iter_type __s, ios_base& __f, char_type __fill, long double __v) const { return this->do_put(__s, __f, __fill, __v); } # 2415 "/usr/include/c++/4.5/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __f, char_type __fill, const void* __v) const { return this->do_put(__s, __f, __fill, __v); } protected: template 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 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() { }; # 2463 "/usr/include/c++/4.5/bits/locale_facets.h" 3 virtual iter_type do_put(iter_type, ios_base&, 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 __fill, double __v) const; virtual iter_type do_put(iter_type, ios_base&, char_type __fill, long double __v) const; virtual iter_type do_put(iter_type, ios_base&, char_type __fill, const void* __v) const; }; template locale::id num_put<_CharT, _OutIter>::id; template inline bool isspace(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::space, __c); } template inline bool isprint(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::print, __c); } template inline bool iscntrl(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::cntrl, __c); } template inline bool isupper(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::upper, __c); } template inline bool islower(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::lower, __c); } template inline bool isalpha(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::alpha, __c); } template inline bool isdigit(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::digit, __c); } template inline bool ispunct(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::punct, __c); } template inline bool isxdigit(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::xdigit, __c); } template inline bool isalnum(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::alnum, __c); } template inline bool isgraph(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::graph, __c); } template inline _CharT toupper(_CharT __c, const locale& __loc) { return use_facet >(__loc).toupper(__c); } template inline _CharT tolower(_CharT __c, const locale& __loc) { return use_facet >(__loc).tolower(__c); } } # 1 "/usr/include/c++/4.5/bits/locale_facets.tcc" 1 3 # 35 "/usr/include/c++/4.5/bits/locale_facets.tcc" 3 # 36 "/usr/include/c++/4.5/bits/locale_facets.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct __use_cache { const _Facet* operator() (const locale& __loc) const; }; template 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 = __null; 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*>(__caches[__i]); } }; template void __numpunct_cache<_CharT>::_M_cache(const locale& __loc) { _M_allocated = true; const numpunct<_CharT>& __np = use_facet >(__loc); char* __grouping = 0; _CharT* __truename = 0; _CharT* __falsename = 0; if (true) { _M_grouping_size = __np.grouping().size(); __grouping = new char[_M_grouping_size]; __np.grouping().copy(__grouping, _M_grouping_size); _M_grouping = __grouping; _M_use_grouping = (_M_grouping_size && static_cast(_M_grouping[0]) > 0 && (_M_grouping[0] != __gnu_cxx::__numeric_traits::__max)); _M_truename_size = __np.truename().size(); __truename = new _CharT[_M_truename_size]; __np.truename().copy(__truename, _M_truename_size); _M_truename = __truename; _M_falsename_size = __np.falsename().size(); __falsename = new _CharT[_M_falsename_size]; __np.falsename().copy(__falsename, _M_falsename_size); _M_falsename = __falsename; _M_decimal_point = __np.decimal_point(); _M_thousands_sep = __np.thousands_sep(); const ctype<_CharT>& __ct = use_facet >(__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); } if (false) { delete [] __grouping; delete [] __truename; delete [] __falsename; ; } } # 136 "/usr/include/c++/4.5/bits/locale_facets.tcc" 3 __attribute__ ((__pure__)) bool __verify_grouping(const char* __grouping, size_t __grouping_size, const string& __grouping_tmp) throw (); template _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(__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(__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(__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(__sep_pos); if (!std::__verify_grouping(__lc->_M_grouping, __lc->_M_grouping_size, __found_grouping)) __err = ios_base::failbit; } return __beg; } template template _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); string __found_grouping; if (__lc->_M_use_grouping) __found_grouping.reserve(32); bool __testfail = false; bool __testoverflow = false; const __unsigned_type __max = (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) ? -__gnu_cxx::__numeric_traits<_ValueT>::__min : __gnu_cxx::__numeric_traits<_ValueT>::__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(__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(__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 && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) __v = __gnu_cxx::__numeric_traits<_ValueT>::__min; else __v = __gnu_cxx::__numeric_traits<_ValueT>::__max; __err = ios_base::failbit; } else __v = __negative ? -__result : __result; if (__testeof) __err |= ios_base::eofbit; return __beg; } template _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 _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 _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; } # 730 "/usr/include/c++/4.5/bits/locale_facets.tcc" 3 template _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 _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(__ul); return __beg; } template 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(__w); } template 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 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 template _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(__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 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; } # 966 "/usr/include/c++/4.5/bits/locale_facets.tcc" 3 template template _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); int __cs_size = __max_digits * 3; char* __cs = static_cast(__builtin_alloca(__cs_size)); __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, __prec, __v); if (__len >= __cs_size) { __cs_size = __len + 1; __cs = static_cast(__builtin_alloca(__cs_size)); __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, __prec, __v); } # 1027 "/usr/include/c++/4.5/bits/locale_facets.tcc" 3 const ctype<_CharT>& __ctype = use_facet >(__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::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(__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 _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(__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 _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); } # 1152 "/usr/include/c++/4.5/bits/locale_facets.tcc" 3 template _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 _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; } # 1189 "/usr/include/c++/4.5/bits/locale_facets.tcc" 3 template 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(__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 >(__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 _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(__gbeg[__idx]) > 0 && __gbeg[__idx] != __gnu_cxx::__numeric_traits::__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 numpunct; extern template class numpunct_byname; extern template class num_get; extern template class num_put; extern template class ctype_byname; extern template const ctype& use_facet >(const locale&); extern template const numpunct& use_facet >(const locale&); extern template const num_put& use_facet >(const locale&); extern template const num_get& use_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template class numpunct; extern template class numpunct_byname; extern template class num_get; extern template class num_put; extern template class ctype_byname; extern template const ctype& use_facet >(const locale&); extern template const numpunct& use_facet >(const locale&); extern template const num_put& use_facet >(const locale&); extern template const num_get& use_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); } # 2602 "/usr/include/c++/4.5/bits/locale_facets.h" 2 3 # 40 "/usr/include/c++/4.5/bits/basic_ios.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline const _Facet& __check_facet(const _Facet* __f) { if (!__f) __throw_bad_cast(); return *__f; } # 61 "/usr/include/c++/4.5/bits/basic_ios.h" 3 template 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: operator void*() const { return this->fail() ? 0 : const_cast(this); } bool operator!() const { return this->fail(); } # 126 "/usr/include/c++/4.5/bits/basic_ios.h" 3 iostate rdstate() const { return _M_streambuf_state; } # 137 "/usr/include/c++/4.5/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; } # 190 "/usr/include/c++/4.5/bits/basic_ios.h" 3 bool fail() const { return (this->rdstate() & (badbit | failbit)) != 0; } bool bad() const { return (this->rdstate() & badbit) != 0; } # 211 "/usr/include/c++/4.5/bits/basic_ios.h" 3 iostate exceptions() const { return _M_exception; } # 246 "/usr/include/c++/4.5/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() { } # 284 "/usr/include/c++/4.5/bits/basic_ios.h" 3 basic_ostream<_CharT, _Traits>* tie() const { return _M_tie; } # 296 "/usr/include/c++/4.5/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; } # 336 "/usr/include/c++/4.5/bits/basic_ios.h" 3 basic_streambuf<_CharT, _Traits>* rdbuf(basic_streambuf<_CharT, _Traits>* __sb); # 350 "/usr/include/c++/4.5/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; } # 379 "/usr/include/c++/4.5/bits/basic_ios.h" 3 char_type fill(char_type __ch) { char_type __old = this->fill(); _M_fill = __ch; return __old; } # 399 "/usr/include/c++/4.5/bits/basic_ios.h" 3 locale imbue(const locale& __loc); # 419 "/usr/include/c++/4.5/bits/basic_ios.h" 3 char narrow(char_type __c, char __dfault) const { return __check_facet(_M_ctype).narrow(__c, __dfault); } # 438 "/usr/include/c++/4.5/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); void _M_cache_locale(const locale& __loc); }; } # 1 "/usr/include/c++/4.5/bits/basic_ios.tcc" 1 3 # 34 "/usr/include/c++/4.5/bits/basic_ios.tcc" 3 # 35 "/usr/include/c++/4.5/bits/basic_ios.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template 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 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 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 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 void basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) { ios_base::_M_init(); _M_cache_locale(_M_ios_locale); # 145 "/usr/include/c++/4.5/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 void basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) { if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) _M_ctype = &use_facet<__ctype_type>(__loc); else _M_ctype = 0; if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) _M_num_put = &use_facet<__num_put_type>(__loc); else _M_num_put = 0; if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) _M_num_get = &use_facet<__num_get_type>(__loc); else _M_num_get = 0; } extern template class basic_ios; extern template class basic_ios; } # 472 "/usr/include/c++/4.5/bits/basic_ios.h" 2 3 # 46 "/usr/include/c++/4.5/ios" 2 3 # 41 "/usr/include/c++/4.5/ostream" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 54 "/usr/include/c++/4.5/ostream" 3 template 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; # 81 "/usr/include/c++/4.5/ostream" 3 explicit basic_ostream(__streambuf_type* __sb) { this->init(__sb); } virtual ~basic_ostream() { } class sentry; friend class sentry; # 107 "/usr/include/c++/4.5/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; } # 164 "/usr/include/c++/4.5/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(__n)); } __ostream_type& operator<<(int __n); __ostream_type& operator<<(unsigned int __n) { return _M_insert(static_cast(__n)); } __ostream_type& operator<<(long long __n) { return _M_insert(__n); } __ostream_type& operator<<(unsigned long long __n) { return _M_insert(__n); } __ostream_type& operator<<(double __f) { return _M_insert(__f); } __ostream_type& operator<<(float __f) { return _M_insert(static_cast(__f)); } __ostream_type& operator<<(long double __f) { return _M_insert(__f); } __ostream_type& operator<<(const void* __p) { return _M_insert(__p); } # 249 "/usr/include/c++/4.5/ostream" 3 __ostream_type& operator<<(__streambuf_type* __sb); # 282 "/usr/include/c++/4.5/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); } # 310 "/usr/include/c++/4.5/ostream" 3 __ostream_type& write(const char_type* __s, streamsize __n); # 323 "/usr/include/c++/4.5/ostream" 3 __ostream_type& flush(); # 334 "/usr/include/c++/4.5/ostream" 3 pos_type tellp(); # 345 "/usr/include/c++/4.5/ostream" 3 __ostream_type& seekp(pos_type); # 357 "/usr/include/c++/4.5/ostream" 3 __ostream_type& seekp(off_type, ios_base::seekdir); protected: basic_ostream() { this->init(0); } template __ostream_type& _M_insert(_ValueT __v); }; # 376 "/usr/include/c++/4.5/ostream" 3 template class basic_ostream<_CharT, _Traits>::sentry { bool _M_ok; basic_ostream<_CharT, _Traits>& _M_os; public: # 395 "/usr/include/c++/4.5/ostream" 3 explicit sentry(basic_ostream<_CharT, _Traits>& __os); # 405 "/usr/include/c++/4.5/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); } } # 426 "/usr/include/c++/4.5/ostream" 3 operator bool() const { return _M_ok; } }; # 447 "/usr/include/c++/4.5/ostream" 3 template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) { return __ostream_insert(__out, &__c, 1); } template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) { return (__out << __out.widen(__c)); } template inline basic_ostream& operator<<(basic_ostream& __out, char __c) { return __ostream_insert(__out, &__c, 1); } template inline basic_ostream& operator<<(basic_ostream& __out, signed char __c) { return (__out << static_cast(__c)); } template inline basic_ostream& operator<<(basic_ostream& __out, unsigned char __c) { return (__out << static_cast(__c)); } # 489 "/usr/include/c++/4.5/ostream" 3 template 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(_Traits::length(__s))); return __out; } template basic_ostream<_CharT, _Traits> & operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); template inline basic_ostream& operator<<(basic_ostream& __out, const char* __s) { if (!__s) __out.setstate(ios_base::badbit); else __ostream_insert(__out, __s, static_cast(_Traits::length(__s))); return __out; } template inline basic_ostream& operator<<(basic_ostream& __out, const signed char* __s) { return (__out << reinterpret_cast(__s)); } template inline basic_ostream & operator<<(basic_ostream& __out, const unsigned char* __s) { return (__out << reinterpret_cast(__s)); } # 539 "/usr/include/c++/4.5/ostream" 3 template inline basic_ostream<_CharT, _Traits>& endl(basic_ostream<_CharT, _Traits>& __os) { return flush(__os.put(__os.widen('\n'))); } template inline basic_ostream<_CharT, _Traits>& ends(basic_ostream<_CharT, _Traits>& __os) { return __os.put(_CharT()); } template inline basic_ostream<_CharT, _Traits>& flush(basic_ostream<_CharT, _Traits>& __os) { return __os.flush(); } # 583 "/usr/include/c++/4.5/ostream" 3 } # 1 "/usr/include/c++/4.5/bits/ostream.tcc" 1 3 # 39 "/usr/include/c++/4.5/bits/ostream.tcc" 3 # 40 "/usr/include/c++/4.5/bits/ostream.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template 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 template 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 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(static_cast(__n))); else return _M_insert(static_cast(__n)); } template 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(static_cast(__n))); else return _M_insert(static_cast(__n)); } template 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 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 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 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 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 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 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 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::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; 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; 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*); } # 587 "/usr/include/c++/4.5/ostream" 2 3 # 66 "/usr/include/c++/4.5/iterator" 2 3 # 1 "/usr/include/c++/4.5/istream" 1 3 # 38 "/usr/include/c++/4.5/istream" 3 # 39 "/usr/include/c++/4.5/istream" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 54 "/usr/include/c++/4.5/istream" 3 template 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: # 90 "/usr/include/c++/4.5/istream" 3 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/include/c++/4.5/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; } # 166 "/usr/include/c++/4.5/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); } __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); } __istream_type& operator>>(void*& __p) { return _M_extract(__p); } # 238 "/usr/include/c++/4.5/istream" 3 __istream_type& operator>>(__streambuf_type* __sb); # 248 "/usr/include/c++/4.5/istream" 3 streamsize gcount() const { return _M_gcount; } # 280 "/usr/include/c++/4.5/istream" 3 int_type get(); # 294 "/usr/include/c++/4.5/istream" 3 __istream_type& get(char_type& __c); # 321 "/usr/include/c++/4.5/istream" 3 __istream_type& get(char_type* __s, streamsize __n, char_type __delim); # 332 "/usr/include/c++/4.5/istream" 3 __istream_type& get(char_type* __s, streamsize __n) { return this->get(__s, __n, this->widen('\n')); } # 355 "/usr/include/c++/4.5/istream" 3 __istream_type& get(__streambuf_type& __sb, char_type __delim); # 365 "/usr/include/c++/4.5/istream" 3 __istream_type& get(__streambuf_type& __sb) { return this->get(__sb, this->widen('\n')); } # 394 "/usr/include/c++/4.5/istream" 3 __istream_type& getline(char_type* __s, streamsize __n, char_type __delim); # 405 "/usr/include/c++/4.5/istream" 3 __istream_type& getline(char_type* __s, streamsize __n) { return this->getline(__s, __n, this->widen('\n')); } # 429 "/usr/include/c++/4.5/istream" 3 __istream_type& ignore(); __istream_type& ignore(streamsize __n); __istream_type& ignore(streamsize __n, int_type __delim); # 446 "/usr/include/c++/4.5/istream" 3 int_type peek(); # 464 "/usr/include/c++/4.5/istream" 3 __istream_type& read(char_type* __s, streamsize __n); # 483 "/usr/include/c++/4.5/istream" 3 streamsize readsome(char_type* __s, streamsize __n); # 499 "/usr/include/c++/4.5/istream" 3 __istream_type& putback(char_type __c); # 514 "/usr/include/c++/4.5/istream" 3 __istream_type& unget(); # 532 "/usr/include/c++/4.5/istream" 3 int sync(); # 546 "/usr/include/c++/4.5/istream" 3 pos_type tellg(); # 561 "/usr/include/c++/4.5/istream" 3 __istream_type& seekg(pos_type); # 577 "/usr/include/c++/4.5/istream" 3 __istream_type& seekg(off_type, ios_base::seekdir); protected: basic_istream() : _M_gcount(streamsize(0)) { this->init(0); } template __istream_type& _M_extract(_ValueT& __v); }; template<> basic_istream& basic_istream:: getline(char_type* __s, streamsize __n, char_type __delim); template<> basic_istream& basic_istream:: ignore(streamsize __n); template<> basic_istream& basic_istream:: ignore(streamsize __n, int_type __delim); template<> basic_istream& basic_istream:: getline(char_type* __s, streamsize __n, char_type __delim); template<> basic_istream& basic_istream:: ignore(streamsize __n); template<> basic_istream& basic_istream:: ignore(streamsize __n, int_type __delim); # 632 "/usr/include/c++/4.5/istream" 3 template 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; # 668 "/usr/include/c++/4.5/istream" 3 explicit sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); # 681 "/usr/include/c++/4.5/istream" 3 operator bool() const { return _M_ok; } }; # 698 "/usr/include/c++/4.5/istream" 3 template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); template inline basic_istream& operator>>(basic_istream& __in, unsigned char& __c) { return (__in >> reinterpret_cast(__c)); } template inline basic_istream& operator>>(basic_istream& __in, signed char& __c) { return (__in >> reinterpret_cast(__c)); } # 740 "/usr/include/c++/4.5/istream" 3 template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); template<> basic_istream& operator>>(basic_istream& __in, char* __s); template inline basic_istream& operator>>(basic_istream& __in, unsigned char* __s) { return (__in >> reinterpret_cast(__s)); } template inline basic_istream& operator>>(basic_istream& __in, signed char* __s) { return (__in >> reinterpret_cast(__s)); } # 768 "/usr/include/c++/4.5/istream" 3 template 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() { } }; # 829 "/usr/include/c++/4.5/istream" 3 template basic_istream<_CharT, _Traits>& ws(basic_istream<_CharT, _Traits>& __is); # 851 "/usr/include/c++/4.5/istream" 3 } # 1 "/usr/include/c++/4.5/bits/istream.tcc" 1 3 # 39 "/usr/include/c++/4.5/bits/istream.tcc" 3 # 40 "/usr/include/c++/4.5/bits/istream.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template 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 (__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 (__in.good() && __err == ios_base::goodbit) _M_ok = true; else { __err |= ios_base::failbit; __in.setstate(__err); } } template template 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 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::__min) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits::__min; } else if (__l > __gnu_cxx::__numeric_traits::__max) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits::__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 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::__min) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits::__min; } else if (__l > __gnu_cxx::__numeric_traits::__max) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits::__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 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 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 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 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 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 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 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 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(); # 513 "/usr/include/c++/4.5/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::__max && !traits_type::eq_int_type(__c, __eof)) { _M_gcount = __gnu_cxx::__numeric_traits::__min; __large_ignore = true; } else break; } if (__large_ignore) _M_gcount = __gnu_cxx::__numeric_traits::__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 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::__max && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __delim)) { _M_gcount = __gnu_cxx::__numeric_traits::__min; __large_ignore = true; } else break; } if (__large_ignore) _M_gcount = __gnu_cxx::__numeric_traits::__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::__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 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 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 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 basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: putback(char_type __c) { _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 (!__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 basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: unget(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 (!__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 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 basic_istream<_CharT, _Traits>::pos_type basic_istream<_CharT, _Traits>:: tellg(void) { pos_type __ret = pos_type(-1); 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 basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: seekg(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::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 basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: seekg(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::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 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 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::__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 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; 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; extern template class basic_istream; 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; } # 855 "/usr/include/c++/4.5/istream" 2 3 # 67 "/usr/include/c++/4.5/iterator" 2 3 # 1 "/usr/include/c++/4.5/bits/stream_iterator.h" 1 3 # 33 "/usr/include/c++/4.5/bits/stream_iterator.h" 3 # 34 "/usr/include/c++/4.5/bits/stream_iterator.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template, typename _Dist = ptrdiff_t> class istream_iterator : public iterator { 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: istream_iterator() : _M_stream(0), _M_value(), _M_ok(false) {} istream_iterator(istream_type& __s) : _M_stream(&__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 &(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 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 inline bool operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) { return !__x._M_equal(__y); } # 150 "/usr/include/c++/4.5/bits/stream_iterator.h" 3 template > class ostream_iterator : public iterator { 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(&__s), _M_string(0) {} # 181 "/usr/include/c++/4.5/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; } }; } # 68 "/usr/include/c++/4.5/iterator" 2 3 # 31 "../llvm/include/llvm/Use.h" 2 namespace llvm { class Value; class User; class Use; template struct simplify_type; template<> class PointerLikeTypeTraits { public: static inline void *getAsVoidPointer(Use** P) { return P; } static inline Use **getFromVoidPointer(void *P) { return static_cast(P); } enum { NumLowBitsAvailable = 2 }; }; class Use { public: void swap(Use &RHS); typedef PointerIntPair UserRef; private: Use(const Use &U); ~Use() { if (Val) removeFromList(); } enum PrevPtrTag { zeroDigitTag , oneDigitTag , stopTag , fullStopTag }; Use(PrevPtrTag tag) : Val(0) { Prev.setInt(tag); } public: operator Value*() const { return Val; } Value *get() const { return Val; } User *getUser() const; inline void set(Value *Val); Value *operator=(Value *RHS) { set(RHS); return RHS; } const Use &operator=(const Use &RHS) { set(RHS.Val); return *this; } Value *operator->() { return Val; } const Value *operator->() const { return Val; } Use *getNext() const { return Next; } static Use *initTags(Use *Start, Use *Stop); static void zap(Use *Start, const Use *Stop, bool del = false); private: const Use* getImpliedUser() const; Value *Val; Use *Next; PointerIntPair Prev; void setPrev(Use **NewPrev) { Prev.setPointer(NewPrev); } void addToList(Use **List) { Next = *List; if (Next) Next->setPrev(&Next); setPrev(List); *List = this; } void removeFromList() { Use **StrippedPrev = Prev.getPointer(); *StrippedPrev = Next; if (Next) Next->setPrev(StrippedPrev); } friend class Value; }; template<> struct simplify_type { typedef Value* SimpleType; static SimpleType getSimplifiedValue(const Use &Val) { return static_cast(Val.get()); } }; template<> struct simplify_type { typedef Value* SimpleType; static SimpleType getSimplifiedValue(const Use &Val) { return static_cast(Val.get()); } }; template class value_use_iterator : public std::iterator { typedef std::iterator super; typedef value_use_iterator _Self; Use *U; explicit value_use_iterator(Use *u) : U(u) {} friend class Value; public: typedef typename super::reference reference; typedef typename super::pointer pointer; value_use_iterator(const _Self &I) : U(I.U) {} value_use_iterator() {} bool operator==(const _Self &x) const { return U == x.U; } bool operator!=(const _Self &x) const { return !operator==(x); } bool atEnd() const { return U == 0; } _Self &operator++() { ((U && "Cannot increment end iterator!") ? static_cast (0) : __assert_fail ("U && \"Cannot increment end iterator!\"", "../llvm/include/llvm/Use.h", 193, __PRETTY_FUNCTION__)); U = U->getNext(); return *this; } _Self operator++(int) { _Self tmp = *this; ++*this; return tmp; } UserTy *operator*() const { ((U && "Cannot dereference end iterator!") ? static_cast (0) : __assert_fail ("U && \"Cannot dereference end iterator!\"", "../llvm/include/llvm/Use.h", 203, __PRETTY_FUNCTION__)); return U->getUser(); } UserTy *operator->() const { return operator*(); } Use &getUse() const { return *U; } unsigned getOperandNo() const; }; } # 18 "../llvm/include/llvm/Value.h" 2 # 1 "../llvm/include/llvm/ADT/StringRef.h" 1 # 13 "../llvm/include/llvm/ADT/StringRef.h" # 1 "/usr/include/c++/4.5/cassert" 1 3 # 43 "/usr/include/c++/4.5/cassert" 3 # 44 "/usr/include/c++/4.5/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/include/c++/4.5/cassert" 2 3 # 14 "../llvm/include/llvm/ADT/StringRef.h" 2 # 1 "/usr/include/c++/4.5/cstring" 1 3 # 41 "/usr/include/c++/4.5/cstring" 3 # 42 "/usr/include/c++/4.5/cstring" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 45 "/usr/include/c++/4.5/cstring" 2 3 # 1 "/usr/include/string.h" 1 3 4 # 29 "/usr/include/string.h" 3 4 extern "C" { # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 35 "/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))); extern "C++" { extern void *memchr (void *__s, int __c, size_t __n) throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const void *memchr (__const void *__s, int __c, size_t __n) throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * memchr (void *__s, int __c, size_t __n) throw () { return __builtin_memchr (__s, __c, __n); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const void * memchr (__const void *__s, int __c, size_t __n) throw () { return __builtin_memchr (__s, __c, __n); } } extern "C++" void *rawmemchr (void *__s, int __c) throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" __const void *rawmemchr (__const void *__s, int __c) throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" void *memrchr (void *__s, int __c, size_t __n) throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" __const void *memrchr (__const void *__s, int __c, size_t __n) throw () __asm ("memrchr") __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))); # 165 "/usr/include/string.h" 3 4 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))); # 210 "/usr/include/string.h" 3 4 extern "C++" { extern char *strchr (char *__s, int __c) throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const char *strchr (__const char *__s, int __c) throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strchr (char *__s, int __c) throw () { return __builtin_strchr (__s, __c); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * strchr (__const char *__s, int __c) throw () { return __builtin_strchr (__s, __c); } } extern "C++" { extern char *strrchr (char *__s, int __c) throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const char *strrchr (__const char *__s, int __c) throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strrchr (char *__s, int __c) throw () { return __builtin_strrchr (__s, __c); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * strrchr (__const char *__s, int __c) throw () { return __builtin_strrchr (__s, __c); } } extern "C++" char *strchrnul (char *__s, int __c) throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" __const char *strchrnul (__const char *__s, int __c) throw () __asm ("strchrnul") __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))); extern "C++" { extern char *strpbrk (char *__s, __const char *__accept) throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern __const char *strpbrk (__const char *__s, __const char *__accept) throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strpbrk (char *__s, __const char *__accept) throw () { return __builtin_strpbrk (__s, __accept); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * strpbrk (__const char *__s, __const char *__accept) throw () { return __builtin_strpbrk (__s, __accept); } } extern "C++" { extern char *strstr (char *__haystack, __const char *__needle) throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern __const char *strstr (__const char *__haystack, __const char *__needle) throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strstr (char *__haystack, __const char *__needle) throw () { return __builtin_strstr (__haystack, __needle); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * strstr (__const char *__haystack, __const char *__needle) throw () { return __builtin_strstr (__haystack, __needle); } } 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))); extern "C++" char *strcasestr (char *__haystack, __const char *__needle) throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern "C++" __const char *strcasestr (__const char *__haystack, __const char *__needle) throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 382 "/usr/include/string.h" 3 4 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 (); # 438 "/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 (); extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); 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))); extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern "C++" { extern char *index (char *__s, int __c) throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const char *index (__const char *__s, int __c) throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * index (char *__s, int __c) throw () { return __builtin_index (__s, __c); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * index (__const char *__s, int __c) throw () { return __builtin_index (__s, __c); } } extern "C++" { extern char *rindex (char *__s, int __c) throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const char *rindex (__const char *__s, int __c) throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * rindex (char *__s, int __c) throw () { return __builtin_rindex (__s, __c); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * rindex (__const char *__s, int __c) throw () { return __builtin_rindex (__s, __c); } } 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))); 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))); extern "C++" char *basename (char *__filename) throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); extern "C++" __const char *basename (__const char *__filename) throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); # 642 "/usr/include/string.h" 3 4 # 1 "/usr/include/bits/string3.h" 1 3 4 # 23 "/usr/include/bits/string3.h" 3 4 extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) ; # 48 "/usr/include/bits/string3.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () { return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * memmove (void *__dest, __const void *__src, size_t __len) throw () { return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () { return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } # 76 "/usr/include/bits/string3.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * memset (void *__dest, int __ch, size_t __len) throw () { if (__builtin_constant_p (__len) && __len == 0 && (!__builtin_constant_p (__ch) || __ch != 0)) { __warn_memset_zero_len (); return __dest; } return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void bcopy (__const void *__src, void *__dest, size_t __len) throw () { (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void bzero (void *__dest, size_t __len) throw () { (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strcpy (char *__restrict __dest, __const char *__restrict __src) throw () { return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () { return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () { return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); } extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, size_t __destlen) throw (); extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) throw () __asm__ ("" "stpncpy") ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * stpncpy (char *__dest, __const char *__src, size_t __n) throw () { if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); return __stpncpy_alias (__dest, __src, __n); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strcat (char *__restrict __dest, __const char *__restrict __src) throw () { return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () { return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); } # 643 "/usr/include/string.h" 2 3 4 } # 46 "/usr/include/c++/4.5/cstring" 2 3 # 74 "/usr/include/c++/4.5/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; # 121 "/usr/include/c++/4.5/cstring" 3 } # 15 "../llvm/include/llvm/ADT/StringRef.h" 2 # 1 "/usr/include/c++/4.5/utility" 1 3 # 59 "/usr/include/c++/4.5/utility" 3 # 60 "/usr/include/c++/4.5/utility" 3 # 70 "/usr/include/c++/4.5/utility" 3 # 1 "/usr/include/c++/4.5/bits/stl_relops.h" 1 3 # 67 "/usr/include/c++/4.5/bits/stl_relops.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { namespace rel_ops { # 83 "/usr/include/c++/4.5/bits/stl_relops.h" 3 template inline bool operator!=(const _Tp& __x, const _Tp& __y) { return !(__x == __y); } # 96 "/usr/include/c++/4.5/bits/stl_relops.h" 3 template inline bool operator>(const _Tp& __x, const _Tp& __y) { return __y < __x; } # 109 "/usr/include/c++/4.5/bits/stl_relops.h" 3 template inline bool operator<=(const _Tp& __x, const _Tp& __y) { return !(__y < __x); } # 122 "/usr/include/c++/4.5/bits/stl_relops.h" 3 template inline bool operator>=(const _Tp& __x, const _Tp& __y) { return !(__x < __y); } } } # 71 "/usr/include/c++/4.5/utility" 2 3 # 16 "../llvm/include/llvm/ADT/StringRef.h" 2 namespace llvm { template class SmallVectorImpl; class APInt; # 30 "../llvm/include/llvm/ADT/StringRef.h" class StringRef { public: typedef const char *iterator; typedef const char *const_iterator; static const size_t npos = ~size_t(0); typedef size_t size_type; private: const char *Data; size_t Length; static size_t min(size_t a, size_t b) { return a < b ? a : b; } static size_t max(size_t a, size_t b) { return a > b ? a : b; } static int compareMemory(const char *Lhs, const char *Rhs, size_t Length) { if (Length == 0) { return 0; } return ::memcmp(Lhs,Rhs,Length); } public: StringRef() : Data(0), Length(0) {} StringRef(const char *Str) : Data(Str) { ((Str && "StringRef cannot be built from a NULL argument") ? static_cast (0) : __assert_fail ("Str && \"StringRef cannot be built from a NULL argument\"", "../llvm/include/llvm/ADT/StringRef.h", 67, __PRETTY_FUNCTION__)); Length = ::strlen(Str); } StringRef(const char *data, size_t length) : Data(data), Length(length) { (((data || length == 0) && "StringRef cannot be built from a NULL argument with non-null length") ? static_cast (0) : __assert_fail ("(data || length == 0) && \"StringRef cannot be built from a NULL argument with non-null length\"", "../llvm/include/llvm/ADT/StringRef.h" # 74 "../llvm/include/llvm/ADT/StringRef.h" , 75 # 74 "../llvm/include/llvm/ADT/StringRef.h" , __PRETTY_FUNCTION__)) ; } StringRef(const std::string &Str) : Data(Str.data()), Length(Str.length()) {} iterator begin() const { return Data; } iterator end() const { return Data + Length; } const char *data() const { return Data; } bool empty() const { return Length == 0; } size_t size() const { return Length; } char front() const { ((!empty()) ? static_cast (0) : __assert_fail ("!empty()", "../llvm/include/llvm/ADT/StringRef.h", 106, __PRETTY_FUNCTION__)); return Data[0]; } char back() const { ((!empty()) ? static_cast (0) : __assert_fail ("!empty()", "../llvm/include/llvm/ADT/StringRef.h", 112, __PRETTY_FUNCTION__)); return Data[Length-1]; } bool equals(StringRef RHS) const { return (Length == RHS.Length && compareMemory(Data, RHS.Data, RHS.Length) == 0); } bool equals_lower(StringRef RHS) const { return Length == RHS.Length && compare_lower(RHS) == 0; } int compare(StringRef RHS) const { if (int Res = compareMemory(Data, RHS.Data, min(Length, RHS.Length))) return Res < 0 ? -1 : 1; if (Length == RHS.Length) return 0; return Length < RHS.Length ? -1 : 1; } int compare_lower(StringRef RHS) const; int compare_numeric(StringRef RHS) const; # 166 "../llvm/include/llvm/ADT/StringRef.h" unsigned edit_distance(StringRef Other, bool AllowReplacements = true, unsigned MaxEditDistance = 0); std::string str() const { if (Data == 0) return std::string(); return std::string(Data, Length); } char operator[](size_t Index) const { ((Index < Length && "Invalid index!") ? static_cast (0) : __assert_fail ("Index < Length && \"Invalid index!\"", "../llvm/include/llvm/ADT/StringRef.h", 180, __PRETTY_FUNCTION__)); return Data[Index]; } operator std::string() const { return str(); } bool startswith(StringRef Prefix) const { return Length >= Prefix.Length && compareMemory(Data, Prefix.Data, Prefix.Length) == 0; } bool endswith(StringRef Suffix) const { return Length >= Suffix.Length && compareMemory(end() - Suffix.Length, Suffix.Data, Suffix.Length) == 0; } # 216 "../llvm/include/llvm/ADT/StringRef.h" size_t find(char C, size_t From = 0) const { for (size_t i = min(From, Length), e = Length; i != e; ++i) if (Data[i] == C) return i; return npos; } size_t find(StringRef Str, size_t From = 0) const; size_t rfind(char C, size_t From = npos) const { From = min(From, Length); size_t i = From; while (i != 0) { --i; if (Data[i] == C) return i; } return npos; } size_t rfind(StringRef Str) const; size_type find_first_of(char C, size_t From = 0) const { return find(C, From); } size_type find_first_of(StringRef Chars, size_t From = 0) const; size_type find_first_not_of(char C, size_t From = 0) const; size_type find_first_not_of(StringRef Chars, size_t From = 0) const; size_type find_last_of(char C, size_t From = npos) const { return rfind(C, From); } size_type find_last_of(StringRef Chars, size_t From = npos) const; 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; # 309 "../llvm/include/llvm/ADT/StringRef.h" bool getAsInteger(unsigned Radix, long long &Result) const; bool getAsInteger(unsigned Radix, unsigned long long &Result) const; bool getAsInteger(unsigned Radix, int &Result) const; bool getAsInteger(unsigned Radix, unsigned &Result) const; # 327 "../llvm/include/llvm/ADT/StringRef.h" bool getAsInteger(unsigned Radix, APInt &Result) const; std::string lower() const; std::string upper() const; # 352 "../llvm/include/llvm/ADT/StringRef.h" StringRef substr(size_t Start, size_t N = npos) const { Start = min(Start, Length); return StringRef(Data + Start, min(N, Length - Start)); } # 367 "../llvm/include/llvm/ADT/StringRef.h" StringRef slice(size_t Start, size_t End) const { Start = min(Start, Length); End = min(max(Start, End), Length); return StringRef(Data + Start, End - Start); } # 383 "../llvm/include/llvm/ADT/StringRef.h" std::pair split(char 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+1, npos)); } # 400 "../llvm/include/llvm/ADT/StringRef.h" std::pair 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)); } # 422 "../llvm/include/llvm/ADT/StringRef.h" void split(SmallVectorImpl &A, StringRef Separator, int MaxSplit = -1, bool KeepEmpty = true) const; # 436 "../llvm/include/llvm/ADT/StringRef.h" std::pair rsplit(char 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+1, npos)); } }; 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, llvm::StringRef string) { return buffer.append(string.data(), string.size()); } template struct isPodLike; template <> struct isPodLike { static const bool value = true; }; } # 19 "../llvm/include/llvm/Value.h" 2 # 1 "../llvm/include/llvm/Support/Casting.h" 1 # 18 "../llvm/include/llvm/Support/Casting.h" # 1 "/usr/include/c++/4.5/cassert" 1 3 # 43 "/usr/include/c++/4.5/cassert" 3 # 44 "/usr/include/c++/4.5/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/include/c++/4.5/cassert" 2 3 # 19 "../llvm/include/llvm/Support/Casting.h" 2 namespace llvm { # 30 "../llvm/include/llvm/Support/Casting.h" template struct simplify_type { typedef From SimpleType; static SimpleType &getSimplifiedValue(From &Val) { return Val; } }; template struct simplify_type { typedef const From SimpleType; static SimpleType &getSimplifiedValue(const From &Val) { return simplify_type::getSimplifiedValue(static_cast(Val)); } }; template struct isa_impl { static inline bool doit(const From &Val) { return To::classof(&Val); } }; template struct isa_impl_cl { static inline bool doit(const From &Val) { return isa_impl::doit(Val); } }; template struct isa_impl_cl { static inline bool doit(const From &Val) { return isa_impl::doit(Val); } }; template struct isa_impl_cl { static inline bool doit(const From *Val) { return isa_impl::doit(*Val); } }; template struct isa_impl_cl { static inline bool doit(const From *Val) { return isa_impl::doit(*Val); } }; template struct isa_impl_cl { static inline bool doit(const From *Val) { return isa_impl::doit(*Val); } }; template struct isa_impl_wrap { static bool doit(const From &Val) { return isa_impl_wrap::SimpleType>::doit( simplify_type::getSimplifiedValue(Val)); } }; template struct isa_impl_wrap { static bool doit(const FromTy &Val) { return isa_impl_cl::doit(Val); } }; template inline bool isa(const Y &Val) { return isa_impl_wrap::SimpleType>::doit(Val); } template struct cast_retty; template struct cast_retty_impl { typedef To& ret_type; }; template struct cast_retty_impl { typedef const To &ret_type; }; template struct cast_retty_impl { typedef To* ret_type; }; template struct cast_retty_impl { typedef const To* ret_type; }; template struct cast_retty_impl { typedef const To* ret_type; }; template struct cast_retty_wrap { typedef typename cast_retty::ret_type ret_type; }; template struct cast_retty_wrap { typedef typename cast_retty_impl::ret_type ret_type; }; template struct cast_retty { typedef typename cast_retty_wrap::SimpleType>::ret_type ret_type; }; template struct cast_convert_val { static typename cast_retty::ret_type doit(const From &Val) { return cast_convert_val::SimpleType>::doit( simplify_type::getSimplifiedValue(Val)); } }; template struct cast_convert_val { static typename cast_retty::ret_type doit(const FromTy &Val) { typename cast_retty::ret_type Res2 = (typename cast_retty::ret_type)const_cast(Val); return Res2; } }; # 192 "../llvm/include/llvm/Support/Casting.h" template inline typename cast_retty::ret_type cast(const Y &Val) { ((isa(Val) && "cast() argument of incompatible type!") ? static_cast (0) : __assert_fail ("isa(Val) && \"cast() argument of incompatible type!\"", "../llvm/include/llvm/Support/Casting.h", 194, __PRETTY_FUNCTION__)); return cast_convert_val::SimpleType>::doit(Val); } template inline typename cast_retty::ret_type cast_or_null(Y *Val) { if (Val == 0) return 0; ((isa(Val) && "cast_or_null() argument of incompatible type!") ? static_cast (0) : __assert_fail ("isa(Val) && \"cast_or_null() argument of incompatible type!\"", "../llvm/include/llvm/Support/Casting.h", 205, __PRETTY_FUNCTION__)); return cast(Val); } # 218 "../llvm/include/llvm/Support/Casting.h" template inline typename cast_retty::ret_type dyn_cast(const Y &Val) { return isa(Val) ? cast(Val) : 0; } template inline typename cast_retty::ret_type dyn_cast_or_null(Y *Val) { return (Val && isa(Val)) ? cast(Val) : 0; } } # 20 "../llvm/include/llvm/Value.h" 2 namespace llvm { class Constant; class Argument; class Instruction; class BasicBlock; class GlobalValue; class Function; class GlobalVariable; class GlobalAlias; class InlineAsm; class ValueSymbolTable; template class StringMapEntry; template class AssertingVH; typedef StringMapEntry ValueName; class raw_ostream; class AssemblyAnnotationWriter; class ValueHandleBase; class LLVMContext; class Twine; class MDNode; class Type; # 63 "../llvm/include/llvm/Value.h" class Value { const unsigned char SubclassID; unsigned char HasValueHandle : 1; protected: unsigned char SubclassOptionalData : 7; private: unsigned short SubclassData; Type *VTy; Use *UseList; friend class ValueSymbolTable; friend class ValueHandleBase; ValueName *Name; void operator=(const Value &); Value(const Value &); protected: virtual void printCustom(raw_ostream &O) const; Value(Type *Ty, unsigned scid); public: virtual ~Value(); void dump() const; void print(raw_ostream &O, AssemblyAnnotationWriter *AAW = 0) const; Type *getType() const { return VTy; } LLVMContext &getContext() const; bool hasName() const { return Name != 0; } ValueName *getValueName() const { return Name; } StringRef getName() const; void setName(const Twine &Name); void takeName(Value *V); void replaceAllUsesWith(Value *V); typedef value_use_iterator use_iterator; typedef value_use_iterator const_use_iterator; bool use_empty() const { return UseList == 0; } use_iterator use_begin() { return use_iterator(UseList); } const_use_iterator use_begin() const { return const_use_iterator(UseList); } use_iterator use_end() { return use_iterator(0); } const_use_iterator use_end() const { return const_use_iterator(0); } User *use_back() { return *use_begin(); } const User *use_back() const { return *use_begin(); } 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; bool isUsedInBasicBlock(const BasicBlock *BB) const; unsigned getNumUses() const; void addUse(Use &U) { U.addToList(&UseList); } enum ValueTy { ArgumentVal, BasicBlockVal, FunctionVal, GlobalAliasVal, GlobalVariableVal, UndefValueVal, BlockAddressVal, ConstantExprVal, ConstantAggregateZeroVal, ConstantIntVal, ConstantFPVal, ConstantArrayVal, ConstantStructVal, ConstantVectorVal, ConstantPointerNullVal, MDNodeVal, MDStringVal, InlineAsmVal, PseudoSourceValueVal, FixedStackPseudoSourceValueVal, InstructionVal, ConstantFirstVal = FunctionVal, ConstantLastVal = ConstantPointerNullVal }; # 227 "../llvm/include/llvm/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; } void intersectOptionalDataWith(const Value *V) { SubclassOptionalData &= V->SubclassOptionalData; } bool hasValueHandle() const { return HasValueHandle; } static inline bool classof(const Value *) { return true; } Value *stripPointerCasts(); const Value *stripPointerCasts() const { return const_cast(this)->stripPointerCasts(); } bool isDereferenceablePointer() const; Value *DoPHITranslation(const BasicBlock *CurBB, const BasicBlock *PredBB); const Value *DoPHITranslation(const BasicBlock *CurBB, const BasicBlock *PredBB) const{ return const_cast(this)->DoPHITranslation(CurBB, PredBB); } static const unsigned MaximumAlignment = 1u << 29; void mutateType(Type *Ty) { VTy = Ty; } protected: unsigned short getSubclassDataFromValue() const { return SubclassData; } void setValueSubclassData(unsigned short D) { SubclassData = D; } }; 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); } template <> struct isa_impl { static inline bool doit(const Value &Val) { return Val.getValueID() >= Value::ConstantFirstVal && Val.getValueID() <= Value::ConstantLastVal; } }; template <> struct isa_impl { static inline bool doit (const Value &Val) { return Val.getValueID() == Value::ArgumentVal; } }; template <> struct isa_impl { static inline bool doit(const Value &Val) { return Val.getValueID() == Value::InlineAsmVal; } }; template <> struct isa_impl { static inline bool doit(const Value &Val) { return Val.getValueID() >= Value::InstructionVal; } }; template <> struct isa_impl { static inline bool doit(const Value &Val) { return Val.getValueID() == Value::BasicBlockVal; } }; template <> struct isa_impl { static inline bool doit(const Value &Val) { return Val.getValueID() == Value::FunctionVal; } }; template <> struct isa_impl { static inline bool doit(const Value &Val) { return Val.getValueID() == Value::GlobalVariableVal; } }; template <> struct isa_impl { static inline bool doit(const Value &Val) { return Val.getValueID() == Value::GlobalAliasVal; } }; template <> struct isa_impl { static inline bool doit(const Value &Val) { return isa(Val) || isa(Val) || isa(Val); } }; template <> struct isa_impl { static inline bool doit(const Value &Val) { return Val.getValueID() == Value::MDNodeVal; } }; template<> class PointerLikeTypeTraits { typedef Value* PT; public: static inline void *getAsVoidPointer(PT P) { return P; } static inline PT getFromVoidPointer(void *P) { return static_cast(P); } enum { NumLowBitsAvailable = 2 }; }; } # 20 "../llvm/include/llvm/InlineAsm.h" 2 # 1 "/usr/include/c++/4.5/vector" 1 3 # 59 "/usr/include/c++/4.5/vector" 3 # 60 "/usr/include/c++/4.5/vector" 3 # 1 "/usr/include/c++/4.5/bits/stl_construct.h" 1 3 # 63 "/usr/include/c++/4.5/bits/stl_construct.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline void _Construct(_T1* __p, const _T2& __value) { ::new(static_cast(__p)) _T1((__value)); } template inline void _Destroy(_Tp* __pointer) { __pointer->~_Tp(); } template struct _Destroy_aux { template static void __destroy(_ForwardIterator __first, _ForwardIterator __last) { for (; __first != __last; ++__first) std::_Destroy(&*__first); } }; template<> struct _Destroy_aux { template static void __destroy(_ForwardIterator, _ForwardIterator) { } }; template inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type _Value_type; std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: __destroy(__first, __last); } template class allocator; template void _Destroy(_ForwardIterator __first, _ForwardIterator __last, _Allocator& __alloc) { for (; __first != __last; ++__first) __alloc.destroy(&*__first); } template inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last, allocator<_Tp>&) { _Destroy(__first, __last); } } # 64 "/usr/include/c++/4.5/vector" 2 3 # 1 "/usr/include/c++/4.5/bits/stl_uninitialized.h" 1 3 # 60 "/usr/include/c++/4.5/bits/stl_uninitialized.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct __uninitialized_copy { template static _ForwardIterator uninitialized_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) { _ForwardIterator __cur = __result; if (true) { for (; __first != __last; ++__first, ++__cur) std::_Construct(&*__cur, *__first); return __cur; } if (false) { std::_Destroy(__result, __cur); ; } } }; template<> struct __uninitialized_copy { template static _ForwardIterator uninitialized_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) { return std::copy(__first, __last, __result); } }; # 104 "/usr/include/c++/4.5/bits/stl_uninitialized.h" 3 template 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; return std::__uninitialized_copy<(__is_pod(_ValueType1) && __is_pod(_ValueType2))>:: uninitialized_copy(__first, __last, __result); } template struct __uninitialized_fill { template static void uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) { _ForwardIterator __cur = __first; if (true) { for (; __cur != __last; ++__cur) std::_Construct(&*__cur, __x); } if (false) { std::_Destroy(__first, __cur); ; } } }; template<> struct __uninitialized_fill { template static void uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) { std::fill(__first, __last, __x); } }; # 161 "/usr/include/c++/4.5/bits/stl_uninitialized.h" 3 template inline void uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; std::__uninitialized_fill<__is_pod(_ValueType)>:: uninitialized_fill(__first, __last, __x); } template struct __uninitialized_construct_range_dispatch { template static void __ucr(_ForwardIterator __first, _ForwardIterator __last, _Tp& __value) { if(__first == __last) return; _ForwardIterator __cur = __first; if (true) { std::_Construct(&*__first, (__value)); _ForwardIterator __prev = __cur; ++__cur; for(; __cur != __last; ++__cur, ++__prev) std::_Construct(&*__cur, (*__prev)); __value = (*__prev); } if (false) { std::_Destroy(__first, __cur); ; } } }; template<> struct __uninitialized_construct_range_dispatch { template static void __ucr(_ForwardIterator, _ForwardIterator, _Tp&) { } }; # 221 "/usr/include/c++/4.5/bits/stl_uninitialized.h" 3 template inline void __uninitialized_construct_range(_ForwardIterator __first, _ForwardIterator __last, _Tp& __value) { typedef typename std::iterator_traits<_ForwardIterator>::value_type _ValueType; std::__uninitialized_construct_range_dispatch< __has_trivial_constructor(_ValueType)>:: __ucr(__first, __last, __value); } template struct __uninitialized_fill_n { template static void uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) { _ForwardIterator __cur = __first; if (true) { for (; __n > 0; --__n, ++__cur) std::_Construct(&*__cur, __x); } if (false) { std::_Destroy(__first, __cur); ; } } }; template<> struct __uninitialized_fill_n { template static void uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) { std::fill_n(__first, __n, __x); } }; # 277 "/usr/include/c++/4.5/bits/stl_uninitialized.h" 3 template inline void uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; std::__uninitialized_fill_n<__is_pod(_ValueType)>:: uninitialized_fill_n(__first, __n, __x); } template _ForwardIterator __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) { _ForwardIterator __cur = __result; if (true) { for (; __first != __last; ++__first, ++__cur) __alloc.construct(&*__cur, *__first); return __cur; } if (false) { std::_Destroy(__result, __cur, __alloc); ; } } template inline _ForwardIterator __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, allocator<_Tp>&) { return std::uninitialized_copy(__first, __last, __result); } template inline _ForwardIterator __uninitialized_move_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) { return std::__uninitialized_copy_a((__first), (__last), __result, __alloc); } template void __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __cur = __first; if (true) { for (; __cur != __last; ++__cur) __alloc.construct(&*__cur, __x); } if (false) { std::_Destroy(__first, __cur, __alloc); ; } } template inline void __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, allocator<_Tp2>&) { std::uninitialized_fill(__first, __last, __x); } template void __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __cur = __first; if (true) { for (; __n > 0; --__n, ++__cur) __alloc.construct(&*__cur, __x); } if (false) { std::_Destroy(__first, __cur, __alloc); ; } } template inline void __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, const _Tp& __x, allocator<_Tp2>&) { std::uninitialized_fill_n(__first, __n, __x); } # 391 "/usr/include/c++/4.5/bits/stl_uninitialized.h" 3 template 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 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 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 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); ; } } # 537 "/usr/include/c++/4.5/bits/stl_uninitialized.h" 3 } # 65 "/usr/include/c++/4.5/vector" 2 3 # 1 "/usr/include/c++/4.5/bits/stl_vector.h" 1 3 # 65 "/usr/include/c++/4.5/bits/stl_vector.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct _Vector_base { typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; struct _Vector_impl : public _Tp_alloc_type { typename _Tp_alloc_type::pointer _M_start; typename _Tp_alloc_type::pointer _M_finish; typename _Tp_alloc_type::pointer _M_end_of_storage; _Vector_impl() : _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0) { } _Vector_impl(_Tp_alloc_type const& __a) : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) { } }; public: typedef _Alloc allocator_type; _Tp_alloc_type& _M_get_Tp_allocator() { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } const _Tp_alloc_type& _M_get_Tp_allocator() const { return *static_cast(&this->_M_impl); } allocator_type get_allocator() const { return allocator_type(_M_get_Tp_allocator()); } _Vector_base() : _M_impl() { } _Vector_base(const allocator_type& __a) : _M_impl(__a) { } _Vector_base(size_t __n, const allocator_type& __a) : _M_impl(__a) { 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; } # 131 "/usr/include/c++/4.5/bits/stl_vector.h" 3 ~_Vector_base() { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); } public: _Vector_impl _M_impl; typename _Tp_alloc_type::pointer _M_allocate(size_t __n) { return __n != 0 ? _M_impl.allocate(__n) : 0; } void _M_deallocate(typename _Tp_alloc_type::pointer __p, size_t __n) { if (__p) _M_impl.deallocate(__p, __n); } }; # 169 "/usr/include/c++/4.5/bits/stl_vector.h" 3 template > class vector : protected _Vector_base<_Tp, _Alloc> { typedef typename _Alloc::value_type _Alloc_value_type; typedef _Vector_base<_Tp, _Alloc> _Base; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; public: typedef _Tp value_type; typedef typename _Tp_alloc_type::pointer pointer; typedef typename _Tp_alloc_type::const_pointer const_pointer; typedef typename _Tp_alloc_type::reference reference; typedef typename _Tp_alloc_type::const_reference const_reference; typedef __gnu_cxx::__normal_iterator iterator; typedef __gnu_cxx::__normal_iterator const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_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() : _Base() { } explicit vector(const allocator_type& __a) : _Base(__a) { } # 226 "/usr/include/c++/4.5/bits/stl_vector.h" 3 explicit vector(size_type __n, const value_type& __value = value_type(), const allocator_type& __a = allocator_type()) : _Base(__n, __a) { _M_fill_initialize(__n, __value); } # 241 "/usr/include/c++/4.5/bits/stl_vector.h" 3 vector(const vector& __x) : _Base(__x.size(), __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()); } # 296 "/usr/include/c++/4.5/bits/stl_vector.h" 3 template vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } ~vector() { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); } # 324 "/usr/include/c++/4.5/bits/stl_vector.h" 3 vector& operator=(const vector& __x); # 374 "/usr/include/c++/4.5/bits/stl_vector.h" 3 void assign(size_type __n, const value_type& __val) { _M_fill_assign(__n, __val); } # 390 "/usr/include/c++/4.5/bits/stl_vector.h" 3 template void assign(_InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } # 417 "/usr/include/c++/4.5/bits/stl_vector.h" 3 using _Base::get_allocator; iterator begin() { return iterator(this->_M_impl._M_start); } const_iterator begin() const { return const_iterator(this->_M_impl._M_start); } iterator end() { return iterator(this->_M_impl._M_finish); } const_iterator end() const { return const_iterator(this->_M_impl._M_finish); } 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()); } # 532 "/usr/include/c++/4.5/bits/stl_vector.h" 3 size_type size() const { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } size_type max_size() const { return _M_get_Tp_allocator().max_size(); } # 552 "/usr/include/c++/4.5/bits/stl_vector.h" 3 void resize(size_type __new_size, value_type __x = value_type()) { if (__new_size < size()) _M_erase_at_end(this->_M_impl._M_start + __new_size); else insert(end(), __new_size - size(), __x); } # 572 "/usr/include/c++/4.5/bits/stl_vector.h" 3 size_type capacity() const { return size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_start); } bool empty() const { return begin() == end(); } # 602 "/usr/include/c++/4.5/bits/stl_vector.h" 3 void reserve(size_type __n); # 617 "/usr/include/c++/4.5/bits/stl_vector.h" 3 reference operator[](size_type __n) { return *(this->_M_impl._M_start + __n); } # 632 "/usr/include/c++/4.5/bits/stl_vector.h" 3 const_reference operator[](size_type __n) const { return *(this->_M_impl._M_start + __n); } protected: void _M_range_check(size_type __n) const { if (__n >= this->size()) __throw_out_of_range(("vector::_M_range_check")); } public: # 657 "/usr/include/c++/4.5/bits/stl_vector.h" 3 reference at(size_type __n) { _M_range_check(__n); return (*this)[__n]; } # 675 "/usr/include/c++/4.5/bits/stl_vector.h" 3 const_reference at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } # 721 "/usr/include/c++/4.5/bits/stl_vector.h" 3 pointer data() { return pointer(this->_M_impl._M_start); } const_pointer data() const { return const_pointer(this->_M_impl._M_start); } # 740 "/usr/include/c++/4.5/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) { this->_M_impl.construct(this->_M_impl._M_finish, __x); ++this->_M_impl._M_finish; } else _M_insert_aux(end(), __x); } # 771 "/usr/include/c++/4.5/bits/stl_vector.h" 3 void pop_back() { --this->_M_impl._M_finish; this->_M_impl.destroy(this->_M_impl._M_finish); } # 807 "/usr/include/c++/4.5/bits/stl_vector.h" 3 iterator insert(iterator __position, const value_type& __x); # 857 "/usr/include/c++/4.5/bits/stl_vector.h" 3 void insert(iterator __position, size_type __n, const value_type& __x) { _M_fill_insert(__position, __n, __x); } # 875 "/usr/include/c++/4.5/bits/stl_vector.h" 3 template void insert(iterator __position, _InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_insert_dispatch(__position, __first, __last, _Integral()); } # 900 "/usr/include/c++/4.5/bits/stl_vector.h" 3 iterator erase(iterator __position); # 921 "/usr/include/c++/4.5/bits/stl_vector.h" 3 iterator erase(iterator __first, iterator __last); # 933 "/usr/include/c++/4.5/bits/stl_vector.h" 3 void swap(vector& __x) { 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); std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } void clear() { _M_erase_at_end(this->_M_impl._M_start); } protected: template 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); ; } } # 988 "/usr/include/c++/4.5/bits/stl_vector.h" 3 template void _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) { this->_M_impl._M_start = _M_allocate(static_cast(__n)); this->_M_impl._M_end_of_storage = this->_M_impl._M_start + static_cast(__n); _M_fill_initialize(static_cast(__n), __value); } template 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 void _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) push_back(*__first); } template 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) { std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, _M_get_Tp_allocator()); this->_M_impl._M_finish = this->_M_impl._M_end_of_storage; } # 1052 "/usr/include/c++/4.5/bits/stl_vector.h" 3 template void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign(__n, __val); } template void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_assign_aux(__first, __last, _IterCategory()); } template void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); template void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); void _M_fill_assign(size_type __n, const value_type& __val); # 1092 "/usr/include/c++/4.5/bits/stl_vector.h" 3 template void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, __true_type) { _M_fill_insert(__pos, __n, __val); } template void _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_range_insert(__pos, __first, __last, _IterCategory()); } template void _M_range_insert(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag); template 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_insert_aux(iterator __position, const value_type& __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(pointer __pos) { std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __pos; } }; # 1170 "/usr/include/c++/4.5/bits/stl_vector.h" 3 template 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())); } # 1187 "/usr/include/c++/4.5/bits/stl_vector.h" 3 template 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 inline bool operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__x < __y); } template inline void swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) { __x.swap(__y); } } # 66 "/usr/include/c++/4.5/vector" 2 3 # 1 "/usr/include/c++/4.5/bits/stl_bvector.h" 1 3 # 62 "/usr/include/c++/4.5/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() : _M_p(0), _M_mask(0) { } operator bool() const { return !!(*_M_p & _M_mask); } _Bit_reference& operator=(bool __x) { if (__x) *_M_p |= _M_mask; else *_M_p &= ~_M_mask; return *this; } _Bit_reference& operator=(const _Bit_reference& __x) { 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() { *_M_p ^= _M_mask; } }; struct _Bit_iterator_base : public std::iterator { _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(__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) { } 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) { } 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_iterator __first, _Bit_iterator __last, bool __x) { for (; __first != __last; ++__first) *__first = __x; } inline void fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) { if (__first._M_p != __last._M_p) { std::fill(__first._M_p + 1, __last._M_p, __x ? ~0 : 0); __fill_bvector(__first, _Bit_iterator(__first._M_p + 1, 0), __x); __fill_bvector(_Bit_iterator(__last._M_p, 0), __last, __x); } else __fill_bvector(__first, __last, __x); } template struct _Bvector_base { typedef typename _Alloc::template rebind<_Bit_type>::other _Bit_alloc_type; struct _Bvector_impl : public _Bit_alloc_type { _Bit_iterator _M_start; _Bit_iterator _M_finish; _Bit_type* _M_end_of_storage; _Bvector_impl() : _Bit_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage(0) { } _Bvector_impl(const _Bit_alloc_type& __a) : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0) { } }; public: typedef _Alloc allocator_type; _Bit_alloc_type& _M_get_Bit_allocator() { return *static_cast<_Bit_alloc_type*>(&this->_M_impl); } const _Bit_alloc_type& _M_get_Bit_allocator() const { return *static_cast(&this->_M_impl); } allocator_type get_allocator() const { return allocator_type(_M_get_Bit_allocator()); } _Bvector_base() : _M_impl() { } _Bvector_base(const allocator_type& __a) : _M_impl(__a) { } # 429 "/usr/include/c++/4.5/bits/stl_bvector.h" 3 ~_Bvector_base() { this->_M_deallocate(); } protected: _Bvector_impl _M_impl; _Bit_type* _M_allocate(size_t __n) { return _M_impl.allocate((__n + int(_S_word_bit) - 1) / int(_S_word_bit)); } void _M_deallocate() { if (_M_impl._M_start._M_p) _M_impl.deallocate(_M_impl._M_start._M_p, _M_impl._M_end_of_storage - _M_impl._M_start._M_p); } }; } namespace std __attribute__ ((__visibility__ ("default"))) { # 473 "/usr/include/c++/4.5/bits/stl_bvector.h" 3 template class vector : protected _Bvector_base<_Alloc> { typedef _Bvector_base<_Alloc> _Base; 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_reverse_iterator; typedef std::reverse_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::_M_get_Bit_allocator; public: vector() : _Base() { } explicit vector(const allocator_type& __a) : _Base(__a) { } explicit vector(size_type __n, const bool& __value = bool(), const allocator_type& __a = allocator_type()) : _Base(__a) { _M_initialize(__n); std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, __value ? ~0 : 0); } vector(const vector& __x) : _Base(__x._M_get_Bit_allocator()) { _M_initialize(__x.size()); _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); } # 542 "/usr/include/c++/4.5/bits/stl_bvector.h" 3 template vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } ~vector() { } vector& operator=(const vector& __x) { if (&__x == this) return *this; 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; } # 591 "/usr/include/c++/4.5/bits/stl_bvector.h" 3 void assign(size_type __n, const bool& __x) { _M_fill_assign(__n, __x); } template void assign(_InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } iterator begin() { return this->_M_impl._M_start; } const_iterator begin() const { return this->_M_impl._M_start; } iterator end() { return this->_M_impl._M_finish; } const_iterator end() const { return this->_M_impl._M_finish; } 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()); } # 659 "/usr/include/c++/4.5/bits/stl_bvector.h" 3 size_type size() const { return size_type(end() - begin()); } size_type max_size() const { const size_type __isize = __gnu_cxx::__numeric_traits::__max - int(_S_word_bit) + 1; const size_type __asize = _M_get_Bit_allocator().max_size(); return (__asize <= __isize / int(_S_word_bit) ? __asize * int(_S_word_bit) : __isize); } size_type capacity() const { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0) - begin()); } bool empty() const { 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(("vector::_M_range_check")); } 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); reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } void data() { } void push_back(bool __x) { if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) *this->_M_impl._M_finish++ = __x; else _M_insert_aux(end(), __x); } void swap(vector& __x) { 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); std::__alloc_swap:: _S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); } static void swap(reference __x, reference __y) { bool __tmp = __x; __x = __y; __y = __tmp; } iterator insert(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_of_storage && __position == end()) *this->_M_impl._M_finish++ = __x; else _M_insert_aux(__position, __x); return begin() + __n; } template void insert(iterator __position, _InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_insert_dispatch(__position, __first, __last, _Integral()); } void insert(iterator __position, size_type __n, const bool& __x) { _M_fill_insert(__position, __n, __x); } void pop_back() { --this->_M_impl._M_finish; } iterator erase(iterator __position) { if (__position + 1 != end()) std::copy(__position + 1, end(), __position); --this->_M_impl._M_finish; return __position; } iterator erase(iterator __first, iterator __last) { _M_erase_at_end(std::copy(__last, end(), __first)); return __first; } 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 flip() { for (_Bit_type * __p = this->_M_impl._M_start._M_p; __p != this->_M_impl._M_end_of_storage; ++__p) *__p = ~*__p; } void clear() { _M_erase_at_end(begin()); } 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) { _Bit_type* __q = this->_M_allocate(__n); this->_M_impl._M_end_of_storage = (__q + ((__n + int(_S_word_bit) - 1) / int(_S_word_bit))); this->_M_impl._M_start = iterator(__q, 0); this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); } template void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { _M_initialize(static_cast(__n)); std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, __x ? ~0 : 0); } template void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _M_initialize_range(__first, __last, std::__iterator_category(__first)); } template void _M_initialize_range(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) push_back(*__first); } template 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); } template void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign(__n, __val); } template void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } void _M_fill_assign(size_t __n, bool __x) { if (__n > size()) { std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, __x ? ~0 : 0); insert(end(), __n - size(), __x); } else { _M_erase_at_end(begin() + __n); std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, __x ? ~0 : 0); } } template 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 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 void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, __true_type) { _M_fill_insert(__pos, __n, __x); } template 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 void _M_insert_range(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) { __pos = insert(__pos, *__first); ++__pos; } } template 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; } }; } # 67 "/usr/include/c++/4.5/vector" 2 3 # 1 "/usr/include/c++/4.5/bits/vector.tcc" 1 3 # 60 "/usr/include/c++/4.5/bits/vector.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template 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, (this->_M_impl._M_start), (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; } } # 104 "/usr/include/c++/4.5/bits/vector.tcc" 3 template typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: insert(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 && __position == end()) { this->_M_impl.construct(this->_M_impl._M_finish, __x); ++this->_M_impl._M_finish; } else { # 126 "/usr/include/c++/4.5/bits/vector.tcc" 3 _M_insert_aux(__position, __x); } return iterator(this->_M_impl._M_start + __n); } template typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: erase(iterator __position) { if (__position + 1 != end()) std::copy(__position + 1, end(), __position); --this->_M_impl._M_finish; this->_M_impl.destroy(this->_M_impl._M_finish); return __position; } template typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: erase(iterator __first, iterator __last) { if (__last != end()) std::copy(__last, end(), __first); _M_erase_at_end(__first.base() + (end() - __last)); return __first; } template vector<_Tp, _Alloc>& vector<_Tp, _Alloc>:: operator=(const vector<_Tp, _Alloc>& __x) { if (&__x != this) { 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 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.swap(*this); } else if (__n > size()) { std::fill(begin(), end(), __val); std::__uninitialized_fill_n_a(this->_M_impl._M_finish, __n - size(), __val, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n - size(); } else _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); } template template 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 insert(end(), __first, __last); } template template 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); this->_M_impl._M_finish = std::__uninitialized_copy_a(__mid, __last, this->_M_impl._M_finish, _M_get_Tp_allocator()); } } # 293 "/usr/include/c++/4.5/bits/vector.tcc" 3 template void vector<_Tp, _Alloc>:: _M_insert_aux(iterator __position, const _Tp& __x) { if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) { this->_M_impl.construct(this->_M_impl._M_finish, (*(this->_M_impl._M_finish - 1)) ); ++this->_M_impl._M_finish; _Tp __x_copy = __x; std::copy_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1) ; *__position = __x_copy; } else { const size_type __len = _M_check_len(size_type(1), "vector::_M_insert_aux"); const size_type __elems_before = __position - begin(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); if (true) { this->_M_impl.construct(__new_start + __elems_before, __x); __new_finish = 0; __new_finish = std::__uninitialized_move_a(this->_M_impl._M_start, __position.base(), __new_start, _M_get_Tp_allocator()); ++__new_finish; __new_finish = std::__uninitialized_move_a(__position.base(), this->_M_impl._M_finish, __new_finish, _M_get_Tp_allocator()); } if (false) { if (!__new_finish) this->_M_impl.destroy(__new_start + __elems_before); 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 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) { value_type __x_copy = __x; 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::copy_backward(__position.base(), __old_finish - __n, __old_finish) ; std::fill(__position.base(), __position.base() + __n, __x_copy); } else { std::__uninitialized_fill_n_a(this->_M_impl._M_finish, __n - __elems_after, __x_copy, _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::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 = 0; __new_finish = std::__uninitialized_move_a(this->_M_impl._M_start, __position.base(), __new_start, _M_get_Tp_allocator()); __new_finish += __n; __new_finish = std::__uninitialized_move_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 template void vector<_Tp, _Alloc>:: _M_range_insert(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) { __pos = insert(__pos, *__first); ++__pos; } } template template 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::copy_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_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_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 void vector:: reserve(size_type __n) { if (__n > this->max_size()) __throw_length_error(("vector::reserve")); if (this->capacity() < __n) { _Bit_type* __q = this->_M_allocate(__n); this->_M_impl._M_finish = _M_copy_aligned(begin(), end(), iterator(__q, 0)); this->_M_deallocate(); this->_M_impl._M_start = iterator(__q, 0); this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1) / int(_S_word_bit)); } } template void vector:: _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::_M_fill_insert"); _Bit_type * __q = this->_M_allocate(__len); iterator __i = _M_copy_aligned(begin(), __position, iterator(__q, 0)); std::fill(__i, __i + difference_type(__n), __x); this->_M_impl._M_finish = std::copy(__position, end(), __i + difference_type(__n)); this->_M_deallocate(); this->_M_impl._M_end_of_storage = (__q + ((__len + int(_S_word_bit) - 1) / int(_S_word_bit))); this->_M_impl._M_start = iterator(__q, 0); } } template template void vector:: _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::_M_insert_range"); _Bit_type * __q = this->_M_allocate(__len); iterator __i = _M_copy_aligned(begin(), __position, iterator(__q, 0)); __i = std::copy(__first, __last, __i); this->_M_impl._M_finish = std::copy(__position, end(), __i); this->_M_deallocate(); this->_M_impl._M_end_of_storage = (__q + ((__len + int(_S_word_bit) - 1) / int(_S_word_bit))); this->_M_impl._M_start = iterator(__q, 0); } } } template void vector:: _M_insert_aux(iterator __position, bool __x) { if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) { 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::_M_insert_aux"); _Bit_type * __q = this->_M_allocate(__len); iterator __i = _M_copy_aligned(begin(), __position, iterator(__q, 0)); *__i++ = __x; this->_M_impl._M_finish = std::copy(__position, end(), __i); this->_M_deallocate(); this->_M_impl._M_end_of_storage = (__q + ((__len + int(_S_word_bit) - 1) / int(_S_word_bit))); this->_M_impl._M_start = iterator(__q, 0); } } } # 70 "/usr/include/c++/4.5/vector" 2 3 # 21 "../llvm/include/llvm/InlineAsm.h" 2 namespace llvm { class PointerType; class FunctionType; class Module; struct InlineAsmKeyType; template class ConstantUniqueMap; template struct ConstantCreator; class InlineAsm : public Value { friend struct ConstantCreator; friend class ConstantUniqueMap; InlineAsm(const InlineAsm &); void operator=(const InlineAsm&); std::string AsmString, Constraints; bool HasSideEffects; bool IsAlignStack; InlineAsm(PointerType *Ty, const std::string &AsmString, const std::string &Constraints, bool hasSideEffects, bool isAlignStack); virtual ~InlineAsm(); void destroyConstant(); public: static InlineAsm *get(FunctionType *Ty, StringRef AsmString, StringRef Constraints, bool hasSideEffects, bool isAlignStack = false); bool hasSideEffects() const { return HasSideEffects; } bool isAlignStack() const { return IsAlignStack; } PointerType *getType() const { return reinterpret_cast(Value::getType()); } FunctionType *getFunctionType() const; const std::string &getAsmString() const { return AsmString; } const std::string &getConstraintString() const { return Constraints; } static bool Verify(FunctionType *Ty, StringRef Constraints); enum ConstraintPrefix { isInput, isOutput, isClobber }; typedef std::vector ConstraintCodeVector; struct SubConstraintInfo { signed char MatchingInput; ConstraintCodeVector Codes; SubConstraintInfo() : MatchingInput(-1) {} }; typedef std::vector SubConstraintInfoVector; struct ConstraintInfo; typedef std::vector ConstraintInfoVector; struct ConstraintInfo { ConstraintPrefix Type; bool isEarlyClobber; signed char MatchingInput; bool hasMatchingInput() const { return MatchingInput != -1; } bool isCommutative; bool isIndirect; ConstraintCodeVector Codes; bool isMultipleAlternative; SubConstraintInfoVector multipleAlternatives; unsigned currentAlternativeIndex; ConstraintInfo(); ConstraintInfo(const ConstraintInfo &other); bool Parse(StringRef Str, ConstraintInfoVector &ConstraintsSoFar); void selectAlternative(unsigned index); }; static ConstraintInfoVector ParseConstraints(StringRef ConstraintString); ConstraintInfoVector ParseConstraints() const { return ParseConstraints(Constraints); } static inline bool classof(const InlineAsm *) { return true; } static inline bool classof(const Value *V) { return V->getValueID() == Value::InlineAsmVal; } enum { Op_InputChain = 0, Op_AsmString = 1, Op_MDNode = 2, Op_ExtraInfo = 3, Op_FirstOperand = 4, MIOp_AsmString = 0, MIOp_ExtraInfo = 1, MIOp_FirstOperand = 2, Extra_HasSideEffects = 1, Extra_IsAlignStack = 2, Kind_RegUse = 1, Kind_RegDef = 2, Kind_RegDefEarlyClobber = 3, Kind_Clobber = 4, Kind_Imm = 5, Kind_Mem = 6, Flag_MatchingOperand = 0x80000000 }; static unsigned getFlagWord(unsigned Kind, unsigned NumOps) { ((((NumOps << 3) & ~0xffff) == 0 && "Too many inline asm operands!") ? static_cast (0) : __assert_fail ("((NumOps << 3) & ~0xffff) == 0 && \"Too many inline asm operands!\"", "../llvm/include/llvm/InlineAsm.h", 221, __PRETTY_FUNCTION__)); ((Kind >= Kind_RegUse && Kind <= Kind_Mem && "Invalid Kind") ? static_cast (0) : __assert_fail ("Kind >= Kind_RegUse && Kind <= Kind_Mem && \"Invalid Kind\"", "../llvm/include/llvm/InlineAsm.h", 222, __PRETTY_FUNCTION__)); return Kind | (NumOps << 3); } static unsigned getFlagWordForMatchingOp(unsigned InputFlag, unsigned MatchedOperandNo) { ((MatchedOperandNo <= 0x7fff && "Too big matched operand") ? static_cast (0) : __assert_fail ("MatchedOperandNo <= 0x7fff && \"Too big matched operand\"", "../llvm/include/llvm/InlineAsm.h", 231, __PRETTY_FUNCTION__)); (((InputFlag & ~0xffff) == 0 && "High bits already contain data") ? static_cast (0) : __assert_fail ("(InputFlag & ~0xffff) == 0 && \"High bits already contain data\"", "../llvm/include/llvm/InlineAsm.h", 232, __PRETTY_FUNCTION__)); return InputFlag | Flag_MatchingOperand | (MatchedOperandNo << 16); } static unsigned getFlagWordForRegClass(unsigned InputFlag, unsigned RC) { ++RC; ((RC <= 0x7fff && "Too large register class ID") ? static_cast (0) : __assert_fail ("RC <= 0x7fff && \"Too large register class ID\"", "../llvm/include/llvm/InlineAsm.h", 244, __PRETTY_FUNCTION__)); (((InputFlag & ~0xffff) == 0 && "High bits already contain data") ? static_cast (0) : __assert_fail ("(InputFlag & ~0xffff) == 0 && \"High bits already contain data\"", "../llvm/include/llvm/InlineAsm.h", 245, __PRETTY_FUNCTION__)); return InputFlag | (RC << 16); } static unsigned getKind(unsigned Flags) { return Flags & 7; } static bool isRegDefKind(unsigned Flag){ return getKind(Flag) == Kind_RegDef;} static bool isImmKind(unsigned Flag) { return getKind(Flag) == Kind_Imm; } static bool isMemKind(unsigned Flag) { return getKind(Flag) == Kind_Mem; } static bool isRegDefEarlyClobberKind(unsigned Flag) { return getKind(Flag) == Kind_RegDefEarlyClobber; } static bool isClobberKind(unsigned Flag) { return getKind(Flag) == Kind_Clobber; } static unsigned getNumOperandRegisters(unsigned Flag) { return (Flag & 0xffff) >> 3; } static bool isUseOperandTiedToDef(unsigned Flag, unsigned &Idx) { if ((Flag & Flag_MatchingOperand) == 0) return false; Idx = (Flag & ~Flag_MatchingOperand) >> 16; return true; } static bool hasRegClassConstraint(unsigned Flag, unsigned &RC) { if (Flag & Flag_MatchingOperand) return false; unsigned High = Flag >> 16; if (!High) return false; RC = High - 1; return true; } }; } # 19 "../llvm/lib/VMCore/ConstantsContext.h" 2 # 1 "../llvm/include/llvm/Instructions.h" 1 # 19 "../llvm/include/llvm/Instructions.h" # 1 "../llvm/include/llvm/InstrTypes.h" 1 # 19 "../llvm/include/llvm/InstrTypes.h" # 1 "../llvm/include/llvm/Instruction.h" 1 # 18 "../llvm/include/llvm/Instruction.h" # 1 "../llvm/include/llvm/User.h" 1 # 24 "../llvm/include/llvm/User.h" namespace llvm { template struct OperandTraits; class User : public Value { User(const User &); void *operator new(size_t); template friend struct HungoffOperandTraits; virtual void anchor(); protected: Use *OperandList; unsigned NumOperands; void *operator new(size_t s, unsigned Us); User(Type *ty, unsigned vty, Use *OpList, unsigned NumOps) : Value(ty, vty), OperandList(OpList), NumOperands(NumOps) {} Use *allocHungoffUses(unsigned) const; void dropHungoffUses() { Use::zap(OperandList, OperandList + NumOperands, true); OperandList = 0; NumOperands = 0; } public: ~User() { Use::zap(OperandList, OperandList + NumOperands); } void operator delete(void *Usr); void operator delete(void*, unsigned) { ((0 && "Constructor throws?") ? static_cast (0) : __assert_fail ("0 && \"Constructor throws?\"", "../llvm/include/llvm/User.h", 68, __PRETTY_FUNCTION__)); } void operator delete(void*, unsigned, bool) { ((0 && "Constructor throws?") ? static_cast (0) : __assert_fail ("0 && \"Constructor throws?\"", "../llvm/include/llvm/User.h", 72, __PRETTY_FUNCTION__)); } protected: template static Use &OpFrom(const U *that) { return Idx < 0 ? OperandTraits::op_end(const_cast(that))[Idx] : OperandTraits::op_begin(const_cast(that))[Idx]; } template Use &Op() { return OpFrom(this); } template const Use &Op() const { return OpFrom(this); } public: Value *getOperand(unsigned i) const { ((i < NumOperands && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i < NumOperands && \"getOperand() out of range!\"", "../llvm/include/llvm/User.h", 88, __PRETTY_FUNCTION__)); return OperandList[i]; } void setOperand(unsigned i, Value *Val) { ((i < NumOperands && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i < NumOperands && \"setOperand() out of range!\"", "../llvm/include/llvm/User.h", 92, __PRETTY_FUNCTION__)); (((!isa((const Value*)this) || isa((const Value*)this)) && "Cannot mutate a constant with setOperand!") ? static_cast (0) : __assert_fail ("(!isa((const Value*)this) || isa((const Value*)this)) && \"Cannot mutate a constant with setOperand!\"", "../llvm/include/llvm/User.h" # 93 "../llvm/include/llvm/User.h" , 95 # 93 "../llvm/include/llvm/User.h" , __PRETTY_FUNCTION__)) ; OperandList[i] = Val; } const Use &getOperandUse(unsigned i) const { ((i < NumOperands && "getOperandUse() out of range!") ? static_cast (0) : __assert_fail ("i < NumOperands && \"getOperandUse() out of range!\"", "../llvm/include/llvm/User.h", 99, __PRETTY_FUNCTION__)); return OperandList[i]; } Use &getOperandUse(unsigned i) { ((i < NumOperands && "getOperandUse() out of range!") ? static_cast (0) : __assert_fail ("i < NumOperands && \"getOperandUse() out of range!\"", "../llvm/include/llvm/User.h", 103, __PRETTY_FUNCTION__)); return OperandList[i]; } unsigned getNumOperands() const { return NumOperands; } typedef Use* op_iterator; typedef const Use* const_op_iterator; inline op_iterator op_begin() { return OperandList; } inline const_op_iterator op_begin() const { return OperandList; } inline op_iterator op_end() { return OperandList+NumOperands; } inline const_op_iterator op_end() const { return OperandList+NumOperands; } # 128 "../llvm/include/llvm/User.h" void dropAllReferences() { for (op_iterator i = op_begin(), e = op_end(); i != e; ++i) i->set(0); } void replaceUsesOfWith(Value *From, Value *To); static inline bool classof(const User *) { return true; } static inline bool classof(const Value *V) { return isa(V) || isa(V); } }; template<> struct simplify_type { typedef Value* SimpleType; static SimpleType getSimplifiedValue(const User::op_iterator &Val) { return static_cast(Val->get()); } }; template<> struct simplify_type : public simplify_type {}; template<> struct simplify_type { typedef Value* SimpleType; static SimpleType getSimplifiedValue(const User::const_op_iterator &Val) { return static_cast(Val->get()); } }; template<> struct simplify_type : public simplify_type {}; template unsigned value_use_iterator::getOperandNo() const { return U - U->getUser()->op_begin(); } } # 19 "../llvm/include/llvm/Instruction.h" 2 # 1 "../llvm/include/llvm/ADT/ilist_node.h" 1 # 18 "../llvm/include/llvm/ADT/ilist_node.h" namespace llvm { template struct ilist_traits; template class ilist_half_node { friend struct ilist_traits; NodeTy *Prev; protected: NodeTy *getPrev() { return Prev; } const NodeTy *getPrev() const { return Prev; } void setPrev(NodeTy *P) { Prev = P; } ilist_half_node() : Prev(0) {} }; template struct ilist_nextprev_traits; template class ilist_node : private ilist_half_node { friend struct ilist_nextprev_traits; friend struct ilist_traits; NodeTy *Next; NodeTy *getNext() { return Next; } const NodeTy *getNext() const { return Next; } void setNext(NodeTy *N) { Next = N; } protected: ilist_node() : Next(0) {} public: NodeTy *getPrevNode() { NodeTy *Prev = this->getPrev(); if (!Prev->getNext()) return 0; return Prev; } const NodeTy *getPrevNode() const { const NodeTy *Prev = this->getPrev(); if (!Prev->getNext()) return 0; return Prev; } NodeTy *getNextNode() { NodeTy *Next = getNext(); if (!Next->getNext()) return 0; return Next; } const NodeTy *getNextNode() const { const NodeTy *Next = getNext(); if (!Next->getNext()) return 0; return Next; } }; } # 20 "../llvm/include/llvm/Instruction.h" 2 # 1 "../llvm/include/llvm/Support/DebugLoc.h" 1 # 18 "../llvm/include/llvm/Support/DebugLoc.h" # 1 "../llvm/include/llvm/ADT/DenseMapInfo.h" 1 # 18 "../llvm/include/llvm/ADT/DenseMapInfo.h" # 1 "../llvm/include/llvm/Support/type_traits.h" 1 # 27 "../llvm/include/llvm/Support/type_traits.h" namespace llvm { namespace dont_use { # 40 "../llvm/include/llvm/Support/type_traits.h" template char is_class_helper(void(T::*)()); template double is_class_helper(...); } template struct is_class { public: enum { value = sizeof(char) == sizeof(dont_use::is_class_helper(0)) }; }; template struct isPodLike { static const bool value = !is_class::value; }; template struct isPodLike > { static const bool value = isPodLike::value & isPodLike::value; }; template struct is_same { static const bool value = false; }; template struct is_same { static const bool value = true; }; template struct enable_if_c { typedef T type; }; template struct enable_if_c { }; template struct enable_if : public enable_if_c { }; namespace dont_use { template char base_of_helper(const volatile Base*); template double base_of_helper(...); } template struct is_base_of { static const bool value = is_class::value && is_class::value && sizeof(char) == sizeof(dont_use::base_of_helper((Derived*)0)); }; template struct remove_pointer { typedef T type; }; template struct remove_pointer { typedef T type; }; template struct remove_pointer { typedef T type; }; template struct remove_pointer { typedef T type; }; template struct remove_pointer { typedef T type; }; template struct conditional { typedef T type; }; template struct conditional { typedef F type; }; } # 19 "../llvm/include/llvm/ADT/DenseMapInfo.h" 2 namespace llvm { template struct DenseMapInfo { }; template struct DenseMapInfo { static inline T* getEmptyKey() { intptr_t Val = -1; Val <<= PointerLikeTypeTraits::NumLowBitsAvailable; return reinterpret_cast(Val); } static inline T* getTombstoneKey() { intptr_t Val = -2; Val <<= PointerLikeTypeTraits::NumLowBitsAvailable; return reinterpret_cast(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 { 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 { static inline unsigned getEmptyKey() { return ~0; } 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 { 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 { 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 { 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 { static inline long getEmptyKey() { return (1UL << (sizeof(long) * 8 - 1)) - 1L; } 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 { 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 struct DenseMapInfo > { typedef std::pair Pair; typedef DenseMapInfo FirstInfo; typedef DenseMapInfo SecondInfo; 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) { uint64_t key = (uint64_t)FirstInfo::getHashValue(PairVal.first) << 32 | (uint64_t)SecondInfo::getHashValue(PairVal.second); 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; } static bool isEqual(const Pair &LHS, const Pair &RHS) { return FirstInfo::isEqual(LHS.first, RHS.first) && SecondInfo::isEqual(LHS.second, RHS.second); } }; } # 19 "../llvm/include/llvm/Support/DebugLoc.h" 2 namespace llvm { class MDNode; class LLVMContext; class DebugLoc { friend struct DenseMapInfo; static DebugLoc getEmptyKey() { DebugLoc DL; DL.LineCol = 1; return DL; } static DebugLoc getTombstoneKey() { DebugLoc DL; DL.LineCol = 2; return DL; } unsigned LineCol; int ScopeIdx; public: DebugLoc() : LineCol(0), ScopeIdx(0) {} static DebugLoc get(unsigned Line, unsigned Col, MDNode *Scope, MDNode *InlinedAt = 0); static DebugLoc getFromDILocation(MDNode *N); static DebugLoc getFromDILexicalBlock(MDNode *N); bool isUnknown() const { return ScopeIdx == 0; } unsigned getLine() const { return (LineCol << 8) >> 8; } unsigned getCol() const { return LineCol >> 24; } MDNode *getScope(const LLVMContext &Ctx) const; MDNode *getInlinedAt(const LLVMContext &Ctx) const; void getScopeAndInlinedAt(MDNode *&Scope, MDNode *&IA, const LLVMContext &Ctx) const; MDNode *getAsMDNode(const LLVMContext &Ctx) const; bool operator==(const DebugLoc &DL) const { return LineCol == DL.LineCol && ScopeIdx == DL.ScopeIdx; } bool operator!=(const DebugLoc &DL) const { return !(*this == DL); } void dump(const LLVMContext &Ctx) const; }; template <> struct DenseMapInfo { static DebugLoc getEmptyKey(); static DebugLoc getTombstoneKey(); static unsigned getHashValue(const DebugLoc &Key); static bool isEqual(const DebugLoc &LHS, const DebugLoc &RHS); }; } # 21 "../llvm/include/llvm/Instruction.h" 2 namespace llvm { class LLVMContext; class MDNode; template class SymbolTableListTraits; class Instruction : public User, public ilist_node { void operator=(const Instruction &); Instruction(const Instruction &); BasicBlock *Parent; DebugLoc DbgLoc; enum { HasMetadataBit = 1 << 15 }; public: ~Instruction(); Instruction *use_back() { return cast(*use_begin());} const Instruction *use_back() const { return cast(*use_begin());} inline const BasicBlock *getParent() const { return Parent; } inline BasicBlock *getParent() { return Parent; } void removeFromParent(); void eraseFromParent(); void insertBefore(Instruction *InsertPos); void insertAfter(Instruction *InsertPos); void moveBefore(Instruction *MovePos); unsigned getOpcode() const { return getValueID() - InstructionVal; } const char *getOpcodeName() const { return getOpcodeName(getOpcode()); } bool isTerminator() const { return isTerminator(getOpcode()); } bool isBinaryOp() const { return isBinaryOp(getOpcode()); } bool isShift() { return isShift(getOpcode()); } bool isCast() const { return isCast(getOpcode()); } static const char* getOpcodeName(unsigned OpCode); static inline bool isTerminator(unsigned OpCode) { return OpCode >= TermOpsBegin && OpCode < TermOpsEnd; } static inline bool isBinaryOp(unsigned Opcode) { return Opcode >= BinaryOpsBegin && Opcode < BinaryOpsEnd; } 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 isCast(unsigned OpCode) { return OpCode >= CastOpsBegin && OpCode < CastOpsEnd; } bool hasMetadata() const { return !DbgLoc.isUnknown() || hasMetadataHashEntry(); } bool hasMetadataOtherThanDebugLoc() const { return hasMetadataHashEntry(); } MDNode *getMetadata(unsigned KindID) const { if (!hasMetadata()) return 0; return getMetadataImpl(KindID); } MDNode *getMetadata(StringRef Kind) const { if (!hasMetadata()) return 0; return getMetadataImpl(Kind); } void getAllMetadata(SmallVectorImpl > &MDs)const{ if (hasMetadata()) getAllMetadataImpl(MDs); } void getAllMetadataOtherThanDebugLoc(SmallVectorImpl > &MDs) const { if (hasMetadataOtherThanDebugLoc()) getAllMetadataOtherThanDebugLocImpl(MDs); } void setMetadata(unsigned KindID, MDNode *Node); void setMetadata(StringRef Kind, MDNode *Node); void setDebugLoc(const DebugLoc &Loc) { DbgLoc = Loc; } const DebugLoc &getDebugLoc() const { return DbgLoc; } private: bool hasMetadataHashEntry() const { return (getSubclassDataFromValue() & HasMetadataBit) != 0; } MDNode *getMetadataImpl(unsigned KindID) const; MDNode *getMetadataImpl(StringRef Kind) const; void getAllMetadataImpl(SmallVectorImpl > &)const; void getAllMetadataOtherThanDebugLocImpl(SmallVectorImpl > &) const; void clearMetadataHashEntries(); public: # 205 "../llvm/include/llvm/Instruction.h" bool isAssociative() const { return isAssociative(getOpcode()); } static bool isAssociative(unsigned op); # 215 "../llvm/include/llvm/Instruction.h" bool isCommutative() const { return isCommutative(getOpcode()); } static bool isCommutative(unsigned op); bool mayWriteToMemory() const; bool mayReadFromMemory() const; bool mayReadOrWriteMemory() const { return mayReadFromMemory() || mayWriteToMemory(); } bool mayThrow() const; bool mayHaveSideEffects() const { return mayWriteToMemory() || mayThrow(); } Instruction *clone() const; bool isIdenticalTo(const Instruction *I) const; bool isIdenticalToWhenDefined(const Instruction *I) const; # 272 "../llvm/include/llvm/Instruction.h" bool isSameOperationAs(const Instruction *I) const; bool isUsedOutsideOfBlock(const BasicBlock *BB) const; static inline bool classof(const Instruction *) { return true; } static inline bool classof(const Value *V) { return V->getValueID() >= Value::InstructionVal; } enum TermOps { # 1 "../llvm/include/llvm/Instruction.def" 1 # 96 "../llvm/include/llvm/Instruction.def" TermOpsBegin = 1, Ret = 1, Br = 2, Switch = 3, IndirectBr = 4, Invoke = 5, Unwind = 6, Resume = 7, Unreachable = 8, TermOpsEnd = 8 +1 # 295 "../llvm/include/llvm/Instruction.h" 2 }; enum BinaryOps { # 1 "../llvm/include/llvm/Instruction.def" 1 # 96 "../llvm/include/llvm/Instruction.def" BinaryOpsBegin = 9, Add = 9, FAdd = 10, Sub = 11, FSub = 12, Mul = 13, FMul = 14, UDiv = 15, SDiv = 16, FDiv = 17, URem = 18, SRem = 19, FRem = 20, Shl = 21, LShr = 22, AShr = 23, And = 24, Or = 25, Xor = 26, BinaryOpsEnd = 26 +1 # 302 "../llvm/include/llvm/Instruction.h" 2 }; enum MemoryOps { # 1 "../llvm/include/llvm/Instruction.def" 1 # 96 "../llvm/include/llvm/Instruction.def" MemoryOpsBegin = 27, Alloca = 27, Load = 28, Store = 29, GetElementPtr = 30, Fence = 31, AtomicCmpXchg = 32, AtomicRMW = 33, MemoryOpsEnd = 33 +1 # 309 "../llvm/include/llvm/Instruction.h" 2 }; enum CastOps { # 1 "../llvm/include/llvm/Instruction.def" 1 # 96 "../llvm/include/llvm/Instruction.def" CastOpsBegin = 34, Trunc = 34, ZExt = 35, SExt = 36, FPToUI = 37, FPToSI = 38, UIToFP = 39, SIToFP = 40, FPTrunc = 41, FPExt = 42, PtrToInt = 43, IntToPtr = 44, BitCast = 45, CastOpsEnd = 45 +1 # 316 "../llvm/include/llvm/Instruction.h" 2 }; enum OtherOps { # 1 "../llvm/include/llvm/Instruction.def" 1 # 96 "../llvm/include/llvm/Instruction.def" OtherOpsBegin = 46, ICmp = 46, FCmp = 47, PHI = 48, Call = 49, Select = 50, UserOp1 = 51, UserOp2 = 52, VAArg = 53, ExtractElement = 54, InsertElement = 55, ShuffleVector = 56, ExtractValue = 57, InsertValue = 58, LandingPad = 59, OtherOpsEnd = 59 +1 # 323 "../llvm/include/llvm/Instruction.h" 2 }; private: void setValueSubclassData(unsigned short D) { Value::setValueSubclassData(D); } unsigned short getSubclassDataFromValue() const { return Value::getSubclassDataFromValue(); } void setHasMetadataHashEntry(bool V) { setValueSubclassData((getSubclassDataFromValue() & ~HasMetadataBit) | (V ? HasMetadataBit : 0)); } friend class SymbolTableListTraits; void setParent(BasicBlock *P); protected: void setInstructionSubclassData(unsigned short D) { (((D & HasMetadataBit) == 0 && "Out of range value put into field") ? static_cast (0) : __assert_fail ("(D & HasMetadataBit) == 0 && \"Out of range value put into field\"", "../llvm/include/llvm/Instruction.h", 347, __PRETTY_FUNCTION__)); setValueSubclassData((getSubclassDataFromValue() & HasMetadataBit) | D); } unsigned getSubclassDataFromInstruction() const { return getSubclassDataFromValue() & ~HasMetadataBit; } Instruction(Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, Instruction *InsertBefore = 0); Instruction(Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, BasicBlock *InsertAtEnd); virtual Instruction *clone_impl() const = 0; }; template<> class PointerLikeTypeTraits { typedef Instruction* PT; public: static inline void *getAsVoidPointer(PT P) { return P; } static inline PT getFromVoidPointer(void *P) { return static_cast(P); } enum { NumLowBitsAvailable = 2 }; }; } # 20 "../llvm/include/llvm/InstrTypes.h" 2 # 1 "../llvm/include/llvm/OperandTraits.h" 1 # 20 "../llvm/include/llvm/OperandTraits.h" namespace llvm { # 30 "../llvm/include/llvm/OperandTraits.h" template struct FixedNumOperandTraits { static Use *op_begin(SubClass* U) { return reinterpret_cast(U) - ARITY; } static Use *op_end(SubClass* U) { return reinterpret_cast(U); } static unsigned operands(const User*) { return ARITY; } }; # 50 "../llvm/include/llvm/OperandTraits.h" template struct OptionalOperandTraits : public FixedNumOperandTraits { static unsigned operands(const User *U) { return U->getNumOperands(); } }; # 65 "../llvm/include/llvm/OperandTraits.h" template struct VariadicOperandTraits { static Use *op_begin(SubClass* U) { return reinterpret_cast(U) - static_cast(U)->getNumOperands(); } static Use *op_end(SubClass* U) { return reinterpret_cast(U); } static unsigned operands(const User *U) { return U->getNumOperands(); } }; # 92 "../llvm/include/llvm/OperandTraits.h" template struct HungoffOperandTraits { static Use *op_begin(User* U) { return U->OperandList; } static Use *op_end(User* U) { return U->OperandList + U->getNumOperands(); } static unsigned operands(const User *U) { return U->getNumOperands(); } }; # 158 "../llvm/include/llvm/OperandTraits.h" } # 21 "../llvm/include/llvm/InstrTypes.h" 2 # 1 "../llvm/include/llvm/DerivedTypes.h" 1 # 21 "../llvm/include/llvm/DerivedTypes.h" # 1 "../llvm/include/llvm/Type.h" 1 # 20 "../llvm/include/llvm/Type.h" namespace llvm { class PointerType; class IntegerType; class raw_ostream; class Module; class LLVMContext; class LLVMContextImpl; template struct GraphTraits; # 38 "../llvm/include/llvm/Type.h" class Type { public: enum TypeID { VoidTyID = 0, HalfTyID, FloatTyID, DoubleTyID, X86_FP80TyID, FP128TyID, PPC_FP128TyID, LabelTyID, MetadataTyID, X86_MMXTyID, IntegerTyID, FunctionTyID, StructTyID, ArrayTyID, PointerTyID, VectorTyID, NumTypeIDs, LastPrimitiveTyID = X86_MMXTyID, FirstDerivedTyID = IntegerTyID }; 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), NumContainedTys(0), ContainedTys(0) {} ~Type() {} unsigned getSubclassData() const { return SubclassData; } void setSubclassData(unsigned val) { SubclassData = val; ((SubclassData == val && "Subclass data too large for field") ? static_cast (0) : __assert_fail ("SubclassData == val && \"Subclass data too large for field\"", "../llvm/include/llvm/Type.h", 98, __PRETTY_FUNCTION__)); } unsigned NumContainedTys; Type * const *ContainedTys; public: void print(raw_ostream &O) const; void dump() const; LLVMContext &getContext() const { return Context; } # 126 "../llvm/include/llvm/Type.h" TypeID getTypeID() const { return ID; } bool isVoidTy() const { return ID == VoidTyID; } bool isHalfTy() const { return ID == HalfTyID; } bool isFloatTy() const { return ID == FloatTyID; } bool isDoubleTy() const { return ID == DoubleTyID; } bool isX86_FP80Ty() const { return ID == X86_FP80TyID; } bool isFP128Ty() const { return ID == FP128TyID; } bool isPPC_FP128Ty() const { return ID == PPC_FP128TyID; } bool isFloatingPointTy() const { return ID == HalfTyID || ID == FloatTyID || ID == DoubleTyID || ID == X86_FP80TyID || ID == FP128TyID || ID == PPC_FP128TyID; } bool isX86_MMXTy() const { return ID == X86_MMXTyID; } bool isFPOrFPVectorTy() const; bool isLabelTy() const { return ID == LabelTyID; } bool isMetadataTy() const { return ID == MetadataTyID; } bool isIntegerTy() const { return ID == IntegerTyID; } bool isIntegerTy(unsigned Bitwidth) const; bool isIntOrIntVectorTy() const; bool isFunctionTy() const { return ID == FunctionTyID; } bool isStructTy() const { return ID == StructTyID; } bool isArrayTy() const { return ID == ArrayTyID; } bool isPointerTy() const { return ID == PointerTyID; } bool isVectorTy() const { return ID == VectorTyID; } bool canLosslesslyBitCastTo(Type *Ty) const; bool isEmptyTy() const; bool isPrimitiveType() const { return ID <= LastPrimitiveTyID; } bool isDerivedType() const { return ID >= FirstDerivedTyID; } bool isFirstClassType() const { return ID != FunctionTyID && ID != VoidTyID; } bool isSingleValueType() const { return (ID != VoidTyID && isPrimitiveType()) || ID == IntegerTyID || ID == PointerTyID || ID == VectorTyID; } bool isAggregateType() const { return ID == StructTyID || ID == ArrayTyID; } bool isSized() const { if (ID == IntegerTyID || isFloatingPointTy() || ID == PointerTyID || ID == X86_MMXTyID) return true; if (ID != StructTyID && ID != ArrayTyID && ID != VectorTyID) return false; return isSizedDerivedType(); } # 270 "../llvm/include/llvm/Type.h" unsigned getPrimitiveSizeInBits() const; unsigned getScalarSizeInBits(); int getFPMantissaWidth() const; Type *getScalarType(); unsigned getNumElements(); typedef Type * const *subtype_iterator; subtype_iterator subtype_begin() const { return ContainedTys; } subtype_iterator subtype_end() const { return &ContainedTys[NumContainedTys];} Type *getContainedType(unsigned i) const { ((i < NumContainedTys && "Index out of range!") ? static_cast (0) : __assert_fail ("i < NumContainedTys && \"Index out of range!\"", "../llvm/include/llvm/Type.h", 302, __PRETTY_FUNCTION__)); return ContainedTys[i]; } unsigned getNumContainedTypes() const { return NumContainedTys; } static Type *getPrimitiveType(LLVMContext &C, TypeID IDNumber); static Type *getVoidTy(LLVMContext &C); static Type *getLabelTy(LLVMContext &C); static Type *getHalfTy(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 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 PointerType *getHalfPtrTy(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); static inline bool classof(const Type *) { return true; } PointerType *getPointerTo(unsigned AddrSpace = 0); private: bool isSizedDerivedType() const; }; static inline raw_ostream &operator<<(raw_ostream &OS, Type &T) { T.print(OS); return OS; } template <> struct isa_impl { static inline bool doit(const Type &Ty) { return Ty.getTypeID() == Type::PointerTyID; } }; template <> struct GraphTraits { typedef Type NodeType; typedef Type::subtype_iterator ChildIteratorType; static inline NodeType *getEntryNode(Type *T) { return T; } static inline ChildIteratorType child_begin(NodeType *N) { return N->subtype_begin(); } static inline ChildIteratorType child_end(NodeType *N) { return N->subtype_end(); } }; template <> struct GraphTraits { typedef const Type NodeType; typedef Type::subtype_iterator ChildIteratorType; static inline NodeType *getEntryNode(NodeType *T) { return T; } static inline ChildIteratorType child_begin(NodeType *N) { return N->subtype_begin(); } static inline ChildIteratorType child_end(NodeType *N) { return N->subtype_end(); } }; } # 22 "../llvm/include/llvm/DerivedTypes.h" 2 namespace llvm { class Value; class APInt; class LLVMContext; template class ArrayRef; class StringRef; 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<<23)-1 }; static IntegerType *get(LLVMContext &C, unsigned NumBits); 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 inline bool classof(const IntegerType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == IntegerTyID; } }; class FunctionType : public Type { FunctionType(const FunctionType &); const FunctionType &operator=(const FunctionType &); FunctionType(Type *Result, ArrayRef Params, bool IsVarArgs); public: static FunctionType *get(Type *Result, ArrayRef 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(); } Type *getReturnType() const { return ContainedTys[0]; } typedef Type::subtype_iterator param_iterator; param_iterator param_begin() const { return ContainedTys + 1; } param_iterator param_end() const { return &ContainedTys[NumContainedTys]; } Type *getParamType(unsigned i) const { return ContainedTys[i+1]; } unsigned getNumParams() const { return NumContainedTys - 1; } static inline bool classof(const FunctionType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == FunctionTyID; } }; class CompositeType : public Type { protected: explicit CompositeType(LLVMContext &C, TypeID tid) : Type(C, tid) { } public: Type *getTypeAtIndex(const Value *V); Type *getTypeAtIndex(unsigned Idx); bool indexValid(const Value *V) const; bool indexValid(unsigned Idx) const; static inline bool classof(const CompositeType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == ArrayTyID || T->getTypeID() == StructTyID || T->getTypeID() == PointerTyID || T->getTypeID() == VectorTyID; } }; # 189 "../llvm/include/llvm/DerivedTypes.h" class StructType : public CompositeType { StructType(const StructType &); const StructType &operator=(const StructType &); StructType(LLVMContext &C) : CompositeType(C, StructTyID), SymbolTableEntry(0) {} enum { SCDB_HasBody = 1, SCDB_Packed = 2, SCDB_IsLiteral = 4 }; void *SymbolTableEntry; public: ~StructType() { delete [] ContainedTys; } static StructType *create(LLVMContext &Context, StringRef Name); static StructType *create(LLVMContext &Context); static StructType *create(ArrayRef Elements, StringRef Name, bool isPacked = false); static StructType *create(ArrayRef Elements); static StructType *create(LLVMContext &Context, ArrayRef Elements, StringRef Name, bool isPacked = false); static StructType *create(LLVMContext &Context, ArrayRef Elements); static StructType *create(StringRef Name, Type *elt1, ...) __attribute__((sentinel)); static StructType *get(LLVMContext &Context, ArrayRef Elements, bool isPacked = false); static StructType *get(LLVMContext &Context, bool isPacked = false); static StructType *get(Type *elt1, ...) __attribute__((sentinel)); 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 hasName() const { return SymbolTableEntry != 0; } StringRef getName() const; void setName(StringRef Name); void setBody(ArrayRef Elements, bool isPacked = false); void setBody(Type *elt1, ...) __attribute__((sentinel)); static bool isValidElementType(Type *ElemTy); typedef Type::subtype_iterator element_iterator; element_iterator element_begin() const { return ContainedTys; } element_iterator element_end() const { return &ContainedTys[NumContainedTys];} bool isLayoutIdentical(StructType *Other) const; unsigned getNumElements() const { return NumContainedTys; } Type *getElementType(unsigned N) const { ((N < NumContainedTys && "Element number out of range!") ? static_cast (0) : __assert_fail ("N < NumContainedTys && \"Element number out of range!\"", "../llvm/include/llvm/DerivedTypes.h", 286, __PRETTY_FUNCTION__)); return ContainedTys[N]; } static inline bool classof(const StructType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == StructTyID; } }; # 305 "../llvm/include/llvm/DerivedTypes.h" class SequentialType : public CompositeType { Type *ContainedType; SequentialType(const SequentialType &); const SequentialType &operator=(const SequentialType &); protected: SequentialType(TypeID TID, Type *ElType) : CompositeType(ElType->getContext(), TID), ContainedType(ElType) { ContainedTys = &ContainedType; NumContainedTys = 1; } public: Type *getElementType() const { return ContainedTys[0]; } static inline bool classof(const SequentialType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == ArrayTyID || T->getTypeID() == PointerTyID || T->getTypeID() == VectorTyID; } }; class ArrayType : public SequentialType { uint64_t NumElements; ArrayType(const ArrayType &); const ArrayType &operator=(const ArrayType &); ArrayType(Type *ElType, uint64_t NumEl); public: static ArrayType *get(Type *ElementType, uint64_t NumElements); static bool isValidElementType(Type *ElemTy); uint64_t getNumElements() const { return NumElements; } static inline bool classof(const ArrayType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == ArrayTyID; } }; class VectorType : public SequentialType { unsigned NumElements; VectorType(const VectorType &); const VectorType &operator=(const VectorType &); VectorType(Type *ElType, unsigned NumEl); public: static VectorType *get(Type *ElementType, unsigned NumElements); static VectorType *getInteger(VectorType *VTy) { unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits(); ((EltBits && "Element size must be of a non-zero size") ? static_cast (0) : __assert_fail ("EltBits && \"Element size must be of a non-zero size\"", "../llvm/include/llvm/DerivedTypes.h", 377, __PRETTY_FUNCTION__)); Type *EltTy = IntegerType::get(VTy->getContext(), EltBits); return VectorType::get(EltTy, VTy->getNumElements()); } static VectorType *getExtendedElementVectorType(VectorType *VTy) { unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits(); Type *EltTy = IntegerType::get(VTy->getContext(), EltBits * 2); return VectorType::get(EltTy, VTy->getNumElements()); } static VectorType *getTruncatedElementVectorType(VectorType *VTy) { unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits(); (((EltBits & 1) == 0 && "Cannot truncate vector element with odd bit-width") ? static_cast (0) : __assert_fail ("(EltBits & 1) == 0 && \"Cannot truncate vector element with odd bit-width\"", "../llvm/include/llvm/DerivedTypes.h" # 398 "../llvm/include/llvm/DerivedTypes.h" , 399 # 398 "../llvm/include/llvm/DerivedTypes.h" , __PRETTY_FUNCTION__)) ; Type *EltTy = IntegerType::get(VTy->getContext(), EltBits / 2); return VectorType::get(EltTy, VTy->getNumElements()); } static bool isValidElementType(Type *ElemTy); unsigned getNumElements() const { return NumElements; } unsigned getBitWidth() const { return NumElements * getElementType()->getPrimitiveSizeInBits(); } static inline bool classof(const VectorType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == VectorTyID; } }; class PointerType : public SequentialType { PointerType(const PointerType &); const PointerType &operator=(const PointerType &); explicit PointerType(Type *ElType, unsigned AddrSpace); public: static PointerType *get(Type *ElementType, unsigned AddressSpace); static PointerType *getUnqual(Type *ElementType) { return PointerType::get(ElementType, 0); } static bool isValidElementType(Type *ElemTy); inline unsigned getAddressSpace() const { return getSubclassData(); } static inline bool classof(const PointerType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == PointerTyID; } }; } # 22 "../llvm/include/llvm/InstrTypes.h" 2 # 1 "../llvm/include/llvm/ADT/Twine.h" 1 # 15 "../llvm/include/llvm/ADT/Twine.h" # 1 "/usr/include/c++/4.5/cassert" 1 3 # 43 "/usr/include/c++/4.5/cassert" 3 # 44 "/usr/include/c++/4.5/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/include/c++/4.5/cassert" 2 3 # 16 "../llvm/include/llvm/ADT/Twine.h" 2 namespace llvm { template class SmallVectorImpl; class StringRef; class raw_ostream; # 80 "../llvm/include/llvm/ADT/Twine.h" class Twine { enum NodeKind { NullKind, EmptyKind, TwineKind, CStringKind, StdStringKind, StringRefKind, CharKind, DecUIKind, DecIKind, DecULKind, DecLKind, DecULLKind, DecLLKind, UHexKind }; union Child { const Twine *twine; const char *cString; const std::string *stdString; const StringRef *stringRef; 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; }; private: Child LHS; Child RHS; unsigned char LHSKind; unsigned char RHSKind; private: explicit Twine(NodeKind Kind) : LHSKind(Kind), RHSKind(EmptyKind) { ((isNullary() && "Invalid kind!") ? static_cast (0) : __assert_fail ("isNullary() && \"Invalid kind!\"", "../llvm/include/llvm/ADT/Twine.h", 166, __PRETTY_FUNCTION__)); } explicit Twine(const Twine &_LHS, const Twine &_RHS) : LHSKind(TwineKind), RHSKind(TwineKind) { LHS.twine = &_LHS; RHS.twine = &_RHS; ((isValid() && "Invalid twine!") ? static_cast (0) : __assert_fail ("isValid() && \"Invalid twine!\"", "../llvm/include/llvm/ADT/Twine.h", 174, __PRETTY_FUNCTION__)); } explicit Twine(Child _LHS, NodeKind _LHSKind, Child _RHS, NodeKind _RHSKind) : LHS(_LHS), RHS(_RHS), LHSKind(_LHSKind), RHSKind(_RHSKind) { ((isValid() && "Invalid twine!") ? static_cast (0) : __assert_fail ("isValid() && \"Invalid twine!\"", "../llvm/include/llvm/ADT/Twine.h", 181, __PRETTY_FUNCTION__)); } 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 (NodeKind) LHSKind; } NodeKind getRHSKind() const { return (NodeKind) RHSKind; } void printOneChild(raw_ostream &OS, Child Ptr, NodeKind Kind) const; void printOneChildRepr(raw_ostream &OS, Child Ptr, NodeKind Kind) const; public: Twine() : LHSKind(EmptyKind), RHSKind(EmptyKind) { ((isValid() && "Invalid twine!") ? static_cast (0) : __assert_fail ("isValid() && \"Invalid twine!\"", "../llvm/include/llvm/ADT/Twine.h", 254, __PRETTY_FUNCTION__)); } Twine(const char *Str) : RHSKind(EmptyKind) { if (Str[0] != '\0') { LHS.cString = Str; LHSKind = CStringKind; } else LHSKind = EmptyKind; ((isValid() && "Invalid twine!") ? static_cast (0) : __assert_fail ("isValid() && \"Invalid twine!\"", "../llvm/include/llvm/ADT/Twine.h", 270, __PRETTY_FUNCTION__)); } Twine(const std::string &Str) : LHSKind(StdStringKind), RHSKind(EmptyKind) { LHS.stdString = &Str; ((isValid() && "Invalid twine!") ? static_cast (0) : __assert_fail ("isValid() && \"Invalid twine!\"", "../llvm/include/llvm/ADT/Twine.h", 277, __PRETTY_FUNCTION__)); } Twine(const StringRef &Str) : LHSKind(StringRefKind), RHSKind(EmptyKind) { LHS.stringRef = &Str; ((isValid() && "Invalid twine!") ? static_cast (0) : __assert_fail ("isValid() && \"Invalid twine!\"", "../llvm/include/llvm/ADT/Twine.h", 284, __PRETTY_FUNCTION__)); } explicit Twine(char Val) : LHSKind(CharKind), RHSKind(EmptyKind) { LHS.character = Val; } explicit Twine(signed char Val) : LHSKind(CharKind), RHSKind(EmptyKind) { LHS.character = static_cast(Val); } explicit Twine(unsigned char Val) : LHSKind(CharKind), RHSKind(EmptyKind) { LHS.character = static_cast(Val); } explicit Twine(unsigned Val) : LHSKind(DecUIKind), RHSKind(EmptyKind) { LHS.decUI = Val; } explicit Twine(int Val) : LHSKind(DecIKind), RHSKind(EmptyKind) { LHS.decI = Val; } explicit Twine(const unsigned long &Val) : LHSKind(DecULKind), RHSKind(EmptyKind) { LHS.decUL = &Val; } explicit Twine(const long &Val) : LHSKind(DecLKind), RHSKind(EmptyKind) { LHS.decL = &Val; } explicit Twine(const unsigned long long &Val) : LHSKind(DecULLKind), RHSKind(EmptyKind) { LHS.decULL = &Val; } explicit Twine(const long long &Val) : LHSKind(DecLLKind), RHSKind(EmptyKind) { LHS.decLL = &Val; } Twine(const char *_LHS, const StringRef &_RHS) : LHSKind(CStringKind), RHSKind(StringRefKind) { LHS.cString = _LHS; RHS.stringRef = &_RHS; ((isValid() && "Invalid twine!") ? static_cast (0) : __assert_fail ("isValid() && \"Invalid twine!\"", "../llvm/include/llvm/ADT/Twine.h", 351, __PRETTY_FUNCTION__)); } Twine(const StringRef &_LHS, const char *_RHS) : LHSKind(StringRefKind), RHSKind(CStringKind) { LHS.stringRef = &_LHS; RHS.cString = _RHS; ((isValid() && "Invalid twine!") ? static_cast (0) : __assert_fail ("isValid() && \"Invalid twine!\"", "../llvm/include/llvm/ADT/Twine.h", 359, __PRETTY_FUNCTION__)); } static Twine createNull() { return Twine(NullKind); } static Twine utohexstr(const uint64_t &Val) { Child LHS, RHS; LHS.uHex = &Val; RHS.twine = 0; 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: return true; default: return false; } } Twine concat(const Twine &Suffix) const; std::string str() const; void toVector(SmallVectorImpl &Out) const; StringRef getSingleStringRef() const { ((isSingleStringRef() &&"This cannot be had as a single stringref!") ? static_cast (0) : __assert_fail ("isSingleStringRef() &&\"This cannot be had as a single stringref!\"", "../llvm/include/llvm/ADT/Twine.h", 426, __PRETTY_FUNCTION__)); switch (getLHSKind()) { default: ((0 && "Out of sync with isSingleStringRef") ? static_cast (0) : __assert_fail ("0 && \"Out of sync with isSingleStringRef\"", "../llvm/include/llvm/ADT/Twine.h", 428, __PRETTY_FUNCTION__)); case EmptyKind: return StringRef(); case CStringKind: return StringRef(LHS.cString); case StdStringKind: return StringRef(*LHS.stdString); case StringRefKind: return *LHS.stringRef; } } StringRef toStringRef(SmallVectorImpl &Out) const; StringRef toNullTerminatedStringRef(SmallVectorImpl &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; } } # 23 "../llvm/include/llvm/InstrTypes.h" 2 namespace llvm { class LLVMContext; # 35 "../llvm/include/llvm/InstrTypes.h" class TerminatorInst : public Instruction { protected: TerminatorInst(Type *Ty, Instruction::TermOps iType, Use *Ops, unsigned NumOps, Instruction *InsertBefore = 0) : Instruction(Ty, iType, Ops, NumOps, InsertBefore) {} TerminatorInst(Type *Ty, Instruction::TermOps iType, Use *Ops, unsigned NumOps, BasicBlock *InsertAtEnd) : Instruction(Ty, iType, Ops, NumOps, InsertAtEnd) {} ~TerminatorInst(); virtual BasicBlock *getSuccessorV(unsigned idx) const = 0; virtual unsigned getNumSuccessorsV() const = 0; virtual void setSuccessorV(unsigned idx, BasicBlock *B) = 0; virtual TerminatorInst *clone_impl() const = 0; public: unsigned getNumSuccessors() const { return getNumSuccessorsV(); } BasicBlock *getSuccessor(unsigned idx) const { return getSuccessorV(idx); } void setSuccessor(unsigned idx, BasicBlock *B) { setSuccessorV(idx, B); } static inline bool classof(const TerminatorInst *) { return true; } static inline bool classof(const Instruction *I) { return I->isTerminator(); } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; class UnaryInstruction : public Instruction { void *operator new(size_t, unsigned); protected: UnaryInstruction(Type *Ty, unsigned iType, Value *V, Instruction *IB = 0) : 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); } ~UnaryInstruction(); 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; static inline bool classof(const UnaryInstruction *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Alloca || I->getOpcode() == Instruction::Load || I->getOpcode() == Instruction::VAArg || I->getOpcode() == Instruction::ExtractValue || (I->getOpcode() >= CastOpsBegin && I->getOpcode() < CastOpsEnd); } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; template <> struct OperandTraits : public FixedNumOperandTraits { }; UnaryInstruction::op_iterator UnaryInstruction::op_begin() { return OperandTraits::op_begin(this); } UnaryInstruction::const_op_iterator UnaryInstruction::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } UnaryInstruction::op_iterator UnaryInstruction::op_end() { return OperandTraits::op_end(this); } UnaryInstruction::const_op_iterator UnaryInstruction::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *UnaryInstruction::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/InstrTypes.h", 134, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void UnaryInstruction::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/InstrTypes.h", 134, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned UnaryInstruction::getNumOperands() const { return OperandTraits::operands(this); } template Use &UnaryInstruction::Op() { return this->OpFrom(this); } template const Use &UnaryInstruction::Op() const { return this->OpFrom(this); } class BinaryOperator : public Instruction { void *operator new(size_t, unsigned); protected: void init(BinaryOps iType); 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); virtual BinaryOperator *clone_impl() 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 inline Use &Op(); template 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 = 0); static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2, const Twine &Name, BasicBlock *InsertAtEnd); # 182 "../llvm/include/llvm/InstrTypes.h" # 1 "../llvm/include/llvm/Instruction.def" 1 # 96 "../llvm/include/llvm/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); } # 183 "../llvm/include/llvm/InstrTypes.h" 2 # 1 "../llvm/include/llvm/Instruction.def" 1 # 96 "../llvm/include/llvm/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); } # 189 "../llvm/include/llvm/InstrTypes.h" 2 # 1 "../llvm/include/llvm/Instruction.def" 1 # 96 "../llvm/include/llvm/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); } # 195 "../llvm/include/llvm/InstrTypes.h" 2 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; } # 267 "../llvm/include/llvm/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); } # 289 "../llvm/include/llvm/InstrTypes.h" static BinaryOperator *CreateNeg(Value *Op, const Twine &Name = "", Instruction *InsertBefore = 0); static BinaryOperator *CreateNeg(Value *Op, const Twine &Name, BasicBlock *InsertAtEnd); static BinaryOperator *CreateNSWNeg(Value *Op, const Twine &Name = "", Instruction *InsertBefore = 0); static BinaryOperator *CreateNSWNeg(Value *Op, const Twine &Name, BasicBlock *InsertAtEnd); static BinaryOperator *CreateNUWNeg(Value *Op, const Twine &Name = "", Instruction *InsertBefore = 0); static BinaryOperator *CreateNUWNeg(Value *Op, const Twine &Name, BasicBlock *InsertAtEnd); static BinaryOperator *CreateFNeg(Value *Op, const Twine &Name = "", Instruction *InsertBefore = 0); static BinaryOperator *CreateFNeg(Value *Op, const Twine &Name, BasicBlock *InsertAtEnd); static BinaryOperator *CreateNot(Value *Op, const Twine &Name = "", Instruction *InsertBefore = 0); static BinaryOperator *CreateNot(Value *Op, const Twine &Name, BasicBlock *InsertAtEnd); static bool isNeg(const Value *V); static bool isFNeg(const Value *V); static bool isNot(const Value *V); static const Value *getNegArgument(const Value *BinOp); static Value *getNegArgument( Value *BinOp); static const Value *getFNegArgument(const Value *BinOp); static Value *getFNegArgument( Value *BinOp); static const Value *getNotArgument(const Value *BinOp); static Value *getNotArgument( Value *BinOp); BinaryOps getOpcode() const { return static_cast(Instruction::getOpcode()); } bool swapOperands(); void setHasNoUnsignedWrap(bool b = true); void setHasNoSignedWrap(bool b = true); void setIsExact(bool b = true); bool hasNoUnsignedWrap() const; bool hasNoSignedWrap() const; bool isExact() const; static inline bool classof(const BinaryOperator *) { return true; } static inline bool classof(const Instruction *I) { return I->isBinaryOp(); } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; template <> struct OperandTraits : public FixedNumOperandTraits { }; BinaryOperator::op_iterator BinaryOperator::op_begin() { return OperandTraits::op_begin(this); } BinaryOperator::const_op_iterator BinaryOperator::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } BinaryOperator::op_iterator BinaryOperator::op_end() { return OperandTraits::op_end(this); } BinaryOperator::const_op_iterator BinaryOperator::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *BinaryOperator::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/InstrTypes.h", 378, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void BinaryOperator::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/InstrTypes.h", 378, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned BinaryOperator::getNumOperands() const { return OperandTraits::operands(this); } template Use &BinaryOperator::Op() { return this->OpFrom(this); } template const Use &BinaryOperator::Op() const { return this->OpFrom(this); } # 390 "../llvm/include/llvm/InstrTypes.h" class CastInst : public UnaryInstruction { virtual void anchor(); protected: CastInst(Type *Ty, unsigned iType, Value *S, const Twine &NameStr = "", Instruction *InsertBefore = 0) : 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 = 0 ); 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 = 0 ); static CastInst *CreateZExtOrBitCast( Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd ); static CastInst *CreateSExtOrBitCast( Value *S, Type *Ty, const Twine &Name = "", Instruction *InsertBefore = 0 ); 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 = 0 ); static CastInst *CreateIntegerCast( Value *S, Type *Ty, bool isSigned, const Twine &Name = "", Instruction *InsertBefore = 0 ); 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 = 0 ); static CastInst *CreateFPCast( Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd ); static CastInst *CreateTruncOrBitCast( Value *S, Type *Ty, const Twine &Name = "", Instruction *InsertBefore = 0 ); static CastInst *CreateTruncOrBitCast( Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd ); static bool isCastable( Type *SrcTy, Type *DestTy ); static Instruction::CastOps getCastOpcode( const Value *Val, bool SrcIsSigned, Type *Ty, bool DstIsSigned ); bool isIntegerCast() const; bool isLosslessCast() const; # 570 "../llvm/include/llvm/InstrTypes.h" static bool isNoopCast( Instruction::CastOps Opcode, Type *SrcTy, Type *DstTy, Type *IntPtrTy ); bool isNoopCast( Type *IntPtrTy ) const; static unsigned isEliminableCastPair( Instruction::CastOps firstOpcode, Instruction::CastOps secondOpcode, Type *SrcTy, Type *MidTy, Type *DstTy, Type *IntPtrTy ); 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 inline bool classof(const CastInst *) { return true; } static inline bool classof(const Instruction *I) { return I->isCast(); } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; class CmpInst : public Instruction { void *operator new(size_t, unsigned); CmpInst(); protected: CmpInst(Type *ty, Instruction::OtherOps op, unsigned short pred, Value *LHS, Value *RHS, const Twine &Name = "", Instruction *InsertBefore = 0); CmpInst(Type *ty, Instruction::OtherOps op, unsigned short pred, Value *LHS, Value *RHS, const Twine &Name, BasicBlock *InsertAtEnd); virtual void Anchor() const; public: enum Predicate { 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 }; void *operator new(size_t s) { return User::operator new(s, 2); } static CmpInst *Create(OtherOps Op, unsigned short predicate, Value *S1, Value *S2, const Twine &Name = "", Instruction *InsertBefore = 0); static CmpInst *Create(OtherOps Op, unsigned short predicate, Value *S1, Value *S2, const Twine &Name, BasicBlock *InsertAtEnd); OtherOps getOpcode() const { return static_cast(Instruction::getOpcode()); } Predicate getPredicate() const { return Predicate(getSubclassDataFromInstruction()); } void setPredicate(Predicate P) { setInstructionSubclassData(P); } static bool isFPPredicate(Predicate P) { return P >= FIRST_FCMP_PREDICATE && P <= LAST_FCMP_PREDICATE; } static bool isIntPredicate(Predicate P) { return P >= FIRST_ICMP_PREDICATE && P <= LAST_ICMP_PREDICATE; } 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); 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 inline Use &Op(); template 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()); } bool isTrueWhenEqual() const { return isTrueWhenEqual(getPredicate()); } bool isFalseWhenEqual() const { return isFalseWhenEqual(getPredicate()); } static bool isUnsigned(unsigned short predicate); static bool isSigned(unsigned short predicate); static bool isOrdered(unsigned short predicate); static bool isUnordered(unsigned short predicate); static bool isTrueWhenEqual(unsigned short predicate); static bool isFalseWhenEqual(unsigned short predicate); static inline bool classof(const CmpInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::ICmp || I->getOpcode() == Instruction::FCmp; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } static Type* makeCmpResultType(Type* opnd_type) { if (VectorType* vt = dyn_cast(opnd_type)) { return VectorType::get(Type::getInt1Ty(opnd_type->getContext()), vt->getNumElements()); } return Type::getInt1Ty(opnd_type->getContext()); } private: void setValueSubclassData(unsigned short D) { Value::setValueSubclassData(D); } }; template <> struct OperandTraits : public FixedNumOperandTraits { }; CmpInst::op_iterator CmpInst::op_begin() { return OperandTraits::op_begin(this); } CmpInst::const_op_iterator CmpInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } CmpInst::op_iterator CmpInst::op_end() { return OperandTraits::op_end(this); } CmpInst::const_op_iterator CmpInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *CmpInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/InstrTypes.h", 850, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void CmpInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/InstrTypes.h", 850, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned CmpInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &CmpInst::Op() { return this->OpFrom(this); } template const Use &CmpInst::Op() const { return this->OpFrom(this); } } # 20 "../llvm/include/llvm/Instructions.h" 2 # 1 "../llvm/include/llvm/Attributes.h" 1 # 18 "../llvm/include/llvm/Attributes.h" # 1 "../llvm/include/llvm/Support/MathExtras.h" 1 # 17 "../llvm/include/llvm/Support/MathExtras.h" # 1 "../llvm/include/llvm/Support/SwapByteOrder.h" 1 # 19 "../llvm/include/llvm/Support/SwapByteOrder.h" # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 20 "../llvm/include/llvm/Support/SwapByteOrder.h" 2 # 1 "/usr/include/c++/4.5/limits" 1 3 # 41 "/usr/include/c++/4.5/limits" 3 # 42 "/usr/include/c++/4.5/limits" 3 # 148 "/usr/include/c++/4.5/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 }; # 190 "/usr/include/c++/4.5/limits" 3 struct __numeric_limits_base { static const bool is_specialized = false; static const int digits = 0; static const int digits10 = 0; static const bool is_signed = false; static const bool is_integer = false; static const bool is_exact = false; static const int radix = 0; static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static const bool is_iec559 = false; static const bool is_bounded = false; static const bool is_modulo = false; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; # 283 "/usr/include/c++/4.5/limits" 3 template struct numeric_limits : public __numeric_limits_base { static _Tp min() throw() { return static_cast<_Tp>(0); } static _Tp max() throw() { return static_cast<_Tp>(0); } static _Tp epsilon() throw() { return static_cast<_Tp>(0); } static _Tp round_error() throw() { return static_cast<_Tp>(0); } static _Tp infinity() throw() { return static_cast<_Tp>(0); } static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); } static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); } static _Tp denorm_min() throw() { return static_cast<_Tp>(0); } }; # 334 "/usr/include/c++/4.5/limits" 3 template<> struct numeric_limits { static const bool is_specialized = true; static bool min() throw() { return false; } static bool max() throw() { return true; } static const int digits = 1; static const int digits10 = 0; static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static bool epsilon() throw() { return false; } static bool round_error() throw() { return false; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static bool infinity() throw() { return false; } static bool quiet_NaN() throw() { return false; } static bool signaling_NaN() throw() { return false; } static bool denorm_min() throw() { return false; } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = false; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static char min() throw() { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); } static char max() throw() { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643 / 2136); static const bool is_signed = ((char)(-1) < 0); static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static char epsilon() throw() { return 0; } static char round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static char infinity() throw() { return char(); } static char quiet_NaN() throw() { return char(); } static char signaling_NaN() throw() { return char(); } static char denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static signed char min() throw() { return -127 - 1; } static signed char max() throw() { return 127; } static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); static const int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static signed char epsilon() throw() { return 0; } static signed char round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static signed char infinity() throw() { return static_cast(0); } static signed char quiet_NaN() throw() { return static_cast(0); } static signed char signaling_NaN() throw() { return static_cast(0); } static signed char denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned char min() throw() { return 0; } static unsigned char max() throw() { return 127 * 2U + 1; } static const int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); static const int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned char epsilon() throw() { return 0; } static unsigned char round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned char infinity() throw() { return static_cast(0); } static unsigned char quiet_NaN() throw() { return static_cast(0); } static unsigned char signaling_NaN() throw() { return static_cast(0); } static unsigned char denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static wchar_t min() throw() { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); } static wchar_t max() throw() { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); static const int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643 / 2136); static const bool is_signed = ((wchar_t)(-1) < 0); static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static wchar_t epsilon() throw() { return 0; } static wchar_t round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static wchar_t infinity() throw() { return wchar_t(); } static wchar_t quiet_NaN() throw() { return wchar_t(); } static wchar_t signaling_NaN() throw() { return wchar_t(); } static wchar_t denorm_min() throw() { return wchar_t(); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; # 744 "/usr/include/c++/4.5/limits" 3 template<> struct numeric_limits { static const bool is_specialized = true; static short min() throw() { return -32767 - 1; } static short max() throw() { return 32767; } static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static short epsilon() throw() { return 0; } static short round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static short infinity() throw() { return short(); } static short quiet_NaN() throw() { return short(); } static short signaling_NaN() throw() { return short(); } static short denorm_min() throw() { return short(); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned short min() throw() { return 0; } static unsigned short max() throw() { return 32767 * 2U + 1; } static const int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); static const int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned short epsilon() throw() { return 0; } static unsigned short round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned short infinity() throw() { return static_cast(0); } static unsigned short quiet_NaN() throw() { return static_cast(0); } static unsigned short signaling_NaN() throw() { return static_cast(0); } static unsigned short denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static int min() throw() { return -2147483647 - 1; } static int max() throw() { return 2147483647; } static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static int epsilon() throw() { return 0; } static int round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static int infinity() throw() { return static_cast(0); } static int quiet_NaN() throw() { return static_cast(0); } static int signaling_NaN() throw() { return static_cast(0); } static int denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned int min() throw() { return 0; } static unsigned int max() throw() { return 2147483647 * 2U + 1; } static const int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); static const int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned int epsilon() throw() { return 0; } static unsigned int round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned int infinity() throw() { return static_cast(0); } static unsigned int quiet_NaN() throw() { return static_cast(0); } static unsigned int signaling_NaN() throw() { return static_cast(0); } static unsigned int denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static long min() throw() { return -9223372036854775807L - 1; } static long max() throw() { return 9223372036854775807L; } static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static long epsilon() throw() { return 0; } static long round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static long infinity() throw() { return static_cast(0); } static long quiet_NaN() throw() { return static_cast(0); } static long signaling_NaN() throw() { return static_cast(0); } static long denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned long min() throw() { return 0; } static unsigned long max() throw() { return 9223372036854775807L * 2UL + 1; } static const int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); static const int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned long epsilon() throw() { return 0; } static unsigned long round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned long infinity() throw() { return static_cast(0); } static unsigned long quiet_NaN() throw() { return static_cast(0); } static unsigned long signaling_NaN() throw() { return static_cast(0); } static unsigned long denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static long long min() throw() { return -9223372036854775807LL - 1; } static long long max() throw() { return 9223372036854775807LL; } static const int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0)); static const int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static long long epsilon() throw() { return 0; } static long long round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static long long infinity() throw() { return static_cast(0); } static long long quiet_NaN() throw() { return static_cast(0); } static long long signaling_NaN() throw() { return static_cast(0); } static long long denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned long long min() throw() { return 0; } static unsigned long long max() throw() { return 9223372036854775807LL * 2ULL + 1; } static const int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); static const int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned long long epsilon() throw() { return 0; } static unsigned long long round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned long long infinity() throw() { return static_cast(0); } static unsigned long long quiet_NaN() throw() { return static_cast(0); } static unsigned long long signaling_NaN() throw() { return static_cast(0); } static unsigned long long denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = true; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static float min() throw() { return 1.17549435082228750797e-38F; } static float max() throw() { return 3.40282346638528859812e+38F; } static const int digits = 24; static const int digits10 = 6; static const bool is_signed = true; static const bool is_integer = false; static const bool is_exact = false; static const int radix = 2; static float epsilon() throw() { return 1.19209289550781250000e-7F; } static float round_error() throw() { return 0.5F; } static const int min_exponent = (-125); static const int min_exponent10 = (-37); static const int max_exponent = 128; static const int max_exponent10 = 38; static const bool has_infinity = 1; static const bool has_quiet_NaN = 1; static const bool has_signaling_NaN = has_quiet_NaN; static const float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static const bool has_denorm_loss = false; static float infinity() throw() { return __builtin_huge_valf (); } static float quiet_NaN() throw() { return __builtin_nanf (""); } static float signaling_NaN() throw() { return __builtin_nansf (""); } static float denorm_min() throw() { return 1.40129846432481707092e-45F; } static const bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static const bool is_bounded = true; static const bool is_modulo = false; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_to_nearest; }; template<> struct numeric_limits { static const bool is_specialized = true; static double min() throw() { return ((double)2.22507385850720138309e-308L); } static double max() throw() { return ((double)1.79769313486231570815e+308L); } static const int digits = 53; static const int digits10 = 15; static const bool is_signed = true; static const bool is_integer = false; static const bool is_exact = false; static const int radix = 2; static double epsilon() throw() { return ((double)2.22044604925031308085e-16L); } static double round_error() throw() { return 0.5; } static const int min_exponent = (-1021); static const int min_exponent10 = (-307); static const int max_exponent = 1024; static const int max_exponent10 = 308; static const bool has_infinity = 1; static const bool has_quiet_NaN = 1; static const bool has_signaling_NaN = has_quiet_NaN; static const float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static const bool has_denorm_loss = false; static double infinity() throw() { return __builtin_huge_val(); } static double quiet_NaN() throw() { return __builtin_nan (""); } static double signaling_NaN() throw() { return __builtin_nans (""); } static double denorm_min() throw() { return ((double)4.94065645841246544177e-324L); } static const bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static const bool is_bounded = true; static const bool is_modulo = false; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_to_nearest; }; template<> struct numeric_limits { static const bool is_specialized = true; static long double min() throw() { return 3.36210314311209350626e-4932L; } static long double max() throw() { return 1.18973149535723176502e+4932L; } static const int digits = 64; static const int digits10 = 18; static const bool is_signed = true; static const bool is_integer = false; static const bool is_exact = false; static const int radix = 2; static long double epsilon() throw() { return 1.08420217248550443401e-19L; } static long double round_error() throw() { return 0.5L; } static const int min_exponent = (-16381); static const int min_exponent10 = (-4931); static const int max_exponent = 16384; static const int max_exponent10 = 4932; static const bool has_infinity = 1; static const bool has_quiet_NaN = 1; static const bool has_signaling_NaN = has_quiet_NaN; static const float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static const bool has_denorm_loss = false; static long double infinity() throw() { return __builtin_huge_vall (); } static long double quiet_NaN() throw() { return __builtin_nanl (""); } static long double signaling_NaN() throw() { return __builtin_nansl (""); } static long double denorm_min() throw() { return 3.64519953188247460253e-4951L; } static const bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static const bool is_bounded = true; static const bool is_modulo = false; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_to_nearest; }; } # 21 "../llvm/include/llvm/Support/SwapByteOrder.h" 2 namespace llvm { namespace sys { inline uint16_t SwapByteOrder_16(uint16_t value) { uint16_t Hi = value << 8; uint16_t Lo = value >> 8; return Hi | Lo; } inline uint32_t SwapByteOrder_32(uint32_t value) { return __builtin_bswap32(value); # 54 "../llvm/include/llvm/Support/SwapByteOrder.h" } inline uint64_t SwapByteOrder_64(uint64_t value) { return __builtin_bswap64(value); } inline unsigned char SwapByteOrder(unsigned char C) { return C; } inline signed char SwapByteOrder(signed char C) { return C; } inline char SwapByteOrder(char C) { return C; } inline unsigned short SwapByteOrder(unsigned short C) { return SwapByteOrder_16(C); } inline signed short SwapByteOrder( signed short C) { return SwapByteOrder_16(C); } inline unsigned int SwapByteOrder(unsigned int C) { return SwapByteOrder_32(C); } inline signed int SwapByteOrder( signed int C) { return SwapByteOrder_32(C); } inline unsigned long SwapByteOrder(unsigned long C) { return SwapByteOrder_64(C); } inline signed long SwapByteOrder( signed long C) { return SwapByteOrder_64(C); } inline unsigned long long SwapByteOrder(unsigned long long C) { return SwapByteOrder_64(C); } inline signed long long SwapByteOrder(signed long long C) { return SwapByteOrder_64(C); } } } # 18 "../llvm/include/llvm/Support/MathExtras.h" 2 namespace llvm { inline uint32_t Hi_32(uint64_t Value) { return static_cast(Value >> 32); } inline uint32_t Lo_32(uint64_t Value) { return static_cast(Value); } template inline bool isInt(int64_t x) { return N >= 64 || (-(1L<<(N-1)) <= x && x < (1L<<(N-1))); } template<> inline bool isInt<8>(int64_t x) { return static_cast(x) == x; } template<> inline bool isInt<16>(int64_t x) { return static_cast(x) == x; } template<> inline bool isInt<32>(int64_t x) { return static_cast(x) == x; } template inline bool isShiftedInt(int64_t x) { return isInt(x) && (x % (1< inline bool isUInt(uint64_t x) { return N >= 64 || x < (1UL< inline bool isUInt<8>(uint64_t x) { return static_cast(x) == x; } template<> inline bool isUInt<16>(uint64_t x) { return static_cast(x) == x; } template<> inline bool isUInt<32>(uint64_t x) { return static_cast(x) == x; } template inline bool isShiftedUInt(uint64_t x) { return isUInt(x) && (x % (1<> (64 - N))); } inline bool isIntN(unsigned N, int64_t x) { return N >= 64 || (-(1L<<(N-1)) <= x && x < (1L<<(N-1))); } inline bool isMask_32(uint32_t Value) { return Value && ((Value + 1) & Value) == 0; } inline bool isMask_64(uint64_t Value) { return Value && ((Value + 1) & Value) == 0; } inline bool isShiftedMask_32(uint32_t Value) { return isMask_32((Value - 1) | Value); } inline bool isShiftedMask_64(uint64_t Value) { return isMask_64((Value - 1) | Value); } inline bool isPowerOf2_32(uint32_t Value) { return Value && !(Value & (Value - 1)); } inline bool isPowerOf2_64(uint64_t Value) { return Value && !(Value & (Value - int64_t(1L))); } inline uint16_t ByteSwap_16(uint16_t Value) { return sys::SwapByteOrder_16(Value); } inline uint32_t ByteSwap_32(uint32_t Value) { return sys::SwapByteOrder_32(Value); } inline uint64_t ByteSwap_64(uint64_t Value) { return sys::SwapByteOrder_64(Value); } inline unsigned CountLeadingZeros_32(uint32_t Value) { unsigned Count; if (!Value) return 32; Count = __builtin_clz(Value); # 181 "../llvm/include/llvm/Support/MathExtras.h" return Count; } inline unsigned CountLeadingOnes_32(uint32_t Value) { return CountLeadingZeros_32(~Value); } inline unsigned CountLeadingZeros_64(uint64_t Value) { unsigned Count; if (!Value) return 64; Count = __builtin_clzll(Value); # 233 "../llvm/include/llvm/Support/MathExtras.h" return Count; } inline unsigned CountLeadingOnes_64(uint64_t Value) { return CountLeadingZeros_64(~Value); } inline unsigned CountTrailingZeros_32(uint32_t Value) { return Value ? __builtin_ctz(Value) : 32; # 259 "../llvm/include/llvm/Support/MathExtras.h" } inline unsigned CountTrailingOnes_32(uint32_t Value) { return CountTrailingZeros_32(~Value); } inline unsigned CountTrailingZeros_64(uint64_t Value) { return Value ? __builtin_ctzll(Value) : 64; # 286 "../llvm/include/llvm/Support/MathExtras.h" } inline unsigned CountTrailingOnes_64(uint64_t Value) { return CountTrailingZeros_64(~Value); } inline unsigned CountPopulation_32(uint32_t Value) { return __builtin_popcount(Value); } inline unsigned CountPopulation_64(uint64_t Value) { return __builtin_popcountll(Value); } inline unsigned Log2_32(uint32_t Value) { return 31 - CountLeadingZeros_32(Value); } inline unsigned Log2_64(uint64_t Value) { return 63 - CountLeadingZeros_64(Value); } inline unsigned Log2_32_Ceil(uint32_t Value) { return 32-CountLeadingZeros_32(Value-1); } inline unsigned Log2_64_Ceil(uint64_t Value) { return 64-CountLeadingZeros_64(Value-1); } inline uint64_t GreatestCommonDivisor64(uint64_t A, uint64_t B) { while (B) { uint64_t T = B; B = A % B; A = T; } return A; } inline double BitsToDouble(uint64_t Bits) { union { uint64_t L; double D; } T; T.L = Bits; return T.D; } inline float BitsToFloat(uint32_t Bits) { union { uint32_t I; float F; } T; T.I = Bits; return T.F; } inline uint64_t DoubleToBits(double Double) { union { uint64_t L; double D; } T; T.D = Double; return T.L; } inline uint32_t FloatToBits(float Float) { union { uint32_t I; float F; } T; T.F = Float; return T.I; } int IsNAN(float f); int IsNAN(double d); int IsInf(float f); int IsInf(double d); static inline uint64_t MinAlign(uint64_t A, uint64_t B) { return (A | B) & -(A | B); } static 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; } # 442 "../llvm/include/llvm/Support/MathExtras.h" inline uint64_t RoundUpToAlignment(uint64_t Value, uint64_t Align) { return ((Value + Align - 1) / Align) * Align; } inline uint64_t OffsetToAlignment(uint64_t Value, uint64_t Align) { return RoundUpToAlignment(Value, Align) - Value; } inline int64_t abs64(int64_t x) { return (x < 0) ? -x : x; } template inline int32_t SignExtend32(uint32_t x) { return int32_t(x << (32 - B)) >> (32 - B); } template inline int64_t SignExtend64(uint64_t x) { return int64_t(x << (64 - B)) >> (64 - B); } } # 19 "../llvm/include/llvm/Attributes.h" 2 # 1 "/usr/include/c++/4.5/cassert" 1 3 # 43 "/usr/include/c++/4.5/cassert" 3 # 44 "/usr/include/c++/4.5/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/include/c++/4.5/cassert" 2 3 # 20 "../llvm/include/llvm/Attributes.h" 2 namespace llvm { class Type; typedef unsigned Attributes; namespace Attribute { const Attributes None = 0; const Attributes ZExt = 1<<0; const Attributes SExt = 1<<1; const Attributes NoReturn = 1<<2; const Attributes InReg = 1<<3; const Attributes StructRet = 1<<4; const Attributes NoUnwind = 1<<5; const Attributes NoAlias = 1<<6; const Attributes ByVal = 1<<7; const Attributes Nest = 1<<8; const Attributes ReadNone = 1<<9; const Attributes ReadOnly = 1<<10; const Attributes NoInline = 1<<11; const Attributes AlwaysInline = 1<<12; const Attributes OptimizeForSize = 1<<13; const Attributes StackProtect = 1<<14; const Attributes StackProtectReq = 1<<15; const Attributes Alignment = 31<<16; const Attributes NoCapture = 1<<21; const Attributes NoRedZone = 1<<22; const Attributes NoImplicitFloat = 1<<23; const Attributes Naked = 1<<24; const Attributes InlineHint = 1<<25; const Attributes StackAlignment = 7<<26; const Attributes ReturnsTwice = 1<<29; const Attributes UWTable = 1<<30; const Attributes NonLazyBind = 1U<<31; # 88 "../llvm/include/llvm/Attributes.h" const Attributes ParameterOnly = ByVal | Nest | StructRet | NoCapture; const Attributes FunctionOnly = NoReturn | NoUnwind | ReadNone | ReadOnly | NoInline | AlwaysInline | OptimizeForSize | StackProtect | StackProtectReq | NoRedZone | NoImplicitFloat | Naked | InlineHint | StackAlignment | UWTable | NonLazyBind | ReturnsTwice; const Attributes VarArgsIncompatible = StructRet; const Attributes MutuallyIncompatible[4] = { ByVal | InReg | Nest | StructRet, ZExt | SExt, ReadNone | ReadOnly, NoInline | AlwaysInline }; Attributes typeIncompatible(Type *Ty); inline Attributes constructAlignmentFromInt(unsigned i) { if (i == 0) return 0; ((isPowerOf2_32(i) && "Alignment must be a power of two.") ? static_cast (0) : __assert_fail ("isPowerOf2_32(i) && \"Alignment must be a power of two.\"", "../llvm/include/llvm/Attributes.h", 118, __PRETTY_FUNCTION__)); ((i <= 0x40000000 && "Alignment too large.") ? static_cast (0) : __assert_fail ("i <= 0x40000000 && \"Alignment too large.\"", "../llvm/include/llvm/Attributes.h", 119, __PRETTY_FUNCTION__)); return (Log2_32(i)+1) << 16; } inline unsigned getAlignmentFromAttrs(Attributes A) { Attributes Align = A & Attribute::Alignment; if (Align == 0) return 0; return 1U << ((Align >> 16) - 1); } inline Attributes constructStackAlignmentFromInt(unsigned i) { if (i == 0) return 0; ((isPowerOf2_32(i) && "Alignment must be a power of two.") ? static_cast (0) : __assert_fail ("isPowerOf2_32(i) && \"Alignment must be a power of two.\"", "../llvm/include/llvm/Attributes.h", 139, __PRETTY_FUNCTION__)); ((i <= 0x100 && "Alignment too large.") ? static_cast (0) : __assert_fail ("i <= 0x100 && \"Alignment too large.\"", "../llvm/include/llvm/Attributes.h", 140, __PRETTY_FUNCTION__)); return (Log2_32(i)+1) << 26; } inline unsigned getStackAlignmentFromAttrs(Attributes A) { Attributes StackAlign = A & Attribute::StackAlignment; if (StackAlign == 0) return 0; return 1U << ((StackAlign >> 26) - 1); } std::string getAsString(Attributes Attrs); } struct AttributeWithIndex { Attributes Attrs; unsigned Index; static AttributeWithIndex get(unsigned Idx, Attributes Attrs) { AttributeWithIndex P; P.Index = Idx; P.Attrs = Attrs; return P; } }; class AttributeListImpl; class AttrListPtr { AttributeListImpl *AttrList; public: AttrListPtr() : AttrList(0) {} AttrListPtr(const AttrListPtr &P); const AttrListPtr &operator=(const AttrListPtr &RHS); ~AttrListPtr(); static AttrListPtr get(const AttributeWithIndex *Attr, unsigned NumAttrs); template static AttrListPtr get(const Iter &I, const Iter &E) { if (I == E) return AttrListPtr(); return get(&*I, static_cast(E-I)); } AttrListPtr addAttr(unsigned Idx, Attributes Attrs) const; AttrListPtr removeAttr(unsigned Idx, Attributes Attrs) const; Attributes getParamAttributes(unsigned Idx) const { ((Idx && Idx != ~0U && "Invalid parameter index!") ? static_cast (0) : __assert_fail ("Idx && Idx != ~0U && \"Invalid parameter index!\"", "../llvm/include/llvm/Attributes.h", 227, __PRETTY_FUNCTION__)); return getAttributes(Idx); } Attributes getRetAttributes() const { return getAttributes(0); } Attributes getFnAttributes() const { return getAttributes(~0U); } bool paramHasAttr(unsigned Idx, Attributes Attr) const { return (getAttributes(Idx) & Attr) != 0; } unsigned getParamAlignment(unsigned Idx) const { return Attribute::getAlignmentFromAttrs(getAttributes(Idx)); } bool hasAttrSomewhere(Attributes Attr) const; bool operator==(const AttrListPtr &RHS) const { return AttrList == RHS.AttrList; } bool operator!=(const AttrListPtr &RHS) const { return AttrList != RHS.AttrList; } void dump() const; void *getRawPointer() const { return AttrList; } bool isEmpty() const { return AttrList == 0; } unsigned getNumSlots() const; const AttributeWithIndex &getSlot(unsigned Slot) const; private: explicit AttrListPtr(AttributeListImpl *L); Attributes getAttributes(unsigned Idx) const; }; } # 22 "../llvm/include/llvm/Instructions.h" 2 # 1 "../llvm/include/llvm/CallingConv.h" 1 # 17 "../llvm/include/llvm/CallingConv.h" namespace llvm { namespace CallingConv { enum ID { C = 0, Fast = 8, Cold = 9, GHC = 10, 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, MBLAZE_INTR = 73, MBLAZE_SVOL = 74 }; } } # 23 "../llvm/include/llvm/Instructions.h" 2 # 1 "../llvm/include/llvm/ADT/ArrayRef.h" 1 # 13 "../llvm/include/llvm/ADT/ArrayRef.h" # 1 "../llvm/include/llvm/ADT/SmallVector.h" 1 # 18 "../llvm/include/llvm/ADT/SmallVector.h" # 1 "/usr/include/c++/4.5/algorithm" 1 3 # 59 "/usr/include/c++/4.5/algorithm" 3 # 60 "/usr/include/c++/4.5/algorithm" 3 # 1 "/usr/include/c++/4.5/bits/stl_algo.h" 1 3 # 60 "/usr/include/c++/4.5/bits/stl_algo.h" 3 # 1 "/usr/include/c++/4.5/cstdlib" 1 3 # 41 "/usr/include/c++/4.5/cstdlib" 3 # 42 "/usr/include/c++/4.5/cstdlib" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 45 "/usr/include/c++/4.5/cstdlib" 2 3 # 68 "/usr/include/c++/4.5/cstdlib" 3 # 1 "/usr/include/stdlib.h" 1 3 4 # 33 "/usr/include/stdlib.h" 3 4 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 34 "/usr/include/stdlib.h" 2 3 4 extern "C" { # 1 "/usr/include/bits/waitflags.h" 1 3 4 # 43 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/include/bits/waitstatus.h" 1 3 4 # 67 "/usr/include/bits/waitstatus.h" 3 4 union wait { int w_status; struct { unsigned int __w_termsig:7; unsigned int __w_coredump:1; unsigned int __w_retcode:8; unsigned int:16; } __wait_terminated; struct { unsigned int __w_stopval:8; unsigned int __w_stopsig:8; unsigned int:16; } __wait_stopped; }; # 44 "/usr/include/stdlib.h" 2 3 4 # 96 "/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; # 140 "/usr/include/stdlib.h" 3 4 extern size_t __ctype_get_mb_cur_max (void) throw () __attribute__ ((__warn_unused_result__)); extern double atof (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int atoi (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern long int atol (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int atoll (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern float strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 240 "/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))) __attribute__ ((__warn_unused_result__)); extern unsigned long int strtoul_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int strtoll_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); __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))) __attribute__ ((__warn_unused_result__)); extern double strtod_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); extern float strtof_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); extern long double strtold_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); # 311 "/usr/include/stdlib.h" 3 4 extern char *l64a (long int __n) throw () __attribute__ ((__warn_unused_result__)); extern long int a64l (__const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 327 "/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; 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__)) __attribute__ ((__warn_unused_result__)); extern void *calloc (size_t __nmemb, size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern void *realloc (void *__ptr, size_t __size) throw () __attribute__ ((__warn_unused_result__)); extern void free (void *__ptr) throw (); extern void cfree (void *__ptr) throw (); # 1 "/usr/include/alloca.h" 1 3 4 # 25 "/usr/include/alloca.h" 3 4 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 26 "/usr/include/alloca.h" 2 3 4 extern "C" { extern void *alloca (size_t __size) throw (); } # 498 "/usr/include/stdlib.h" 2 3 4 extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 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))); 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))) __attribute__ ((__warn_unused_result__)); extern char *__secure_getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 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 (); # 606 "/usr/include/stdlib.h" 3 4 extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 620 "/usr/include/stdlib.h" 3 4 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 630 "/usr/include/stdlib.h" 3 4 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 642 "/usr/include/stdlib.h" 3 4 extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 652 "/usr/include/stdlib.h" 3 4 extern int mkstemps64 (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 663 "/usr/include/stdlib.h" 3 4 extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 674 "/usr/include/stdlib.h" 3 4 extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 684 "/usr/include/stdlib.h" 3 4 extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 694 "/usr/include/stdlib.h" 3 4 extern int mkostemps (char *__template, int __suffixlen, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 706 "/usr/include/stdlib.h" 3 4 extern int mkostemps64 (char *__template, int __suffixlen, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); extern char *canonicalize_file_name (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 734 "/usr/include/stdlib.h" 3 4 extern char *realpath (__const char *__restrict __name, char *__restrict __resolved) throw () __attribute__ ((__warn_unused_result__)); 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))) __attribute__ ((__warn_unused_result__)); 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__)) __attribute__ ((__warn_unused_result__)); extern long int labs (long int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int llabs (long long int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern div_t div (int __numer, int __denom) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern ldiv_t ldiv (long int __numer, long int __denom) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); # 808 "/usr/include/stdlib.h" 3 4 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *gcvt (double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *qgcvt (long double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); 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 () __attribute__ ((__warn_unused_result__)); extern int mbtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); extern int wctomb (char *__s, wchar_t __wchar) throw () __attribute__ ((__warn_unused_result__)); 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))) __attribute__ ((__warn_unused_result__)); # 896 "/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))) __attribute__ ((__warn_unused_result__)); extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); extern int grantpt (int __fd) throw (); extern int unlockpt (int __fd) throw (); extern char *ptsname (int __fd) throw () __attribute__ ((__warn_unused_result__)); 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))); # 1 "/usr/include/bits/stdlib.h" 1 3 4 # 24 "/usr/include/bits/stdlib.h" 3 4 extern char *__realpath_chk (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) throw () __attribute__ ((__warn_unused_result__)); extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) throw () __asm__ ("" "realpath") __attribute__ ((__warn_unused_result__)); extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) throw () __asm__ ("" "__realpath_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * realpath (__const char *__restrict __name, char *__restrict __resolved) throw () { if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) { return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); } return __realpath_alias (__name, __resolved); } extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ptsname_r") __attribute__ ((__nonnull__ (2))); extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int ptsname_r (int __fd, char *__buf, size_t __buflen) throw () { if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__buflen)) return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); if (__buflen > __builtin_object_size (__buf, 2 > 1)) return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); } return __ptsname_r_alias (__fd, __buf, __buflen); } extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) throw () __attribute__ ((__warn_unused_result__)); extern int __wctomb_alias (char *__s, wchar_t __wchar) throw () __asm__ ("" "wctomb") __attribute__ ((__warn_unused_result__)); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) int wctomb (char *__s, wchar_t __wchar) throw () { if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); return __wctomb_alias (__s, __wchar); } extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) throw (); extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () __asm__ ("" "mbstowcs") ; extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__mbstowcs_chk") __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () { if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __mbstowcs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) return __mbstowcs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); } return __mbstowcs_alias (__dst, __src, __len); } extern size_t __wcstombs_chk (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) throw (); extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () __asm__ ("" "wcstombs") ; extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__wcstombs_chk") __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () { if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) { if (!__builtin_constant_p (__len)) return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); if (__len > __builtin_object_size (__dst, 2 > 1)) return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); } return __wcstombs_alias (__dst, __src, __len); } # 956 "/usr/include/stdlib.h" 2 3 4 # 964 "/usr/include/stdlib.h" 3 4 } # 69 "/usr/include/c++/4.5/cstdlib" 2 3 # 100 "/usr/include/c++/4.5/cstdlib" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::div_t; using ::ldiv_t; using ::abort; using ::abs; using ::atexit; 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 ::rand; using ::realloc; using ::srand; using ::strtod; using ::strtol; using ::strtoul; using ::system; using ::wcstombs; using ::wctomb; inline long abs(long __i) { return labs(__i); } inline ldiv_t div(long __i, long __j) { return ldiv(__i, __j); } } # 157 "/usr/include/c++/4.5/cstdlib" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { using ::lldiv_t; using ::_Exit; inline long long abs(long long __x) { return __x >= 0 ? __x : -__x; } 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; # 190 "/usr/include/c++/4.5/cstdlib" 3 using ::atoll; using ::strtoll; using ::strtoull; using ::strtof; using ::strtold; } namespace std __attribute__ ((__visibility__ ("default"))) { using ::__gnu_cxx::lldiv_t; using ::__gnu_cxx::_Exit; using ::__gnu_cxx::abs; 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; } # 61 "/usr/include/c++/4.5/bits/stl_algo.h" 2 3 # 1 "/usr/include/c++/4.5/bits/algorithmfwd.h" 1 3 # 33 "/usr/include/c++/4.5/bits/algorithmfwd.h" 3 # 34 "/usr/include/c++/4.5/bits/algorithmfwd.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 199 "/usr/include/c++/4.5/bits/algorithmfwd.h" 3 template bool binary_search(_FIter, _FIter, const _Tp&); template bool binary_search(_FIter, _FIter, const _Tp&, _Compare); template _OIter copy(_IIter, _IIter, _OIter); template _BIter2 copy_backward(_BIter1, _BIter1, _BIter2); # 228 "/usr/include/c++/4.5/bits/algorithmfwd.h" 3 template pair<_FIter, _FIter> equal_range(_FIter, _FIter, const _Tp&); template pair<_FIter, _FIter> equal_range(_FIter, _FIter, const _Tp&, _Compare); template void fill(_FIter, _FIter, const _Tp&); template _OIter fill_n(_OIter, _Size, const _Tp&); template _FIter1 find_end(_FIter1, _FIter1, _FIter2, _FIter2); template _FIter1 find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); # 267 "/usr/include/c++/4.5/bits/algorithmfwd.h" 3 template bool includes(_IIter1, _IIter1, _IIter2, _IIter2); template bool includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); template void inplace_merge(_BIter, _BIter, _BIter); template void inplace_merge(_BIter, _BIter, _BIter, _Compare); # 321 "/usr/include/c++/4.5/bits/algorithmfwd.h" 3 template void iter_swap(_FIter1, _FIter2); template _FIter lower_bound(_FIter, _FIter, const _Tp&); template _FIter lower_bound(_FIter, _FIter, const _Tp&, _Compare); template void make_heap(_RAIter, _RAIter); template void make_heap(_RAIter, _RAIter, _Compare); template const _Tp& max(const _Tp&, const _Tp&); template const _Tp& max(const _Tp&, const _Tp&, _Compare); template const _Tp& min(const _Tp&, const _Tp&); template const _Tp& min(const _Tp&, const _Tp&, _Compare); # 406 "/usr/include/c++/4.5/bits/algorithmfwd.h" 3 template bool next_permutation(_BIter, _BIter); template bool next_permutation(_BIter, _BIter, _Compare); # 423 "/usr/include/c++/4.5/bits/algorithmfwd.h" 3 template _RAIter partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); template _RAIter partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); # 444 "/usr/include/c++/4.5/bits/algorithmfwd.h" 3 template void pop_heap(_RAIter, _RAIter); template void pop_heap(_RAIter, _RAIter, _Compare); template bool prev_permutation(_BIter, _BIter); template bool prev_permutation(_BIter, _BIter, _Compare); template void push_heap(_RAIter, _RAIter); template void push_heap(_RAIter, _RAIter, _Compare); template _FIter remove(_FIter, _FIter, const _Tp&); template _FIter remove_if(_FIter, _FIter, _Predicate); template _OIter remove_copy(_IIter, _IIter, _OIter, const _Tp&); template _OIter remove_copy_if(_IIter, _IIter, _OIter, _Predicate); template _OIter replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); template _OIter replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); template void reverse(_BIter, _BIter); template _OIter reverse_copy(_BIter, _BIter, _OIter); template void rotate(_FIter, _FIter, _FIter); template _OIter rotate_copy(_FIter, _FIter, _FIter, _OIter); # 527 "/usr/include/c++/4.5/bits/algorithmfwd.h" 3 template void sort_heap(_RAIter, _RAIter); template void sort_heap(_RAIter, _RAIter, _Compare); template _BIter stable_partition(_BIter, _BIter, _Predicate); template void swap(_Tp&, _Tp&); template void swap(_Tp (&)[_Nm], _Tp (&)[_Nm]); template _FIter2 swap_ranges(_FIter1, _FIter1, _FIter2); template _FIter unique(_FIter, _FIter); template _FIter unique(_FIter, _FIter, _BinaryPredicate); template _FIter upper_bound(_FIter, _FIter, const _Tp&); template _FIter upper_bound(_FIter, _FIter, const _Tp&, _Compare); } namespace std __attribute__ ((__visibility__ ("default"))) { template _FIter adjacent_find(_FIter, _FIter); template _FIter adjacent_find(_FIter, _FIter, _BinaryPredicate); template typename iterator_traits<_IIter>::difference_type count(_IIter, _IIter, const _Tp&); template typename iterator_traits<_IIter>::difference_type count_if(_IIter, _IIter, _Predicate); template bool equal(_IIter1, _IIter1, _IIter2); template bool equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); template _IIter find(_IIter, _IIter, const _Tp&); template _FIter1 find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); template _FIter1 find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); template _IIter find_if(_IIter, _IIter, _Predicate); template _Funct for_each(_IIter, _IIter, _Funct); template void generate(_FIter, _FIter, _Generator); template _OIter generate_n(_OIter, _Size, _Generator); template bool lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); template bool lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); template _FIter max_element(_FIter, _FIter); template _FIter max_element(_FIter, _FIter, _Compare); template _OIter merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template _OIter merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template _FIter min_element(_FIter, _FIter); template _FIter min_element(_FIter, _FIter, _Compare); template pair<_IIter1, _IIter2> mismatch(_IIter1, _IIter1, _IIter2); template pair<_IIter1, _IIter2> mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); template void nth_element(_RAIter, _RAIter, _RAIter); template void nth_element(_RAIter, _RAIter, _RAIter, _Compare); template void partial_sort(_RAIter, _RAIter, _RAIter); template void partial_sort(_RAIter, _RAIter, _RAIter, _Compare); template _BIter partition(_BIter, _BIter, _Predicate); template void random_shuffle(_RAIter, _RAIter); template void random_shuffle(_RAIter, _RAIter, _Generator&); template void replace(_FIter, _FIter, const _Tp&, const _Tp&); template void replace_if(_FIter, _FIter, _Predicate, const _Tp&); template _FIter1 search(_FIter1, _FIter1, _FIter2, _FIter2); template _FIter1 search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); template _FIter search_n(_FIter, _FIter, _Size, const _Tp&); template _FIter search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); template _OIter set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template _OIter set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template _OIter set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template _OIter set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template _OIter set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template _OIter set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template _OIter set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template _OIter set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template void sort(_RAIter, _RAIter); template void sort(_RAIter, _RAIter, _Compare); template void stable_sort(_RAIter, _RAIter); template void stable_sort(_RAIter, _RAIter, _Compare); template _OIter transform(_IIter, _IIter, _OIter, _UnaryOperation); template _OIter transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); template _OIter unique_copy(_IIter, _IIter, _OIter); template _OIter unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); } # 62 "/usr/include/c++/4.5/bits/stl_algo.h" 2 3 # 1 "/usr/include/c++/4.5/bits/stl_heap.h" 1 3 # 62 "/usr/include/c++/4.5/bits/stl_heap.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template _Distance __is_heap_until(_RandomAccessIterator __first, _Distance __n) { _Distance __parent = 0; for (_Distance __child = 1; __child < __n; ++__child) { if (__first[__parent] < __first[__child]) return __child; if ((__child & 1) == 0) ++__parent; } return __n; } template _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 inline bool __is_heap(_RandomAccessIterator __first, _Distance __n) { return std::__is_heap_until(__first, __n) == __n; } template inline bool __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) { return std::__is_heap_until(__first, __n, __comp) == __n; } template inline bool __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { return std::__is_heap(__first, std::distance(__first, __last)); } template inline bool __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } template void __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __topIndex, _Tp __value) { _Distance __parent = (__holeIndex - 1) / 2; while (__holeIndex > __topIndex && *(__first + __parent) < __value) { *(__first + __holeIndex) = (*(__first + __parent)); __holeIndex = __parent; __parent = (__holeIndex - 1) / 2; } *(__first + __holeIndex) = (__value); } # 152 "/usr/include/c++/4.5/bits/stl_heap.h" 3 template inline void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; ; _ValueType __value = (*(__last - 1)); std::__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0), (__value)); } template 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) = (*(__first + __parent)); __holeIndex = __parent; __parent = (__holeIndex - 1) / 2; } *(__first + __holeIndex) = (__value); } # 201 "/usr/include/c++/4.5/bits/stl_heap.h" 3 template 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; ; ; _ValueType __value = (*(__last - 1)); std::__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0), (__value), __comp); } template void __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __len, _Tp __value) { const _Distance __topIndex = __holeIndex; _Distance __secondChild = __holeIndex; while (__secondChild < (__len - 1) / 2) { __secondChild = 2 * (__secondChild + 1); if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) __secondChild--; *(__first + __holeIndex) = (*(__first + __secondChild)); __holeIndex = __secondChild; } if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) { __secondChild = 2 * (__secondChild + 1); *(__first + __holeIndex) = (*(__first + (__secondChild - 1))) ; __holeIndex = __secondChild - 1; } std::__push_heap(__first, __holeIndex, __topIndex, (__value)); } template inline void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomAccessIterator __result) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; _ValueType __value = (*__result); *__result = (*__first); std::__adjust_heap(__first, _DistanceType(0), _DistanceType(__last - __first), (__value)); } # 274 "/usr/include/c++/4.5/bits/stl_heap.h" 3 template inline void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; --__last; std::__pop_heap(__first, __last, __last); } template 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) = (*(__first + __secondChild)); __holeIndex = __secondChild; } if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) { __secondChild = 2 * (__secondChild + 1); *(__first + __holeIndex) = (*(__first + (__secondChild - 1))) ; __holeIndex = __secondChild - 1; } std::__push_heap(__first, __holeIndex, __topIndex, (__value), __comp); } template 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 = (*__result); *__result = (*__first); std::__adjust_heap(__first, _DistanceType(0), _DistanceType(__last - __first), (__value), __comp); } # 348 "/usr/include/c++/4.5/bits/stl_heap.h" 3 template inline void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { ; ; --__last; std::__pop_heap(__first, __last, __last, __comp); } # 371 "/usr/include/c++/4.5/bits/stl_heap.h" 3 template void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { 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 = (*(__first + __parent)); std::__adjust_heap(__first, __parent, __len, (__value)); if (__parent == 0) return; __parent--; } } # 411 "/usr/include/c++/4.5/bits/stl_heap.h" 3 template 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 = (*(__first + __parent)); std::__adjust_heap(__first, __parent, __len, (__value), __comp); if (__parent == 0) return; __parent--; } } # 450 "/usr/include/c++/4.5/bits/stl_heap.h" 3 template void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { ; ; while (__last - __first > 1) { --__last; std::__pop_heap(__first, __last, __last); } } # 479 "/usr/include/c++/4.5/bits/stl_heap.h" 3 template void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { ; ; while (__last - __first > 1) { --__last; std::__pop_heap(__first, __last, __last, __comp); } } # 576 "/usr/include/c++/4.5/bits/stl_heap.h" 3 } # 63 "/usr/include/c++/4.5/bits/stl_algo.h" 2 3 # 1 "/usr/include/c++/4.5/bits/stl_tempbuf.h" 1 3 # 64 "/usr/include/c++/4.5/bits/stl_tempbuf.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 83 "/usr/include/c++/4.5/bits/stl_tempbuf.h" 3 template pair<_Tp*, ptrdiff_t> get_temporary_buffer(ptrdiff_t __len) { const ptrdiff_t __max = __gnu_cxx::__numeric_traits::__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/include/c++/4.5/bits/stl_tempbuf.h" 3 template inline void return_temporary_buffer(_Tp* __p) { ::operator delete(__p, std::nothrow); } template 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 _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 __p(std::get_temporary_buffer< value_type>(_M_original_len)); _M_buffer = __p.first; _M_len = __p.second; if(_M_buffer) std::__uninitialized_construct_range(_M_buffer, _M_buffer + _M_len, *__first); } if (false) { std::return_temporary_buffer(_M_buffer); _M_buffer = 0; _M_len = 0; ; } } } # 64 "/usr/include/c++/4.5/bits/stl_algo.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template void __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c) { if (*__a < *__b) { if (*__b < *__c) std::iter_swap(__a, __b); else if (*__a < *__c) std::iter_swap(__a, __c); } else if (*__a < *__c) return; else if (*__b < *__c) std::iter_swap(__a, __c); else std::iter_swap(__a, __b); } template void __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c, _Compare __comp) { if (__comp(*__a, *__b)) { if (__comp(*__b, *__c)) std::iter_swap(__a, __b); else if (__comp(*__a, *__c)) std::iter_swap(__a, __c); } else if (__comp(*__a, *__c)) return; else if (__comp(*__b, *__c)) std::iter_swap(__a, __c); else std::iter_swap(__a, __b); } template inline _InputIterator __find(_InputIterator __first, _InputIterator __last, const _Tp& __val, input_iterator_tag) { while (__first != __last && !(*__first == __val)) ++__first; return __first; } template inline _InputIterator __find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred, input_iterator_tag) { while (__first != __last && !bool(__pred(*__first))) ++__first; return __first; } template _RandomAccessIterator __find(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __val, random_access_iterator_tag) { typename iterator_traits<_RandomAccessIterator>::difference_type __trip_count = (__last - __first) >> 2; for (; __trip_count > 0; --__trip_count) { if (*__first == __val) return __first; ++__first; if (*__first == __val) return __first; ++__first; if (*__first == __val) return __first; ++__first; if (*__first == __val) return __first; ++__first; } switch (__last - __first) { case 3: if (*__first == __val) return __first; ++__first; case 2: if (*__first == __val) return __first; ++__first; case 1: if (*__first == __val) return __first; ++__first; case 0: default: return __last; } } template _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; } } # 322 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _ForwardIterator __search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val, std::forward_iterator_tag) { __first = std::find(__first, __last, __val); while (__first != __last) { typename iterator_traits<_ForwardIterator>::difference_type __n = __count; _ForwardIterator __i = __first; ++__i; while (__i != __last && __n != 1 && *__i == __val) { ++__i; --__n; } if (__n == 1) return __first; if (__i == __last) return __last; __first = std::find(++__i, __last, __val); } return __last; } template _RandomAccessIter __search_n(_RandomAccessIter __first, _RandomAccessIter __last, _Integer __count, const _Tp& __val, std::random_access_iterator_tag) { typedef typename std::iterator_traits<_RandomAccessIter>::difference_type _DistanceType; _DistanceType __tailSize = __last - __first; const _DistanceType __pattSize = __count; if (__tailSize < __pattSize) return __last; const _DistanceType __skipOffset = __pattSize - 1; _RandomAccessIter __lookAhead = __first + __skipOffset; __tailSize -= __pattSize; while (1) { while (!(*__lookAhead == __val)) { if (__tailSize < __pattSize) return __last; __lookAhead += __pattSize; __tailSize -= __pattSize; } _DistanceType __remainder = __skipOffset; for (_RandomAccessIter __backTrack = __lookAhead - 1; *__backTrack == __val; --__backTrack) { if (--__remainder == 0) return (__lookAhead - __skipOffset); } if (__remainder > __tailSize) return __last; __lookAhead += __remainder; __tailSize -= __remainder; } } # 407 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _ForwardIterator __search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val, _BinaryPredicate __binary_pred, std::forward_iterator_tag) { while (__first != __last && !bool(__binary_pred(*__first, __val))) ++__first; while (__first != __last) { typename iterator_traits<_ForwardIterator>::difference_type __n = __count; _ForwardIterator __i = __first; ++__i; while (__i != __last && __n != 1 && bool(__binary_pred(*__i, __val))) { ++__i; --__n; } if (__n == 1) return __first; if (__i == __last) return __last; __first = ++__i; while (__first != __last && !bool(__binary_pred(*__first, __val))) ++__first; } return __last; } template _RandomAccessIter __search_n(_RandomAccessIter __first, _RandomAccessIter __last, _Integer __count, const _Tp& __val, _BinaryPredicate __binary_pred, std::random_access_iterator_tag) { typedef typename std::iterator_traits<_RandomAccessIter>::difference_type _DistanceType; _DistanceType __tailSize = __last - __first; const _DistanceType __pattSize = __count; if (__tailSize < __pattSize) return __last; const _DistanceType __skipOffset = __pattSize - 1; _RandomAccessIter __lookAhead = __first + __skipOffset; __tailSize -= __pattSize; while (1) { while (!bool(__binary_pred(*__lookAhead, __val))) { if (__tailSize < __pattSize) return __last; __lookAhead += __pattSize; __tailSize -= __pattSize; } _DistanceType __remainder = __skipOffset; for (_RandomAccessIter __backTrack = __lookAhead - 1; __binary_pred(*__backTrack, __val); --__backTrack) { if (--__remainder == 0) return (__lookAhead - __skipOffset); } if (__remainder > __tailSize) return __last; __lookAhead += __remainder; __tailSize -= __remainder; } } template _ForwardIterator1 __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, forward_iterator_tag, forward_iterator_tag) { if (__first2 == __last2) return __last1; else { _ForwardIterator1 __result = __last1; while (1) { _ForwardIterator1 __new_result = std::search(__first1, __last1, __first2, __last2); if (__new_result == __last1) return __result; else { __result = __new_result; __first1 = __new_result; ++__first1; } } } } template _ForwardIterator1 __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, forward_iterator_tag, forward_iterator_tag, _BinaryPredicate __comp) { if (__first2 == __last2) return __last1; else { _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 _BidirectionalIterator1 __find_end(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, bidirectional_iterator_tag, bidirectional_iterator_tag) { 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); if (__rresult == __rlast1) return __last1; else { _BidirectionalIterator1 __result = __rresult.base(); std::advance(__result, -std::distance(__first2, __last2)); return __result; } } template _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; } } # 645 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template 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)); } # 691 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template 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), __comp); } # 870 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator remove_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __value) { ; for (; __first != __last; ++__first) if (!(*__first == __value)) { *__result = *__first; ++__result; } return __result; } # 907 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator remove_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred) { ; for (; __first != __last; ++__first) if (!bool(__pred(*__first))) { *__result = *__first; ++__result; } return __result; } # 1082 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _ForwardIterator remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { ; __first = std::find(__first, __last, __value); if(__first == __last) return __first; _ForwardIterator __result = __first; ++__first; for(; __first != __last; ++__first) if(!(*__first == __value)) { *__result = (*__first); ++__result; } return __result; } # 1125 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _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(!bool(__pred(*__first))) { *__result = (*__first); ++__result; } return __result; } # 1165 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _ForwardIterator unique(_ForwardIterator __first, _ForwardIterator __last) { ; __first = std::adjacent_find(__first, __last); if (__first == __last) return __last; _ForwardIterator __dest = __first; ++__first; while (++__first != __last) if (!(*__dest == *__first)) *++__dest = (*__first); return ++__dest; } # 1205 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _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 (!bool(__binary_pred(*__dest, *__first))) *++__dest = (*__first); return ++__dest; } template _OutputIterator __unique_copy(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result, forward_iterator_tag, output_iterator_tag) { _ForwardIterator __next = __first; *__result = *__first; while (++__next != __last) if (!(*__first == *__next)) { __first = __next; *++__result = *__first; } return ++__result; } template _OutputIterator __unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, input_iterator_tag, output_iterator_tag) { typename iterator_traits<_InputIterator>::value_type __value = *__first; *__result = __value; while (++__first != __last) if (!(__value == *__first)) { __value = *__first; *++__result = __value; } return ++__result; } template _ForwardIterator __unique_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, input_iterator_tag, forward_iterator_tag) { *__result = *__first; while (++__first != __last) if (!(*__result == *__first)) *++__result = *__first; return ++__result; } template _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 (!bool(__binary_pred(*__first, *__next))) { __first = __next; *++__result = *__first; } return ++__result; } template _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; *__result = __value; while (++__first != __last) if (!bool(__binary_pred(__value, *__first))) { __value = *__first; *++__result = __value; } return ++__result; } template _ForwardIterator __unique_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _BinaryPredicate __binary_pred, input_iterator_tag, forward_iterator_tag) { *__result = *__first; while (++__first != __last) if (!bool(__binary_pred(*__result, *__first))) *++__result = *__first; return ++__result; } template 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 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; } } # 1433 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template inline void reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) { ; std::__reverse(__first, __last, std::__iterator_category(__first)); } # 1460 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result) { ; while (__first != __last) { --__last; *__result = *__last; ++__result; } return __result; } template _EuclideanRingElement __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) { while (__n != 0) { _EuclideanRingElement __t = __m % __n; __m = __n; __n = __t; } return __m; } template void __rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, forward_iterator_tag) { if (__first == __middle || __last == __middle) return; _ForwardIterator __first2 = __middle; do { std::iter_swap(__first, __first2); ++__first; ++__first2; if (__first == __middle) __middle = __first2; } while (__first2 != __last); __first2 = __middle; while (__first2 != __last) { std::iter_swap(__first, __first2); ++__first; ++__first2; if (__first == __middle) __middle = __first2; else if (__first2 == __last) __first2 = __middle; } } template void __rotate(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, bidirectional_iterator_tag) { if (__first == __middle || __last == __middle) return; 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()); else std::__reverse(__first, __middle, bidirectional_iterator_tag()); } template void __rotate(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, random_access_iterator_tag) { if (__first == __middle || __last == __middle) return; 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; } _RandomAccessIterator __p = __first; for (;;) { if (__k < __n - __k) { if (__is_pod(_ValueType) && __k == 1) { _ValueType __t = (*__p); std::copy(__p + 1, __p + __n, __p); *(__p + __n - 1) = (__t); return; } _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; std::swap(__n, __k); __k = __n - __k; } else { __k = __n - __k; if (__is_pod(_ValueType) && __k == 1) { _ValueType __t = (*(__p + __n - 1)); std::copy_backward(__p, __p + __n - 1, __p + __n); *__p = (__t); return; } _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; std::swap(__n, __k); } } } # 1664 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template inline void rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last) { ; ; typedef typename iterator_traits<_ForwardIterator>::iterator_category _IterType; std::__rotate(__first, __middle, __last, _IterType()); } # 1698 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result) { ; ; return std::copy(__first, __middle, std::copy(__middle, __last, __result)); } template _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 _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; } } template _ForwardIterator __inplace_stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, _Distance __len) { if (__len == 1) return __pred(*__first) ? __last : __first; _ForwardIterator __middle = __first; std::advance(__middle, __len / 2); _ForwardIterator __begin = std::__inplace_stable_partition(__first, __middle, __pred, __len / 2); _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last, __pred, __len - __len / 2); std::rotate(__begin, __middle, __end); std::advance(__begin, std::distance(__middle, __end)); return __begin; } template _ForwardIterator __stable_partition_adaptive(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, _Distance __len, _Pointer __buffer, _Distance __buffer_size) { if (__len <= __buffer_size) { _ForwardIterator __result1 = __first; _Pointer __result2 = __buffer; for (; __first != __last; ++__first) if (__pred(*__first)) { *__result1 = (*__first); ++__result1; } else { *__result2 = (*__first); ++__result2; } std::copy(__buffer, __result2, __result1); return __result1; } else { _ForwardIterator __middle = __first; std::advance(__middle, __len / 2); _ForwardIterator __begin = std::__stable_partition_adaptive(__first, __middle, __pred, __len / 2, __buffer, __buffer_size); _ForwardIterator __end = std::__stable_partition_adaptive(__middle, __last, __pred, __len - __len / 2, __buffer, __buffer_size); std::rotate(__begin, __middle, __end); std::advance(__begin, std::distance(__middle, __end)); return __begin; } } # 1856 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _ForwardIterator stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { ; if (__first == __last) return __first; else { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, __last); if (__buf.size() > 0) return std::__stable_partition_adaptive(__first, __last, __pred, _DistanceType(__buf.requested_size()), __buf.begin(), _DistanceType(__buf.size())); else return std::__inplace_stable_partition(__first, __last, __pred, _DistanceType(__buf.requested_size())); } } template void __heap_select(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last) { std::make_heap(__first, __middle); for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) if (*__i < *__first) std::__pop_heap(__first, __middle, __i); } template 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); } # 1938 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _RandomAccessIterator partial_sort_copy(_InputIterator __first, _InputIterator __last, _RandomAccessIterator __result_first, _RandomAccessIterator __result_last) { typedef typename iterator_traits<_InputIterator>::value_type _InputValueType; typedef typename iterator_traits<_RandomAccessIterator>::value_type _OutputValueType; typedef typename iterator_traits<_RandomAccessIterator>::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); while (__first != __last) { if (*__first < *__result_first) std::__adjust_heap(__result_first, _DistanceType(0), _DistanceType(__result_real_last - __result_first), _InputValueType(*__first)); ++__first; } std::sort_heap(__result_first, __result_real_last); return __result_real_last; } # 2004 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _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 typename iterator_traits<_RandomAccessIterator>::value_type _OutputValueType; typedef typename iterator_traits<_RandomAccessIterator>::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; } template void __unguarded_linear_insert(_RandomAccessIterator __last) { typename iterator_traits<_RandomAccessIterator>::value_type __val = (*__last); _RandomAccessIterator __next = __last; --__next; while (__val < *__next) { *__last = (*__next); __last = __next; --__next; } *__last = (__val); } template void __unguarded_linear_insert(_RandomAccessIterator __last, _Compare __comp) { typename iterator_traits<_RandomAccessIterator>::value_type __val = (*__last); _RandomAccessIterator __next = __last; --__next; while (__comp(__val, *__next)) { *__last = (*__next); __last = __next; --__next; } *__last = (__val); } template void __insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { if (__first == __last) return; for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) { if (*__i < *__first) { typename iterator_traits<_RandomAccessIterator>::value_type __val = (*__i); std::copy_backward(__first, __i, __i + 1); *__first = (__val); } else std::__unguarded_linear_insert(__i); } } template 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 = (*__i); std::copy_backward(__first, __i, __i + 1); *__first = (__val); } else std::__unguarded_linear_insert(__i, __comp); } } template inline void __unguarded_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; for (_RandomAccessIterator __i = __first; __i != __last; ++__i) std::__unguarded_linear_insert(__i); } template inline void __unguarded_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; for (_RandomAccessIterator __i = __first; __i != __last; ++__i) std::__unguarded_linear_insert(__i, __comp); } enum { _S_threshold = 16 }; template void __final_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { if (__last - __first > int(_S_threshold)) { std::__insertion_sort(__first, __first + int(_S_threshold)); std::__unguarded_insertion_sort(__first + int(_S_threshold), __last); } else std::__insertion_sort(__first, __last); } template 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 _RandomAccessIterator __unguarded_partition(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __pivot) { while (true) { while (*__first < __pivot) ++__first; --__last; while (__pivot < *__last) --__last; if (!(__first < __last)) return __first; std::iter_swap(__first, __last); ++__first; } } template _RandomAccessIterator __unguarded_partition(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __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 inline _RandomAccessIterator __unguarded_partition_pivot(_RandomAccessIterator __first, _RandomAccessIterator __last) { _RandomAccessIterator __mid = __first + (__last - __first) / 2; std::__move_median_first(__first, __mid, (__last - 1)); return std::__unguarded_partition(__first + 1, __last, *__first); } template inline _RandomAccessIterator __unguarded_partition_pivot(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { _RandomAccessIterator __mid = __first + (__last - __first) / 2; std::__move_median_first(__first, __mid, (__last - 1), __comp); return std::__unguarded_partition(__first + 1, __last, *__first, __comp); } template void __introsort_loop(_RandomAccessIterator __first, _RandomAccessIterator __last, _Size __depth_limit) { while (__last - __first > int(_S_threshold)) { if (__depth_limit == 0) { std::partial_sort(__first, __last, __last); return; } --__depth_limit; _RandomAccessIterator __cut = std::__unguarded_partition_pivot(__first, __last); std::__introsort_loop(__cut, __last, __depth_limit); __last = __cut; } } template 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 void __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Size __depth_limit) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; while (__last - __first > 3) { if (__depth_limit == 0) { std::__heap_select(__first, __nth + 1, __last); std::iter_swap(__first, __nth); return; } --__depth_limit; _RandomAccessIterator __cut = std::__unguarded_partition_pivot(__first, __last); if (__cut <= __nth) __first = __cut; else __last = __cut; } std::__insertion_sort(__first, __last); } template void __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Size __depth_limit, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; 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); } # 2388 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; 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 (__comp(*__middle, __val)) { __first = __middle; ++__first; __len = __len - __half - 1; } else __len = __half; } return __first; } # 2437 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _ForwardIterator upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; 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 (__val < *__middle) __len = __half; else { __first = __middle; ++__first; __len = __len - __half - 1; } } return __first; } # 2488 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _ForwardIterator upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; 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 (__comp(__val, *__middle)) __len = __half; else { __first = __middle; ++__first; __len = __len - __half - 1; } } return __first; } # 2543 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template pair<_ForwardIterator, _ForwardIterator> equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; ; ; _DistanceType __len = std::distance(__first, __last); _DistanceType __half; _ForwardIterator __middle, __left, __right; while (__len > 0) { __half = __len >> 1; __middle = __first; std::advance(__middle, __half); if (*__middle < __val) { __first = __middle; ++__first; __len = __len - __half - 1; } else if (__val < *__middle) __len = __half; else { __left = std::lower_bound(__first, __middle, __val); std::advance(__first, __len); __right = std::upper_bound(++__middle, __first, __val); return pair<_ForwardIterator, _ForwardIterator>(__left, __right); } } return pair<_ForwardIterator, _ForwardIterator>(__first, __first); } # 2605 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template pair<_ForwardIterator, _ForwardIterator> equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; ; ; _DistanceType __len = std::distance(__first, __last); _DistanceType __half; _ForwardIterator __middle, __left, __right; while (__len > 0) { __half = __len >> 1; __middle = __first; std::advance(__middle, __half); if (__comp(*__middle, __val)) { __first = __middle; ++__first; __len = __len - __half - 1; } else if (__comp(__val, *__middle)) __len = __half; else { __left = std::lower_bound(__first, __middle, __val, __comp); std::advance(__first, __len); __right = std::upper_bound(++__middle, __first, __val, __comp); return pair<_ForwardIterator, _ForwardIterator>(__left, __right); } } return pair<_ForwardIterator, _ForwardIterator>(__first, __first); } # 2666 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template bool binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; ; ; _ForwardIterator __i = std::lower_bound(__first, __last, __val); return __i != __last && !(__val < *__i); } # 2699 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template bool binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; ; ; _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp); return __i != __last && !bool(__comp(__val, *__i)); } template _BidirectionalIterator3 __merge_backward(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, _BidirectionalIterator3 __result) { if (__first1 == __last1) return std::copy_backward(__first2, __last2, __result); if (__first2 == __last2) return std::copy_backward(__first1, __last1, __result); --__last1; --__last2; while (true) { if (*__last2 < *__last1) { *--__result = *__last1; if (__first1 == __last1) return std::copy_backward(__first2, ++__last2, __result); --__last1; } else { *--__result = *__last2; if (__first2 == __last2) return std::copy_backward(__first1, ++__last1, __result); --__last2; } } } template _BidirectionalIterator3 __merge_backward(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, _BidirectionalIterator3 __result, _Compare __comp) { if (__first1 == __last1) return std::copy_backward(__first2, __last2, __result); if (__first2 == __last2) return std::copy_backward(__first1, __last1, __result); --__last1; --__last2; while (true) { if (__comp(*__last2, *__last1)) { *--__result = *__last1; if (__first1 == __last1) return std::copy_backward(__first2, ++__last2, __result); --__last1; } else { *--__result = *__last2; if (__first2 == __last2) return std::copy_backward(__first1, ++__last1, __result); --__last2; } } } template _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) { __buffer_end = std::copy(__middle, __last, __buffer); std::copy_backward(__first, __middle, __last); return std::copy(__buffer, __buffer_end, __first); } else if (__len1 <= __buffer_size) { __buffer_end = std::copy(__first, __middle, __buffer); std::copy(__middle, __last, __first); return std::copy_backward(__buffer, __buffer_end, __last); } else { std::rotate(__first, __middle, __last); std::advance(__first, std::distance(__middle, __last)); return __first; } } template void __merge_adaptive(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Pointer __buffer, _Distance __buffer_size) { if (__len1 <= __len2 && __len1 <= __buffer_size) { _Pointer __buffer_end = std::copy(__first, __middle, __buffer); std::merge((__buffer), (__buffer_end), (__middle), (__last), __first); } else if (__len2 <= __buffer_size) { _Pointer __buffer_end = std::copy(__middle, __last, __buffer); std::__merge_backward((__first), (__middle), (__buffer), (__buffer_end), __last); } 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); __len22 = std::distance(__middle, __second_cut); } else { __len22 = __len2 / 2; std::advance(__second_cut, __len22); __first_cut = std::upper_bound(__first, __middle, *__second_cut); __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); std::__merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22, __buffer, __buffer_size); } } template 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::copy(__first, __middle, __buffer); std::merge((__buffer), (__buffer_end), (__middle), (__last), __first, __comp); } else if (__len2 <= __buffer_size) { _Pointer __buffer_end = std::copy(__middle, __last, __buffer); std::__merge_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, __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, __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 void __merge_without_buffer(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2) { if (__len1 == 0 || __len2 == 0) return; if (__len1 + __len2 == 2) { if (*__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); __len22 = std::distance(__middle, __second_cut); } else { __len22 = __len2 / 2; std::advance(__second_cut, __len22); __first_cut = std::upper_bound(__first, __middle, *__second_cut); __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); std::__merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22); } template 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, __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, __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); } # 3059 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template void inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last) { typedef typename iterator_traits<_BidirectionalIterator>::value_type _ValueType; typedef typename iterator_traits<_BidirectionalIterator>::difference_type _DistanceType; ; ; if (__first == __middle || __middle == __last) return; _DistanceType __len1 = std::distance(__first, __middle); _DistanceType __len2 = std::distance(__middle, __last); _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, __last); if (__buf.begin() == 0) std::__merge_without_buffer(__first, __middle, __last, __len1, __len2); else std::__merge_adaptive(__first, __middle, __last, __len1, __len2, __buf.begin(), _DistanceType(__buf.size())); } # 3114 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template 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); _Temporary_buffer<_BidirectionalIterator, _ValueType> __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); } template void __merge_sort_loop(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _RandomAccessIterator2 __result, _Distance __step_size) { const _Distance __two_step = 2 * __step_size; while (__last - __first >= __two_step) { __result = std::merge( (__first), (__first + __step_size), (__first + __step_size), (__first + __two_step), __result); __first += __two_step; } __step_size = std::min(_Distance(__last - __first), __step_size); std::merge((__first), (__first + __step_size) , (__first + __step_size) , (__last), __result); } template 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::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::merge((__first), (__first + __step_size) , (__first + __step_size) , (__last), __result, __comp); } template void __chunk_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Distance __chunk_size) { while (__last - __first >= __chunk_size) { std::__insertion_sort(__first, __first + __chunk_size); __first += __chunk_size; } std::__insertion_sort(__first, __last); } template 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 void __merge_sort_with_buffer(_RandomAccessIterator __first, _RandomAccessIterator __last, _Pointer __buffer) { 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); while (__step_size < __len) { std::__merge_sort_loop(__first, __last, __buffer, __step_size); __step_size *= 2; std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size); __step_size *= 2; } } template 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 void __stable_sort_adaptive(_RandomAccessIterator __first, _RandomAccessIterator __last, _Pointer __buffer, _Distance __buffer_size) { 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); std::__stable_sort_adaptive(__middle, __last, __buffer, __buffer_size); } else { std::__merge_sort_with_buffer(__first, __middle, __buffer); std::__merge_sort_with_buffer(__middle, __last, __buffer); } std::__merge_adaptive(__first, __middle, __last, _Distance(__middle - __first), _Distance(__last - __middle), __buffer, __buffer_size); } template 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 void __inplace_stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { if (__last - __first < 15) { std::__insertion_sort(__first, __last); return; } _RandomAccessIterator __middle = __first + (__last - __first) / 2; std::__inplace_stable_sort(__first, __middle); std::__inplace_stable_sort(__middle, __last); std::__merge_without_buffer(__first, __middle, __last, __middle - __first, __last - __middle); } template 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); } # 3412 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template bool includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (*__first2 < *__first1) return false; else if(*__first1 < *__first2) ++__first1; else ++__first1, ++__first2; return __first2 == __last2; } # 3461 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template bool includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first2, *__first1)) return false; else if(__comp(*__first1, *__first2)) ++__first1; else ++__first1, ++__first2; return __first2 == __last2; } # 3516 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template bool next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) { ; if (__first == __last) return false; _BidirectionalIterator __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIterator __ii = __i; --__i; if (*__i < *__ii) { _BidirectionalIterator __j = __last; while (!(*__i < *--__j)) {} std::iter_swap(__i, __j); std::reverse(__ii, __last); return true; } if (__i == __first) { std::reverse(__first, __last); return false; } } } # 3573 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template 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 (!bool(__comp(*__i, *--__j))) {} std::iter_swap(__i, __j); std::reverse(__ii, __last); return true; } if (__i == __first) { std::reverse(__first, __last); return false; } } } # 3629 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template bool prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) { ; if (__first == __last) return false; _BidirectionalIterator __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIterator __ii = __i; --__i; if (*__ii < *__i) { _BidirectionalIterator __j = __last; while (!(*--__j < *__i)) {} std::iter_swap(__i, __j); std::reverse(__ii, __last); return true; } if (__i == __first) { std::reverse(__first, __last); return false; } } } # 3686 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template 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 (!bool(__comp(*--__j, *__i))) {} std::iter_swap(__i, __j); std::reverse(__ii, __last); return true; } if (__i == __first) { std::reverse(__first, __last); return false; } } } # 3746 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator replace_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __old_value, const _Tp& __new_value) { ; for (; __first != __last; ++__first, ++__result) if (*__first == __old_value) *__result = __new_value; else *__result = *__first; return __result; } # 3783 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator replace_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred, const _Tp& __new_value) { ; for (; __first != __last; ++__first, ++__result) if (__pred(*__first)) *__result = __new_value; else *__result = *__first; return __result; } # 4161 "/usr/include/c++/4.5/bits/stl_algo.h" 3 } namespace std __attribute__ ((__visibility__ ("default"))) { # 4177 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _Function for_each(_InputIterator __first, _InputIterator __last, _Function __f) { ; for (; __first != __last; ++__first) __f(*__first); return (__f); } # 4198 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template inline _InputIterator find(_InputIterator __first, _InputIterator __last, const _Tp& __val) { ; return std::__find(__first, __last, __val, std::__iterator_category(__first)); } # 4222 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template inline _InputIterator find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) { ; return std::__find_if(__first, __last, __pred, std::__iterator_category(__first)); } # 4251 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _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; } # 4290 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _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; } # 4322 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _ForwardIterator adjacent_find(_ForwardIterator __first, _ForwardIterator __last) { ; if (__first == __last) return __last; _ForwardIterator __next = __first; while(++__next != __last) { if (*__first == *__next) return __first; __first = __next; } return __last; } # 4354 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _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; } # 4386 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template typename iterator_traits<_InputIterator>::difference_type count(_InputIterator __first, _InputIterator __last, const _Tp& __value) { ; typename iterator_traits<_InputIterator>::difference_type __n = 0; for (; __first != __last; ++__first) if (*__first == __value) ++__n; return __n; } # 4411 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template 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; } # 4451 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) { ; ; if (__first1 == __last1 || __first2 == __last2) return __first1; _ForwardIterator2 __p1(__first2); if (++__p1 == __last2) return std::find(__first1, __last1, *__first2); _ForwardIterator2 __p; _ForwardIterator1 __current = __first1; for (;;) { __first1 = std::find(__first1, __last1, *__first2); if (__first1 == __last1) return __last1; __p = __p1; __current = __first1; if (++__current == __last1) return __last1; while (*__current == *__p) { if (++__p == __last2) return __first1; if (++__current == __last1) return __last1; } ++__first1; } return __first1; } # 4522 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _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) { while (__first1 != __last1 && !bool(__predicate(*__first1, *__first2))) ++__first1; return __first1; } _ForwardIterator2 __p; _ForwardIterator1 __current = __first1; for (;;) { while (__first1 != __last1 && !bool(__predicate(*__first1, *__first2))) ++__first1; 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; } # 4596 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val) { ; if (__count <= 0) return __first; if (__count == 1) return std::find(__first, __last, __val); return std::__search_n(__first, __last, __count, __val, std::__iterator_category(__first)); } # 4632 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val, _BinaryPredicate __binary_pred) { ; if (__count <= 0) return __first; if (__count == 1) { while (__first != __last && !bool(__binary_pred(*__first, __val))) ++__first; return __first; } return std::__search_n(__first, __last, __count, __val, __binary_pred, std::__iterator_category(__first)); } # 4674 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator transform(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _UnaryOperation __unary_op) { ; for (; __first != __last; ++__first, ++__result) *__result = __unary_op(*__first); return __result; } # 4710 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator transform(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _OutputIterator __result, _BinaryOperation __binary_op) { ; for (; __first1 != __last1; ++__first1, ++__first2, ++__result) *__result = __binary_op(*__first1, *__first2); return __result; } # 4743 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template 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; } # 4775 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template void replace_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, const _Tp& __new_value) { ; for (; __first != __last; ++__first) if (__pred(*__first)) *__first = __new_value; } # 4807 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template void generate(_ForwardIterator __first, _ForwardIterator __last, _Generator __gen) { ; for (; __first != __last; ++__first) *__first = __gen(); } # 4838 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator generate_n(_OutputIterator __first, _Size __n, _Generator __gen) { for (; __n > 0; --__n, ++__first) *__first = __gen(); return __first; } # 4874 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template inline _OutputIterator unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { ; if (__first == __last) return __result; return std::__unique_copy(__first, __last, __result, std::__iterator_category(__first), std::__iterator_category(__result)); } # 4913 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template 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, __binary_pred, std::__iterator_category(__first), std::__iterator_category(__result)); } # 4945 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template inline void random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) { ; if (__first != __last) for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1))); } # 4973 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template void random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomNumberGenerator& __rand) { ; if (__first == __last) return; for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) std::iter_swap(__i, __first + __rand((__i - __first) + 1)); } # 5009 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template inline _ForwardIterator partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { ; return std::__partition(__first, __last, __pred, std::__iterator_category(__first)); } # 5043 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template inline void partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; std::__heap_select(__first, __middle, __last); std::sort_heap(__first, __middle); } # 5082 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template inline void partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; std::__heap_select(__first, __middle, __last, __comp); std::sort_heap(__first, __middle, __comp); } # 5120 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template inline void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; if (__first == __last || __nth == __last) return; std::__introselect(__first, __nth, __last, std::__lg(__last - __first) * 2); } # 5159 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template inline void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; if (__first == __last || __nth == __last) return; std::__introselect(__first, __nth, __last, std::__lg(__last - __first) * 2, __comp); } # 5197 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template inline void sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; if (__first != __last) { std::__introsort_loop(__first, __last, std::__lg(__last - __first) * 2); std::__final_insertion_sort(__first, __last); } } # 5233 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template inline void sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; if (__first != __last) { std::__introsort_loop(__first, __last, std::__lg(__last - __first) * 2, __comp); std::__final_insertion_sort(__first, __last, __comp); } } # 5274 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator merge(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) { if (*__first2 < *__first1) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; } ++__result; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 5337 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator merge(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; 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)); } # 5397 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template inline void stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, __last); if (__buf.begin() == 0) std::__inplace_stable_sort(__first, __last); else std::__stable_sort_adaptive(__first, __last, __buf.begin(), _DistanceType(__buf.size())); } # 5439 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template 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; ; _Temporary_buffer<_RandomAccessIterator, _ValueType> __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); } # 5485 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator set_union(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) { if (*__first1 < *__first2) { *__result = *__first1; ++__first1; } else if (*__first2 < *__first1) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; ++__first2; } ++__result; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 5552 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator set_union(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; 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)); } # 5619 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (*__first1 < *__first2) ++__first1; else if (*__first2 < *__first1) ++__first2; else { *__result = *__first1; ++__first1; ++__first2; ++__result; } return __result; } # 5676 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first1, *__first2)) ++__first1; else if (__comp(*__first2, *__first1)) ++__first2; else { *__result = *__first1; ++__first1; ++__first2; ++__result; } return __result; } # 5734 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator set_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (*__first1 < *__first2) { *__result = *__first1; ++__first1; ++__result; } else if (*__first2 < *__first1) ++__first2; else { ++__first1; ++__first2; } return std::copy(__first1, __last1, __result); } # 5795 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator set_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; 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); } # 5853 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (*__first1 < *__first2) { *__result = *__first1; ++__first1; ++__result; } else if (*__first2 < *__first1) { *__result = *__first2; ++__first2; ++__result; } else { ++__first1; ++__first2; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 5919 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _OutputIterator set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; 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)); } # 5976 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _ForwardIterator min_element(_ForwardIterator __first, _ForwardIterator __last) { ; if (__first == __last) return __first; _ForwardIterator __result = __first; while (++__first != __last) if (*__first < *__result) __result = __first; return __result; } # 6004 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _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; } # 6032 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _ForwardIterator max_element(_ForwardIterator __first, _ForwardIterator __last) { ; if (__first == __last) return __first; _ForwardIterator __result = __first; while (++__first != __last) if (*__result < *__first) __result = __first; return __result; } # 6060 "/usr/include/c++/4.5/bits/stl_algo.h" 3 template _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; } } # 64 "/usr/include/c++/4.5/algorithm" 2 3 # 19 "../llvm/include/llvm/ADT/SmallVector.h" 2 # 1 "/usr/include/c++/4.5/cassert" 1 3 # 43 "/usr/include/c++/4.5/cassert" 3 # 44 "/usr/include/c++/4.5/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/include/c++/4.5/cassert" 2 3 # 20 "../llvm/include/llvm/ADT/SmallVector.h" 2 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 21 "../llvm/include/llvm/ADT/SmallVector.h" 2 # 1 "/usr/include/c++/4.5/cstdlib" 1 3 # 41 "/usr/include/c++/4.5/cstdlib" 3 # 42 "/usr/include/c++/4.5/cstdlib" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 45 "/usr/include/c++/4.5/cstdlib" 2 3 # 22 "../llvm/include/llvm/ADT/SmallVector.h" 2 # 1 "/usr/include/c++/4.5/cstring" 1 3 # 41 "/usr/include/c++/4.5/cstring" 3 # 42 "/usr/include/c++/4.5/cstring" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 45 "/usr/include/c++/4.5/cstring" 2 3 # 23 "../llvm/include/llvm/ADT/SmallVector.h" 2 # 1 "/usr/include/c++/4.5/memory" 1 3 # 47 "/usr/include/c++/4.5/memory" 3 # 48 "/usr/include/c++/4.5/memory" 3 # 68 "/usr/include/c++/4.5/memory" 3 # 1 "/usr/include/c++/4.5/bits/stl_raw_storage_iter.h" 1 3 # 60 "/usr/include/c++/4.5/bits/stl_raw_storage_iter.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template class raw_storage_iterator : public iterator { 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(&*_M_iter, __element); return *this; } raw_storage_iterator<_OutputIterator, _Tp>& operator++() { ++_M_iter; return *this; } raw_storage_iterator<_OutputIterator, _Tp> operator++(int) { raw_storage_iterator<_OutputIterator, _Tp> __tmp = *this; ++_M_iter; return __tmp; } }; } # 69 "/usr/include/c++/4.5/memory" 2 3 # 103 "/usr/include/c++/4.5/memory" 3 # 1 "/usr/include/c++/4.5/backward/auto_ptr.h" 1 3 # 36 "/usr/include/c++/4.5/backward/auto_ptr.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 45 "/usr/include/c++/4.5/backward/auto_ptr.h" 3 template struct auto_ptr_ref { _Tp1* _M_ptr; explicit auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { } } ; # 84 "/usr/include/c++/4.5/backward/auto_ptr.h" 3 template class auto_ptr { private: _Tp* _M_ptr; public: typedef _Tp element_type; explicit auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } # 110 "/usr/include/c++/4.5/backward/auto_ptr.h" 3 auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } # 122 "/usr/include/c++/4.5/backward/auto_ptr.h" 3 template auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } # 133 "/usr/include/c++/4.5/backward/auto_ptr.h" 3 auto_ptr& operator=(auto_ptr& __a) throw() { reset(__a.release()); return *this; } # 150 "/usr/include/c++/4.5/backward/auto_ptr.h" 3 template auto_ptr& operator=(auto_ptr<_Tp1>& __a) throw() { reset(__a.release()); return *this; } # 168 "/usr/include/c++/4.5/backward/auto_ptr.h" 3 ~auto_ptr() { delete _M_ptr; } # 178 "/usr/include/c++/4.5/backward/auto_ptr.h" 3 element_type& operator*() const throw() { ; return *_M_ptr; } element_type* operator->() const throw() { ; return _M_ptr; } # 208 "/usr/include/c++/4.5/backward/auto_ptr.h" 3 element_type* get() const throw() { return _M_ptr; } # 222 "/usr/include/c++/4.5/backward/auto_ptr.h" 3 element_type* release() throw() { element_type* __tmp = _M_ptr; _M_ptr = 0; return __tmp; } # 237 "/usr/include/c++/4.5/backward/auto_ptr.h" 3 void reset(element_type* __p = 0) throw() { if (__p != _M_ptr) { delete _M_ptr; _M_ptr = __p; } } # 258 "/usr/include/c++/4.5/backward/auto_ptr.h" 3 auto_ptr(auto_ptr_ref __ref) throw() : _M_ptr(__ref._M_ptr) { } auto_ptr& operator=(auto_ptr_ref __ref) throw() { if (__ref._M_ptr != this->get()) { delete _M_ptr; _M_ptr = __ref._M_ptr; } return *this; } template operator auto_ptr_ref<_Tp1>() throw() { return auto_ptr_ref<_Tp1>(this->release()); } template operator auto_ptr<_Tp1>() throw() { return auto_ptr<_Tp1>(this->release()); } } ; template<> class auto_ptr { public: typedef void element_type; } ; } # 104 "/usr/include/c++/4.5/memory" 2 3 # 25 "../llvm/include/llvm/ADT/SmallVector.h" 2 # 50 "../llvm/include/llvm/ADT/SmallVector.h" namespace llvm { class SmallVectorBase { protected: void *BeginX, *EndX, *CapacityX; union U { double D; long double LD; long long L; void *P; } FirstEl; protected: SmallVectorBase(size_t Size) : BeginX(&FirstEl), EndX(&FirstEl), CapacityX((char*)&FirstEl+Size) {} bool isSmall() const { return BeginX == static_cast(&FirstEl); } void grow_pod(size_t MinSizeInBytes, size_t TSize); public: size_t size_in_bytes() const { return size_t((char*)EndX - (char*)BeginX); } size_t capacity_in_bytes() const { return size_t((char*)CapacityX - (char*)BeginX); } bool empty() const { return BeginX == EndX; } }; template class SmallVectorTemplateCommon : public SmallVectorBase { protected: void setEnd(T *P) { this->EndX = P; } public: SmallVectorTemplateCommon(size_t Size) : SmallVectorBase(Size) {} typedef size_t size_type; typedef ptrdiff_t difference_type; typedef T value_type; typedef T *iterator; typedef const T *const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; typedef T &reference; typedef const T &const_reference; typedef T *pointer; typedef const T *const_pointer; iterator begin() { return (iterator)this->BeginX; } const_iterator begin() const { return (const_iterator)this->BeginX; } iterator end() { return (iterator)this->EndX; } const_iterator end() const { return (const_iterator)this->EndX; } protected: iterator capacity_ptr() { return (iterator)this->CapacityX; } const_iterator capacity_ptr() const { return (const_iterator)this->CapacityX;} public: 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() const { return end()-begin(); } size_type max_size() const { return size_type(-1) / sizeof(T); } size_t capacity() const { return capacity_ptr() - begin(); } pointer data() { return pointer(begin()); } const_pointer data() const { return const_pointer(begin()); } reference operator[](unsigned idx) { ((begin() + idx < end()) ? static_cast (0) : __assert_fail ("begin() + idx < end()", "../llvm/include/llvm/ADT/SmallVector.h", 150, __PRETTY_FUNCTION__)); return begin()[idx]; } const_reference operator[](unsigned idx) const { ((begin() + idx < end()) ? static_cast (0) : __assert_fail ("begin() + idx < end()", "../llvm/include/llvm/ADT/SmallVector.h", 154, __PRETTY_FUNCTION__)); return begin()[idx]; } reference front() { return begin()[0]; } const_reference front() const { return begin()[0]; } reference back() { return end()[-1]; } const_reference back() const { return end()[-1]; } }; template class SmallVectorTemplateBase : public SmallVectorTemplateCommon { public: SmallVectorTemplateBase(size_t Size) : SmallVectorTemplateCommon(Size) {} static void destroy_range(T *S, T *E) { while (S != E) { --E; E->~T(); } } template static void uninitialized_copy(It1 I, It1 E, It2 Dest) { std::uninitialized_copy(I, E, Dest); } void grow(size_t MinSize = 0); }; template void SmallVectorTemplateBase::grow(size_t MinSize) { size_t CurCapacity = this->capacity(); size_t CurSize = this->size(); size_t NewCapacity = 2*CurCapacity + 1; if (NewCapacity < MinSize) NewCapacity = MinSize; T *NewElts = static_cast(malloc(NewCapacity*sizeof(T))); this->uninitialized_copy(this->begin(), this->end(), NewElts); destroy_range(this->begin(), this->end()); if (!this->isSmall()) free(this->begin()); this->setEnd(NewElts+CurSize); this->BeginX = NewElts; this->CapacityX = this->begin()+NewCapacity; } template class SmallVectorTemplateBase : public SmallVectorTemplateCommon { public: SmallVectorTemplateBase(size_t Size) : SmallVectorTemplateCommon(Size) {} static void destroy_range(T *, T *) {} template static void uninitialized_copy(It1 I, It1 E, It2 Dest) { std::uninitialized_copy(I, E, Dest); } template static void uninitialized_copy(T1 *I, T1 *E, T2 *Dest) { memcpy(Dest, I, (E-I)*sizeof(T)); } void grow(size_t MinSize = 0) { this->grow_pod(MinSize*sizeof(T), sizeof(T)); } }; template class SmallVectorImpl : public SmallVectorTemplateBase::value> { typedef SmallVectorTemplateBase::value > SuperClass; SmallVectorImpl(const SmallVectorImpl&); public: typedef typename SuperClass::iterator iterator; typedef typename SuperClass::size_type size_type; explicit SmallVectorImpl(unsigned N) : SmallVectorTemplateBase::value>(N*sizeof(T)) { } ~SmallVectorImpl() { this->destroy_range(this->begin(), this->end()); if (!this->isSmall()) free(this->begin()); } void clear() { this->destroy_range(this->begin(), this->end()); this->EndX = this->BeginX; } void resize(unsigned N) { if (N < this->size()) { this->destroy_range(this->begin()+N, this->end()); this->setEnd(this->begin()+N); } else if (N > this->size()) { if (this->capacity() < N) this->grow(N); this->construct_range(this->end(), this->begin()+N, T()); this->setEnd(this->begin()+N); } } void resize(unsigned N, const T &NV) { if (N < this->size()) { this->destroy_range(this->begin()+N, this->end()); this->setEnd(this->begin()+N); } else if (N > this->size()) { if (this->capacity() < N) this->grow(N); construct_range(this->end(), this->begin()+N, NV); this->setEnd(this->begin()+N); } } void reserve(unsigned N) { if (this->capacity() < N) this->grow(N); } void push_back(const T &Elt) { if (this->EndX < this->CapacityX) { Retry: new (this->end()) T(Elt); this->setEnd(this->end()+1); return; } this->grow(); goto Retry; } void pop_back() { this->setEnd(this->end()-1); this->end()->~T(); } T pop_back_val() { T Result = this->back(); pop_back(); return Result; } void swap(SmallVectorImpl &RHS); template void append(in_iter in_start, in_iter in_end) { size_type NumInputs = std::distance(in_start, in_end); if (NumInputs > size_type(this->capacity_ptr()-this->end())) this->grow(this->size()+NumInputs); std::uninitialized_copy(in_start, in_end, this->end()); this->setEnd(this->end() + NumInputs); } void append(size_type NumInputs, const T &Elt) { if (NumInputs > size_type(this->capacity_ptr()-this->end())) this->grow(this->size()+NumInputs); std::uninitialized_fill_n(this->end(), NumInputs, Elt); this->setEnd(this->end() + NumInputs); } void assign(unsigned NumElts, const T &Elt) { clear(); if (this->capacity() < NumElts) this->grow(NumElts); this->setEnd(this->begin()+NumElts); construct_range(this->begin(), this->end(), Elt); } iterator erase(iterator I) { iterator N = I; std::copy(I+1, this->end(), I); pop_back(); return(N); } iterator erase(iterator S, iterator E) { iterator N = S; iterator I = std::copy(E, this->end(), S); this->destroy_range(I, this->end()); this->setEnd(I); return(N); } iterator insert(iterator I, const T &Elt) { if (I == this->end()) { push_back(Elt); return this->end()-1; } if (this->EndX < this->CapacityX) { Retry: new (this->end()) T(this->back()); this->setEnd(this->end()+1); std::copy_backward(I, this->end()-1, this->end()); const T *EltPtr = &Elt; if (I <= EltPtr && EltPtr < this->EndX) ++EltPtr; *I = *EltPtr; return I; } size_t EltNo = I-this->begin(); this->grow(); I = this->begin()+EltNo; goto Retry; } iterator insert(iterator I, size_type NumToInsert, const T &Elt) { if (I == this->end()) { append(NumToInsert, Elt); return this->end()-1; } size_t InsertElt = I - this->begin(); reserve(static_cast(this->size() + NumToInsert)); I = this->begin()+InsertElt; if (size_t(this->end()-I) >= NumToInsert) { T *OldEnd = this->end(); append(this->end()-NumToInsert, this->end()); std::copy_backward(I, OldEnd-NumToInsert, OldEnd); std::fill_n(I, NumToInsert, Elt); return I; } T *OldEnd = this->end(); this->setEnd(this->end() + NumToInsert); size_t NumOverwritten = OldEnd-I; this->uninitialized_copy(I, OldEnd, this->end()-NumOverwritten); std::fill_n(I, NumOverwritten, Elt); std::uninitialized_fill_n(OldEnd, NumToInsert-NumOverwritten, Elt); return I; } template iterator insert(iterator I, ItTy From, ItTy To) { if (I == this->end()) { append(From, To); return this->end()-1; } size_t NumToInsert = std::distance(From, To); size_t InsertElt = I - this->begin(); reserve(static_cast(this->size() + NumToInsert)); I = this->begin()+InsertElt; if (size_t(this->end()-I) >= NumToInsert) { T *OldEnd = this->end(); append(this->end()-NumToInsert, this->end()); std::copy_backward(I, OldEnd-NumToInsert, OldEnd); std::copy(From, To, I); return I; } T *OldEnd = this->end(); this->setEnd(this->end() + NumToInsert); size_t NumOverwritten = OldEnd-I; this->uninitialized_copy(I, OldEnd, this->end()-NumOverwritten); for (; NumOverwritten > 0; --NumOverwritten) { *I = *From; ++I; ++From; } this->uninitialized_copy(From, To, OldEnd); return I; } const SmallVectorImpl &operator=(const 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()); } # 553 "../llvm/include/llvm/ADT/SmallVector.h" void set_size(unsigned N) { ((N <= this->capacity()) ? static_cast (0) : __assert_fail ("N <= this->capacity()", "../llvm/include/llvm/ADT/SmallVector.h", 554, __PRETTY_FUNCTION__)); this->setEnd(this->begin() + N); } private: static void construct_range(T *S, T *E, const T &Elt) { for (; S != E; ++S) new (S) T(Elt); } }; template void SmallVectorImpl::swap(SmallVectorImpl &RHS) { if (this == &RHS) return; if (!this->isSmall() && !RHS.isSmall()) { std::swap(this->BeginX, RHS.BeginX); std::swap(this->EndX, RHS.EndX); std::swap(this->CapacityX, RHS.CapacityX); 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 (unsigned i = 0; i != static_cast(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.setEnd(RHS.end()+EltDiff); this->destroy_range(this->begin()+NumShared, this->end()); this->setEnd(this->begin()+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->setEnd(this->end() + EltDiff); this->destroy_range(RHS.begin()+NumShared, RHS.end()); RHS.setEnd(RHS.begin()+NumShared); } } template const SmallVectorImpl &SmallVectorImpl:: operator=(const SmallVectorImpl &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->setEnd(NewEnd); return *this; } if (this->capacity() < RHSSize) { this->destroy_range(this->begin(), this->end()); this->setEnd(this->begin()); 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->setEnd(this->begin()+RHSSize); return *this; } # 661 "../llvm/include/llvm/ADT/SmallVector.h" template class SmallVector : public SmallVectorImpl { typedef typename SmallVectorImpl::U U; enum { MinUs = (static_cast(sizeof(T))*N + static_cast(sizeof(U)) - 1) / static_cast(sizeof(U)), NumInlineEltsElts = MinUs > 1 ? (MinUs - 1) : 1, NumTsAvailable = (NumInlineEltsElts+1)*static_cast(sizeof(U))/ static_cast(sizeof(T)) }; U InlineElts[NumInlineEltsElts]; public: SmallVector() : SmallVectorImpl(NumTsAvailable) { } explicit SmallVector(unsigned Size, const T &Value = T()) : SmallVectorImpl(NumTsAvailable) { this->reserve(Size); while (Size--) this->push_back(Value); } template SmallVector(ItTy S, ItTy E) : SmallVectorImpl(NumTsAvailable) { this->append(S, E); } SmallVector(const SmallVector &RHS) : SmallVectorImpl(NumTsAvailable) { if (!RHS.empty()) SmallVectorImpl::operator=(RHS); } const SmallVector &operator=(const SmallVector &RHS) { SmallVectorImpl::operator=(RHS); return *this; } }; template class SmallVector : public SmallVectorImpl { public: SmallVector() : SmallVectorImpl(0) {} explicit SmallVector(unsigned Size, const T &Value = T()) : SmallVectorImpl(0) { this->reserve(Size); while (Size--) this->push_back(Value); } template SmallVector(ItTy S, ItTy E) : SmallVectorImpl(0) { this->append(S, E); } SmallVector(const SmallVector &RHS) : SmallVectorImpl(0) { SmallVectorImpl::operator=(RHS); } SmallVector &operator=(const SmallVectorImpl &RHS) { return SmallVectorImpl::operator=(RHS); } }; template static inline size_t capacity_in_bytes(const SmallVector &X) { return X.capacity_in_bytes(); } } namespace std { template inline void swap(llvm::SmallVectorImpl &LHS, llvm::SmallVectorImpl &RHS) { LHS.swap(RHS); } template inline void swap(llvm::SmallVector &LHS, llvm::SmallVector &RHS) { LHS.swap(RHS); } } # 14 "../llvm/include/llvm/ADT/ArrayRef.h" 2 namespace llvm { class APInt; # 30 "../llvm/include/llvm/ADT/ArrayRef.h" template class ArrayRef { public: typedef const T *iterator; typedef const T *const_iterator; typedef size_t size_type; private: const T *Data; size_type Length; public: ArrayRef() : Data(0), Length(0) {} 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) {} ArrayRef(const SmallVectorImpl &Vec) : Data(Vec.data()), Length(Vec.size()) {} ArrayRef(const std::vector &Vec) : Data(Vec.empty() ? (T*)0 : &Vec[0]), Length(Vec.size()) {} template ArrayRef(const T (&Arr)[N]) : Data(Arr), Length(N) {} iterator begin() const { return Data; } iterator end() const { return Data + Length; } bool empty() const { return Length == 0; } const T *data() const { return Data; } size_t size() const { return Length; } const T &front() const { ((!empty()) ? static_cast (0) : __assert_fail ("!empty()", "../llvm/include/llvm/ADT/ArrayRef.h", 93, __PRETTY_FUNCTION__)); return Data[0]; } const T &back() const { ((!empty()) ? static_cast (0) : __assert_fail ("!empty()", "../llvm/include/llvm/ADT/ArrayRef.h", 99, __PRETTY_FUNCTION__)); return Data[Length-1]; } bool equals(ArrayRef RHS) const { if (Length != RHS.Length) return false; for (size_type i = 0; i != Length; i++) if (Data[i] != RHS.Data[i]) return false; return true; } ArrayRef slice(unsigned N) { ((N <= size() && "Invalid specifier") ? static_cast (0) : __assert_fail ("N <= size() && \"Invalid specifier\"", "../llvm/include/llvm/ADT/ArrayRef.h", 115, __PRETTY_FUNCTION__)); return ArrayRef(data()+N, size()-N); } ArrayRef slice(unsigned N, unsigned M) { ((N+M <= size() && "Invalid specifier") ? static_cast (0) : __assert_fail ("N+M <= size() && \"Invalid specifier\"", "../llvm/include/llvm/ADT/ArrayRef.h", 122, __PRETTY_FUNCTION__)); return ArrayRef(data()+N, M); } const T &operator[](size_t Index) const { ((Index < Length && "Invalid index!") ? static_cast (0) : __assert_fail ("Index < Length && \"Invalid index!\"", "../llvm/include/llvm/ADT/ArrayRef.h", 130, __PRETTY_FUNCTION__)); return Data[Index]; } std::vector vec() const { return std::vector(Data, Data+Length); } operator std::vector() const { return std::vector(Data, Data+Length); } }; template ArrayRef makeArrayRef(const T &OneElt) { return OneElt; } template ArrayRef makeArrayRef(const T *data, size_t length) { return ArrayRef(data, length); } template ArrayRef makeArrayRef(const T *begin, const T *end) { return ArrayRef(begin, end); } template ArrayRef makeArrayRef(const SmallVectorImpl &Vec) { return Vec; } template ArrayRef makeArrayRef(const SmallVector &Vec) { return Vec; } template ArrayRef makeArrayRef(const std::vector &Vec) { return Vec; } template ArrayRef makeArrayRef(const T (&Arr)[N]) { return ArrayRef(Arr); } template inline bool operator==(ArrayRef LHS, ArrayRef RHS) { return LHS.equals(RHS); } template inline bool operator!=(ArrayRef LHS, ArrayRef RHS) { return !(LHS == RHS); } template struct isPodLike; template struct isPodLike > { static const bool value = true; }; } # 24 "../llvm/include/llvm/Instructions.h" 2 # 1 "../llvm/include/llvm/Support/ErrorHandling.h" 1 # 18 "../llvm/include/llvm/Support/ErrorHandling.h" # 1 "../llvm/include/llvm/Support/Compiler.h" 1 # 19 "../llvm/include/llvm/Support/ErrorHandling.h" 2 namespace llvm { class Twine; typedef void (*fatal_error_handler_t)(void *user_data, const std::string& reason); # 48 "../llvm/include/llvm/Support/ErrorHandling.h" void install_fatal_error_handler(fatal_error_handler_t handler, void *user_data = 0); void remove_fatal_error_handler(); struct ScopedFatalErrorHandler { explicit ScopedFatalErrorHandler(fatal_error_handler_t handler, void *user_data = 0) { install_fatal_error_handler(handler, user_data); } ~ScopedFatalErrorHandler() { remove_fatal_error_handler(); } }; # 76 "../llvm/include/llvm/Support/ErrorHandling.h" __attribute__((noreturn)) void report_fatal_error(const char *reason); __attribute__((noreturn)) void report_fatal_error(const std::string &reason); __attribute__((noreturn)) void report_fatal_error(StringRef reason); __attribute__((noreturn)) void report_fatal_error(const Twine &reason); __attribute__((noreturn)) void llvm_unreachable_internal(const char *msg=0, const char *file=0, unsigned line=0); } # 26 "../llvm/include/llvm/Instructions.h" 2 namespace llvm { class ConstantInt; class ConstantRange; class APInt; class LLVMContext; enum AtomicOrdering { NotAtomic = 0, Unordered = 1, Monotonic = 2, Acquire = 4, Release = 5, AcquireRelease = 6, SequentiallyConsistent = 7 }; enum SynchronizationScope { SingleThread = 0, CrossThread = 1 }; class AllocaInst : public UnaryInstruction { protected: virtual AllocaInst *clone_impl() const; public: explicit AllocaInst(Type *Ty, Value *ArraySize = 0, const Twine &Name = "", Instruction *InsertBefore = 0); AllocaInst(Type *Ty, Value *ArraySize, const Twine &Name, BasicBlock *InsertAtEnd); AllocaInst(Type *Ty, const Twine &Name, Instruction *InsertBefore = 0); AllocaInst(Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd); AllocaInst(Type *Ty, Value *ArraySize, unsigned Align, const Twine &Name = "", Instruction *InsertBefore = 0); AllocaInst(Type *Ty, Value *ArraySize, unsigned Align, const Twine &Name, BasicBlock *InsertAtEnd); virtual ~AllocaInst(); bool isArrayAllocation() const; const Value *getArraySize() const { return getOperand(0); } Value *getArraySize() { return getOperand(0); } PointerType *getType() const { return reinterpret_cast(Instruction::getType()); } Type *getAllocatedType() const; unsigned getAlignment() const { return (1u << getSubclassDataFromInstruction()) >> 1; } void setAlignment(unsigned Align); bool isStaticAlloca() const; static inline bool classof(const AllocaInst *) { return true; } static inline bool classof(const Instruction *I) { return (I->getOpcode() == Instruction::Alloca); } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: void setInstructionSubclassData(unsigned short D) { Instruction::setInstructionSubclassData(D); } }; # 136 "../llvm/include/llvm/Instructions.h" class LoadInst : public UnaryInstruction { void AssertOK(); protected: virtual LoadInst *clone_impl() const; public: LoadInst(Value *Ptr, const Twine &NameStr, Instruction *InsertBefore); LoadInst(Value *Ptr, const Twine &NameStr, BasicBlock *InsertAtEnd); LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile = false, Instruction *InsertBefore = 0); LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, BasicBlock *InsertAtEnd); LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, unsigned Align, Instruction *InsertBefore = 0); LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, unsigned Align, BasicBlock *InsertAtEnd); LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, unsigned Align, AtomicOrdering Order, SynchronizationScope SynchScope = CrossThread, Instruction *InsertBefore = 0); LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, unsigned Align, AtomicOrdering Order, SynchronizationScope SynchScope, BasicBlock *InsertAtEnd); LoadInst(Value *Ptr, const char *NameStr, Instruction *InsertBefore); LoadInst(Value *Ptr, const char *NameStr, BasicBlock *InsertAtEnd); explicit LoadInst(Value *Ptr, const char *NameStr = 0, bool isVolatile = false, Instruction *InsertBefore = 0); LoadInst(Value *Ptr, const char *NameStr, bool isVolatile, BasicBlock *InsertAtEnd); bool isVolatile() const { return getSubclassDataFromInstruction() & 1; } void setVolatile(bool V) { setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) | (V ? 1 : 0)); } unsigned getAlignment() const { return (1 << ((getSubclassDataFromInstruction() >> 1) & 31)) >> 1; } void setAlignment(unsigned Align); AtomicOrdering getOrdering() const { return AtomicOrdering((getSubclassDataFromInstruction() >> 7) & 7); } void setOrdering(AtomicOrdering Ordering) { setInstructionSubclassData((getSubclassDataFromInstruction() & ~(7 << 7)) | (Ordering << 7)); } SynchronizationScope getSynchScope() const { return SynchronizationScope((getSubclassDataFromInstruction() >> 6) & 1); } void setSynchScope(SynchronizationScope xthread) { setInstructionSubclassData((getSubclassDataFromInstruction() & ~(1 << 6)) | (xthread << 6)); } bool isAtomic() const { return getOrdering() != NotAtomic; } void setAtomic(AtomicOrdering Ordering, SynchronizationScope SynchScope = CrossThread) { setOrdering(Ordering); setSynchScope(SynchScope); } bool isSimple() const { return !isAtomic() && !isVolatile(); } bool isUnordered() const { return getOrdering() <= Unordered && !isVolatile(); } Value *getPointerOperand() { return getOperand(0); } const Value *getPointerOperand() const { return getOperand(0); } static unsigned getPointerOperandIndex() { return 0U; } unsigned getPointerAddressSpace() const { return cast(getPointerOperand()->getType())->getAddressSpace(); } static inline bool classof(const LoadInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Load; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: void setInstructionSubclassData(unsigned short D) { Instruction::setInstructionSubclassData(D); } }; # 255 "../llvm/include/llvm/Instructions.h" class StoreInst : public Instruction { void *operator new(size_t, unsigned); void AssertOK(); protected: virtual StoreInst *clone_impl() const; public: void *operator new(size_t s) { return User::operator new(s, 2); } StoreInst(Value *Val, Value *Ptr, Instruction *InsertBefore); StoreInst(Value *Val, Value *Ptr, BasicBlock *InsertAtEnd); StoreInst(Value *Val, Value *Ptr, bool isVolatile = false, Instruction *InsertBefore = 0); StoreInst(Value *Val, Value *Ptr, bool isVolatile, BasicBlock *InsertAtEnd); StoreInst(Value *Val, Value *Ptr, bool isVolatile, unsigned Align, Instruction *InsertBefore = 0); StoreInst(Value *Val, Value *Ptr, bool isVolatile, unsigned Align, BasicBlock *InsertAtEnd); StoreInst(Value *Val, Value *Ptr, bool isVolatile, unsigned Align, AtomicOrdering Order, SynchronizationScope SynchScope = CrossThread, Instruction *InsertBefore = 0); StoreInst(Value *Val, Value *Ptr, bool isVolatile, unsigned Align, AtomicOrdering Order, SynchronizationScope SynchScope, BasicBlock *InsertAtEnd); bool isVolatile() const { return getSubclassDataFromInstruction() & 1; } void setVolatile(bool V) { setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) | (V ? 1 : 0)); } 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; unsigned getAlignment() const { return (1 << ((getSubclassDataFromInstruction() >> 1) & 31)) >> 1; } void setAlignment(unsigned Align); AtomicOrdering getOrdering() const { return AtomicOrdering((getSubclassDataFromInstruction() >> 7) & 7); } void setOrdering(AtomicOrdering Ordering) { setInstructionSubclassData((getSubclassDataFromInstruction() & ~(7 << 7)) | (Ordering << 7)); } SynchronizationScope getSynchScope() const { return SynchronizationScope((getSubclassDataFromInstruction() >> 6) & 1); } void setSynchScope(SynchronizationScope xthread) { setInstructionSubclassData((getSubclassDataFromInstruction() & ~(1 << 6)) | (xthread << 6)); } bool isAtomic() const { return getOrdering() != NotAtomic; } void setAtomic(AtomicOrdering Ordering, SynchronizationScope SynchScope = CrossThread) { setOrdering(Ordering); setSynchScope(SynchScope); } bool isSimple() const { return !isAtomic() && !isVolatile(); } bool isUnordered() const { return getOrdering() <= 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; } unsigned getPointerAddressSpace() const { return cast(getPointerOperand()->getType())->getAddressSpace(); } static inline bool classof(const StoreInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Store; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: void setInstructionSubclassData(unsigned short D) { Instruction::setInstructionSubclassData(D); } }; template <> struct OperandTraits : public FixedNumOperandTraits { }; StoreInst::op_iterator StoreInst::op_begin() { return OperandTraits::op_begin(this); } StoreInst::const_op_iterator StoreInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } StoreInst::op_iterator StoreInst::op_end() { return OperandTraits::op_end(this); } StoreInst::const_op_iterator StoreInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *StoreInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 374, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void StoreInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 374, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned StoreInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &StoreInst::Op() { return this->OpFrom(this); } template const Use &StoreInst::Op() const { return this->OpFrom(this); } class FenceInst : public Instruction { void *operator new(size_t, unsigned); void Init(AtomicOrdering Ordering, SynchronizationScope SynchScope); protected: virtual FenceInst *clone_impl() const; public: void *operator new(size_t s) { return User::operator new(s, 0); } FenceInst(LLVMContext &C, AtomicOrdering Ordering, SynchronizationScope SynchScope = CrossThread, Instruction *InsertBefore = 0); FenceInst(LLVMContext &C, AtomicOrdering Ordering, SynchronizationScope SynchScope, BasicBlock *InsertAtEnd); AtomicOrdering getOrdering() const { return AtomicOrdering(getSubclassDataFromInstruction() >> 1); } void setOrdering(AtomicOrdering Ordering) { setInstructionSubclassData((getSubclassDataFromInstruction() & 1) | (Ordering << 1)); } SynchronizationScope getSynchScope() const { return SynchronizationScope(getSubclassDataFromInstruction() & 1); } void setSynchScope(SynchronizationScope xthread) { setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) | xthread); } static inline bool classof(const FenceInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Fence; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: void setInstructionSubclassData(unsigned short D) { Instruction::setInstructionSubclassData(D); } }; # 450 "../llvm/include/llvm/Instructions.h" class AtomicCmpXchgInst : public Instruction { void *operator new(size_t, unsigned); void Init(Value *Ptr, Value *Cmp, Value *NewVal, AtomicOrdering Ordering, SynchronizationScope SynchScope); protected: virtual AtomicCmpXchgInst *clone_impl() const; public: void *operator new(size_t s) { return User::operator new(s, 3); } AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal, AtomicOrdering Ordering, SynchronizationScope SynchScope, Instruction *InsertBefore = 0); AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal, AtomicOrdering Ordering, SynchronizationScope SynchScope, BasicBlock *InsertAtEnd); bool isVolatile() const { return getSubclassDataFromInstruction() & 1; } void setVolatile(bool V) { setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) | (unsigned)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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; void setOrdering(AtomicOrdering Ordering) { ((Ordering != NotAtomic && "CmpXchg instructions can only be atomic.") ? static_cast (0) : __assert_fail ("Ordering != NotAtomic && \"CmpXchg instructions can only be atomic.\"", "../llvm/include/llvm/Instructions.h" # 487 "../llvm/include/llvm/Instructions.h" , 488 # 487 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; setInstructionSubclassData((getSubclassDataFromInstruction() & 3) | (Ordering << 2)); } void setSynchScope(SynchronizationScope SynchScope) { setInstructionSubclassData((getSubclassDataFromInstruction() & ~2) | (SynchScope << 1)); } AtomicOrdering getOrdering() const { return AtomicOrdering(getSubclassDataFromInstruction() >> 2); } SynchronizationScope getSynchScope() const { return SynchronizationScope((getSubclassDataFromInstruction() & 2) >> 1); } 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 cast(getPointerOperand()->getType())->getAddressSpace(); } static inline bool classof(const AtomicCmpXchgInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::AtomicCmpXchg; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: void setInstructionSubclassData(unsigned short D) { Instruction::setInstructionSubclassData(D); } }; template <> struct OperandTraits : public FixedNumOperandTraits { }; AtomicCmpXchgInst::op_iterator AtomicCmpXchgInst::op_begin() { return OperandTraits::op_begin(this); } AtomicCmpXchgInst::const_op_iterator AtomicCmpXchgInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } AtomicCmpXchgInst::op_iterator AtomicCmpXchgInst::op_end() { return OperandTraits::op_end(this); } AtomicCmpXchgInst::const_op_iterator AtomicCmpXchgInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *AtomicCmpXchgInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 547, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void AtomicCmpXchgInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 547, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned AtomicCmpXchgInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &AtomicCmpXchgInst::Op() { return this->OpFrom(this); } template const Use &AtomicCmpXchgInst::Op() const { return this->OpFrom(this); } # 557 "../llvm/include/llvm/Instructions.h" class AtomicRMWInst : public Instruction { void *operator new(size_t, unsigned); protected: virtual AtomicRMWInst *clone_impl() const; public: enum BinOp { Xchg, Add, Sub, And, Nand, Or, Xor, Max, Min, UMax, UMin, FIRST_BINOP = Xchg, LAST_BINOP = UMin, BAD_BINOP }; void *operator new(size_t s) { return User::operator new(s, 2); } AtomicRMWInst(BinOp Operation, Value *Ptr, Value *Val, AtomicOrdering Ordering, SynchronizationScope SynchScope, Instruction *InsertBefore = 0); AtomicRMWInst(BinOp Operation, Value *Ptr, Value *Val, AtomicOrdering Ordering, SynchronizationScope SynchScope, BasicBlock *InsertAtEnd); BinOp getOperation() const { return static_cast(getSubclassDataFromInstruction() >> 5); } void setOperation(BinOp Operation) { unsigned short SubclassData = getSubclassDataFromInstruction(); setInstructionSubclassData((SubclassData & 31) | (Operation << 5)); } bool isVolatile() const { return getSubclassDataFromInstruction() & 1; } void setVolatile(bool V) { setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) | (unsigned)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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; void setOrdering(AtomicOrdering Ordering) { ((Ordering != NotAtomic && "atomicrmw instructions can only be atomic.") ? static_cast (0) : __assert_fail ("Ordering != NotAtomic && \"atomicrmw instructions can only be atomic.\"", "../llvm/include/llvm/Instructions.h" # 634 "../llvm/include/llvm/Instructions.h" , 635 # 634 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; setInstructionSubclassData((getSubclassDataFromInstruction() & ~(7 << 2)) | (Ordering << 2)); } void setSynchScope(SynchronizationScope SynchScope) { setInstructionSubclassData((getSubclassDataFromInstruction() & ~2) | (SynchScope << 1)); } AtomicOrdering getOrdering() const { return AtomicOrdering((getSubclassDataFromInstruction() >> 2) & 7); } SynchronizationScope getSynchScope() const { return SynchronizationScope((getSubclassDataFromInstruction() & 2) >> 1); } 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 cast(getPointerOperand()->getType())->getAddressSpace(); } static inline bool classof(const AtomicRMWInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::AtomicRMW; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: void Init(BinOp Operation, Value *Ptr, Value *Val, AtomicOrdering Ordering, SynchronizationScope SynchScope); void setInstructionSubclassData(unsigned short D) { Instruction::setInstructionSubclassData(D); } }; template <> struct OperandTraits : public FixedNumOperandTraits { }; AtomicRMWInst::op_iterator AtomicRMWInst::op_begin() { return OperandTraits::op_begin(this); } AtomicRMWInst::const_op_iterator AtomicRMWInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } AtomicRMWInst::op_iterator AtomicRMWInst::op_end() { return OperandTraits::op_end(this); } AtomicRMWInst::const_op_iterator AtomicRMWInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *AtomicRMWInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 693, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void AtomicRMWInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 693, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned AtomicRMWInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &AtomicRMWInst::Op() { return this->OpFrom(this); } template const Use &AtomicRMWInst::Op() const { return this->OpFrom(this); } # 702 "../llvm/include/llvm/Instructions.h" static inline Type *checkGEPType(Type *Ty) { ((Ty && "Invalid GetElementPtrInst indices for type!") ? static_cast (0) : __assert_fail ("Ty && \"Invalid GetElementPtrInst indices for type!\"", "../llvm/include/llvm/Instructions.h", 703, __PRETTY_FUNCTION__)); return Ty; } class GetElementPtrInst : public Instruction { GetElementPtrInst(const GetElementPtrInst &GEPI); void init(Value *Ptr, ArrayRef IdxList, const Twine &NameStr); inline GetElementPtrInst(Value *Ptr, ArrayRef IdxList, unsigned Values, const Twine &NameStr, Instruction *InsertBefore); inline GetElementPtrInst(Value *Ptr, ArrayRef IdxList, unsigned Values, const Twine &NameStr, BasicBlock *InsertAtEnd); protected: virtual GetElementPtrInst *clone_impl() const; public: static GetElementPtrInst *Create(Value *Ptr, ArrayRef IdxList, const Twine &NameStr = "", Instruction *InsertBefore = 0) { unsigned Values = 1 + unsigned(IdxList.size()); return new(Values) GetElementPtrInst(Ptr, IdxList, Values, NameStr, InsertBefore); } static GetElementPtrInst *Create(Value *Ptr, ArrayRef IdxList, const Twine &NameStr, BasicBlock *InsertAtEnd) { unsigned Values = 1 + unsigned(IdxList.size()); return new(Values) GetElementPtrInst(Ptr, IdxList, Values, NameStr, InsertAtEnd); } static GetElementPtrInst *CreateInBounds(Value *Ptr, ArrayRef IdxList, const Twine &NameStr = "", Instruction *InsertBefore = 0) { GetElementPtrInst *GEP = Create(Ptr, IdxList, NameStr, InsertBefore); GEP->setIsInBounds(true); return GEP; } static GetElementPtrInst *CreateInBounds(Value *Ptr, ArrayRef IdxList, const Twine &NameStr, BasicBlock *InsertAtEnd) { GetElementPtrInst *GEP = Create(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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; PointerType *getType() const { return reinterpret_cast(Instruction::getType()); } static Type *getIndexedType(Type *Ptr, ArrayRef IdxList); static Type *getIndexedType(Type *Ptr, ArrayRef IdxList); static Type *getIndexedType(Type *Ptr, ArrayRef IdxList); static unsigned getAddressSpace(Value *Ptr); 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(); } Value *getPointerOperand() { return getOperand(0); } const Value *getPointerOperand() const { return getOperand(0); } static unsigned getPointerOperandIndex() { return 0U; } unsigned getPointerAddressSpace() const { return cast(getType())->getAddressSpace(); } Type *getPointerOperandType() const { return getPointerOperand()->getType(); } static Type *getGEPReturnType(Value *Ptr, ArrayRef IdxList) { Type *PtrTy = PointerType::get(checkGEPType( getIndexedType(Ptr->getType(), IdxList)), getAddressSpace(Ptr)); if (Ptr->getType()->isVectorTy()) { unsigned NumElem = cast(Ptr->getType())->getNumElements(); return VectorType::get(PtrTy, NumElem); } 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; static inline bool classof(const GetElementPtrInst *) { return true; } static inline bool classof(const Instruction *I) { return (I->getOpcode() == Instruction::GetElementPtr); } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; template <> struct OperandTraits : public VariadicOperandTraits { }; GetElementPtrInst::GetElementPtrInst(Value *Ptr, ArrayRef IdxList, unsigned Values, const Twine &NameStr, Instruction *InsertBefore) : Instruction(getGEPReturnType(Ptr, IdxList), GetElementPtr, OperandTraits::op_end(this) - Values, Values, InsertBefore) { init(Ptr, IdxList, NameStr); } GetElementPtrInst::GetElementPtrInst(Value *Ptr, ArrayRef IdxList, unsigned Values, const Twine &NameStr, BasicBlock *InsertAtEnd) : Instruction(getGEPReturnType(Ptr, IdxList), GetElementPtr, OperandTraits::op_end(this) - Values, Values, InsertAtEnd) { init(Ptr, IdxList, NameStr); } GetElementPtrInst::op_iterator GetElementPtrInst::op_begin() { return OperandTraits::op_begin(this); } GetElementPtrInst::const_op_iterator GetElementPtrInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } GetElementPtrInst::op_iterator GetElementPtrInst::op_end() { return OperandTraits::op_end(this); } GetElementPtrInst::const_op_iterator GetElementPtrInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *GetElementPtrInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 888, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void GetElementPtrInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 888, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned GetElementPtrInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &GetElementPtrInst::Op() { return this->OpFrom(this); } template const Use &GetElementPtrInst::Op() const { return this->OpFrom(this); } # 899 "../llvm/include/llvm/Instructions.h" class ICmpInst: public CmpInst { protected: virtual ICmpInst *clone_impl() 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) { ((pred >= CmpInst::FIRST_ICMP_PREDICATE && pred <= CmpInst::LAST_ICMP_PREDICATE && "Invalid ICmp predicate value") ? static_cast (0) : __assert_fail ("pred >= CmpInst::FIRST_ICMP_PREDICATE && pred <= CmpInst::LAST_ICMP_PREDICATE && \"Invalid ICmp predicate value\"", "../llvm/include/llvm/Instructions.h" # 914 "../llvm/include/llvm/Instructions.h" , 916 # 914 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; ((getOperand(0)->getType() == getOperand(1)->getType() && "Both operands to ICmp instruction are not of the same type!") ? static_cast (0) : __assert_fail ("getOperand(0)->getType() == getOperand(1)->getType() && \"Both operands to ICmp instruction are not of the same type!\"", "../llvm/include/llvm/Instructions.h" # 917 "../llvm/include/llvm/Instructions.h" , 918 # 917 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; (((getOperand(0)->getType()->isIntOrIntVectorTy() || getOperand(0)->getType()->getScalarType()->isPointerTy()) && "Invalid operand types for ICmp instruction") ? static_cast (0) : __assert_fail ("(getOperand(0)->getType()->isIntOrIntVectorTy() || getOperand(0)->getType()->getScalarType()->isPointerTy()) && \"Invalid operand types for ICmp instruction\"", "../llvm/include/llvm/Instructions.h" # 920 "../llvm/include/llvm/Instructions.h" , 922 # 920 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; } ICmpInst( BasicBlock &InsertAtEnd, Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr = "" ) : CmpInst(makeCmpResultType(LHS->getType()), Instruction::ICmp, pred, LHS, RHS, NameStr, &InsertAtEnd) { ((pred >= CmpInst::FIRST_ICMP_PREDICATE && pred <= CmpInst::LAST_ICMP_PREDICATE && "Invalid ICmp predicate value") ? static_cast (0) : __assert_fail ("pred >= CmpInst::FIRST_ICMP_PREDICATE && pred <= CmpInst::LAST_ICMP_PREDICATE && \"Invalid ICmp predicate value\"", "../llvm/include/llvm/Instructions.h" # 935 "../llvm/include/llvm/Instructions.h" , 937 # 935 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; ((getOperand(0)->getType() == getOperand(1)->getType() && "Both operands to ICmp instruction are not of the same type!") ? static_cast (0) : __assert_fail ("getOperand(0)->getType() == getOperand(1)->getType() && \"Both operands to ICmp instruction are not of the same type!\"", "../llvm/include/llvm/Instructions.h" # 938 "../llvm/include/llvm/Instructions.h" , 939 # 938 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; (((getOperand(0)->getType()->isIntOrIntVectorTy() || getOperand(0)->getType()->isPointerTy()) && "Invalid operand types for ICmp instruction") ? static_cast (0) : __assert_fail ("(getOperand(0)->getType()->isIntOrIntVectorTy() || getOperand(0)->getType()->isPointerTy()) && \"Invalid operand types for ICmp instruction\"", "../llvm/include/llvm/Instructions.h" # 941 "../llvm/include/llvm/Instructions.h" , 943 # 941 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; } ICmpInst( Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr = "" ) : CmpInst(makeCmpResultType(LHS->getType()), Instruction::ICmp, pred, LHS, RHS, NameStr) { ((pred >= CmpInst::FIRST_ICMP_PREDICATE && pred <= CmpInst::LAST_ICMP_PREDICATE && "Invalid ICmp predicate value") ? static_cast (0) : __assert_fail ("pred >= CmpInst::FIRST_ICMP_PREDICATE && pred <= CmpInst::LAST_ICMP_PREDICATE && \"Invalid ICmp predicate value\"", "../llvm/include/llvm/Instructions.h" # 954 "../llvm/include/llvm/Instructions.h" , 956 # 954 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; ((getOperand(0)->getType() == getOperand(1)->getType() && "Both operands to ICmp instruction are not of the same type!") ? static_cast (0) : __assert_fail ("getOperand(0)->getType() == getOperand(1)->getType() && \"Both operands to ICmp instruction are not of the same type!\"", "../llvm/include/llvm/Instructions.h" # 957 "../llvm/include/llvm/Instructions.h" , 958 # 957 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; (((getOperand(0)->getType()->isIntOrIntVectorTy() || getOperand(0)->getType()->getScalarType()->isPointerTy()) && "Invalid operand types for ICmp instruction") ? static_cast (0) : __assert_fail ("(getOperand(0)->getType()->isIntOrIntVectorTy() || getOperand(0)->getType()->getScalarType()->isPointerTy()) && \"Invalid operand types for ICmp instruction\"", "../llvm/include/llvm/Instructions.h" # 960 "../llvm/include/llvm/Instructions.h" , 962 # 960 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; } 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); } static ConstantRange makeConstantRange(Predicate pred, const APInt &C); void swapOperands() { setPredicate(getSwappedPredicate()); Op<0>().swap(Op<1>()); } static inline bool classof(const ICmpInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::ICmp; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; # 1050 "../llvm/include/llvm/Instructions.h" class FCmpInst: public CmpInst { protected: virtual FCmpInst *clone_impl() 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) { ((pred <= FCmpInst::LAST_FCMP_PREDICATE && "Invalid FCmp predicate value") ? static_cast (0) : __assert_fail ("pred <= FCmpInst::LAST_FCMP_PREDICATE && \"Invalid FCmp predicate value\"", "../llvm/include/llvm/Instructions.h" # 1065 "../llvm/include/llvm/Instructions.h" , 1066 # 1065 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; ((getOperand(0)->getType() == getOperand(1)->getType() && "Both operands to FCmp instruction are not of the same type!") ? static_cast (0) : __assert_fail ("getOperand(0)->getType() == getOperand(1)->getType() && \"Both operands to FCmp instruction are not of the same type!\"", "../llvm/include/llvm/Instructions.h" # 1067 "../llvm/include/llvm/Instructions.h" , 1068 # 1067 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; ((getOperand(0)->getType()->isFPOrFPVectorTy() && "Invalid operand types for FCmp instruction") ? static_cast (0) : __assert_fail ("getOperand(0)->getType()->isFPOrFPVectorTy() && \"Invalid operand types for FCmp instruction\"", "../llvm/include/llvm/Instructions.h" # 1070 "../llvm/include/llvm/Instructions.h" , 1071 # 1070 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; } FCmpInst( BasicBlock &InsertAtEnd, Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr = "" ) : CmpInst(makeCmpResultType(LHS->getType()), Instruction::FCmp, pred, LHS, RHS, NameStr, &InsertAtEnd) { ((pred <= FCmpInst::LAST_FCMP_PREDICATE && "Invalid FCmp predicate value") ? static_cast (0) : __assert_fail ("pred <= FCmpInst::LAST_FCMP_PREDICATE && \"Invalid FCmp predicate value\"", "../llvm/include/llvm/Instructions.h" # 1084 "../llvm/include/llvm/Instructions.h" , 1085 # 1084 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; ((getOperand(0)->getType() == getOperand(1)->getType() && "Both operands to FCmp instruction are not of the same type!") ? static_cast (0) : __assert_fail ("getOperand(0)->getType() == getOperand(1)->getType() && \"Both operands to FCmp instruction are not of the same type!\"", "../llvm/include/llvm/Instructions.h" # 1086 "../llvm/include/llvm/Instructions.h" , 1087 # 1086 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; ((getOperand(0)->getType()->isFPOrFPVectorTy() && "Invalid operand types for FCmp instruction") ? static_cast (0) : __assert_fail ("getOperand(0)->getType()->isFPOrFPVectorTy() && \"Invalid operand types for FCmp instruction\"", "../llvm/include/llvm/Instructions.h" # 1089 "../llvm/include/llvm/Instructions.h" , 1090 # 1089 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; } FCmpInst( Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr = "" ) : CmpInst(makeCmpResultType(LHS->getType()), Instruction::FCmp, pred, LHS, RHS, NameStr) { ((pred <= FCmpInst::LAST_FCMP_PREDICATE && "Invalid FCmp predicate value") ? static_cast (0) : __assert_fail ("pred <= FCmpInst::LAST_FCMP_PREDICATE && \"Invalid FCmp predicate value\"", "../llvm/include/llvm/Instructions.h" # 1101 "../llvm/include/llvm/Instructions.h" , 1102 # 1101 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; ((getOperand(0)->getType() == getOperand(1)->getType() && "Both operands to FCmp instruction are not of the same type!") ? static_cast (0) : __assert_fail ("getOperand(0)->getType() == getOperand(1)->getType() && \"Both operands to FCmp instruction are not of the same type!\"", "../llvm/include/llvm/Instructions.h" # 1103 "../llvm/include/llvm/Instructions.h" , 1104 # 1103 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; ((getOperand(0)->getType()->isFPOrFPVectorTy() && "Invalid operand types for FCmp instruction") ? static_cast (0) : __assert_fail ("getOperand(0)->getType()->isFPOrFPVectorTy() && \"Invalid operand types for FCmp instruction\"", "../llvm/include/llvm/Instructions.h" # 1106 "../llvm/include/llvm/Instructions.h" , 1107 # 1106 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; } bool isEquality() const { return getPredicate() == FCMP_OEQ || getPredicate() == FCMP_ONE || getPredicate() == FCMP_UEQ || getPredicate() == FCMP_UNE; } 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 inline bool classof(const FCmpInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::FCmp; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; class CallInst : public Instruction { AttrListPtr AttributeList; CallInst(const CallInst &CI); void init(Value *Func, ArrayRef Args, const Twine &NameStr); void init(Value *Func, const Twine &NameStr); inline CallInst(Value *Func, ArrayRef Args, const Twine &NameStr, Instruction *InsertBefore); inline CallInst(Value *Func, ArrayRef Args, const Twine &NameStr, BasicBlock *InsertAtEnd); CallInst(Value *F, Value *Actual, const Twine &NameStr, Instruction *InsertBefore); CallInst(Value *F, Value *Actual, const Twine &NameStr, BasicBlock *InsertAtEnd); explicit CallInst(Value *F, const Twine &NameStr, Instruction *InsertBefore); CallInst(Value *F, const Twine &NameStr, BasicBlock *InsertAtEnd); protected: virtual CallInst *clone_impl() const; public: static CallInst *Create(Value *Func, ArrayRef Args, const Twine &NameStr = "", Instruction *InsertBefore = 0) { return new(unsigned(Args.size() + 1)) CallInst(Func, Args, NameStr, InsertBefore); } static CallInst *Create(Value *Func, ArrayRef Args, const Twine &NameStr, BasicBlock *InsertAtEnd) { return new(unsigned(Args.size() + 1)) CallInst(Func, Args, NameStr, InsertAtEnd); } static CallInst *Create(Value *F, const Twine &NameStr = "", Instruction *InsertBefore = 0) { return new(1) CallInst(F, NameStr, InsertBefore); } static CallInst *Create(Value *F, const Twine &NameStr, BasicBlock *InsertAtEnd) { return new(1) CallInst(F, NameStr, InsertAtEnd); } static Instruction *CreateMalloc(Instruction *InsertBefore, Type *IntPtrTy, Type *AllocTy, Value *AllocSize, Value *ArraySize = 0, Function* MallocF = 0, const Twine &Name = ""); static Instruction *CreateMalloc(BasicBlock *InsertAtEnd, Type *IntPtrTy, Type *AllocTy, Value *AllocSize, Value *ArraySize = 0, Function* MallocF = 0, const Twine &Name = ""); static Instruction* CreateFree(Value* Source, Instruction *InsertBefore); static Instruction* CreateFree(Value* Source, BasicBlock *InsertAtEnd); ~CallInst(); bool isTailCall() const { return getSubclassDataFromInstruction() & 1; } void setTailCall(bool isTC = true) { setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) | unsigned(isTC)); } 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; unsigned getNumArgOperands() const { return getNumOperands() - 1; } Value *getArgOperand(unsigned i) const { return getOperand(i); } void setArgOperand(unsigned i, Value *v) { setOperand(i, v); } CallingConv::ID getCallingConv() const { return static_cast(getSubclassDataFromInstruction() >> 1); } void setCallingConv(CallingConv::ID CC) { setInstructionSubclassData((getSubclassDataFromInstruction() & 1) | (static_cast(CC) << 1)); } const AttrListPtr &getAttributes() const { return AttributeList; } void setAttributes(const AttrListPtr &Attrs) { AttributeList = Attrs; } void addAttribute(unsigned i, Attributes attr); void removeAttribute(unsigned i, Attributes attr); bool paramHasAttr(unsigned i, Attributes attr) const; unsigned getParamAlignment(unsigned i) const { return AttributeList.getParamAlignment(i); } bool isNoInline() const { return paramHasAttr(~0, Attribute::NoInline); } void setIsNoInline(bool Value = true) { if (Value) addAttribute(~0, Attribute::NoInline); else removeAttribute(~0, Attribute::NoInline); } bool canReturnTwice() const { return paramHasAttr(~0, Attribute::ReturnsTwice); } void setCanReturnTwice(bool Value = true) { if (Value) addAttribute(~0, Attribute::ReturnsTwice); else removeAttribute(~0, Attribute::ReturnsTwice); } bool doesNotAccessMemory() const { return paramHasAttr(~0, Attribute::ReadNone); } void setDoesNotAccessMemory(bool NotAccessMemory = true) { if (NotAccessMemory) addAttribute(~0, Attribute::ReadNone); else removeAttribute(~0, Attribute::ReadNone); } bool onlyReadsMemory() const { return doesNotAccessMemory() || paramHasAttr(~0, Attribute::ReadOnly); } void setOnlyReadsMemory(bool OnlyReadsMemory = true) { if (OnlyReadsMemory) addAttribute(~0, Attribute::ReadOnly); else removeAttribute(~0, Attribute::ReadOnly | Attribute::ReadNone); } bool doesNotReturn() const { return paramHasAttr(~0, Attribute::NoReturn); } void setDoesNotReturn(bool DoesNotReturn = true) { if (DoesNotReturn) addAttribute(~0, Attribute::NoReturn); else removeAttribute(~0, Attribute::NoReturn); } bool doesNotThrow() const { return paramHasAttr(~0, Attribute::NoUnwind); } void setDoesNotThrow(bool DoesNotThrow = true) { if (DoesNotThrow) addAttribute(~0, Attribute::NoUnwind); else removeAttribute(~0, Attribute::NoUnwind); } bool hasStructRetAttr() const { return paramHasAttr(1, Attribute::StructRet); } bool hasByValArgument() const { return AttributeList.hasAttrSomewhere(Attribute::ByVal); } Function *getCalledFunction() const { return dyn_cast(Op<-1>()); } const Value *getCalledValue() const { return Op<-1>(); } Value *getCalledValue() { return Op<-1>(); } void setCalledFunction(Value* Fn) { Op<-1>() = Fn; } bool isInlineAsm() const { return isa(Op<-1>()); } static inline bool classof(const CallInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Call; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: void setInstructionSubclassData(unsigned short D) { Instruction::setInstructionSubclassData(D); } }; template <> struct OperandTraits : public VariadicOperandTraits { }; CallInst::CallInst(Value *Func, ArrayRef Args, const Twine &NameStr, BasicBlock *InsertAtEnd) : Instruction(cast(cast(Func->getType()) ->getElementType())->getReturnType(), Instruction::Call, OperandTraits::op_end(this) - (Args.size() + 1), unsigned(Args.size() + 1), InsertAtEnd) { init(Func, Args, NameStr); } CallInst::CallInst(Value *Func, ArrayRef Args, const Twine &NameStr, Instruction *InsertBefore) : Instruction(cast(cast(Func->getType()) ->getElementType())->getReturnType(), Instruction::Call, OperandTraits::op_end(this) - (Args.size() + 1), unsigned(Args.size() + 1), InsertBefore) { init(Func, Args, NameStr); } CallInst::op_iterator CallInst::op_begin() { return OperandTraits::op_begin(this); } CallInst::const_op_iterator CallInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } CallInst::op_iterator CallInst::op_end() { return OperandTraits::op_end(this); } CallInst::const_op_iterator CallInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *CallInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 1402, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void CallInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 1402, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned CallInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &CallInst::Op() { return this->OpFrom(this); } template const Use &CallInst::Op() const { return this->OpFrom(this); } class SelectInst : public Instruction { void init(Value *C, Value *S1, Value *S2) { ((!areInvalidOperands(C, S1, S2) && "Invalid operands for select") ? static_cast (0) : __assert_fail ("!areInvalidOperands(C, S1, S2) && \"Invalid operands for select\"", "../llvm/include/llvm/Instructions.h", 1412, __PRETTY_FUNCTION__)); Op<0>() = C; Op<1>() = S1; Op<2>() = S2; } 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); } protected: virtual SelectInst *clone_impl() const; public: static SelectInst *Create(Value *C, Value *S1, Value *S2, const Twine &NameStr = "", Instruction *InsertBefore = 0) { return new(3) SelectInst(C, S1, S2, NameStr, InsertBefore); } 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>(); } 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; OtherOps getOpcode() const { return static_cast(Instruction::getOpcode()); } static inline bool classof(const SelectInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Select; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; template <> struct OperandTraits : public FixedNumOperandTraits { }; SelectInst::op_iterator SelectInst::op_begin() { return OperandTraits::op_begin(this); } SelectInst::const_op_iterator SelectInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } SelectInst::op_iterator SelectInst::op_end() { return OperandTraits::op_end(this); } SelectInst::const_op_iterator SelectInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *SelectInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 1478, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void SelectInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 1478, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned SelectInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &SelectInst::Op() { return this->OpFrom(this); } template const Use &SelectInst::Op() const { return this->OpFrom(this); } # 1487 "../llvm/include/llvm/Instructions.h" class VAArgInst : public UnaryInstruction { protected: virtual VAArgInst *clone_impl() const; public: VAArgInst(Value *List, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = 0) : 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 inline bool classof(const VAArgInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == VAArg; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; # 1524 "../llvm/include/llvm/Instructions.h" class ExtractElementInst : public Instruction { ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr = "", Instruction *InsertBefore = 0); ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr, BasicBlock *InsertAtEnd); protected: virtual ExtractElementInst *clone_impl() const; public: static ExtractElementInst *Create(Value *Vec, Value *Idx, const Twine &NameStr = "", Instruction *InsertBefore = 0) { 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 reinterpret_cast(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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; static inline bool classof(const ExtractElementInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::ExtractElement; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; template <> struct OperandTraits : public FixedNumOperandTraits { }; ExtractElementInst::op_iterator ExtractElementInst::op_begin() { return OperandTraits::op_begin(this); } ExtractElementInst::const_op_iterator ExtractElementInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } ExtractElementInst::op_iterator ExtractElementInst::op_end() { return OperandTraits::op_end(this); } ExtractElementInst::const_op_iterator ExtractElementInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *ExtractElementInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 1576, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void ExtractElementInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 1576, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ExtractElementInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &ExtractElementInst::Op() { return this->OpFrom(this); } template const Use &ExtractElementInst::Op() const { return this->OpFrom(this); } # 1585 "../llvm/include/llvm/Instructions.h" class InsertElementInst : public Instruction { InsertElementInst(Value *Vec, Value *NewElt, Value *Idx, const Twine &NameStr = "", Instruction *InsertBefore = 0); InsertElementInst(Value *Vec, Value *NewElt, Value *Idx, const Twine &NameStr, BasicBlock *InsertAtEnd); protected: virtual InsertElementInst *clone_impl() const; public: static InsertElementInst *Create(Value *Vec, Value *NewElt, Value *Idx, const Twine &NameStr = "", Instruction *InsertBefore = 0) { 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 reinterpret_cast(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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; static inline bool classof(const InsertElementInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::InsertElement; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; template <> struct OperandTraits : public FixedNumOperandTraits { }; InsertElementInst::op_iterator InsertElementInst::op_begin() { return OperandTraits::op_begin(this); } InsertElementInst::const_op_iterator InsertElementInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } InsertElementInst::op_iterator InsertElementInst::op_end() { return OperandTraits::op_end(this); } InsertElementInst::const_op_iterator InsertElementInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *InsertElementInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 1635, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void InsertElementInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 1635, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned InsertElementInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &InsertElementInst::Op() { return this->OpFrom(this); } template const Use &InsertElementInst::Op() const { return this->OpFrom(this); } # 1644 "../llvm/include/llvm/Instructions.h" class ShuffleVectorInst : public Instruction { protected: virtual ShuffleVectorInst *clone_impl() const; public: void *operator new(size_t s) { return User::operator new(s, 3); } ShuffleVectorInst(Value *V1, Value *V2, Value *Mask, const Twine &NameStr = "", Instruction *InsertBefor = 0); ShuffleVectorInst(Value *V1, Value *V2, Value *Mask, const Twine &NameStr, BasicBlock *InsertAtEnd); static bool isValidOperands(const Value *V1, const Value *V2, const Value *Mask); VectorType *getType() const { return reinterpret_cast(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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; int getMaskValue(unsigned i) const; static inline bool classof(const ShuffleVectorInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::ShuffleVector; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; template <> struct OperandTraits : public FixedNumOperandTraits { }; ShuffleVectorInst::op_iterator ShuffleVectorInst::op_begin() { return OperandTraits::op_begin(this); } ShuffleVectorInst::const_op_iterator ShuffleVectorInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } ShuffleVectorInst::op_iterator ShuffleVectorInst::op_end() { return OperandTraits::op_end(this); } ShuffleVectorInst::const_op_iterator ShuffleVectorInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *ShuffleVectorInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 1693, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void ShuffleVectorInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 1693, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ShuffleVectorInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &ShuffleVectorInst::Op() { return this->OpFrom(this); } template const Use &ShuffleVectorInst::Op() const { return this->OpFrom(this); } # 1702 "../llvm/include/llvm/Instructions.h" class ExtractValueInst : public UnaryInstruction { SmallVector Indices; ExtractValueInst(const ExtractValueInst &EVI); void init(ArrayRef Idxs, const Twine &NameStr); inline ExtractValueInst(Value *Agg, ArrayRef Idxs, const Twine &NameStr, Instruction *InsertBefore); inline ExtractValueInst(Value *Agg, ArrayRef Idxs, const Twine &NameStr, BasicBlock *InsertAtEnd); void *operator new(size_t s) { return User::operator new(s, 1); } protected: virtual ExtractValueInst *clone_impl() const; public: static ExtractValueInst *Create(Value *Agg, ArrayRef Idxs, const Twine &NameStr = "", Instruction *InsertBefore = 0) { return new ExtractValueInst(Agg, Idxs, NameStr, InsertBefore); } static ExtractValueInst *Create(Value *Agg, ArrayRef Idxs, const Twine &NameStr, BasicBlock *InsertAtEnd) { return new ExtractValueInst(Agg, Idxs, NameStr, InsertAtEnd); } static Type *getIndexedType(Type *Agg, ArrayRef Idxs); typedef const unsigned* idx_iterator; inline idx_iterator idx_begin() const { return Indices.begin(); } inline idx_iterator idx_end() const { return Indices.end(); } Value *getAggregateOperand() { return getOperand(0); } const Value *getAggregateOperand() const { return getOperand(0); } static unsigned getAggregateOperandIndex() { return 0U; } ArrayRef getIndices() const { return Indices; } unsigned getNumIndices() const { return (unsigned)Indices.size(); } bool hasIndices() const { return true; } static inline bool classof(const ExtractValueInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::ExtractValue; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; ExtractValueInst::ExtractValueInst(Value *Agg, ArrayRef Idxs, const Twine &NameStr, Instruction *InsertBefore) : UnaryInstruction(checkGEPType(getIndexedType(Agg->getType(), Idxs)), ExtractValue, Agg, InsertBefore) { init(Idxs, NameStr); } ExtractValueInst::ExtractValueInst(Value *Agg, ArrayRef Idxs, const Twine &NameStr, BasicBlock *InsertAtEnd) : UnaryInstruction(checkGEPType(getIndexedType(Agg->getType(), Idxs)), ExtractValue, Agg, InsertAtEnd) { init(Idxs, NameStr); } # 1809 "../llvm/include/llvm/Instructions.h" class InsertValueInst : public Instruction { SmallVector Indices; void *operator new(size_t, unsigned); InsertValueInst(const InsertValueInst &IVI); void init(Value *Agg, Value *Val, ArrayRef Idxs, const Twine &NameStr); inline InsertValueInst(Value *Agg, Value *Val, ArrayRef Idxs, const Twine &NameStr, Instruction *InsertBefore); inline InsertValueInst(Value *Agg, Value *Val, ArrayRef Idxs, const Twine &NameStr, BasicBlock *InsertAtEnd); InsertValueInst(Value *Agg, Value *Val, unsigned Idx, const Twine &NameStr = "", Instruction *InsertBefore = 0); InsertValueInst(Value *Agg, Value *Val, unsigned Idx, const Twine &NameStr, BasicBlock *InsertAtEnd); protected: virtual InsertValueInst *clone_impl() const; public: void *operator new(size_t s) { return User::operator new(s, 2); } static InsertValueInst *Create(Value *Agg, Value *Val, ArrayRef Idxs, const Twine &NameStr = "", Instruction *InsertBefore = 0) { return new InsertValueInst(Agg, Val, Idxs, NameStr, InsertBefore); } static InsertValueInst *Create(Value *Agg, Value *Val, ArrayRef 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; typedef const unsigned* idx_iterator; inline idx_iterator idx_begin() const { return Indices.begin(); } inline idx_iterator idx_end() const { return Indices.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 getIndices() const { return Indices; } unsigned getNumIndices() const { return (unsigned)Indices.size(); } bool hasIndices() const { return true; } static inline bool classof(const InsertValueInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::InsertValue; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; template <> struct OperandTraits : public FixedNumOperandTraits { }; InsertValueInst::InsertValueInst(Value *Agg, Value *Val, ArrayRef Idxs, const Twine &NameStr, Instruction *InsertBefore) : Instruction(Agg->getType(), InsertValue, OperandTraits::op_begin(this), 2, InsertBefore) { init(Agg, Val, Idxs, NameStr); } InsertValueInst::InsertValueInst(Value *Agg, Value *Val, ArrayRef Idxs, const Twine &NameStr, BasicBlock *InsertAtEnd) : Instruction(Agg->getType(), InsertValue, OperandTraits::op_begin(this), 2, InsertAtEnd) { init(Agg, Val, Idxs, NameStr); } InsertValueInst::op_iterator InsertValueInst::op_begin() { return OperandTraits::op_begin(this); } InsertValueInst::const_op_iterator InsertValueInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } InsertValueInst::op_iterator InsertValueInst::op_end() { return OperandTraits::op_end(this); } InsertValueInst::const_op_iterator InsertValueInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *InsertValueInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 1932, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void InsertValueInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 1932, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned InsertValueInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &InsertValueInst::Op() { return this->OpFrom(this); } template const Use &InsertValueInst::Op() const { return this->OpFrom(this); } # 1942 "../llvm/include/llvm/Instructions.h" class PHINode : public Instruction { void *operator new(size_t, unsigned); unsigned ReservedSpace; PHINode(const PHINode &PN); void *operator new(size_t s) { return User::operator new(s, 0); } explicit PHINode(Type *Ty, unsigned NumReservedValues, const Twine &NameStr = "", Instruction *InsertBefore = 0) : Instruction(Ty, Instruction::PHI, 0, 0, InsertBefore), ReservedSpace(NumReservedValues) { setName(NameStr); OperandList = allocHungoffUses(ReservedSpace); } PHINode(Type *Ty, unsigned NumReservedValues, const Twine &NameStr, BasicBlock *InsertAtEnd) : Instruction(Ty, Instruction::PHI, 0, 0, InsertAtEnd), ReservedSpace(NumReservedValues) { setName(NameStr); OperandList = allocHungoffUses(ReservedSpace); } protected: Use *allocHungoffUses(unsigned) const; virtual PHINode *clone_impl() const; public: static PHINode *Create(Type *Ty, unsigned NumReservedValues, const Twine &NameStr = "", Instruction *InsertBefore = 0) { 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); } ~PHINode(); 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; typedef BasicBlock **block_iterator; typedef BasicBlock * const *const_block_iterator; block_iterator block_begin() { Use::UserRef *ref = reinterpret_cast(op_begin() + ReservedSpace); return reinterpret_cast(ref + 1); } const_block_iterator block_begin() const { const Use::UserRef *ref = reinterpret_cast(op_begin() + ReservedSpace); return reinterpret_cast(ref + 1); } block_iterator block_end() { return block_begin() + getNumOperands(); } const_block_iterator block_end() const { return block_begin() + getNumOperands(); } unsigned getNumIncomingValues() const { return getNumOperands(); } Value *getIncomingValue(unsigned i) const { return getOperand(i); } void setIncomingValue(unsigned i, Value *V) { 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 { ((this == U.getUser() && "Iterator doesn't point to PHI's Uses?") ? static_cast (0) : __assert_fail ("this == U.getUser() && \"Iterator doesn't point to PHI's Uses?\"", "../llvm/include/llvm/Instructions.h", 2046, __PRETTY_FUNCTION__)); return getIncomingBlock(unsigned(&U - op_begin())); } template BasicBlock *getIncomingBlock(value_use_iterator I) const { return getIncomingBlock(I.getUse()); } void setIncomingBlock(unsigned i, BasicBlock *BB) { block_begin()[i] = BB; } void addIncoming(Value *V, BasicBlock *BB) { ((V && "PHI node got a null value!") ? static_cast (0) : __assert_fail ("V && \"PHI node got a null value!\"", "../llvm/include/llvm/Instructions.h", 2065, __PRETTY_FUNCTION__)); ((BB && "PHI node got a null basic block!") ? static_cast (0) : __assert_fail ("BB && \"PHI node got a null basic block!\"", "../llvm/include/llvm/Instructions.h", 2066, __PRETTY_FUNCTION__)); ((getType() == V->getType() && "All operands to PHI node must be the same type as the PHI node!") ? static_cast (0) : __assert_fail ("getType() == V->getType() && \"All operands to PHI node must be the same type as the PHI node!\"", "../llvm/include/llvm/Instructions.h" # 2067 "../llvm/include/llvm/Instructions.h" , 2068 # 2067 "../llvm/include/llvm/Instructions.h" , __PRETTY_FUNCTION__)) ; if (NumOperands == ReservedSpace) growOperands(); ++NumOperands; setIncomingValue(NumOperands - 1, V); setIncomingBlock(NumOperands - 1, BB); } # 2085 "../llvm/include/llvm/Instructions.h" Value *removeIncomingValue(unsigned Idx, bool DeletePHIIfEmpty = true); Value *removeIncomingValue(const BasicBlock *BB, bool DeletePHIIfEmpty=true) { int Idx = getBasicBlockIndex(BB); ((Idx >= 0 && "Invalid basic block argument to remove!") ? static_cast (0) : __assert_fail ("Idx >= 0 && \"Invalid basic block argument to remove!\"", "../llvm/include/llvm/Instructions.h", 2089, __PRETTY_FUNCTION__)); 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); ((Idx >= 0 && "Invalid basic block argument!") ? static_cast (0) : __assert_fail ("Idx >= 0 && \"Invalid basic block argument!\"", "../llvm/include/llvm/Instructions.h", 2105, __PRETTY_FUNCTION__)); return getIncomingValue(Idx); } Value *hasConstantValue() const; static inline bool classof(const PHINode *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::PHI; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: void growOperands(); }; template <> struct OperandTraits : public HungoffOperandTraits<2> { }; PHINode::op_iterator PHINode::op_begin() { return OperandTraits::op_begin(this); } PHINode::const_op_iterator PHINode::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } PHINode::op_iterator PHINode::op_end() { return OperandTraits::op_end(this); } PHINode::const_op_iterator PHINode::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *PHINode::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2129, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void PHINode::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2129, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned PHINode::getNumOperands() const { return OperandTraits::operands(this); } template Use &PHINode::Op() { return this->OpFrom(this); } template const Use &PHINode::Op() const { return this->OpFrom(this); } # 2143 "../llvm/include/llvm/Instructions.h" class LandingPadInst : public Instruction { unsigned ReservedSpace; LandingPadInst(const LandingPadInst &LP); public: enum ClauseType { Catch, Filter }; private: void *operator new(size_t, unsigned); void *operator new(size_t s) { return User::operator new(s, 0); } void growOperands(unsigned Size); void init(Value *PersFn, unsigned NumReservedValues, const Twine &NameStr); explicit LandingPadInst(Type *RetTy, Value *PersonalityFn, unsigned NumReservedValues, const Twine &NameStr, Instruction *InsertBefore); explicit LandingPadInst(Type *RetTy, Value *PersonalityFn, unsigned NumReservedValues, const Twine &NameStr, BasicBlock *InsertAtEnd); protected: virtual LandingPadInst *clone_impl() const; public: static LandingPadInst *Create(Type *RetTy, Value *PersonalityFn, unsigned NumReservedClauses, const Twine &NameStr = "", Instruction *InsertBefore = 0); static LandingPadInst *Create(Type *RetTy, Value *PersonalityFn, unsigned NumReservedClauses, const Twine &NameStr, BasicBlock *InsertAtEnd); ~LandingPadInst(); 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; Value *getPersonalityFn() const { return getOperand(0); } bool isCleanup() const { return getSubclassDataFromInstruction() & 1; } void setCleanup(bool V) { setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) | (V ? 1 : 0)); } void addClause(Value *ClauseVal); Value *getClause(unsigned Idx) const { return OperandList[Idx + 1]; } bool isCatch(unsigned Idx) const { return !isa(OperandList[Idx + 1]->getType()); } bool isFilter(unsigned Idx) const { return isa(OperandList[Idx + 1]->getType()); } unsigned getNumClauses() const { return getNumOperands() - 1; } void reserveClauses(unsigned Size) { growOperands(Size); } static inline bool classof(const LandingPadInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::LandingPad; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; template <> struct OperandTraits : public HungoffOperandTraits<2> { }; LandingPadInst::op_iterator LandingPadInst::op_begin() { return OperandTraits::op_begin(this); } LandingPadInst::const_op_iterator LandingPadInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } LandingPadInst::op_iterator LandingPadInst::op_end() { return OperandTraits::op_end(this); } LandingPadInst::const_op_iterator LandingPadInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *LandingPadInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2235, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void LandingPadInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2235, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned LandingPadInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &LandingPadInst::Op() { return this->OpFrom(this); } template const Use &LandingPadInst::Op() const { return this->OpFrom(this); } # 2245 "../llvm/include/llvm/Instructions.h" class ReturnInst : public TerminatorInst { ReturnInst(const ReturnInst &RI); private: # 2260 "../llvm/include/llvm/Instructions.h" explicit ReturnInst(LLVMContext &C, Value *retVal = 0, Instruction *InsertBefore = 0); ReturnInst(LLVMContext &C, Value *retVal, BasicBlock *InsertAtEnd); explicit ReturnInst(LLVMContext &C, BasicBlock *InsertAtEnd); protected: virtual ReturnInst *clone_impl() const; public: static ReturnInst* Create(LLVMContext &C, Value *retVal = 0, Instruction *InsertBefore = 0) { 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); } virtual ~ReturnInst(); 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; Value *getReturnValue() const { return getNumOperands() != 0 ? getOperand(0) : 0; } unsigned getNumSuccessors() const { return 0; } static inline bool classof(const ReturnInst *) { return true; } static inline bool classof(const Instruction *I) { return (I->getOpcode() == Instruction::Ret); } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: virtual BasicBlock *getSuccessorV(unsigned idx) const; virtual unsigned getNumSuccessorsV() const; virtual void setSuccessorV(unsigned idx, BasicBlock *B); }; template <> struct OperandTraits : public VariadicOperandTraits { }; ReturnInst::op_iterator ReturnInst::op_begin() { return OperandTraits::op_begin(this); } ReturnInst::const_op_iterator ReturnInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } ReturnInst::op_iterator ReturnInst::op_end() { return OperandTraits::op_end(this); } ReturnInst::const_op_iterator ReturnInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *ReturnInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2308, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void ReturnInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2308, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ReturnInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &ReturnInst::Op() { return this->OpFrom(this); } template const Use &ReturnInst::Op() const { return this->OpFrom(this); } # 2317 "../llvm/include/llvm/Instructions.h" class BranchInst : public TerminatorInst { BranchInst(const BranchInst &BI); void AssertOK(); explicit BranchInst(BasicBlock *IfTrue, Instruction *InsertBefore = 0); BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, Instruction *InsertBefore = 0); BranchInst(BasicBlock *IfTrue, BasicBlock *InsertAtEnd); BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, BasicBlock *InsertAtEnd); protected: virtual BranchInst *clone_impl() const; public: static BranchInst *Create(BasicBlock *IfTrue, Instruction *InsertBefore = 0) { return new(1) BranchInst(IfTrue, InsertBefore); } static BranchInst *Create(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, Instruction *InsertBefore = 0) { 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 inline Use &Op(); template 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 { ((isConditional() && "Cannot get condition of an uncond branch!") ? static_cast (0) : __assert_fail ("isConditional() && \"Cannot get condition of an uncond branch!\"", "../llvm/include/llvm/Instructions.h", 2362, __PRETTY_FUNCTION__)); return Op<-3>(); } void setCondition(Value *V) { ((isConditional() && "Cannot set condition of unconditional branch!") ? static_cast (0) : __assert_fail ("isConditional() && \"Cannot set condition of unconditional branch!\"", "../llvm/include/llvm/Instructions.h", 2367, __PRETTY_FUNCTION__)); Op<-3>() = V; } unsigned getNumSuccessors() const { return 1+isConditional(); } BasicBlock *getSuccessor(unsigned i) const { ((i < getNumSuccessors() && "Successor # out of range for Branch!") ? static_cast (0) : __assert_fail ("i < getNumSuccessors() && \"Successor # out of range for Branch!\"", "../llvm/include/llvm/Instructions.h", 2374, __PRETTY_FUNCTION__)); return cast_or_null((&Op<-1>() - i)->get()); } void setSuccessor(unsigned idx, BasicBlock *NewSucc) { ((idx < getNumSuccessors() && "Successor # out of range for Branch!") ? static_cast (0) : __assert_fail ("idx < getNumSuccessors() && \"Successor # out of range for Branch!\"", "../llvm/include/llvm/Instructions.h", 2379, __PRETTY_FUNCTION__)); *(&Op<-1>() - idx) = (Value*)NewSucc; } void swapSuccessors(); static inline bool classof(const BranchInst *) { return true; } static inline bool classof(const Instruction *I) { return (I->getOpcode() == Instruction::Br); } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: virtual BasicBlock *getSuccessorV(unsigned idx) const; virtual unsigned getNumSuccessorsV() const; virtual void setSuccessorV(unsigned idx, BasicBlock *B); }; template <> struct OperandTraits : public VariadicOperandTraits { }; BranchInst::op_iterator BranchInst::op_begin() { return OperandTraits::op_begin(this); } BranchInst::const_op_iterator BranchInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } BranchInst::op_iterator BranchInst::op_end() { return OperandTraits::op_end(this); } BranchInst::const_op_iterator BranchInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *BranchInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2408, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void BranchInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2408, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned BranchInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &BranchInst::Op() { return this->OpFrom(this); } template const Use &BranchInst::Op() const { return this->OpFrom(this); } # 2417 "../llvm/include/llvm/Instructions.h" class SwitchInst : public TerminatorInst { void *operator new(size_t, unsigned); unsigned ReservedSpace; SwitchInst(const SwitchInst &SI); void init(Value *Value, BasicBlock *Default, unsigned NumReserved); void growOperands(); void *operator new(size_t s) { return User::operator new(s, 0); } SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases, Instruction *InsertBefore); SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases, BasicBlock *InsertAtEnd); protected: virtual SwitchInst *clone_impl() const; public: static SwitchInst *Create(Value *Value, BasicBlock *Default, unsigned NumCases, Instruction *InsertBefore = 0) { 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); } ~SwitchInst(); 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 inline Use &Op(); template 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(getOperand(1)); } unsigned getNumCases() const { return getNumOperands()/2; } ConstantInt *getCaseValue(unsigned i) { ((i && i < getNumCases() && "Illegal case value to get!") ? static_cast (0) : __assert_fail ("i && i < getNumCases() && \"Illegal case value to get!\"", "../llvm/include/llvm/Instructions.h", 2477, __PRETTY_FUNCTION__)); return getSuccessorValue(i); } const ConstantInt *getCaseValue(unsigned i) const { ((i && i < getNumCases() && "Illegal case value to get!") ? static_cast (0) : __assert_fail ("i && i < getNumCases() && \"Illegal case value to get!\"", "../llvm/include/llvm/Instructions.h", 2484, __PRETTY_FUNCTION__)); return getSuccessorValue(i); } unsigned findCaseValue(const ConstantInt *C) const { for (unsigned i = 1, e = getNumCases(); i != e; ++i) if (getCaseValue(i) == C) return i; return 0; } ConstantInt *findCaseDest(BasicBlock *BB) { if (BB == getDefaultDest()) return __null; ConstantInt *CI = __null; for (unsigned i = 1, e = getNumCases(); i != e; ++i) { if (getSuccessor(i) == BB) { if (CI) return __null; else CI = getCaseValue(i); } } return CI; } void addCase(ConstantInt *OnVal, BasicBlock *Dest); void removeCase(unsigned idx); unsigned getNumSuccessors() const { return getNumOperands()/2; } BasicBlock *getSuccessor(unsigned idx) const { ((idx < getNumSuccessors() &&"Successor idx out of range for switch!") ? static_cast (0) : __assert_fail ("idx < getNumSuccessors() &&\"Successor idx out of range for switch!\"", "../llvm/include/llvm/Instructions.h", 2526, __PRETTY_FUNCTION__)); return cast(getOperand(idx*2+1)); } void setSuccessor(unsigned idx, BasicBlock *NewSucc) { ((idx < getNumSuccessors() && "Successor # out of range for switch!") ? static_cast (0) : __assert_fail ("idx < getNumSuccessors() && \"Successor # out of range for switch!\"", "../llvm/include/llvm/Instructions.h", 2530, __PRETTY_FUNCTION__)); setOperand(idx*2+1, (Value*)NewSucc); } ConstantInt *getSuccessorValue(unsigned idx) const { ((idx < getNumSuccessors() && "Successor # out of range!") ? static_cast (0) : __assert_fail ("idx < getNumSuccessors() && \"Successor # out of range!\"", "../llvm/include/llvm/Instructions.h", 2537, __PRETTY_FUNCTION__)); return reinterpret_cast(getOperand(idx*2)); } void setSuccessorValue(unsigned idx, ConstantInt* SuccessorValue) { ((idx < getNumSuccessors() && "Successor # out of range!") ? static_cast (0) : __assert_fail ("idx < getNumSuccessors() && \"Successor # out of range!\"", "../llvm/include/llvm/Instructions.h", 2544, __PRETTY_FUNCTION__)); setOperand(idx*2, reinterpret_cast(SuccessorValue)); } static inline bool classof(const SwitchInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Switch; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: virtual BasicBlock *getSuccessorV(unsigned idx) const; virtual unsigned getNumSuccessorsV() const; virtual void setSuccessorV(unsigned idx, BasicBlock *B); }; template <> struct OperandTraits : public HungoffOperandTraits<2> { }; SwitchInst::op_iterator SwitchInst::op_begin() { return OperandTraits::op_begin(this); } SwitchInst::const_op_iterator SwitchInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } SwitchInst::op_iterator SwitchInst::op_end() { return OperandTraits::op_end(this); } SwitchInst::const_op_iterator SwitchInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *SwitchInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2566, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void SwitchInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2566, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned SwitchInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &SwitchInst::Op() { return this->OpFrom(this); } template const Use &SwitchInst::Op() const { return this->OpFrom(this); } # 2576 "../llvm/include/llvm/Instructions.h" class IndirectBrInst : public TerminatorInst { void *operator new(size_t, unsigned); unsigned ReservedSpace; IndirectBrInst(const IndirectBrInst &IBI); void init(Value *Address, unsigned NumDests); void growOperands(); void *operator new(size_t s) { return User::operator new(s, 0); } IndirectBrInst(Value *Address, unsigned NumDests, Instruction *InsertBefore); IndirectBrInst(Value *Address, unsigned NumDests, BasicBlock *InsertAtEnd); protected: virtual IndirectBrInst *clone_impl() const; public: static IndirectBrInst *Create(Value *Address, unsigned NumDests, Instruction *InsertBefore = 0) { return new IndirectBrInst(Address, NumDests, InsertBefore); } static IndirectBrInst *Create(Value *Address, unsigned NumDests, BasicBlock *InsertAtEnd) { return new IndirectBrInst(Address, NumDests, InsertAtEnd); } ~IndirectBrInst(); 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 inline Use &Op(); template 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(getOperand(i+1)); } void setSuccessor(unsigned i, BasicBlock *NewSucc) { setOperand(i+1, (Value*)NewSucc); } static inline bool classof(const IndirectBrInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::IndirectBr; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: virtual BasicBlock *getSuccessorV(unsigned idx) const; virtual unsigned getNumSuccessorsV() const; virtual void setSuccessorV(unsigned idx, BasicBlock *B); }; template <> struct OperandTraits : public HungoffOperandTraits<1> { }; IndirectBrInst::op_iterator IndirectBrInst::op_begin() { return OperandTraits::op_begin(this); } IndirectBrInst::const_op_iterator IndirectBrInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } IndirectBrInst::op_iterator IndirectBrInst::op_end() { return OperandTraits::op_end(this); } IndirectBrInst::const_op_iterator IndirectBrInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *IndirectBrInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2665, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void IndirectBrInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2665, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned IndirectBrInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &IndirectBrInst::Op() { return this->OpFrom(this); } template const Use &IndirectBrInst::Op() const { return this->OpFrom(this); } # 2675 "../llvm/include/llvm/Instructions.h" class InvokeInst : public TerminatorInst { AttrListPtr AttributeList; InvokeInst(const InvokeInst &BI); void init(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef Args, const Twine &NameStr); inline InvokeInst(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef Args, unsigned Values, const Twine &NameStr, Instruction *InsertBefore); inline InvokeInst(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef Args, unsigned Values, const Twine &NameStr, BasicBlock *InsertAtEnd); protected: virtual InvokeInst *clone_impl() const; public: static InvokeInst *Create(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef Args, const Twine &NameStr = "", Instruction *InsertBefore = 0) { unsigned Values = unsigned(Args.size()) + 3; return new(Values) InvokeInst(Func, IfNormal, IfException, Args, Values, NameStr, InsertBefore); } static InvokeInst *Create(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef Args, const Twine &NameStr, BasicBlock *InsertAtEnd) { unsigned Values = unsigned(Args.size()) + 3; return new(Values) InvokeInst(Func, IfNormal, IfException, Args, Values, 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; unsigned getNumArgOperands() const { return getNumOperands() - 3; } Value *getArgOperand(unsigned i) const { return getOperand(i); } void setArgOperand(unsigned i, Value *v) { setOperand(i, v); } CallingConv::ID getCallingConv() const { return static_cast(getSubclassDataFromInstruction()); } void setCallingConv(CallingConv::ID CC) { setInstructionSubclassData(static_cast(CC)); } const AttrListPtr &getAttributes() const { return AttributeList; } void setAttributes(const AttrListPtr &Attrs) { AttributeList = Attrs; } void addAttribute(unsigned i, Attributes attr); void removeAttribute(unsigned i, Attributes attr); bool paramHasAttr(unsigned i, Attributes attr) const; unsigned getParamAlignment(unsigned i) const { return AttributeList.getParamAlignment(i); } bool isNoInline() const { return paramHasAttr(~0, Attribute::NoInline); } void setIsNoInline(bool Value = true) { if (Value) addAttribute(~0, Attribute::NoInline); else removeAttribute(~0, Attribute::NoInline); } bool doesNotAccessMemory() const { return paramHasAttr(~0, Attribute::ReadNone); } void setDoesNotAccessMemory(bool NotAccessMemory = true) { if (NotAccessMemory) addAttribute(~0, Attribute::ReadNone); else removeAttribute(~0, Attribute::ReadNone); } bool onlyReadsMemory() const { return doesNotAccessMemory() || paramHasAttr(~0, Attribute::ReadOnly); } void setOnlyReadsMemory(bool OnlyReadsMemory = true) { if (OnlyReadsMemory) addAttribute(~0, Attribute::ReadOnly); else removeAttribute(~0, Attribute::ReadOnly | Attribute::ReadNone); } bool doesNotReturn() const { return paramHasAttr(~0, Attribute::NoReturn); } void setDoesNotReturn(bool DoesNotReturn = true) { if (DoesNotReturn) addAttribute(~0, Attribute::NoReturn); else removeAttribute(~0, Attribute::NoReturn); } bool doesNotThrow() const { return paramHasAttr(~0, Attribute::NoUnwind); } void setDoesNotThrow(bool DoesNotThrow = true) { if (DoesNotThrow) addAttribute(~0, Attribute::NoUnwind); else removeAttribute(~0, Attribute::NoUnwind); } bool hasStructRetAttr() const { return paramHasAttr(1, Attribute::StructRet); } bool hasByValArgument() const { return AttributeList.hasAttrSomewhere(Attribute::ByVal); } Function *getCalledFunction() const { return dyn_cast(Op<-3>()); } const Value *getCalledValue() const { return Op<-3>(); } Value *getCalledValue() { return Op<-3>(); } void setCalledFunction(Value* Fn) { Op<-3>() = Fn; } BasicBlock *getNormalDest() const { return cast(Op<-2>()); } BasicBlock *getUnwindDest() const { return cast(Op<-1>()); } void setNormalDest(BasicBlock *B) { Op<-2>() = reinterpret_cast(B); } void setUnwindDest(BasicBlock *B) { Op<-1>() = reinterpret_cast(B); } LandingPadInst *getLandingPadInst() const; BasicBlock *getSuccessor(unsigned i) const { ((i < 2 && "Successor # out of range for invoke!") ? static_cast (0) : __assert_fail ("i < 2 && \"Successor # out of range for invoke!\"", "../llvm/include/llvm/Instructions.h", 2844, __PRETTY_FUNCTION__)); return i == 0 ? getNormalDest() : getUnwindDest(); } void setSuccessor(unsigned idx, BasicBlock *NewSucc) { ((idx < 2 && "Successor # out of range for invoke!") ? static_cast (0) : __assert_fail ("idx < 2 && \"Successor # out of range for invoke!\"", "../llvm/include/llvm/Instructions.h", 2849, __PRETTY_FUNCTION__)); *(&Op<-2>() + idx) = reinterpret_cast(NewSucc); } unsigned getNumSuccessors() const { return 2; } static inline bool classof(const InvokeInst *) { return true; } static inline bool classof(const Instruction *I) { return (I->getOpcode() == Instruction::Invoke); } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: virtual BasicBlock *getSuccessorV(unsigned idx) const; virtual unsigned getNumSuccessorsV() const; virtual void setSuccessorV(unsigned idx, BasicBlock *B); void setInstructionSubclassData(unsigned short D) { Instruction::setInstructionSubclassData(D); } }; template <> struct OperandTraits : public VariadicOperandTraits { }; InvokeInst::InvokeInst(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef Args, unsigned Values, const Twine &NameStr, Instruction *InsertBefore) : TerminatorInst(cast(cast(Func->getType()) ->getElementType())->getReturnType(), Instruction::Invoke, OperandTraits::op_end(this) - Values, Values, InsertBefore) { init(Func, IfNormal, IfException, Args, NameStr); } InvokeInst::InvokeInst(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef Args, unsigned Values, const Twine &NameStr, BasicBlock *InsertAtEnd) : TerminatorInst(cast(cast(Func->getType()) ->getElementType())->getReturnType(), Instruction::Invoke, OperandTraits::op_end(this) - Values, Values, InsertAtEnd) { init(Func, IfNormal, IfException, Args, NameStr); } InvokeInst::op_iterator InvokeInst::op_begin() { return OperandTraits::op_begin(this); } InvokeInst::const_op_iterator InvokeInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } InvokeInst::op_iterator InvokeInst::op_end() { return OperandTraits::op_end(this); } InvokeInst::const_op_iterator InvokeInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *InvokeInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2903, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void InvokeInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2903, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned InvokeInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &InvokeInst::Op() { return this->OpFrom(this); } template const Use &InvokeInst::Op() const { return this->OpFrom(this); } # 2913 "../llvm/include/llvm/Instructions.h" class UnwindInst : public TerminatorInst { void *operator new(size_t, unsigned); protected: virtual UnwindInst *clone_impl() const; public: void *operator new(size_t s) { return User::operator new(s, 0); } explicit UnwindInst(LLVMContext &C, Instruction *InsertBefore = 0); explicit UnwindInst(LLVMContext &C, BasicBlock *InsertAtEnd); unsigned getNumSuccessors() const { return 0; } static inline bool classof(const UnwindInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Unwind; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: virtual BasicBlock *getSuccessorV(unsigned idx) const; virtual unsigned getNumSuccessorsV() const; virtual void setSuccessorV(unsigned idx, BasicBlock *B); }; # 2948 "../llvm/include/llvm/Instructions.h" class ResumeInst : public TerminatorInst { ResumeInst(const ResumeInst &RI); explicit ResumeInst(Value *Exn, Instruction *InsertBefore=0); ResumeInst(Value *Exn, BasicBlock *InsertAtEnd); protected: virtual ResumeInst *clone_impl() const; public: static ResumeInst *Create(Value *Exn, Instruction *InsertBefore = 0) { 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; Value *getValue() const { return Op<0>(); } unsigned getNumSuccessors() const { return 0; } static inline bool classof(const ResumeInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Resume; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: virtual BasicBlock *getSuccessorV(unsigned idx) const; virtual unsigned getNumSuccessorsV() const; virtual void setSuccessorV(unsigned idx, BasicBlock *B); }; template <> struct OperandTraits : public FixedNumOperandTraits { }; ResumeInst::op_iterator ResumeInst::op_begin() { return OperandTraits::op_begin(this); } ResumeInst::const_op_iterator ResumeInst::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } ResumeInst::op_iterator ResumeInst::op_end() { return OperandTraits::op_end(this); } ResumeInst::const_op_iterator ResumeInst::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *ResumeInst::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2990, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void ResumeInst::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Instructions.h", 2990, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ResumeInst::getNumOperands() const { return OperandTraits::operands(this); } template Use &ResumeInst::Op() { return this->OpFrom(this); } template const Use &ResumeInst::Op() const { return this->OpFrom(this); } # 3001 "../llvm/include/llvm/Instructions.h" class UnreachableInst : public TerminatorInst { void *operator new(size_t, unsigned); protected: virtual UnreachableInst *clone_impl() const; public: void *operator new(size_t s) { return User::operator new(s, 0); } explicit UnreachableInst(LLVMContext &C, Instruction *InsertBefore = 0); explicit UnreachableInst(LLVMContext &C, BasicBlock *InsertAtEnd); unsigned getNumSuccessors() const { return 0; } static inline bool classof(const UnreachableInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Unreachable; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } private: virtual BasicBlock *getSuccessorV(unsigned idx) const; virtual unsigned getNumSuccessorsV() const; virtual void setSuccessorV(unsigned idx, BasicBlock *B); }; class TruncInst : public CastInst { protected: virtual TruncInst *clone_impl() const; public: TruncInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = 0 ); TruncInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static inline bool classof(const TruncInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Trunc; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; class ZExtInst : public CastInst { protected: virtual ZExtInst *clone_impl() const; public: ZExtInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = 0 ); ZExtInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static inline bool classof(const ZExtInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == ZExt; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; class SExtInst : public CastInst { protected: virtual SExtInst *clone_impl() const; public: SExtInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = 0 ); SExtInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static inline bool classof(const SExtInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == SExt; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; class FPTruncInst : public CastInst { protected: virtual FPTruncInst *clone_impl() const; public: FPTruncInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = 0 ); FPTruncInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static inline bool classof(const FPTruncInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == FPTrunc; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; class FPExtInst : public CastInst { protected: virtual FPExtInst *clone_impl() const; public: FPExtInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = 0 ); FPExtInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static inline bool classof(const FPExtInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == FPExt; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; class UIToFPInst : public CastInst { protected: virtual UIToFPInst *clone_impl() const; public: UIToFPInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = 0 ); UIToFPInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static inline bool classof(const UIToFPInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == UIToFP; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; class SIToFPInst : public CastInst { protected: virtual SIToFPInst *clone_impl() const; public: SIToFPInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = 0 ); SIToFPInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static inline bool classof(const SIToFPInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == SIToFP; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; class FPToUIInst : public CastInst { protected: virtual FPToUIInst *clone_impl() const; public: FPToUIInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = 0 ); FPToUIInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static inline bool classof(const FPToUIInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == FPToUI; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; class FPToSIInst : public CastInst { protected: virtual FPToSIInst *clone_impl() const; public: FPToSIInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = 0 ); FPToSIInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static inline bool classof(const FPToSIInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == FPToSI; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; class IntToPtrInst : public CastInst { public: IntToPtrInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = 0 ); IntToPtrInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); virtual IntToPtrInst *clone_impl() const; static inline bool classof(const IntToPtrInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == IntToPtr; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; class PtrToIntInst : public CastInst { protected: virtual PtrToIntInst *clone_impl() const; public: PtrToIntInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = 0 ); PtrToIntInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static inline bool classof(const PtrToIntInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == PtrToInt; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; class BitCastInst : public CastInst { protected: virtual BitCastInst *clone_impl() const; public: BitCastInst( Value *S, Type *Ty, const Twine &NameStr = "", Instruction *InsertBefore = 0 ); BitCastInst( Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd ); static inline bool classof(const BitCastInst *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == BitCast; } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } }; } # 20 "../llvm/lib/VMCore/ConstantsContext.h" 2 # 1 "../llvm/include/llvm/Operator.h" 1 # 19 "../llvm/include/llvm/Operator.h" # 1 "../llvm/include/llvm/Constants.h" 1 # 24 "../llvm/include/llvm/Constants.h" # 1 "../llvm/include/llvm/Constant.h" 1 # 19 "../llvm/include/llvm/Constant.h" namespace llvm { class APInt; template class SmallVectorImpl; # 41 "../llvm/include/llvm/Constant.h" class Constant : public User { void operator=(const Constant &); Constant(const Constant &); virtual void anchor(); protected: Constant(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps) : User(ty, vty, Ops, NumOps) {} void destroyConstantImpl(); public: bool isNullValue() const; bool isAllOnesValue() const; bool isNegativeZeroValue() const; bool canTrap() const; bool isConstantUsed() const; enum PossibleRelocationsTy { NoRelocation = 0, LocalRelocation = 1, GlobalRelocations = 2 }; # 92 "../llvm/include/llvm/Constant.h" PossibleRelocationsTy getRelocationInfo() const; void getVectorElements(SmallVectorImpl &Elts) const; # 107 "../llvm/include/llvm/Constant.h" virtual void destroyConstant() { ((0 && "Not reached!") ? static_cast (0) : __assert_fail ("0 && \"Not reached!\"", "../llvm/include/llvm/Constant.h", 107, __PRETTY_FUNCTION__)); } static inline bool classof(const Constant *) { return true; } static inline bool classof(const GlobalValue *) { return true; } static inline bool classof(const Value *V) { return V->getValueID() >= ConstantFirstVal && V->getValueID() <= ConstantLastVal; } # 127 "../llvm/include/llvm/Constant.h" virtual void replaceUsesOfWithOnConstant(Value *, Value *, Use *) { ((getNumOperands() == 0 && "replaceUsesOfWithOnConstant must be " "implemented for all constants that have operands!") ? static_cast (0) : __assert_fail ("getNumOperands() == 0 && \"replaceUsesOfWithOnConstant must be \" \"implemented for all constants that have operands!\"", "../llvm/include/llvm/Constant.h" # 131 "../llvm/include/llvm/Constant.h" , 132 # 131 "../llvm/include/llvm/Constant.h" , __PRETTY_FUNCTION__)) ; ((0 && "Constants that do not have operands cannot be using 'From'!") ? static_cast (0) : __assert_fail ("0 && \"Constants that do not have operands cannot be using 'From'!\"", "../llvm/include/llvm/Constant.h", 133, __PRETTY_FUNCTION__)); } static Constant *getNullValue(Type* Ty); static Constant *getAllOnesValue(Type* Ty); static Constant *getIntegerValue(Type* Ty, const APInt &V); void removeDeadConstantUsers() const; }; } # 25 "../llvm/include/llvm/Constants.h" 2 # 1 "../llvm/include/llvm/ADT/APInt.h" 1 # 20 "../llvm/include/llvm/ADT/APInt.h" # 1 "/usr/include/c++/4.5/cassert" 1 3 # 43 "/usr/include/c++/4.5/cassert" 3 # 44 "/usr/include/c++/4.5/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/include/c++/4.5/cassert" 2 3 # 21 "../llvm/include/llvm/ADT/APInt.h" 2 # 1 "/usr/include/c++/4.5/climits" 1 3 # 41 "/usr/include/c++/4.5/climits" 3 # 42 "/usr/include/c++/4.5/climits" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include-fixed/limits.h" 1 3 4 # 34 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include-fixed/limits.h" 3 4 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include-fixed/syslimits.h" 1 3 4 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include-fixed/limits.h" 1 3 4 # 169 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include-fixed/limits.h" 3 4 # 1 "/usr/include/limits.h" 1 3 4 # 145 "/usr/include/limits.h" 3 4 # 1 "/usr/include/bits/posix1_lim.h" 1 3 4 # 157 "/usr/include/bits/posix1_lim.h" 3 4 # 1 "/usr/include/bits/local_lim.h" 1 3 4 # 39 "/usr/include/bits/local_lim.h" 3 4 # 1 "/usr/include/linux/limits.h" 1 3 4 # 40 "/usr/include/bits/local_lim.h" 2 3 4 # 158 "/usr/include/bits/posix1_lim.h" 2 3 4 # 146 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/bits/posix2_lim.h" 1 3 4 # 150 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/bits/xopen_lim.h" 1 3 4 # 34 "/usr/include/bits/xopen_lim.h" 3 4 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 # 35 "/usr/include/bits/xopen_lim.h" 2 3 4 # 154 "/usr/include/limits.h" 2 3 4 # 170 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include-fixed/limits.h" 2 3 4 # 8 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include-fixed/syslimits.h" 2 3 4 # 35 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include-fixed/limits.h" 2 3 4 # 44 "/usr/include/c++/4.5/climits" 2 3 # 22 "../llvm/include/llvm/ADT/APInt.h" 2 # 1 "/usr/include/c++/4.5/cstring" 1 3 # 41 "/usr/include/c++/4.5/cstring" 3 # 42 "/usr/include/c++/4.5/cstring" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 45 "/usr/include/c++/4.5/cstring" 2 3 # 23 "../llvm/include/llvm/ADT/APInt.h" 2 namespace llvm { class Serializer; class Deserializer; class FoldingSetNodeID; class raw_ostream; class StringRef; template class SmallVectorImpl; typedef uint64_t integerPart; const unsigned int host_char_bit = 8; const unsigned int integerPartWidth = host_char_bit * static_cast(sizeof(integerPart)); # 73 "../llvm/include/llvm/ADT/APInt.h" class APInt { unsigned BitWidth; union { uint64_t VAL; uint64_t *pVal; }; enum { APINT_BITS_PER_WORD = static_cast(sizeof(uint64_t)) * 8, APINT_WORD_SIZE = static_cast(sizeof(uint64_t)) }; APInt(uint64_t* val, unsigned bits) : BitWidth(bits), 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 % APINT_BITS_PER_WORD; if (wordBits == 0) return *this; uint64_t mask = ~uint64_t(0ULL) >> (APINT_BITS_PER_WORD - wordBits); if (isSingleWord()) VAL &= mask; else pVal[getNumWords() - 1] &= mask; return *this; } uint64_t getWord(unsigned bitPosition) const { return isSingleWord() ? VAL : pVal[whichWord(bitPosition)]; } # 166 "../llvm/include/llvm/ADT/APInt.h" void fromString(unsigned numBits, StringRef str, uint8_t radix); static void divide(const APInt LHS, unsigned lhsWords, const APInt &RHS, unsigned rhsWords, APInt *Quotient, APInt *Remainder); void initSlowCase(unsigned numBits, uint64_t val, bool isSigned); void initFromArray(ArrayRef array); void initSlowCase(const APInt& that); APInt shlSlowCase(unsigned shiftAmt) const; APInt AndSlowCase(const APInt& RHS) const; APInt OrSlowCase(const APInt& RHS) const; APInt XorSlowCase(const APInt& RHS) const; APInt& AssignSlowCase(const APInt& RHS); bool EqualSlowCase(const APInt& RHS) const; bool EqualSlowCase(uint64_t Val) const; unsigned countLeadingZerosSlowCase() const; unsigned countTrailingOnesSlowCase() const; unsigned countPopulationSlowCase() const; public: # 227 "../llvm/include/llvm/ADT/APInt.h" APInt(unsigned numBits, uint64_t val, bool isSigned = false) : BitWidth(numBits), VAL(0) { ((BitWidth && "bitwidth too small") ? static_cast (0) : __assert_fail ("BitWidth && \"bitwidth too small\"", "../llvm/include/llvm/ADT/APInt.h", 229, __PRETTY_FUNCTION__)); if (isSingleWord()) VAL = val; else initSlowCase(numBits, val, isSigned); clearUnusedBits(); } APInt(unsigned numBits, ArrayRef bigVal); APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]); # 262 "../llvm/include/llvm/ADT/APInt.h" APInt(unsigned numBits, StringRef str, uint8_t radix); APInt(const APInt& that) : BitWidth(that.BitWidth), VAL(0) { ((BitWidth && "bitwidth too small") ? static_cast (0) : __assert_fail ("BitWidth && \"bitwidth too small\"", "../llvm/include/llvm/ADT/APInt.h", 268, __PRETTY_FUNCTION__)); if (isSingleWord()) VAL = that.VAL; else initSlowCase(that); } ~APInt() { if (!isSingleWord()) delete [] pVal; } explicit APInt() : BitWidth(1) {} void Profile(FoldingSetNodeID& id) const; bool isNegative() const { return (*this)[BitWidth - 1]; } bool isNonNegative() const { return !isNegative(); } bool isStrictlyPositive() const { return isNonNegative() && !!*this; } bool isAllOnesValue() const { return countPopulation() == BitWidth; } bool isMaxValue() const { return countPopulation() == BitWidth; } bool isMaxSignedValue() const { return BitWidth == 1 ? VAL == 0 : !isNegative() && countPopulation() == BitWidth - 1; } bool isMinValue() const { return !*this; } bool isMinSignedValue() const { return BitWidth == 1 ? VAL == 1 : isNegative() && isPowerOf2(); } bool isIntN(unsigned N) const { ((N && "N == 0 ???") ? static_cast (0) : __assert_fail ("N && \"N == 0 ???\"", "../llvm/include/llvm/ADT/APInt.h", 350, __PRETTY_FUNCTION__)); if (N >= getBitWidth()) return true; if (isSingleWord()) return isUIntN(N, VAL); return APInt(N, makeArrayRef(pVal, getNumWords())).zext(getBitWidth()) == (*this); } bool isSignedIntN(unsigned N) const { ((N && "N == 0 ???") ? static_cast (0) : __assert_fail ("N && \"N == 0 ???\"", "../llvm/include/llvm/ADT/APInt.h", 362, __PRETTY_FUNCTION__)); return getMinSignedBits() <= N; } bool isPowerOf2() const { if (isSingleWord()) return isPowerOf2_64(VAL); return countPopulationSlowCase() == 1; } bool isSignBit() const { return isMinSignedValue(); } bool getBoolValue() const { return !!*this; } uint64_t getLimitedValue(uint64_t Limit = ~0ULL) const { return (getActiveBits() > 64 || getZExtValue() > Limit) ? Limit : getZExtValue(); } 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 getSignBit(unsigned BitWidth) { return getSignedMinValue(BitWidth); } static APInt getAllOnesValue(unsigned numBits) { return APInt(numBits, -1ULL, 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; } # 463 "../llvm/include/llvm/ADT/APInt.h" static APInt getBitsSet(unsigned numBits, unsigned loBit, unsigned hiBit) { ((hiBit <= numBits && "hiBit out of range") ? static_cast (0) : __assert_fail ("hiBit <= numBits && \"hiBit out of range\"", "../llvm/include/llvm/ADT/APInt.h", 464, __PRETTY_FUNCTION__)); ((loBit < numBits && "loBit out of range") ? static_cast (0) : __assert_fail ("loBit < numBits && \"loBit out of range\"", "../llvm/include/llvm/ADT/APInt.h", 465, __PRETTY_FUNCTION__)); if (hiBit < loBit) return getLowBitsSet(numBits, hiBit) | getHighBitsSet(numBits, numBits-loBit); return getLowBitsSet(numBits, hiBit-loBit).shl(loBit); } static APInt getHighBitsSet(unsigned numBits, unsigned hiBitsSet) { ((hiBitsSet <= numBits && "Too many bits to set!") ? static_cast (0) : __assert_fail ("hiBitsSet <= numBits && \"Too many bits to set!\"", "../llvm/include/llvm/ADT/APInt.h", 477, __PRETTY_FUNCTION__)); if (hiBitsSet == 0) return APInt(numBits, 0); unsigned shiftAmt = numBits - hiBitsSet; if (numBits <= APINT_BITS_PER_WORD) return APInt(numBits, ~0ULL << shiftAmt); return getAllOnesValue(numBits).shl(shiftAmt); } static APInt getLowBitsSet(unsigned numBits, unsigned loBitsSet) { ((loBitsSet <= numBits && "Too many bits to set!") ? static_cast (0) : __assert_fail ("loBitsSet <= numBits && \"Too many bits to set!\"", "../llvm/include/llvm/ADT/APInt.h", 493, __PRETTY_FUNCTION__)); if (loBitsSet == 0) return APInt(numBits, 0); if (loBitsSet == APINT_BITS_PER_WORD) return APInt(numBits, -1ULL); if (loBitsSet <= APINT_BITS_PER_WORD) return APInt(numBits, -1ULL >> (APINT_BITS_PER_WORD - loBitsSet)); return getAllOnesValue(numBits).lshr(numBits - loBitsSet); } uint64_t getHashValue() const; const uint64_t* getRawData() const { if (isSingleWord()) return &VAL; return &pVal[0]; } const APInt operator++(int) { APInt API(*this); ++(*this); return API; } APInt& operator++(); const APInt operator--(int) { APInt API(*this); --(*this); return API; } APInt& operator--(); APInt operator~() const { APInt Result(*this); Result.flipAllBits(); return Result; } APInt operator-() const { return APInt(BitWidth, 0) - (*this); } bool operator!() const; APInt& operator=(const APInt& RHS) { if (isSingleWord() && RHS.isSingleWord()) { VAL = RHS.VAL; BitWidth = RHS.BitWidth; return clearUnusedBits(); } return AssignSlowCase(RHS); } APInt& operator=(uint64_t RHS); APInt& operator&=(const APInt& RHS); APInt& operator|=(const APInt& RHS); APInt& operator|=(uint64_t RHS) { if (isSingleWord()) { VAL |= RHS; clearUnusedBits(); } else { pVal[0] |= RHS; } return *this; } APInt& operator^=(const APInt& RHS); APInt& operator*=(const APInt& RHS); APInt& operator+=(const APInt& RHS); APInt& operator-=(const APInt& RHS); APInt& operator<<=(unsigned shiftAmt) { *this = shl(shiftAmt); return *this; } APInt operator&(const APInt& RHS) const { ((BitWidth == RHS.BitWidth && "Bit widths must be the same") ? static_cast (0) : __assert_fail ("BitWidth == RHS.BitWidth && \"Bit widths must be the same\"", "../llvm/include/llvm/ADT/APInt.h", 653, __PRETTY_FUNCTION__)); if (isSingleWord()) return APInt(getBitWidth(), VAL & RHS.VAL); return AndSlowCase(RHS); } APInt And(const APInt& RHS) const { return this->operator&(RHS); } APInt operator|(const APInt& RHS) const { ((BitWidth == RHS.BitWidth && "Bit widths must be the same") ? static_cast (0) : __assert_fail ("BitWidth == RHS.BitWidth && \"Bit widths must be the same\"", "../llvm/include/llvm/ADT/APInt.h", 666, __PRETTY_FUNCTION__)); if (isSingleWord()) return APInt(getBitWidth(), VAL | RHS.VAL); return OrSlowCase(RHS); } APInt Or(const APInt& RHS) const { return this->operator|(RHS); } APInt operator^(const APInt& RHS) const { ((BitWidth == RHS.BitWidth && "Bit widths must be the same") ? static_cast (0) : __assert_fail ("BitWidth == RHS.BitWidth && \"Bit widths must be the same\"", "../llvm/include/llvm/ADT/APInt.h", 679, __PRETTY_FUNCTION__)); if (isSingleWord()) return APInt(BitWidth, VAL ^ RHS.VAL); return XorSlowCase(RHS); } APInt Xor(const APInt& RHS) const { return this->operator^(RHS); } APInt operator*(const APInt& RHS) const; APInt operator+(const APInt& RHS) const; APInt operator+(uint64_t RHS) const { return (*this) + APInt(BitWidth, RHS); } APInt operator-(const APInt& RHS) const; APInt operator-(uint64_t RHS) const { return (*this) - APInt(BitWidth, RHS); } APInt operator<<(unsigned Bits) const { return shl(Bits); } APInt operator<<(const APInt &Bits) const { return shl(Bits); } APInt ashr(unsigned shiftAmt) const; APInt lshr(unsigned shiftAmt) const; APInt shl(unsigned shiftAmt) const { ((shiftAmt <= BitWidth && "Invalid shift amount") ? static_cast (0) : __assert_fail ("shiftAmt <= BitWidth && \"Invalid shift amount\"", "../llvm/include/llvm/ADT/APInt.h", 725, __PRETTY_FUNCTION__)); if (isSingleWord()) { if (shiftAmt == BitWidth) return APInt(BitWidth, 0); return APInt(BitWidth, VAL << shiftAmt); } return shlSlowCase(shiftAmt); } APInt rotl(unsigned rotateAmt) const; APInt rotr(unsigned rotateAmt) const; APInt ashr(const APInt &shiftAmt) const; APInt lshr(const APInt &shiftAmt) const; APInt shl(const APInt &shiftAmt) const; APInt rotl(const APInt &rotateAmt) const; APInt rotr(const APInt &rotateAmt) const; APInt udiv(const APInt &RHS) const; APInt sdiv(const APInt &RHS) const { if (isNegative()) if (RHS.isNegative()) return (-(*this)).udiv(-RHS); else return -((-(*this)).udiv(RHS)); else if (RHS.isNegative()) return -(this->udiv(-RHS)); return this->udiv(RHS); } # 784 "../llvm/include/llvm/ADT/APInt.h" APInt urem(const APInt &RHS) const; APInt srem(const APInt &RHS) const { if (isNegative()) if (RHS.isNegative()) return -((-(*this)).urem(-RHS)); else return -((-(*this)).urem(RHS)); else if (RHS.isNegative()) return this->urem(-RHS); return this->urem(RHS); } static void udivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient, APInt &Remainder); static void sdivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient, APInt &Remainder) { if (LHS.isNegative()) { if (RHS.isNegative()) APInt::udivrem(-LHS, -RHS, Quotient, Remainder); else APInt::udivrem(-LHS, RHS, Quotient, Remainder); Quotient = -Quotient; Remainder = -Remainder; } else if (RHS.isNegative()) { APInt::udivrem(LHS, -RHS, Quotient, Remainder); Quotient = -Quotient; } else { APInt::udivrem(LHS, RHS, Quotient, 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(unsigned Amt, bool &Overflow) const; bool operator[](unsigned bitPosition) const; bool operator==(const APInt& RHS) const { ((BitWidth == RHS.BitWidth && "Comparison requires equal bit widths") ? static_cast (0) : __assert_fail ("BitWidth == RHS.BitWidth && \"Comparison requires equal bit widths\"", "../llvm/include/llvm/ADT/APInt.h", 847, __PRETTY_FUNCTION__)); if (isSingleWord()) return VAL == RHS.VAL; return EqualSlowCase(RHS); } bool operator==(uint64_t Val) const { if (isSingleWord()) return VAL == Val; return EqualSlowCase(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; bool ult(uint64_t RHS) const { return ult(APInt(getBitWidth(), RHS)); } bool slt(const APInt& RHS) const; bool slt(uint64_t RHS) const { return slt(APInt(getBitWidth(), RHS)); } bool ule(const APInt& RHS) const { return ult(RHS) || eq(RHS); } bool ule(uint64_t RHS) const { return ule(APInt(getBitWidth(), RHS)); } bool sle(const APInt& RHS) const { return slt(RHS) || eq(RHS); } bool sle(uint64_t RHS) const { return sle(APInt(getBitWidth(), RHS)); } bool ugt(const APInt& RHS) const { return !ult(RHS) && !eq(RHS); } bool ugt(uint64_t RHS) const { return ugt(APInt(getBitWidth(), RHS)); } bool sgt(const APInt& RHS) const { return !slt(RHS) && !eq(RHS); } bool sgt(uint64_t RHS) const { return sgt(APInt(getBitWidth(), RHS)); } bool uge(const APInt& RHS) const { return !ult(RHS); } bool uge(uint64_t RHS) const { return uge(APInt(getBitWidth(), RHS)); } bool sge(const APInt& RHS) const { return !slt(RHS); } bool sge(uint64_t RHS) const { return sge(APInt(getBitWidth(), RHS)); } bool intersects(const APInt &RHS) const { return (*this & RHS) != 0; } APInt trunc(unsigned width) const; APInt sext(unsigned width) const; APInt zext(unsigned width) const; APInt sextOrTrunc(unsigned width) const; APInt zextOrTrunc(unsigned width) const; void setAllBits() { if (isSingleWord()) VAL = -1ULL; else { for (unsigned i = 0; i < getNumWords(); ++i) pVal[i] = -1ULL; } clearUnusedBits(); } void setBit(unsigned bitPosition); void clearAllBits() { if (isSingleWord()) VAL = 0; else memset(pVal, 0, getNumWords() * APINT_WORD_SIZE); } void clearBit(unsigned bitPosition); void flipAllBits() { if (isSingleWord()) VAL ^= -1ULL; else { for (unsigned i = 0; i < getNumWords(); ++i) pVal[i] ^= -1ULL; } clearUnusedBits(); } void flipBit(unsigned bitPosition); unsigned getBitWidth() const { return BitWidth; } unsigned getNumWords() const { return getNumWords(BitWidth); } static unsigned getNumWords(unsigned BitWidth) { return (BitWidth + APINT_BITS_PER_WORD - 1) / APINT_BITS_PER_WORD; } unsigned getActiveBits() const { return BitWidth - countLeadingZeros(); } unsigned getActiveWords() const { return whichWord(getActiveBits()-1) + 1; } # 1153 "../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 VAL; ((getActiveBits() <= 64 && "Too many bits for uint64_t") ? static_cast (0) : __assert_fail ("getActiveBits() <= 64 && \"Too many bits for uint64_t\"", "../llvm/include/llvm/ADT/APInt.h", 1166, __PRETTY_FUNCTION__)); return pVal[0]; } int64_t getSExtValue() const { if (isSingleWord()) return int64_t(VAL << (APINT_BITS_PER_WORD - BitWidth)) >> (APINT_BITS_PER_WORD - BitWidth); ((getMinSignedBits() <= 64 && "Too many bits for int64_t") ? static_cast (0) : __assert_fail ("getMinSignedBits() <= 64 && \"Too many bits for int64_t\"", "../llvm/include/llvm/ADT/APInt.h", 1178, __PRETTY_FUNCTION__)); return int64_t(pVal[0]); } static unsigned getBitsNeeded(StringRef str, uint8_t radix); unsigned countLeadingZeros() const { if (isSingleWord()) { unsigned unusedBits = APINT_BITS_PER_WORD - BitWidth; return CountLeadingZeros_64(VAL) - unusedBits; } return countLeadingZerosSlowCase(); } unsigned countLeadingOnes() const; unsigned getNumSignBits() const { return isNegative() ? countLeadingOnes() : countLeadingZeros(); } # 1222 "../llvm/include/llvm/ADT/APInt.h" unsigned countTrailingZeros() const; # 1231 "../llvm/include/llvm/ADT/APInt.h" unsigned countTrailingOnes() const { if (isSingleWord()) return CountTrailingOnes_64(VAL); return countTrailingOnesSlowCase(); } unsigned countPopulation() const { if (isSingleWord()) return CountPopulation_64(VAL); return countPopulationSlowCase(); } void print(raw_ostream &OS, bool isSigned) const; void toString(SmallVectorImpl &Str, unsigned Radix, bool Signed, bool formatAsCLiteral = false) const; void toStringUnsigned(SmallVectorImpl &Str, unsigned Radix = 10) const { toString(Str, Radix, false, false); } void toStringSigned(SmallVectorImpl &Str, unsigned Radix = 10) const { toString(Str, Radix, true, false); } std::string toString(unsigned Radix, bool Signed) const; APInt byteSwap() const; double roundToDouble(bool isSigned) const; double roundToDouble() const { return roundToDouble(false); } double signedRoundToDouble() const { return roundToDouble(true); } double bitsToDouble() const { union { uint64_t I; double D; } T; T.I = (isSingleWord() ? VAL : pVal[0]); return T.D; } float bitsToFloat() const { union { unsigned I; float F; } T; T.I = unsigned((isSingleWord() ? VAL : pVal[0])); return T.F; } static APInt doubleToBits(double V) { union { uint64_t I; double D; } T; T.D = V; return APInt(sizeof T * 8, T.I); } static APInt floatToBits(float V) { union { unsigned I; float F; } T; T.F = V; return APInt(sizeof T * 8, T.I); } unsigned logBase2() const { return BitWidth - 1 - countLeadingZeros(); } unsigned ceilLogBase2() const { return BitWidth - (*this - 1).countLeadingZeros(); } 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; # 1404 "../llvm/include/llvm/ADT/APInt.h" static void tcSet(integerPart *, integerPart, unsigned int); static void tcAssign(integerPart *, const integerPart *, unsigned int); static bool tcIsZero(const integerPart *, unsigned int); static int tcExtractBit(const integerPart *, unsigned int bit); static void tcExtract(integerPart *, unsigned int dstCount, const integerPart *, unsigned int srcBits, unsigned int srcLSB); static void tcSetBit(integerPart *, unsigned int bit); static void tcClearBit(integerPart *, unsigned int bit); static unsigned int tcLSB(const integerPart *, unsigned int); static unsigned int tcMSB(const integerPart *parts, unsigned int n); static void tcNegate(integerPart *, unsigned int); static integerPart tcAdd(integerPart *, const integerPart *, integerPart carry, unsigned); static integerPart tcSubtract(integerPart *, const integerPart *, integerPart carry, unsigned); # 1459 "../llvm/include/llvm/ADT/APInt.h" static int tcMultiplyPart(integerPart *dst, const integerPart *src, integerPart multiplier, integerPart carry, unsigned int srcParts, unsigned int dstParts, bool add); static int tcMultiply(integerPart *, const integerPart *, const integerPart *, unsigned); static unsigned int tcFullMultiply(integerPart *, const integerPart *, const integerPart *, unsigned, unsigned); # 1488 "../llvm/include/llvm/ADT/APInt.h" static int tcDivide(integerPart *lhs, const integerPart *rhs, integerPart *remainder, integerPart *scratch, unsigned int parts); static void tcShiftLeft(integerPart *, unsigned int parts, unsigned int count); static void tcShiftRight(integerPart *, unsigned int parts, unsigned int count); static void tcAnd(integerPart *, const integerPart *, unsigned int); static void tcOr(integerPart *, const integerPart *, unsigned int); static void tcXor(integerPart *, const integerPart *, unsigned int); static void tcComplement(integerPart *, unsigned int); static int tcCompare(const integerPart *, const integerPart *, unsigned int); static integerPart tcIncrement(integerPart *, unsigned int); static void tcSetLeastSignificantBits(integerPart *, unsigned int, unsigned int 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 raw_ostream &operator<<(raw_ostream &OS, const APInt &I) { I.print(OS, true); return OS; } namespace APIntOps { inline APInt smin(const APInt &A, const APInt &B) { return A.slt(B) ? A : B; } inline APInt smax(const APInt &A, const APInt &B) { return A.sgt(B) ? A : B; } inline APInt umin(const APInt &A, const APInt &B) { return A.ult(B) ? A : B; } inline APInt umax(const APInt &A, const APInt &B) { return A.ugt(B) ? A : B; } inline bool isIntN(unsigned N, const APInt& APIVal) { return APIVal.isIntN(N); } inline bool isSignedIntN(unsigned N, const APInt& APIVal) { return APIVal.isSignedIntN(N); } inline bool isMask(unsigned numBits, const APInt& APIVal) { return numBits <= APIVal.getBitWidth() && APIVal == APInt::getLowBitsSet(APIVal.getBitWidth(), numBits); } inline bool isShiftedMask(unsigned numBits, const APInt& APIVal) { return isMask(numBits, (APIVal - APInt(numBits,1)) | APIVal); } inline APInt byteSwap(const APInt& APIVal) { return APIVal.byteSwap(); } inline unsigned logBase2(const APInt& APIVal) { return APIVal.logBase2(); } APInt GreatestCommonDivisor(const APInt& Val1, const APInt& Val2); 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); } inline APInt ashr(const APInt& LHS, unsigned shiftAmt) { return LHS.ashr(shiftAmt); } inline APInt lshr(const APInt& LHS, unsigned shiftAmt) { return LHS.lshr(shiftAmt); } inline APInt shl(const APInt& LHS, unsigned shiftAmt) { return LHS.shl(shiftAmt); } inline APInt sdiv(const APInt& LHS, const APInt& RHS) { return LHS.sdiv(RHS); } inline APInt udiv(const APInt& LHS, const APInt& RHS) { return LHS.udiv(RHS); } inline APInt srem(const APInt& LHS, const APInt& RHS) { return LHS.srem(RHS); } inline APInt urem(const APInt& LHS, const APInt& RHS) { return LHS.urem(RHS); } inline APInt mul(const APInt& LHS, const APInt& RHS) { return LHS * RHS; } inline APInt add(const APInt& LHS, const APInt& RHS) { return LHS + RHS; } inline APInt sub(const APInt& LHS, const APInt& RHS) { return LHS - RHS; } inline APInt And(const APInt& LHS, const APInt& RHS) { return LHS & RHS; } inline APInt Or(const APInt& LHS, const APInt& RHS) { return LHS | RHS; } inline APInt Xor(const APInt& LHS, const APInt& RHS) { return LHS ^ RHS; } inline APInt Not(const APInt& APIVal) { return ~APIVal; } } } # 27 "../llvm/include/llvm/Constants.h" 2 # 1 "../llvm/include/llvm/ADT/APFloat.h" 1 # 106 "../llvm/include/llvm/ADT/APFloat.h" namespace llvm { typedef signed short exponent_t; struct fltSemantics; class APSInt; class StringRef; enum lostFraction { lfExactlyZero, lfLessThanHalf, lfExactlyHalf, lfMoreThanHalf }; class APFloat { public: static const fltSemantics IEEEhalf; static const fltSemantics IEEEsingle; static const fltSemantics IEEEdouble; static const fltSemantics IEEEquad; static const fltSemantics PPCDoubleDouble; static const fltSemantics x87DoubleExtended; static const fltSemantics Bogus; static unsigned int semanticsPrecision(const fltSemantics &); enum cmpResult { cmpLessThan, cmpEqual, cmpGreaterThan, cmpUnordered }; enum roundingMode { rmNearestTiesToEven, rmTowardPositive, rmTowardNegative, rmTowardZero, rmNearestTiesToAway }; enum opStatus { opOK = 0x00, opInvalidOp = 0x01, opDivByZero = 0x02, opOverflow = 0x04, opUnderflow = 0x08, opInexact = 0x10 }; enum fltCategory { fcInfinity, fcNaN, fcNormal, fcZero }; enum uninitializedTag { uninitialized }; APFloat(const fltSemantics &); APFloat(const fltSemantics &, StringRef); APFloat(const fltSemantics &, integerPart); APFloat(const fltSemantics &, fltCategory, bool negative); APFloat(const fltSemantics &, uninitializedTag); explicit APFloat(double d); explicit APFloat(float f); explicit APFloat(const APInt &, bool isIEEE = false); APFloat(const APFloat &); ~APFloat(); static APFloat getZero(const fltSemantics &Sem, bool Negative = false) { return APFloat(Sem, fcZero, Negative); } static APFloat getInf(const fltSemantics &Sem, bool Negative = false) { return APFloat(Sem, fcInfinity, Negative); } static APFloat getNaN(const fltSemantics &Sem, bool Negative = false, unsigned type = 0) { if (type) { APInt fill(64, type); return getQNaN(Sem, Negative, &fill); } else { return getQNaN(Sem, Negative, 0); } } static APFloat getQNaN(const fltSemantics &Sem, bool Negative = false, const APInt *payload = 0) { return makeNaN(Sem, false, Negative, payload); } static APFloat getSNaN(const fltSemantics &Sem, bool Negative = false, const APInt *payload = 0) { return makeNaN(Sem, true, Negative, payload); } static APFloat getLargest(const fltSemantics &Sem, bool Negative = false); static APFloat getSmallest(const fltSemantics &Sem, bool Negative = false); static APFloat getSmallestNormalized(const fltSemantics &Sem, bool Negative = false); static APFloat getAllOnesValue(unsigned BitWidth, bool isIEEE = false); void Profile(FoldingSetNodeID& NID) const; void Emit(Serializer& S) const; static APFloat ReadVal(Deserializer& D); opStatus add(const APFloat &, roundingMode); opStatus subtract(const APFloat &, roundingMode); opStatus multiply(const APFloat &, roundingMode); opStatus divide(const APFloat &, roundingMode); opStatus remainder(const APFloat &); opStatus mod(const APFloat &, roundingMode); opStatus fusedMultiplyAdd(const APFloat &, const APFloat &, roundingMode); void changeSign(); void clearSign(); void copySign(const APFloat &); opStatus convert(const fltSemantics &, roundingMode, bool *); opStatus convertToInteger(integerPart *, unsigned int, bool, roundingMode, bool *) const; opStatus convertToInteger(APSInt&, 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); opStatus convertFromString(StringRef, roundingMode); APInt bitcastToAPInt() const; double convertToDouble() const; float convertToFloat() const; # 306 "../llvm/include/llvm/ADT/APFloat.h" cmpResult compare(const APFloat &) const; bool bitwiseIsEqual(const APFloat &) const; unsigned int convertToHexString(char *dst, unsigned int hexDigits, bool upperCase, roundingMode) const; fltCategory getCategory() const { return category; } const fltSemantics &getSemantics() const { return *semantics; } bool isZero() const { return category == fcZero; } bool isNonZero() const { return category != fcZero; } bool isNaN() const { return category == fcNaN; } bool isInfinity() const { return category == fcInfinity; } bool isNegative() const { return sign; } bool isPosZero() const { return isZero() && !isNegative(); } bool isNegZero() const { return isZero() && isNegative(); } APFloat& operator=(const APFloat &); uint32_t getHashValue() const; # 354 "../llvm/include/llvm/ADT/APFloat.h" void toString(SmallVectorImpl &Str, unsigned FormatPrecision = 0, unsigned FormatMaxPadding = 3) const; bool getExactInverse(APFloat *inv) const; private: integerPart *significandParts(); const integerPart *significandParts() const; unsigned int partCount() const; integerPart addSignificand(const APFloat &); integerPart subtractSignificand(const APFloat &, integerPart); lostFraction addOrSubtractSignificand(const APFloat &, bool subtract); lostFraction multiplySignificand(const APFloat &, const APFloat *); lostFraction divideSignificand(const APFloat &); void incrementSignificand(); void initialize(const fltSemantics *); void shiftSignificandLeft(unsigned int); lostFraction shiftSignificandRight(unsigned int); unsigned int significandLSB() const; unsigned int significandMSB() const; void zeroSignificand(); opStatus addOrSubtractSpecials(const APFloat &, bool subtract); opStatus divideSpecials(const APFloat &); opStatus multiplySpecials(const APFloat &); opStatus modSpecials(const APFloat &); static APFloat makeNaN(const fltSemantics &Sem, bool SNaN, bool Negative, const APInt *fill); void makeNaN(bool SNaN = false, bool Neg = false, const APInt *fill = 0); opStatus normalize(roundingMode, lostFraction); opStatus addOrSubtract(const APFloat &, roundingMode, bool subtract); cmpResult compareAbsoluteValue(const APFloat &) const; opStatus handleOverflow(roundingMode); bool roundAwayFromZero(roundingMode, lostFraction, unsigned int) const; opStatus convertToSignExtendedInteger(integerPart *, unsigned int, bool, roundingMode, bool *) const; opStatus convertFromUnsignedParts(const integerPart *, unsigned int, roundingMode); opStatus convertFromHexadecimalString(StringRef, roundingMode); opStatus convertFromDecimalString(StringRef, roundingMode); char *convertNormalToHexString(char *, unsigned int, bool, roundingMode) const; opStatus roundSignificandWithExponent(const integerPart *, unsigned int, int, roundingMode); APInt convertHalfAPFloatToAPInt() const; APInt convertFloatAPFloatToAPInt() const; APInt convertDoubleAPFloatToAPInt() const; APInt convertQuadrupleAPFloatToAPInt() const; APInt convertF80LongDoubleAPFloatToAPInt() const; APInt convertPPCDoubleDoubleAPFloatToAPInt() const; void initFromAPInt(const APInt& api, bool isIEEE = false); void initFromHalfAPInt(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 APFloat &); void copySignificand(const APFloat &); void freeSignificand(); const fltSemantics *semantics; union Significand { integerPart part; integerPart *parts; } significand; exponent_t exponent; fltCategory category: 3; unsigned int sign: 1; exponent_t exponent2 : 11; unsigned int sign2: 1; }; } # 28 "../llvm/include/llvm/Constants.h" 2 namespace llvm { class ArrayType; class IntegerType; class StructType; class PointerType; class VectorType; template struct ConstantCreator; template struct ConvertConstantType; class ConstantInt : public Constant { virtual void anchor(); void *operator new(size_t, unsigned); ConstantInt(const ConstantInt &); ConstantInt(IntegerType *Ty, const APInt& V); APInt Val; protected: void *operator new(size_t s) { return User::operator new(s, 0); } public: 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(); } bool equalsInt(uint64_t V) const { return Val == V; } inline IntegerType *getType() const { return reinterpret_cast(Value::getType()); } # 150 "../llvm/include/llvm/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 == 0; } bool isOne() const { return Val == 1; } 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.getActiveBits() > 64 || Val.getZExtValue() >= Num; } uint64_t getLimitedValue(uint64_t Limit = ~0ULL) const { return Val.getLimitedValue(Limit); } static inline bool classof(const ConstantInt *) { return true; } static bool classof(const Value *V) { return V->getValueID() == ConstantIntVal; } }; class ConstantFP : public Constant { APFloat Val; virtual void anchor(); void *operator new(size_t, unsigned); ConstantFP(const ConstantFP &); friend class LLVMContextImpl; protected: ConstantFP(Type *Ty, const APFloat& V); protected: void *operator new(size_t s) { return User::operator new(s, 0); } public: static Constant *getZeroValueForNegation(Type *Ty); static Constant *get(Type* Ty, double V); static Constant *get(Type* Ty, StringRef Str); static ConstantFP *get(LLVMContext &Context, const APFloat &V); static ConstantFP *getNegativeZero(Type* Ty); static ConstantFP *getInfinity(Type *Ty, bool Negative = false); static bool isValueValidForType(Type *Ty, const APFloat &V); inline const APFloat &getValueAPF() const { return Val; } bool isZero() const { return Val.isZero(); } bool isNegative() const { return Val.isNegative(); } bool isNaN() const { return Val.isNaN(); } bool isExactlyValue(const APFloat &V) const; bool isExactlyValue(double V) const { bool ignored; if (&Val.getSemantics() == &APFloat::PPCDoubleDouble) return false; APFloat FV(V); FV.convert(Val.getSemantics(), APFloat::rmNearestTiesToEven, &ignored); return isExactlyValue(FV); } static inline bool classof(const ConstantFP *) { return true; } static bool classof(const Value *V) { return V->getValueID() == ConstantFPVal; } }; class ConstantAggregateZero : public Constant { friend struct ConstantCreator; void *operator new(size_t, unsigned); ConstantAggregateZero(const ConstantAggregateZero &); protected: explicit ConstantAggregateZero(Type *ty) : Constant(ty, ConstantAggregateZeroVal, 0, 0) {} protected: void *operator new(size_t s) { return User::operator new(s, 0); } public: static ConstantAggregateZero* get(Type *Ty); virtual void destroyConstant(); static bool classof(const ConstantAggregateZero *) { return true; } static bool classof(const Value *V) { return V->getValueID() == ConstantAggregateZeroVal; } }; class ConstantArray : public Constant { friend struct ConstantCreator >; ConstantArray(const ConstantArray &); protected: ConstantArray(ArrayType *T, ArrayRef Val); public: static Constant *get(ArrayType *T, ArrayRef V); static Constant *get(LLVMContext &Context, StringRef Initializer, bool AddNull = true); 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; inline ArrayType *getType() const { return reinterpret_cast(Value::getType()); } bool isString() const; bool isCString() const; std::string getAsString() const; std::string getAsCString() const; virtual void destroyConstant(); virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U); static inline bool classof(const ConstantArray *) { return true; } static bool classof(const Value *V) { return V->getValueID() == ConstantArrayVal; } }; template <> struct OperandTraits : public VariadicOperandTraits { }; ConstantArray::op_iterator ConstantArray::op_begin() { return OperandTraits::op_begin(this); } ConstantArray::const_op_iterator ConstantArray::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } ConstantArray::op_iterator ConstantArray::op_end() { return OperandTraits::op_end(this); } ConstantArray::const_op_iterator ConstantArray::op_end() const { return OperandTraits::op_end(const_cast(this)); } Constant *ConstantArray::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Constants.h", 395, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void ConstantArray::setOperand(unsigned i_nocapture, Constant *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Constants.h", 395, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ConstantArray::getNumOperands() const { return OperandTraits::operands(this); } template Use &ConstantArray::Op() { return this->OpFrom(this); } template const Use &ConstantArray::Op() const { return this->OpFrom(this); } class ConstantStruct : public Constant { friend struct ConstantCreator >; ConstantStruct(const ConstantStruct &); protected: ConstantStruct(StructType *T, ArrayRef Val); public: static Constant *get(StructType *T, ArrayRef V); static Constant *get(StructType *T, ...) __attribute__((sentinel)); static Constant *getAnon(ArrayRef V, bool Packed = false) { return get(getTypeForElements(V, Packed), V); } static Constant *getAnon(LLVMContext &Ctx, ArrayRef V, bool Packed = false) { return get(getTypeForElements(Ctx, V, Packed), V); } static StructType *getTypeForElements(ArrayRef V, bool Packed = false); static StructType *getTypeForElements(LLVMContext &Ctx, ArrayRef V, bool Packed = false); 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; inline StructType *getType() const { return reinterpret_cast(Value::getType()); } virtual void destroyConstant(); virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U); static inline bool classof(const ConstantStruct *) { return true; } static bool classof(const Value *V) { return V->getValueID() == ConstantStructVal; } }; template <> struct OperandTraits : public VariadicOperandTraits { }; ConstantStruct::op_iterator ConstantStruct::op_begin() { return OperandTraits::op_begin(this); } ConstantStruct::const_op_iterator ConstantStruct::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } ConstantStruct::op_iterator ConstantStruct::op_end() { return OperandTraits::op_end(this); } ConstantStruct::const_op_iterator ConstantStruct::op_end() const { return OperandTraits::op_end(const_cast(this)); } Constant *ConstantStruct::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Constants.h", 455, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void ConstantStruct::setOperand(unsigned i_nocapture, Constant *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Constants.h", 455, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ConstantStruct::getNumOperands() const { return OperandTraits::operands(this); } template Use &ConstantStruct::Op() { return this->OpFrom(this); } template const Use &ConstantStruct::Op() const { return this->OpFrom(this); } class ConstantVector : public Constant { friend struct ConstantCreator >; ConstantVector(const ConstantVector &); protected: ConstantVector(VectorType *T, ArrayRef Val); public: static Constant *get(ArrayRef V); 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; inline VectorType *getType() const { return reinterpret_cast(Value::getType()); } Constant *getSplatValue() const; virtual void destroyConstant(); virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U); static inline bool classof(const ConstantVector *) { return true; } static bool classof(const Value *V) { return V->getValueID() == ConstantVectorVal; } }; template <> struct OperandTraits : public VariadicOperandTraits { }; ConstantVector::op_iterator ConstantVector::op_begin() { return OperandTraits::op_begin(this); } ConstantVector::const_op_iterator ConstantVector::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } ConstantVector::op_iterator ConstantVector::op_end() { return OperandTraits::op_end(this); } ConstantVector::const_op_iterator ConstantVector::op_end() const { return OperandTraits::op_end(const_cast(this)); } Constant *ConstantVector::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Constants.h", 500, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void ConstantVector::setOperand(unsigned i_nocapture, Constant *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Constants.h", 500, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ConstantVector::getNumOperands() const { return OperandTraits::operands(this); } template Use &ConstantVector::Op() { return this->OpFrom(this); } template const Use &ConstantVector::Op() const { return this->OpFrom(this); } class ConstantPointerNull : public Constant { friend struct ConstantCreator; void *operator new(size_t, unsigned); ConstantPointerNull(const ConstantPointerNull &); protected: explicit ConstantPointerNull(PointerType *T) : Constant(reinterpret_cast(T), Value::ConstantPointerNullVal, 0, 0) {} protected: void *operator new(size_t s) { return User::operator new(s, 0); } public: static ConstantPointerNull *get(PointerType *T); virtual void destroyConstant(); inline PointerType *getType() const { return reinterpret_cast(Value::getType()); } static inline bool classof(const ConstantPointerNull *) { return true; } static bool classof(const Value *V) { return V->getValueID() == ConstantPointerNullVal; } }; class BlockAddress : public Constant { void *operator new(size_t, unsigned); void *operator new(size_t s) { return User::operator new(s, 2); } BlockAddress(Function *F, BasicBlock *BB); public: static BlockAddress *get(Function *F, BasicBlock *BB); static BlockAddress *get(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 inline Use &Op(); template 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(); } virtual void destroyConstant(); virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U); static inline bool classof(const BlockAddress *) { return true; } static inline bool classof(const Value *V) { return V->getValueID() == BlockAddressVal; } }; template <> struct OperandTraits : public FixedNumOperandTraits { }; BlockAddress::op_iterator BlockAddress::op_begin() { return OperandTraits::op_begin(this); } BlockAddress::const_op_iterator BlockAddress::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } BlockAddress::op_iterator BlockAddress::op_end() { return OperandTraits::op_end(this); } BlockAddress::const_op_iterator BlockAddress::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *BlockAddress::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Constants.h", 574, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void BlockAddress::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Constants.h", 574, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned BlockAddress::getNumOperands() const { return OperandTraits::operands(this); } template Use &BlockAddress::Op() { return this->OpFrom(this); } template const Use &BlockAddress::Op() const { return this->OpFrom(this); } # 584 "../llvm/include/llvm/Constants.h" class ConstantExpr : public Constant { friend struct ConstantCreator > >; friend struct ConvertConstantType; protected: ConstantExpr(Type *ty, unsigned Opcode, Use *Ops, unsigned NumOps) : Constant(ty, ConstantExprVal, Ops, NumOps) { setValueSubclassData(Opcode); } 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); static Constant *getSExt (Constant *C, Type *Ty); static Constant *getZExt (Constant *C, Type *Ty); static Constant *getFPTrunc (Constant *C, Type *Ty); static Constant *getFPExtend(Constant *C, Type *Ty); static Constant *getUIToFP (Constant *C, Type *Ty); static Constant *getSIToFP (Constant *C, Type *Ty); static Constant *getFPToUI (Constant *C, Type *Ty); static Constant *getFPToSI (Constant *C, Type *Ty); static Constant *getPtrToInt(Constant *C, Type *Ty); static Constant *getIntToPtr(Constant *C, Type *Ty); static Constant *getBitCast (Constant *C, Type *Ty); 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); } 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; static Constant *getCast( unsigned ops, Constant *C, Type *Ty ); 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 *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); static Constant *get(unsigned Opcode, Constant *C1, Constant *C2, unsigned Flags = 0); static Constant *getCompare(unsigned short pred, Constant *C1, Constant *C2); static Constant *getICmp(unsigned short pred, Constant *LHS, Constant *RHS); static Constant *getFCmp(unsigned short pred, Constant *LHS, Constant *RHS); static Constant *getGetElementPtr(Constant *C, ArrayRef IdxList, bool InBounds = false) { return getGetElementPtr(C, makeArrayRef((Value * const *)IdxList.data(), IdxList.size()), InBounds); } static Constant *getGetElementPtr(Constant *C, Constant *Idx, bool InBounds = false) { return getGetElementPtr(C, cast(Idx), InBounds); } static Constant *getGetElementPtr(Constant *C, ArrayRef IdxList, bool InBounds = false); static Constant *getInBoundsGetElementPtr(Constant *C, ArrayRef IdxList) { return getGetElementPtr(C, IdxList, true); } static Constant *getInBoundsGetElementPtr(Constant *C, Constant *Idx) { return getGetElementPtr(C, Idx, true); } static Constant *getInBoundsGetElementPtr(Constant *C, ArrayRef IdxList) { return getGetElementPtr(C, IdxList, true); } static Constant *getExtractElement(Constant *Vec, Constant *Idx); static Constant *getInsertElement(Constant *Vec, Constant *Elt,Constant *Idx); static Constant *getShuffleVector(Constant *V1, Constant *V2, Constant *Mask); static Constant *getExtractValue(Constant *Agg, ArrayRef Idxs); static Constant *getInsertValue(Constant *Agg, Constant *Val, ArrayRef Idxs); unsigned getOpcode() const { return getSubclassDataFromValue(); } unsigned getPredicate() const; ArrayRef getIndices() const; const char *getOpcodeName() const; Constant *getWithOperandReplaced(unsigned OpNo, Constant *Op) const; Constant *getWithOperands(ArrayRef Ops) const { return getWithOperands(Ops, getType()); } Constant *getWithOperands(ArrayRef Ops, Type *Ty) const; virtual void destroyConstant(); virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U); static inline bool classof(const ConstantExpr *) { return true; } static inline bool classof(const Value *V) { return V->getValueID() == ConstantExprVal; } private: void setValueSubclassData(unsigned short D) { Value::setValueSubclassData(D); } }; template <> struct OperandTraits : public VariadicOperandTraits { }; ConstantExpr::op_iterator ConstantExpr::op_begin() { return OperandTraits::op_begin(this); } ConstantExpr::const_op_iterator ConstantExpr::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } ConstantExpr::op_iterator ConstantExpr::op_end() { return OperandTraits::op_end(this); } ConstantExpr::const_op_iterator ConstantExpr::op_end() const { return OperandTraits::op_end(const_cast(this)); } Constant *ConstantExpr::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/include/llvm/Constants.h", 883, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void ConstantExpr::setOperand(unsigned i_nocapture, Constant *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/include/llvm/Constants.h", 883, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ConstantExpr::getNumOperands() const { return OperandTraits::operands(this); } template Use &ConstantExpr::Op() { return this->OpFrom(this); } template const Use &ConstantExpr::Op() const { return this->OpFrom(this); } # 895 "../llvm/include/llvm/Constants.h" class UndefValue : public Constant { friend struct ConstantCreator; void *operator new(size_t, unsigned); UndefValue(const UndefValue &); protected: explicit UndefValue(Type *T) : Constant(T, UndefValueVal, 0, 0) {} protected: void *operator new(size_t s) { return User::operator new(s, 0); } public: static UndefValue *get(Type *T); virtual void destroyConstant(); static inline bool classof(const UndefValue *) { return true; } static bool classof(const Value *V) { return V->getValueID() == UndefValueVal; } }; } # 20 "../llvm/include/llvm/Operator.h" 2 namespace llvm { class GetElementPtrInst; class BinaryOperator; class ConstantExpr; class Operator : public User { private: void *operator new(size_t, unsigned); void *operator new(size_t s); Operator(); ~Operator(); public: unsigned getOpcode() const { if (const Instruction *I = dyn_cast(this)) return I->getOpcode(); return cast(this)->getOpcode(); } static unsigned getOpcode(const Value *V) { if (const Instruction *I = dyn_cast(V)) return I->getOpcode(); if (const ConstantExpr *CE = dyn_cast(V)) return CE->getOpcode(); return Instruction::UserOp1; } static inline bool classof(const Operator *) { return true; } static inline bool classof(const Instruction *) { return true; } static inline bool classof(const ConstantExpr *) { return true; } static inline bool classof(const Value *V) { return isa(V) || isa(V); } }; class OverflowingBinaryOperator : public Operator { public: enum { NoUnsignedWrap = (1 << 0), NoSignedWrap = (1 << 1) }; private: ~OverflowingBinaryOperator(); friend class BinaryOperator; friend class ConstantExpr; void setHasNoUnsignedWrap(bool B) { SubclassOptionalData = (SubclassOptionalData & ~NoUnsignedWrap) | (B * NoUnsignedWrap); } void setHasNoSignedWrap(bool B) { SubclassOptionalData = (SubclassOptionalData & ~NoSignedWrap) | (B * NoSignedWrap); } public: bool hasNoUnsignedWrap() const { return SubclassOptionalData & NoUnsignedWrap; } bool hasNoSignedWrap() const { return (SubclassOptionalData & NoSignedWrap) != 0; } static inline bool classof(const OverflowingBinaryOperator *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Instruction::Add || I->getOpcode() == Instruction::Sub || I->getOpcode() == Instruction::Mul || I->getOpcode() == Instruction::Shl; } static inline bool classof(const ConstantExpr *CE) { return CE->getOpcode() == Instruction::Add || CE->getOpcode() == Instruction::Sub || CE->getOpcode() == Instruction::Mul || CE->getOpcode() == Instruction::Shl; } static inline bool classof(const Value *V) { return (isa(V) && classof(cast(V))) || (isa(V) && classof(cast(V))); } }; class PossiblyExactOperator : public Operator { public: enum { IsExact = (1 << 0) }; friend class BinaryOperator; friend class ConstantExpr; void setIsExact(bool B) { SubclassOptionalData = (SubclassOptionalData & ~IsExact) | (B * IsExact); } private: ~PossiblyExactOperator(); public: bool isExact() const { return SubclassOptionalData & IsExact; } static bool isPossiblyExactOpcode(unsigned OpC) { return OpC == Instruction::SDiv || OpC == Instruction::UDiv || OpC == Instruction::AShr || OpC == Instruction::LShr; } static inline bool classof(const ConstantExpr *CE) { return isPossiblyExactOpcode(CE->getOpcode()); } static inline bool classof(const Instruction *I) { return isPossiblyExactOpcode(I->getOpcode()); } static inline bool classof(const Value *V) { return (isa(V) && classof(cast(V))) || (isa(V) && classof(cast(V))); } }; template class ConcreteOperator : public SuperClass { ~ConcreteOperator(); public: static inline bool classof(const ConcreteOperator *) { return true; } static inline bool classof(const Instruction *I) { return I->getOpcode() == Opc; } static inline bool classof(const ConstantExpr *CE) { return CE->getOpcode() == Opc; } static inline bool classof(const Value *V) { return (isa(V) && classof(cast(V))) || (isa(V) && classof(cast(V))); } }; class AddOperator : public ConcreteOperator { ~AddOperator(); }; class SubOperator : public ConcreteOperator { ~SubOperator(); }; class MulOperator : public ConcreteOperator { ~MulOperator(); }; class ShlOperator : public ConcreteOperator { ~ShlOperator(); }; class SDivOperator : public ConcreteOperator { ~SDivOperator(); }; class UDivOperator : public ConcreteOperator { ~UDivOperator(); }; class AShrOperator : public ConcreteOperator { ~AShrOperator(); }; class LShrOperator : public ConcreteOperator { ~LShrOperator(); }; class GEPOperator : public ConcreteOperator { ~GEPOperator(); enum { IsInBounds = (1 << 0) }; friend class GetElementPtrInst; friend class ConstantExpr; void setIsInBounds(bool B) { SubclassOptionalData = (SubclassOptionalData & ~IsInBounds) | (B * IsInBounds); } public: bool isInBounds() const { return SubclassOptionalData & IsInBounds; } 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(); } Value *getPointerOperand() { return getOperand(0); } const Value *getPointerOperand() const { return getOperand(0); } static unsigned getPointerOperandIndex() { return 0U; } Type *getPointerOperandType() const { return getPointerOperand()->getType(); } unsigned getNumIndices() const { return getNumOperands() - 1; } bool hasIndices() const { return getNumOperands() > 1; } bool hasAllZeroIndices() const { for (const_op_iterator I = idx_begin(), E = idx_end(); I != E; ++I) { if (ConstantInt *C = dyn_cast(I)) if (C->isZero()) continue; return false; } return true; } bool hasAllConstantIndices() const { for (const_op_iterator I = idx_begin(), E = idx_end(); I != E; ++I) { if (!isa(I)) return false; } return true; } }; } # 21 "../llvm/lib/VMCore/ConstantsContext.h" 2 # 1 "../llvm/include/llvm/Support/Debug.h" 1 # 29 "../llvm/include/llvm/Support/Debug.h" namespace llvm { class raw_ostream; # 44 "../llvm/include/llvm/Support/Debug.h" extern bool DebugFlag; bool isCurrentDebugType(const char *Type); void SetCurrentDebugType(const char *Type); # 83 "../llvm/include/llvm/Support/Debug.h" extern bool EnableDebugBuffering; raw_ostream &dbgs(); # 99 "../llvm/include/llvm/Support/Debug.h" } # 22 "../llvm/lib/VMCore/ConstantsContext.h" 2 # 1 "../llvm/include/llvm/Support/raw_ostream.h" 1 # 20 "../llvm/include/llvm/Support/raw_ostream.h" namespace llvm { class format_object_base; template class SmallVectorImpl; class raw_ostream { private: void operator=(const raw_ostream &); raw_ostream(const raw_ostream &); # 53 "../llvm/include/llvm/Support/raw_ostream.h" char *OutBufStart, *OutBufEnd, *OutBufCur; enum BufferKind { Unbuffered = 0, InternalBuffer, ExternalBuffer } BufferMode; public: enum Colors { BLACK=0, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, SAVEDCOLOR }; explicit raw_ostream(bool unbuffered=false) : BufferMode(unbuffered ? Unbuffered : InternalBuffer) { OutBufStart = OutBufEnd = OutBufCur = 0; } virtual ~raw_ostream(); uint64_t tell() const { return current_pos() + GetNumBytesInBuffer(); } void SetBuffered(); void SetBufferSize(size_t Size) { flush(); SetBufferAndMode(new char[Size], Size, InternalBuffer); } size_t GetBufferSize() const { if (BufferMode != Unbuffered && OutBufStart == 0) return preferred_buffer_size(); return OutBufEnd - OutBufStart; } void SetUnbuffered() { flush(); SetBufferAndMode(0, 0, 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 (OutBufCur+Size > OutBufEnd) return write(Str.data(), 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<<(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(N)); } raw_ostream &operator<<(int N) { return this->operator<<(static_cast(N)); } raw_ostream &operator<<(double N); raw_ostream &write_hex(unsigned long long N); 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 &indent(unsigned NumSpaces); # 218 "../llvm/include/llvm/Support/raw_ostream.h" virtual raw_ostream &changeColor(enum Colors, bool = false, bool = false) { return *this; } virtual raw_ostream &resetColor() { return *this; } virtual bool is_displayed() const { return false; } private: # 247 "../llvm/include/llvm/Support/raw_ostream.h" virtual void write_impl(const char *Ptr, size_t Size) = 0; virtual void handle(); virtual uint64_t current_pos() const = 0; protected: void SetBuffer(char *BufferStart, size_t Size) { SetBufferAndMode(BufferStart, Size, 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); }; class raw_fd_ostream : public raw_ostream { int FD; bool ShouldClose; bool Error; bool UseAtomicWrites; uint64_t pos; virtual void write_impl(const char *Ptr, size_t Size); virtual uint64_t current_pos() const { return pos; } virtual size_t preferred_buffer_size() const; void error_detected() { Error = true; } public: enum { F_Excl = 1, F_Append = 2, F_Binary = 4 }; # 351 "../llvm/include/llvm/Support/raw_ostream.h" raw_fd_ostream(const char *Filename, std::string &ErrorInfo, unsigned Flags = 0); raw_fd_ostream(int fd, bool shouldClose, bool unbuffered=false); ~raw_fd_ostream(); void close(); uint64_t seek(uint64_t off); void SetUseAtomicWrites(bool Value) { UseAtomicWrites = Value; } virtual raw_ostream &changeColor(enum Colors colors, bool bold=false, bool bg=false); virtual raw_ostream &resetColor(); virtual bool is_displayed() const; bool has_error() const { return Error; } # 401 "../llvm/include/llvm/Support/raw_ostream.h" void clear_error() { Error = false; } }; raw_ostream &outs(); raw_ostream &errs(); raw_ostream &nulls(); class raw_string_ostream : public raw_ostream { std::string &OS; virtual void write_impl(const char *Ptr, size_t Size); virtual uint64_t current_pos() const { return OS.size(); } public: explicit raw_string_ostream(std::string &O) : OS(O) {} ~raw_string_ostream(); std::string& str() { flush(); return OS; } }; class raw_svector_ostream : public raw_ostream { SmallVectorImpl &OS; virtual void write_impl(const char *Ptr, size_t Size); virtual uint64_t current_pos() const; public: explicit raw_svector_ostream(SmallVectorImpl &O); ~raw_svector_ostream(); void resync(); StringRef str(); }; class raw_null_ostream : public raw_ostream { virtual void write_impl(const char *Ptr, size_t size); virtual uint64_t current_pos() const; public: explicit raw_null_ostream() {} ~raw_null_ostream(); }; } # 24 "../llvm/lib/VMCore/ConstantsContext.h" 2 # 1 "/usr/include/c++/4.5/map" 1 3 # 58 "/usr/include/c++/4.5/map" 3 # 59 "/usr/include/c++/4.5/map" 3 # 1 "/usr/include/c++/4.5/bits/stl_tree.h" 1 3 # 67 "/usr/include/c++/4.5/bits/stl_tree.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 85 "/usr/include/c++/4.5/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) { while (__x->_M_left != 0) __x = __x->_M_left; return __x; } static _Const_Base_ptr _S_minimum(_Const_Base_ptr __x) { while (__x->_M_left != 0) __x = __x->_M_left; return __x; } static _Base_ptr _S_maximum(_Base_ptr __x) { while (__x->_M_right != 0) __x = __x->_M_right; return __x; } static _Const_Base_ptr _S_maximum(_Const_Base_ptr __x) { while (__x->_M_right != 0) __x = __x->_M_right; return __x; } }; template struct _Rb_tree_node : public _Rb_tree_node_base { typedef _Rb_tree_node<_Val>* _Link_type; _Val _M_value_field; }; __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 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() : _M_node() { } explicit _Rb_tree_iterator(_Link_type __x) : _M_node(__x) { } reference operator*() const { return static_cast<_Link_type>(_M_node)->_M_value_field; } pointer operator->() const { return &static_cast<_Link_type>(_M_node)->_M_value_field; } _Self& operator++() { _M_node = _Rb_tree_increment(_M_node); return *this; } _Self operator++(int) { _Self __tmp = *this; _M_node = _Rb_tree_increment(_M_node); return __tmp; } _Self& operator--() { _M_node = _Rb_tree_decrement(_M_node); return *this; } _Self operator--(int) { _Self __tmp = *this; _M_node = _Rb_tree_decrement(_M_node); return __tmp; } bool operator==(const _Self& __x) const { return _M_node == __x._M_node; } bool operator!=(const _Self& __x) const { return _M_node != __x._M_node; } _Base_ptr _M_node; }; template 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() : _M_node() { } explicit _Rb_tree_const_iterator(_Link_type __x) : _M_node(__x) { } _Rb_tree_const_iterator(const iterator& __it) : _M_node(__it._M_node) { } reference operator*() const { return static_cast<_Link_type>(_M_node)->_M_value_field; } pointer operator->() const { return &static_cast<_Link_type>(_M_node)->_M_value_field; } _Self& operator++() { _M_node = _Rb_tree_increment(_M_node); return *this; } _Self operator++(int) { _Self __tmp = *this; _M_node = _Rb_tree_increment(_M_node); return __tmp; } _Self& operator--() { _M_node = _Rb_tree_decrement(_M_node); return *this; } _Self operator--(int) { _Self __tmp = *this; _M_node = _Rb_tree_decrement(_M_node); return __tmp; } bool operator==(const _Self& __x) const { return _M_node == __x._M_node; } bool operator!=(const _Self& __x) const { return _M_node != __x._M_node; } _Base_ptr _M_node; }; template inline bool operator==(const _Rb_tree_iterator<_Val>& __x, const _Rb_tree_const_iterator<_Val>& __y) { return __x._M_node == __y._M_node; } template inline bool operator!=(const _Rb_tree_iterator<_Val>& __x, const _Rb_tree_const_iterator<_Val>& __y) { 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 > class _Rb_tree { typedef typename _Alloc::template rebind<_Rb_tree_node<_Val> >::other _Node_allocator; protected: typedef _Rb_tree_node_base* _Base_ptr; typedef const _Rb_tree_node_base* _Const_Base_ptr; 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 _Rb_tree_node<_Val>* _Link_type; typedef const _Rb_tree_node<_Val>* _Const_Link_type; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Alloc allocator_type; _Node_allocator& _M_get_Node_allocator() { return *static_cast<_Node_allocator*>(&this->_M_impl); } const _Node_allocator& _M_get_Node_allocator() const { return *static_cast(&this->_M_impl); } allocator_type get_allocator() const { return allocator_type(_M_get_Node_allocator()); } protected: _Link_type _M_get_node() { return _M_impl._Node_allocator::allocate(1); } void _M_put_node(_Link_type __p) { _M_impl._Node_allocator::deallocate(__p, 1); } _Link_type _M_create_node(const value_type& __x) { _Link_type __tmp = _M_get_node(); if (true) { get_allocator().construct(&__tmp->_M_value_field, __x); } if (false) { _M_put_node(__tmp); ; } return __tmp; } void _M_destroy_node(_Link_type __p) { get_allocator().destroy(&__p->_M_value_field); _M_put_node(__p); } # 413 "/usr/include/c++/4.5/bits/stl_tree.h" 3 _Link_type _M_clone_node(_Const_Link_type __x) { _Link_type __tmp = _M_create_node(__x->_M_value_field); __tmp->_M_color = __x->_M_color; __tmp->_M_left = 0; __tmp->_M_right = 0; return __tmp; } protected: template struct _Rb_tree_impl : public _Node_allocator { _Key_compare _M_key_compare; _Rb_tree_node_base _M_header; size_type _M_node_count; _Rb_tree_impl() : _Node_allocator(), _M_key_compare(), _M_header(), _M_node_count(0) { _M_initialize(); } _Rb_tree_impl(const _Key_compare& __comp, const _Node_allocator& __a) : _Node_allocator(__a), _M_key_compare(__comp), _M_header(), _M_node_count(0) { _M_initialize(); } private: void _M_initialize() { this->_M_header._M_color = _S_red; this->_M_header._M_parent = 0; this->_M_header._M_left = &this->_M_header; this->_M_header._M_right = &this->_M_header; } }; _Rb_tree_impl<_Compare> _M_impl; protected: _Base_ptr& _M_root() { return this->_M_impl._M_header._M_parent; } _Const_Base_ptr _M_root() const { return this->_M_impl._M_header._M_parent; } _Base_ptr& _M_leftmost() { return this->_M_impl._M_header._M_left; } _Const_Base_ptr _M_leftmost() const { return this->_M_impl._M_header._M_left; } _Base_ptr& _M_rightmost() { return this->_M_impl._M_header._M_right; } _Const_Base_ptr _M_rightmost() const { return this->_M_impl._M_header._M_right; } _Link_type _M_begin() { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } _Const_Link_type _M_begin() const { return static_cast<_Const_Link_type> (this->_M_impl._M_header._M_parent); } _Link_type _M_end() { return static_cast<_Link_type>(&this->_M_impl._M_header); } _Const_Link_type _M_end() const { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); } static const_reference _S_value(_Const_Link_type __x) { return __x->_M_value_field; } static const _Key& _S_key(_Const_Link_type __x) { return _KeyOfValue()(_S_value(__x)); } static _Link_type _S_left(_Base_ptr __x) { return static_cast<_Link_type>(__x->_M_left); } static _Const_Link_type _S_left(_Const_Base_ptr __x) { return static_cast<_Const_Link_type>(__x->_M_left); } static _Link_type _S_right(_Base_ptr __x) { return static_cast<_Link_type>(__x->_M_right); } static _Const_Link_type _S_right(_Const_Base_ptr __x) { 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_value_field; } static const _Key& _S_key(_Const_Base_ptr __x) { return _KeyOfValue()(_S_value(__x)); } static _Base_ptr _S_minimum(_Base_ptr __x) { return _Rb_tree_node_base::_S_minimum(__x); } static _Const_Base_ptr _S_minimum(_Const_Base_ptr __x) { return _Rb_tree_node_base::_S_minimum(__x); } static _Base_ptr _S_maximum(_Base_ptr __x) { return _Rb_tree_node_base::_S_maximum(__x); } static _Const_Base_ptr _S_maximum(_Const_Base_ptr __x) { return _Rb_tree_node_base::_S_maximum(__x); } public: typedef _Rb_tree_iterator iterator; typedef _Rb_tree_const_iterator const_iterator; typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; private: iterator _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __y, const value_type& __v); iterator _M_insert_lower(_Base_ptr __x, _Base_ptr __y, const value_type& __v); iterator _M_insert_equal_lower(const value_type& __x); _Link_type _M_copy(_Const_Link_type __x, _Link_type __p); void _M_erase(_Link_type __x); iterator _M_lower_bound(_Link_type __x, _Link_type __y, const _Key& __k); const_iterator _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, const _Key& __k) const; iterator _M_upper_bound(_Link_type __x, _Link_type __y, const _Key& __k); const_iterator _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, const _Key& __k) const; public: _Rb_tree() { } _Rb_tree(const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_impl(__comp, __a) { } _Rb_tree(const _Rb_tree& __x) : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator()) { if (__x._M_root() != 0) { _M_root() = _M_copy(__x._M_begin(), _M_end()); _M_leftmost() = _S_minimum(_M_root()); _M_rightmost() = _S_maximum(_M_root()); _M_impl._M_node_count = __x._M_impl._M_node_count; } } ~_Rb_tree() { _M_erase(_M_begin()); } _Rb_tree& operator=(const _Rb_tree& __x); _Compare key_comp() const { return _M_impl._M_key_compare; } iterator begin() { return iterator(static_cast<_Link_type> (this->_M_impl._M_header._M_left)); } const_iterator begin() const { return const_iterator(static_cast<_Const_Link_type> (this->_M_impl._M_header._M_left)); } iterator end() { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); } const_iterator end() const { return const_iterator(static_cast<_Const_Link_type> (&this->_M_impl._M_header)); } 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()); } bool empty() const { return _M_impl._M_node_count == 0; } size_type size() const { return _M_impl._M_node_count; } size_type max_size() const { return _M_get_Node_allocator().max_size(); } void swap(_Rb_tree& __t); pair _M_insert_unique(const value_type& __x); iterator _M_insert_equal(const value_type& __x); iterator _M_insert_unique_(const_iterator __position, const value_type& __x); iterator _M_insert_equal_(const_iterator __position, const value_type& __x); template void _M_insert_unique(_InputIterator __first, _InputIterator __last); template void _M_insert_equal(_InputIterator __first, _InputIterator __last); # 712 "/usr/include/c++/4.5/bits/stl_tree.h" 3 void erase(iterator __position); void erase(const_iterator __position); size_type erase(const key_type& __x); # 732 "/usr/include/c++/4.5/bits/stl_tree.h" 3 void erase(iterator __first, iterator __last); void erase(const_iterator __first, const_iterator __last); void erase(const key_type* __first, const key_type* __last); void clear() { _M_erase(_M_begin()); _M_leftmost() = _M_end(); _M_root() = 0; _M_rightmost() = _M_end(); _M_impl._M_node_count = 0; } 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 equal_range(const key_type& __k); pair equal_range(const key_type& __k) const; bool __rb_verify() const; }; template 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 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 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 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 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 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 inline void swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { __x.swap(__y); } # 867 "/usr/include/c++/4.5/bits/stl_tree.h" 3 template _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: operator=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x) { if (this != &__x) { clear(); _M_impl._M_key_compare = __x._M_impl._M_key_compare; if (__x._M_root() != 0) { _M_root() = _M_copy(__x._M_begin(), _M_end()); _M_leftmost() = _S_minimum(_M_root()); _M_rightmost() = _S_maximum(_M_root()); _M_impl._M_node_count = __x._M_impl._M_node_count; } } return *this; } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __v) { bool __insert_left = (__x != 0 || __p == _M_end() || _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__p))); _Link_type __z = _M_create_node(__v); _Rb_tree_insert_and_rebalance(__insert_left, __z, const_cast<_Base_ptr>(__p), this->_M_impl._M_header); ++_M_impl._M_node_count; return iterator(__z); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_lower(_Base_ptr __x, _Base_ptr __p, const _Val& __v) { bool __insert_left = (__x != 0 || __p == _M_end() || !_M_impl._M_key_compare(_S_key(__p), _KeyOfValue()(__v))); _Link_type __z = _M_create_node(__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 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_equal_lower(const _Val& __v) { _Link_type __x = _M_begin(); _Link_type __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(__x, __y, __v); } template typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: _M_copy(_Const_Link_type __x, _Link_type __p) { _Link_type __top = _M_clone_node(__x); __top->_M_parent = __p; if (true) { if (__x->_M_right) __top->_M_right = _M_copy(_S_right(__x), __top); __p = __top; __x = _S_left(__x); while (__x != 0) { _Link_type __y = _M_clone_node(__x); __p->_M_left = __y; __y->_M_parent = __p; if (__x->_M_right) __y->_M_right = _M_copy(_S_right(__x), __y); __p = __y; __x = _S_left(__x); } } if (false) { _M_erase(__top); ; } return __top; } template 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_destroy_node(__x); __x = __y; } } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_lower_bound(_Link_type __x, _Link_type __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 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_lower_bound(_Const_Link_type __x, _Const_Link_type __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 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_upper_bound(_Link_type __x, _Link_type __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 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_upper_bound(_Const_Link_type __x, _Const_Link_type __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 pair::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(); _Link_type __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), __yu(__y); __y = __x, __x = _S_left(__x); __xu = _S_right(__xu); return pair(_M_lower_bound(__x, __y, __k), _M_upper_bound(__xu, __yu, __k)); } } return pair(iterator(__y), iterator(__y)); } template pair::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_Link_type __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), __yu(__y); __y = __x, __x = _S_left(__x); __xu = _S_right(__xu); return pair(_M_lower_bound(__x, __y, __k), _M_upper_bound(__xu, __yu, __k)); } } return pair(const_iterator(__y), const_iterator(__y)); } template void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t) { if (_M_root() == 0) { if (__t._M_root() != 0) { _M_root() = __t._M_root(); _M_leftmost() = __t._M_leftmost(); _M_rightmost() = __t._M_rightmost(); _M_root()->_M_parent = _M_end(); __t._M_root() = 0; __t._M_leftmost() = __t._M_end(); __t._M_rightmost() = __t._M_end(); } } else if (__t._M_root() == 0) { __t._M_root() = _M_root(); __t._M_leftmost() = _M_leftmost(); __t._M_rightmost() = _M_rightmost(); __t._M_root()->_M_parent = __t._M_end(); _M_root() = 0; _M_leftmost() = _M_end(); _M_rightmost() = _M_end(); } 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); std::__alloc_swap<_Node_allocator>:: _S_do_it(_M_get_Node_allocator(), __t._M_get_Node_allocator()); } template pair::iterator, bool> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_unique(const _Val& __v) { _Link_type __x = _M_begin(); _Link_type __y = _M_end(); bool __comp = true; while (__x != 0) { __y = __x; __comp = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)); __x = __comp ? _S_left(__x) : _S_right(__x); } iterator __j = iterator(__y); if (__comp) { if (__j == begin()) return pair(_M_insert_(__x, __y, __v), true); else --__j; } if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v))) return pair(_M_insert_(__x, __y, __v), true); return pair(__j, false); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_equal(const _Val& __v) { _Link_type __x = _M_begin(); _Link_type __y = _M_end(); while (__x != 0) { __y = __x; __x = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? _S_left(__x) : _S_right(__x); } return _M_insert_(__x, __y, __v); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_unique_(const_iterator __position, const _Val& __v) { if (__position._M_node == _M_end()) { if (size() > 0 && _M_impl._M_key_compare(_S_key(_M_rightmost()), _KeyOfValue()(__v))) return _M_insert_(0, _M_rightmost(), __v); else return _M_insert_unique(__v).first; } else if (_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node))) { const_iterator __before = __position; if (__position._M_node == _M_leftmost()) return _M_insert_(_M_leftmost(), _M_leftmost(), __v); else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), _KeyOfValue()(__v))) { if (_S_right(__before._M_node) == 0) return _M_insert_(0, __before._M_node, __v); else return _M_insert_(__position._M_node, __position._M_node, __v); } else return _M_insert_unique(__v).first; } else if (_M_impl._M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v))) { const_iterator __after = __position; if (__position._M_node == _M_rightmost()) return _M_insert_(0, _M_rightmost(), __v); else if (_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key((++__after)._M_node))) { if (_S_right(__position._M_node) == 0) return _M_insert_(0, __position._M_node, __v); else return _M_insert_(__after._M_node, __after._M_node, __v); } else return _M_insert_unique(__v).first; } else return iterator(static_cast<_Link_type> (const_cast<_Base_ptr>(__position._M_node))); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_equal_(const_iterator __position, const _Val& __v) { if (__position._M_node == _M_end()) { if (size() > 0 && !_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(_M_rightmost()))) return _M_insert_(0, _M_rightmost(), __v); else return _M_insert_equal(__v); } else if (!_M_impl._M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v))) { const_iterator __before = __position; if (__position._M_node == _M_leftmost()) return _M_insert_(_M_leftmost(), _M_leftmost(), __v); else if (!_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key((--__before)._M_node))) { if (_S_right(__before._M_node) == 0) return _M_insert_(0, __before._M_node, __v); else return _M_insert_(__position._M_node, __position._M_node, __v); } else return _M_insert_equal(__v); } else { const_iterator __after = __position; if (__position._M_node == _M_rightmost()) return _M_insert_(0, _M_rightmost(), __v); else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), _KeyOfValue()(__v))) { if (_S_right(__position._M_node) == 0) return _M_insert_(0, __position._M_node, __v); else return _M_insert_(__after._M_node, __after._M_node, __v); } else return _M_insert_equal_lower(__v); } } template template void _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: _M_insert_unique(_II __first, _II __last) { for (; __first != __last; ++__first) _M_insert_unique_(end(), *__first); } template template void _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: _M_insert_equal(_II __first, _II __last) { for (; __first != __last; ++__first) _M_insert_equal_(end(), *__first); } # 1391 "/usr/include/c++/4.5/bits/stl_tree.h" 3 template inline void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(iterator __position) { _Link_type __y = static_cast<_Link_type>(_Rb_tree_rebalance_for_erase (__position._M_node, this->_M_impl._M_header)); _M_destroy_node(__y); --_M_impl._M_node_count; } template inline void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(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_destroy_node(__y); --_M_impl._M_node_count; } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(const _Key& __x) { pair __p = equal_range(__x); const size_type __old_size = size(); erase(__p.first, __p.second); return __old_size - size(); } # 1475 "/usr/include/c++/4.5/bits/stl_tree.h" 3 template void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(iterator __first, iterator __last) { if (__first == begin() && __last == end()) clear(); else while (__first != __last) erase(__first++); } template void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(const_iterator __first, const_iterator __last) { if (__first == begin() && __last == end()) clear(); else while (__first != __last) erase(__first++); } template void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(const _Key* __first, const _Key* __last) { while (__first != __last) erase(*__first++); } template 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 _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 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: count(const _Key& __k) const { pair __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 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; } } # 61 "/usr/include/c++/4.5/map" 2 3 # 1 "/usr/include/c++/4.5/bits/stl_map.h" 1 3 # 64 "/usr/include/c++/4.5/bits/stl_map.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 84 "/usr/include/c++/4.5/bits/stl_map.h" 3 template , typename _Alloc = std::allocator > > class map { public: typedef _Key key_type; typedef _Tp mapped_type; typedef std::pair value_type; typedef _Compare key_compare; typedef _Alloc allocator_type; private: typedef typename _Alloc::value_type _Alloc_value_type; public: class value_compare : public std::binary_function { 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 _Alloc::template rebind::other _Pair_alloc_type; typedef _Rb_tree, key_compare, _Pair_alloc_type> _Rep_type; _Rep_type _M_t; public: typedef typename _Pair_alloc_type::pointer pointer; typedef typename _Pair_alloc_type::const_pointer const_pointer; typedef typename _Pair_alloc_type::reference reference; typedef typename _Pair_alloc_type::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; map() : _M_t() { } explicit map(const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, __a) { } # 170 "/usr/include/c++/4.5/bits/stl_map.h" 3 map(const map& __x) : _M_t(__x._M_t) { } # 211 "/usr/include/c++/4.5/bits/stl_map.h" 3 template map(_InputIterator __first, _InputIterator __last) : _M_t() { _M_t._M_insert_unique(__first, __last); } # 227 "/usr/include/c++/4.5/bits/stl_map.h" 3 template map(_InputIterator __first, _InputIterator __last, const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, __a) { _M_t._M_insert_unique(__first, __last); } # 250 "/usr/include/c++/4.5/bits/stl_map.h" 3 map& operator=(const map& __x) { _M_t = __x._M_t; return *this; } # 296 "/usr/include/c++/4.5/bits/stl_map.h" 3 allocator_type get_allocator() const { return _M_t.get_allocator(); } iterator begin() { return _M_t.begin(); } const_iterator begin() const { return _M_t.begin(); } iterator end() { return _M_t.end(); } const_iterator end() const { return _M_t.end(); } reverse_iterator rbegin() { return _M_t.rbegin(); } const_reverse_iterator rbegin() const { return _M_t.rbegin(); } reverse_iterator rend() { return _M_t.rend(); } const_reverse_iterator rend() const { return _M_t.rend(); } # 415 "/usr/include/c++/4.5/bits/stl_map.h" 3 bool empty() const { return _M_t.empty(); } size_type size() const { return _M_t.size(); } size_type max_size() const { return _M_t.max_size(); } # 442 "/usr/include/c++/4.5/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 = insert(__i, value_type(__k, mapped_type())); return (*__i).second; } # 464 "/usr/include/c++/4.5/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; } # 499 "/usr/include/c++/4.5/bits/stl_map.h" 3 std::pair insert(const value_type& __x) { return _M_t._M_insert_unique(__x); } # 539 "/usr/include/c++/4.5/bits/stl_map.h" 3 iterator insert(iterator __position, const value_type& __x) { return _M_t._M_insert_unique_(__position, __x); } # 551 "/usr/include/c++/4.5/bits/stl_map.h" 3 template void insert(_InputIterator __first, _InputIterator __last) { _M_t._M_insert_unique(__first, __last); } # 586 "/usr/include/c++/4.5/bits/stl_map.h" 3 void erase(iterator __position) { _M_t.erase(__position); } # 602 "/usr/include/c++/4.5/bits/stl_map.h" 3 size_type erase(const key_type& __x) { return _M_t.erase(__x); } # 636 "/usr/include/c++/4.5/bits/stl_map.h" 3 void erase(iterator __first, iterator __last) { _M_t.erase(__first, __last); } # 652 "/usr/include/c++/4.5/bits/stl_map.h" 3 void swap(map& __x) { _M_t.swap(__x._M_t); } void clear() { _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()); } # 695 "/usr/include/c++/4.5/bits/stl_map.h" 3 iterator find(const key_type& __x) { return _M_t.find(__x); } # 710 "/usr/include/c++/4.5/bits/stl_map.h" 3 const_iterator find(const key_type& __x) const { return _M_t.find(__x); } # 722 "/usr/include/c++/4.5/bits/stl_map.h" 3 size_type count(const key_type& __x) const { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } # 737 "/usr/include/c++/4.5/bits/stl_map.h" 3 iterator lower_bound(const key_type& __x) { return _M_t.lower_bound(__x); } # 752 "/usr/include/c++/4.5/bits/stl_map.h" 3 const_iterator lower_bound(const key_type& __x) const { return _M_t.lower_bound(__x); } iterator upper_bound(const key_type& __x) { return _M_t.upper_bound(__x); } const_iterator upper_bound(const key_type& __x) const { return _M_t.upper_bound(__x); } # 791 "/usr/include/c++/4.5/bits/stl_map.h" 3 std::pair equal_range(const key_type& __x) { return _M_t.equal_range(__x); } # 810 "/usr/include/c++/4.5/bits/stl_map.h" 3 std::pair equal_range(const key_type& __x) const { return _M_t.equal_range(__x); } template friend bool operator==(const map<_K1, _T1, _C1, _A1>&, const map<_K1, _T1, _C1, _A1>&); template friend bool operator<(const map<_K1, _T1, _C1, _A1>&, const map<_K1, _T1, _C1, _A1>&); }; # 835 "/usr/include/c++/4.5/bits/stl_map.h" 3 template inline bool operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t == __y._M_t; } # 852 "/usr/include/c++/4.5/bits/stl_map.h" 3 template 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 inline bool operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x < __y); } template inline void swap(map<_Key, _Tp, _Compare, _Alloc>& __x, map<_Key, _Tp, _Compare, _Alloc>& __y) { __x.swap(__y); } } # 62 "/usr/include/c++/4.5/map" 2 3 # 1 "/usr/include/c++/4.5/bits/stl_multimap.h" 1 3 # 63 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 83 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 template , typename _Alloc = std::allocator > > class multimap { public: typedef _Key key_type; typedef _Tp mapped_type; typedef std::pair value_type; typedef _Compare key_compare; typedef _Alloc allocator_type; private: typedef typename _Alloc::value_type _Alloc_value_type; public: class value_compare : public std::binary_function { 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 _Alloc::template rebind::other _Pair_alloc_type; typedef _Rb_tree, key_compare, _Pair_alloc_type> _Rep_type; _Rep_type _M_t; public: typedef typename _Pair_alloc_type::pointer pointer; typedef typename _Pair_alloc_type::const_pointer const_pointer; typedef typename _Pair_alloc_type::reference reference; typedef typename _Pair_alloc_type::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; multimap() : _M_t() { } explicit multimap(const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, __a) { } # 168 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 multimap(const multimap& __x) : _M_t(__x._M_t) { } # 208 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 template multimap(_InputIterator __first, _InputIterator __last) : _M_t() { _M_t._M_insert_equal(__first, __last); } # 224 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 template multimap(_InputIterator __first, _InputIterator __last, const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, __a) { _M_t._M_insert_equal(__first, __last); } # 247 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 multimap& operator=(const multimap& __x) { _M_t = __x._M_t; return *this; } # 293 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 allocator_type get_allocator() const { return _M_t.get_allocator(); } iterator begin() { return _M_t.begin(); } const_iterator begin() const { return _M_t.begin(); } iterator end() { return _M_t.end(); } const_iterator end() const { return _M_t.end(); } reverse_iterator rbegin() { return _M_t.rbegin(); } const_reverse_iterator rbegin() const { return _M_t.rbegin(); } reverse_iterator rend() { return _M_t.rend(); } const_reverse_iterator rend() const { return _M_t.rend(); } # 410 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 bool empty() const { return _M_t.empty(); } size_type size() const { return _M_t.size(); } size_type max_size() const { return _M_t.max_size(); } # 437 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 iterator insert(const value_type& __x) { return _M_t._M_insert_equal(__x); } # 461 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 iterator insert(iterator __position, const value_type& __x) { return _M_t._M_insert_equal_(__position, __x); } # 474 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 template void insert(_InputIterator __first, _InputIterator __last) { _M_t._M_insert_equal(__first, __last); } # 522 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 void erase(iterator __position) { _M_t.erase(__position); } # 538 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 size_type erase(const key_type& __x) { return _M_t.erase(__x); } # 574 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 void erase(iterator __first, iterator __last) { _M_t.erase(__first, __last); } # 590 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 void swap(multimap& __x) { _M_t.swap(__x._M_t); } void clear() { _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()); } # 633 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 iterator find(const key_type& __x) { return _M_t.find(__x); } # 648 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 const_iterator find(const key_type& __x) const { return _M_t.find(__x); } size_type count(const key_type& __x) const { return _M_t.count(__x); } # 672 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 iterator lower_bound(const key_type& __x) { return _M_t.lower_bound(__x); } # 687 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 const_iterator lower_bound(const key_type& __x) const { return _M_t.lower_bound(__x); } iterator upper_bound(const key_type& __x) { return _M_t.upper_bound(__x); } const_iterator upper_bound(const key_type& __x) const { return _M_t.upper_bound(__x); } # 724 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 std::pair equal_range(const key_type& __x) { return _M_t.equal_range(__x); } # 741 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 std::pair equal_range(const key_type& __x) const { return _M_t.equal_range(__x); } template friend bool operator==(const multimap<_K1, _T1, _C1, _A1>&, const multimap<_K1, _T1, _C1, _A1>&); template friend bool operator<(const multimap<_K1, _T1, _C1, _A1>&, const multimap<_K1, _T1, _C1, _A1>&); }; # 766 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 template inline bool operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t == __y._M_t; } # 783 "/usr/include/c++/4.5/bits/stl_multimap.h" 3 template 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 inline bool operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x < __y); } template inline void swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, multimap<_Key, _Tp, _Compare, _Alloc>& __y) { __x.swap(__y); } } # 63 "/usr/include/c++/4.5/map" 2 3 # 25 "../llvm/lib/VMCore/ConstantsContext.h" 2 namespace llvm { template struct ConstantTraits; class UnaryConstantExpr : public ConstantExpr { virtual void anchor(); void *operator new(size_t, unsigned); public: void *operator new(size_t s) { return User::operator new(s, 1); } UnaryConstantExpr(unsigned Opcode, Constant *C, Type *Ty) : ConstantExpr(Ty, Opcode, &Op<0>(), 1) { Op<0>() = C; } 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; }; class BinaryConstantExpr : public ConstantExpr { virtual void anchor(); void *operator new(size_t, unsigned); public: void *operator new(size_t s) { return User::operator new(s, 2); } BinaryConstantExpr(unsigned Opcode, Constant *C1, Constant *C2, unsigned Flags) : ConstantExpr(C1->getType(), Opcode, &Op<0>(), 2) { Op<0>() = C1; Op<1>() = C2; SubclassOptionalData = Flags; } 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; }; class SelectConstantExpr : public ConstantExpr { virtual void anchor(); void *operator new(size_t, unsigned); public: void *operator new(size_t s) { return User::operator new(s, 3); } SelectConstantExpr(Constant *C1, Constant *C2, Constant *C3) : ConstantExpr(C2->getType(), Instruction::Select, &Op<0>(), 3) { Op<0>() = C1; Op<1>() = C2; Op<2>() = C3; } 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; }; class ExtractElementConstantExpr : public ConstantExpr { virtual void anchor(); void *operator new(size_t, unsigned); public: void *operator new(size_t s) { return User::operator new(s, 2); } ExtractElementConstantExpr(Constant *C1, Constant *C2) : ConstantExpr(cast(C1->getType())->getElementType(), Instruction::ExtractElement, &Op<0>(), 2) { Op<0>() = C1; Op<1>() = C2; } 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; }; class InsertElementConstantExpr : public ConstantExpr { virtual void anchor(); void *operator new(size_t, unsigned); public: void *operator new(size_t s) { return User::operator new(s, 3); } InsertElementConstantExpr(Constant *C1, Constant *C2, Constant *C3) : ConstantExpr(C1->getType(), Instruction::InsertElement, &Op<0>(), 3) { Op<0>() = C1; Op<1>() = C2; Op<2>() = C3; } 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; }; class ShuffleVectorConstantExpr : public ConstantExpr { virtual void anchor(); void *operator new(size_t, unsigned); public: void *operator new(size_t s) { return User::operator new(s, 3); } ShuffleVectorConstantExpr(Constant *C1, Constant *C2, Constant *C3) : ConstantExpr(VectorType::get( cast(C1->getType())->getElementType(), cast(C3->getType())->getNumElements()), Instruction::ShuffleVector, &Op<0>(), 3) { Op<0>() = C1; Op<1>() = C2; Op<2>() = C3; } 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; }; class ExtractValueConstantExpr : public ConstantExpr { virtual void anchor(); void *operator new(size_t, unsigned); public: void *operator new(size_t s) { return User::operator new(s, 1); } ExtractValueConstantExpr(Constant *Agg, const SmallVector &IdxList, Type *DestTy) : ConstantExpr(DestTy, Instruction::ExtractValue, &Op<0>(), 1), Indices(IdxList) { Op<0>() = Agg; } const SmallVector Indices; 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; }; class InsertValueConstantExpr : public ConstantExpr { virtual void anchor(); void *operator new(size_t, unsigned); public: void *operator new(size_t s) { return User::operator new(s, 2); } InsertValueConstantExpr(Constant *Agg, Constant *Val, const SmallVector &IdxList, Type *DestTy) : ConstantExpr(DestTy, Instruction::InsertValue, &Op<0>(), 2), Indices(IdxList) { Op<0>() = Agg; Op<1>() = Val; } const SmallVector Indices; 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; }; class GetElementPtrConstantExpr : public ConstantExpr { virtual void anchor(); GetElementPtrConstantExpr(Constant *C, const std::vector &IdxList, Type *DestTy); public: static GetElementPtrConstantExpr *Create(Constant *C, const std::vector&IdxList, Type *DestTy, unsigned Flags) { GetElementPtrConstantExpr *Result = new(IdxList.size() + 1) GetElementPtrConstantExpr(C, IdxList, DestTy); Result->SubclassOptionalData = Flags; return Result; } 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; }; class CompareConstantExpr : public ConstantExpr { virtual void anchor(); void *operator new(size_t, unsigned); public: void *operator new(size_t s) { return User::operator new(s, 2); } unsigned short predicate; CompareConstantExpr(Type *ty, Instruction::OtherOps opc, unsigned short pred, Constant* LHS, Constant* RHS) : ConstantExpr(ty, opc, &Op<0>(), 2), predicate(pred) { Op<0>() = LHS; Op<1>() = RHS; } 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 inline Use &Op(); template inline const Use &Op() const; public: inline unsigned getNumOperands() const; }; template <> struct OperandTraits : public FixedNumOperandTraits { }; UnaryConstantExpr::op_iterator UnaryConstantExpr::op_begin() { return OperandTraits::op_begin(this); } UnaryConstantExpr::const_op_iterator UnaryConstantExpr::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } UnaryConstantExpr::op_iterator UnaryConstantExpr::op_end() { return OperandTraits::op_end(this); } UnaryConstantExpr::const_op_iterator UnaryConstantExpr::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *UnaryConstantExpr::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 256, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void UnaryConstantExpr::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 256, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned UnaryConstantExpr::getNumOperands() const { return OperandTraits::operands(this); } template Use &UnaryConstantExpr::Op() { return this->OpFrom(this); } template const Use &UnaryConstantExpr::Op() const { return this->OpFrom(this); } template <> struct OperandTraits : public FixedNumOperandTraits { }; BinaryConstantExpr::op_iterator BinaryConstantExpr::op_begin() { return OperandTraits::op_begin(this); } BinaryConstantExpr::const_op_iterator BinaryConstantExpr::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } BinaryConstantExpr::op_iterator BinaryConstantExpr::op_end() { return OperandTraits::op_end(this); } BinaryConstantExpr::const_op_iterator BinaryConstantExpr::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *BinaryConstantExpr::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 262, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void BinaryConstantExpr::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 262, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned BinaryConstantExpr::getNumOperands() const { return OperandTraits::operands(this); } template Use &BinaryConstantExpr::Op() { return this->OpFrom(this); } template const Use &BinaryConstantExpr::Op() const { return this->OpFrom(this); } template <> struct OperandTraits : public FixedNumOperandTraits { }; SelectConstantExpr::op_iterator SelectConstantExpr::op_begin() { return OperandTraits::op_begin(this); } SelectConstantExpr::const_op_iterator SelectConstantExpr::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } SelectConstantExpr::op_iterator SelectConstantExpr::op_end() { return OperandTraits::op_end(this); } SelectConstantExpr::const_op_iterator SelectConstantExpr::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *SelectConstantExpr::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 268, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void SelectConstantExpr::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 268, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned SelectConstantExpr::getNumOperands() const { return OperandTraits::operands(this); } template Use &SelectConstantExpr::Op() { return this->OpFrom(this); } template const Use &SelectConstantExpr::Op() const { return this->OpFrom(this); } template <> struct OperandTraits : public FixedNumOperandTraits { }; ExtractElementConstantExpr::op_iterator ExtractElementConstantExpr::op_begin() { return OperandTraits::op_begin(this); } ExtractElementConstantExpr::const_op_iterator ExtractElementConstantExpr::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } ExtractElementConstantExpr::op_iterator ExtractElementConstantExpr::op_end() { return OperandTraits::op_end(this); } ExtractElementConstantExpr::const_op_iterator ExtractElementConstantExpr::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *ExtractElementConstantExpr::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 274, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void ExtractElementConstantExpr::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 274, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ExtractElementConstantExpr::getNumOperands() const { return OperandTraits::operands(this); } template Use &ExtractElementConstantExpr::Op() { return this->OpFrom(this); } template const Use &ExtractElementConstantExpr::Op() const { return this->OpFrom(this); } template <> struct OperandTraits : public FixedNumOperandTraits { }; InsertElementConstantExpr::op_iterator InsertElementConstantExpr::op_begin() { return OperandTraits::op_begin(this); } InsertElementConstantExpr::const_op_iterator InsertElementConstantExpr::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } InsertElementConstantExpr::op_iterator InsertElementConstantExpr::op_end() { return OperandTraits::op_end(this); } InsertElementConstantExpr::const_op_iterator InsertElementConstantExpr::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *InsertElementConstantExpr::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 280, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void InsertElementConstantExpr::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 280, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned InsertElementConstantExpr::getNumOperands() const { return OperandTraits::operands(this); } template Use &InsertElementConstantExpr::Op() { return this->OpFrom(this); } template const Use &InsertElementConstantExpr::Op() const { return this->OpFrom(this); } template <> struct OperandTraits : public FixedNumOperandTraits { }; ShuffleVectorConstantExpr::op_iterator ShuffleVectorConstantExpr::op_begin() { return OperandTraits::op_begin(this); } ShuffleVectorConstantExpr::const_op_iterator ShuffleVectorConstantExpr::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } ShuffleVectorConstantExpr::op_iterator ShuffleVectorConstantExpr::op_end() { return OperandTraits::op_end(this); } ShuffleVectorConstantExpr::const_op_iterator ShuffleVectorConstantExpr::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *ShuffleVectorConstantExpr::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 286, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void ShuffleVectorConstantExpr::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 286, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ShuffleVectorConstantExpr::getNumOperands() const { return OperandTraits::operands(this); } template Use &ShuffleVectorConstantExpr::Op() { return this->OpFrom(this); } template const Use &ShuffleVectorConstantExpr::Op() const { return this->OpFrom(this); } template <> struct OperandTraits : public FixedNumOperandTraits { }; ExtractValueConstantExpr::op_iterator ExtractValueConstantExpr::op_begin() { return OperandTraits::op_begin(this); } ExtractValueConstantExpr::const_op_iterator ExtractValueConstantExpr::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } ExtractValueConstantExpr::op_iterator ExtractValueConstantExpr::op_end() { return OperandTraits::op_end(this); } ExtractValueConstantExpr::const_op_iterator ExtractValueConstantExpr::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *ExtractValueConstantExpr::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 292, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void ExtractValueConstantExpr::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 292, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned ExtractValueConstantExpr::getNumOperands() const { return OperandTraits::operands(this); } template Use &ExtractValueConstantExpr::Op() { return this->OpFrom(this); } template const Use &ExtractValueConstantExpr::Op() const { return this->OpFrom(this); } template <> struct OperandTraits : public FixedNumOperandTraits { }; InsertValueConstantExpr::op_iterator InsertValueConstantExpr::op_begin() { return OperandTraits::op_begin(this); } InsertValueConstantExpr::const_op_iterator InsertValueConstantExpr::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } InsertValueConstantExpr::op_iterator InsertValueConstantExpr::op_end() { return OperandTraits::op_end(this); } InsertValueConstantExpr::const_op_iterator InsertValueConstantExpr::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *InsertValueConstantExpr::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 298, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void InsertValueConstantExpr::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 298, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned InsertValueConstantExpr::getNumOperands() const { return OperandTraits::operands(this); } template Use &InsertValueConstantExpr::Op() { return this->OpFrom(this); } template const Use &InsertValueConstantExpr::Op() const { return this->OpFrom(this); } template <> struct OperandTraits : public VariadicOperandTraits { }; GetElementPtrConstantExpr::op_iterator GetElementPtrConstantExpr::op_begin() { return OperandTraits::op_begin(this); } GetElementPtrConstantExpr::const_op_iterator GetElementPtrConstantExpr::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } GetElementPtrConstantExpr::op_iterator GetElementPtrConstantExpr::op_end() { return OperandTraits::op_end(this); } GetElementPtrConstantExpr::const_op_iterator GetElementPtrConstantExpr::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *GetElementPtrConstantExpr::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 305, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void GetElementPtrConstantExpr::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 305, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned GetElementPtrConstantExpr::getNumOperands() const { return OperandTraits::operands(this); } template Use &GetElementPtrConstantExpr::Op() { return this->OpFrom(this); } template const Use &GetElementPtrConstantExpr::Op() const { return this->OpFrom(this); } template <> struct OperandTraits : public FixedNumOperandTraits { }; CompareConstantExpr::op_iterator CompareConstantExpr::op_begin() { return OperandTraits::op_begin(this); } CompareConstantExpr::const_op_iterator CompareConstantExpr::op_begin() const { return OperandTraits::op_begin(const_cast(this)); } CompareConstantExpr::op_iterator CompareConstantExpr::op_end() { return OperandTraits::op_end(this); } CompareConstantExpr::const_op_iterator CompareConstantExpr::op_end() const { return OperandTraits::op_end(const_cast(this)); } Value *CompareConstantExpr::getOperand(unsigned i_nocapture) const { ((i_nocapture < OperandTraits::operands(this) && "getOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"getOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 312, __PRETTY_FUNCTION__)); return cast_or_null( OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); } void CompareConstantExpr::setOperand(unsigned i_nocapture, Value *Val_nocapture) { ((i_nocapture < OperandTraits::operands(this) && "setOperand() out of range!") ? static_cast (0) : __assert_fail ("i_nocapture < OperandTraits::operands(this) && \"setOperand() out of range!\"", "../llvm/lib/VMCore/ConstantsContext.h", 312, __PRETTY_FUNCTION__)); OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; } unsigned CompareConstantExpr::getNumOperands() const { return OperandTraits::operands(this); } template Use &CompareConstantExpr::Op() { return this->OpFrom(this); } template const Use &CompareConstantExpr::Op() const { return this->OpFrom(this); } struct ExprMapKeyType { ExprMapKeyType(unsigned opc, ArrayRef ops, unsigned short flags = 0, unsigned short optionalflags = 0, ArrayRef inds = ArrayRef()) : opcode(opc), subclassoptionaldata(optionalflags), subclassdata(flags), operands(ops.begin(), ops.end()), indices(inds.begin(), inds.end()) {} uint8_t opcode; uint8_t subclassoptionaldata; uint16_t subclassdata; std::vector operands; SmallVector indices; bool operator==(const ExprMapKeyType& that) const { return this->opcode == that.opcode && this->subclassdata == that.subclassdata && this->subclassoptionaldata == that.subclassoptionaldata && this->operands == that.operands && this->indices == that.indices; } bool operator<(const ExprMapKeyType & that) const { if (this->opcode != that.opcode) return this->opcode < that.opcode; if (this->operands != that.operands) return this->operands < that.operands; if (this->subclassdata != that.subclassdata) return this->subclassdata < that.subclassdata; if (this->subclassoptionaldata != that.subclassoptionaldata) return this->subclassoptionaldata < that.subclassoptionaldata; if (this->indices != that.indices) return this->indices < that.indices; return false; } bool operator!=(const ExprMapKeyType& that) const { return !(*this == that); } }; struct InlineAsmKeyType { InlineAsmKeyType(StringRef AsmString, StringRef Constraints, bool hasSideEffects, bool isAlignStack) : asm_string(AsmString), constraints(Constraints), has_side_effects(hasSideEffects), is_align_stack(isAlignStack) {} std::string asm_string; std::string constraints; bool has_side_effects; bool is_align_stack; bool operator==(const InlineAsmKeyType& that) const { return this->asm_string == that.asm_string && this->constraints == that.constraints && this->has_side_effects == that.has_side_effects && this->is_align_stack == that.is_align_stack; } bool operator<(const InlineAsmKeyType& that) const { if (this->asm_string != that.asm_string) return this->asm_string < that.asm_string; if (this->constraints != that.constraints) return this->constraints < that.constraints; if (this->has_side_effects != that.has_side_effects) return this->has_side_effects < that.has_side_effects; if (this->is_align_stack != that.is_align_stack) return this->is_align_stack < that.is_align_stack; return false; } bool operator!=(const InlineAsmKeyType& that) const { return !(*this == that); } }; # 390 "../llvm/lib/VMCore/ConstantsContext.h" template struct ConstantTraits< std::vector > { static unsigned uses(const std::vector& v) { return v.size(); } }; template<> struct ConstantTraits { static unsigned uses(Constant * const & v) { return 1; } }; template struct ConstantCreator { static ConstantClass *create(TypeClass *Ty, const ValType &V) { return new(ConstantTraits::uses(V)) ConstantClass(Ty, V); } }; template struct ConstantKeyData { typedef void ValType; static ValType getValType(ConstantClass *C) { ::llvm::llvm_unreachable_internal("Unknown Constant type!", "../llvm/lib/VMCore/ConstantsContext.h", 415); } }; template<> struct ConstantCreator { static ConstantExpr *create(Type *Ty, const ExprMapKeyType &V, unsigned short pred = 0) { if (Instruction::isCast(V.opcode)) return new UnaryConstantExpr(V.opcode, V.operands[0], Ty); if ((V.opcode >= Instruction::BinaryOpsBegin && V.opcode < Instruction::BinaryOpsEnd)) return new BinaryConstantExpr(V.opcode, V.operands[0], V.operands[1], V.subclassoptionaldata); if (V.opcode == Instruction::Select) return new SelectConstantExpr(V.operands[0], V.operands[1], V.operands[2]); if (V.opcode == Instruction::ExtractElement) return new ExtractElementConstantExpr(V.operands[0], V.operands[1]); if (V.opcode == Instruction::InsertElement) return new InsertElementConstantExpr(V.operands[0], V.operands[1], V.operands[2]); if (V.opcode == Instruction::ShuffleVector) return new ShuffleVectorConstantExpr(V.operands[0], V.operands[1], V.operands[2]); if (V.opcode == Instruction::InsertValue) return new InsertValueConstantExpr(V.operands[0], V.operands[1], V.indices, Ty); if (V.opcode == Instruction::ExtractValue) return new ExtractValueConstantExpr(V.operands[0], V.indices, Ty); if (V.opcode == Instruction::GetElementPtr) { std::vector IdxList(V.operands.begin()+1, V.operands.end()); return GetElementPtrConstantExpr::Create(V.operands[0], IdxList, Ty, V.subclassoptionaldata); } if (V.opcode == Instruction::ICmp) return new CompareConstantExpr(Ty, Instruction::ICmp, V.subclassdata, V.operands[0], V.operands[1]); if (V.opcode == Instruction::FCmp) return new CompareConstantExpr(Ty, Instruction::FCmp, V.subclassdata, V.operands[0], V.operands[1]); ::llvm::llvm_unreachable_internal("Invalid ConstantExpr!", "../llvm/lib/VMCore/ConstantsContext.h", 460); return 0; } }; template<> struct ConstantKeyData { typedef ExprMapKeyType ValType; static ValType getValType(ConstantExpr *CE) { std::vector Operands; Operands.reserve(CE->getNumOperands()); for (unsigned i = 0, e = CE->getNumOperands(); i != e; ++i) Operands.push_back(cast(CE->getOperand(i))); return ExprMapKeyType(CE->getOpcode(), Operands, CE->isCompare() ? CE->getPredicate() : 0, CE->getRawSubclassOptionalData(), CE->hasIndices() ? CE->getIndices() : ArrayRef()); } }; template struct ConstantCreator { static ConstantAggregateZero *create(Type *Ty, const ValType &V){ return new ConstantAggregateZero(Ty); } }; template<> struct ConstantKeyData { typedef std::vector ValType; static ValType getValType(ConstantVector *CP) { std::vector Elements; Elements.reserve(CP->getNumOperands()); for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i) Elements.push_back(CP->getOperand(i)); return Elements; } }; template<> struct ConstantKeyData { typedef char ValType; static ValType getValType(ConstantAggregateZero *C) { return 0; } }; template<> struct ConstantKeyData { typedef std::vector ValType; static ValType getValType(ConstantArray *CA) { std::vector Elements; Elements.reserve(CA->getNumOperands()); for (unsigned i = 0, e = CA->getNumOperands(); i != e; ++i) Elements.push_back(cast(CA->getOperand(i))); return Elements; } }; template<> struct ConstantKeyData { typedef std::vector ValType; static ValType getValType(ConstantStruct *CS) { std::vector Elements; Elements.reserve(CS->getNumOperands()); for (unsigned i = 0, e = CS->getNumOperands(); i != e; ++i) Elements.push_back(cast(CS->getOperand(i))); return Elements; } }; template struct ConstantCreator { static ConstantPointerNull *create(PointerType *Ty, const ValType &V){ return new ConstantPointerNull(Ty); } }; template<> struct ConstantKeyData { typedef char ValType; static ValType getValType(ConstantPointerNull *C) { return 0; } }; template struct ConstantCreator { static UndefValue *create(Type *Ty, const ValType &V) { return new UndefValue(Ty); } }; template<> struct ConstantKeyData { typedef char ValType; static ValType getValType(UndefValue *C) { return 0; } }; template<> struct ConstantCreator { static InlineAsm *create(PointerType *Ty, const InlineAsmKeyType &Key) { return new InlineAsm(Ty, Key.asm_string, Key.constraints, Key.has_side_effects, Key.is_align_stack); } }; template<> struct ConstantKeyData { typedef InlineAsmKeyType ValType; static ValType getValType(InlineAsm *Asm) { return InlineAsmKeyType(Asm->getAsmString(), Asm->getConstraintString(), Asm->hasSideEffects(), Asm->isAlignStack()); } }; template class ConstantUniqueMap { public: typedef std::pair MapKey; typedef std::map MapTy; typedef std::map InverseMapTy; private: MapTy Map; InverseMapTy InverseMap; public: typename MapTy::iterator map_begin() { return Map.begin(); } typename MapTy::iterator map_end() { return Map.end(); } void freeConstants() { for (typename MapTy::iterator I=Map.begin(), E=Map.end(); I != E; ++I) { delete I->second; } } typename MapTy::iterator InsertOrGetItem(std::pair &InsertVal, bool &Exists) { std::pair IP = Map.insert(InsertVal); Exists = !IP.second; return IP.first; } private: typename MapTy::iterator FindExistingElement(ConstantClass *CP) { if (HasLargeKey) { typename InverseMapTy::iterator IMI = InverseMap.find(CP); ((IMI != InverseMap.end() && IMI->second != Map.end() && IMI->second->second == CP && "InverseMap corrupt!") ? static_cast (0) : __assert_fail ("IMI != InverseMap.end() && IMI->second != Map.end() && IMI->second->second == CP && \"InverseMap corrupt!\"", "../llvm/lib/VMCore/ConstantsContext.h" # 630 "../llvm/lib/VMCore/ConstantsContext.h" , 632 # 630 "../llvm/lib/VMCore/ConstantsContext.h" , __PRETTY_FUNCTION__)) ; return IMI->second; } typename MapTy::iterator I = Map.find(MapKey(static_cast(CP->getType()), ConstantKeyData::getValType(CP))); if (I == Map.end() || I->second != CP) { for (I = Map.begin(); I != Map.end() && I->second != CP; ++I) ; } return I; } ConstantClass *Create(TypeClass *Ty, ValRefType V, typename MapTy::iterator I) { ConstantClass* Result = ConstantCreator::create(Ty, V); ((Result->getType() == Ty && "Type specified is not correct!") ? static_cast (0) : __assert_fail ("Result->getType() == Ty && \"Type specified is not correct!\"", "../llvm/lib/VMCore/ConstantsContext.h", 653, __PRETTY_FUNCTION__)); I = Map.insert(I, std::make_pair(MapKey(Ty, V), Result)); if (HasLargeKey) InverseMap.insert(std::make_pair(Result, I)); return Result; } public: ConstantClass *getOrCreate(TypeClass *Ty, ValRefType V) { MapKey Lookup(Ty, V); ConstantClass* Result = 0; typename MapTy::iterator I = Map.find(Lookup); if (I != Map.end()) Result = I->second; if (!Result) { Result = Create(Ty, V, I); } return Result; } void remove(ConstantClass *CP) { typename MapTy::iterator I = FindExistingElement(CP); ((I != Map.end() && "Constant not found in constant table!") ? static_cast (0) : __assert_fail ("I != Map.end() && \"Constant not found in constant table!\"", "../llvm/lib/VMCore/ConstantsContext.h", 684, __PRETTY_FUNCTION__)); ((I->second == CP && "Didn't find correct element?") ? static_cast (0) : __assert_fail ("I->second == CP && \"Didn't find correct element?\"", "../llvm/lib/VMCore/ConstantsContext.h", 685, __PRETTY_FUNCTION__)); if (HasLargeKey) InverseMap.erase(CP); Map.erase(I); } void MoveConstantToNewSlot(ConstantClass *C, typename MapTy::iterator I) { typename MapTy::iterator OldI = FindExistingElement(C); ((OldI != Map.end() && "Constant not found in constant table!") ? static_cast (0) : __assert_fail ("OldI != Map.end() && \"Constant not found in constant table!\"", "../llvm/lib/VMCore/ConstantsContext.h", 699, __PRETTY_FUNCTION__)); ((OldI->second == C && "Didn't find correct element?") ? static_cast (0) : __assert_fail ("OldI->second == C && \"Didn't find correct element?\"", "../llvm/lib/VMCore/ConstantsContext.h", 700, __PRETTY_FUNCTION__)); Map.erase(OldI); if (HasLargeKey) { ((I->second == C && "Bad inversemap entry!") ? static_cast (0) : __assert_fail ("I->second == C && \"Bad inversemap entry!\"", "../llvm/lib/VMCore/ConstantsContext.h", 708, __PRETTY_FUNCTION__)); InverseMap[C] = I; } } void dump() const { do { if (::llvm::DebugFlag && ::llvm::isCurrentDebugType("")) { dbgs() << "Constant.cpp: ConstantUniqueMap\n"; } } while (0); } }; } # 20 "../llvm/lib/VMCore/LLVMContextImpl.h" 2 # 1 "../llvm/lib/VMCore/LeaksContext.h" 1 # 16 "../llvm/lib/VMCore/LeaksContext.h" # 1 "../llvm/include/llvm/ADT/SmallPtrSet.h" 1 # 18 "../llvm/include/llvm/ADT/SmallPtrSet.h" # 1 "/usr/include/c++/4.5/cassert" 1 3 # 43 "/usr/include/c++/4.5/cassert" 3 # 44 "/usr/include/c++/4.5/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/include/c++/4.5/cassert" 2 3 # 19 "../llvm/include/llvm/ADT/SmallPtrSet.h" 2 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 20 "../llvm/include/llvm/ADT/SmallPtrSet.h" 2 # 1 "/usr/include/c++/4.5/cstring" 1 3 # 41 "/usr/include/c++/4.5/cstring" 3 # 42 "/usr/include/c++/4.5/cstring" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 45 "/usr/include/c++/4.5/cstring" 2 3 # 21 "../llvm/include/llvm/ADT/SmallPtrSet.h" 2 namespace llvm { class SmallPtrSetIteratorImpl; # 47 "../llvm/include/llvm/ADT/SmallPtrSet.h" class SmallPtrSetImpl { friend class SmallPtrSetIteratorImpl; protected: const void **SmallArray; const void **CurArray; unsigned CurArraySize; unsigned NumElements; unsigned NumTombstones; SmallPtrSetImpl(const void **SmallStorage, const SmallPtrSetImpl& that); explicit SmallPtrSetImpl(const void **SmallStorage, unsigned SmallSize) : SmallArray(SmallStorage), CurArray(SmallStorage), CurArraySize(SmallSize) { ((SmallSize && (SmallSize & (SmallSize-1)) == 0 && "Initial size must be a power of two!") ? static_cast (0) : __assert_fail ("SmallSize && (SmallSize & (SmallSize-1)) == 0 && \"Initial size must be a power of two!\"", "../llvm/include/llvm/ADT/SmallPtrSet.h" # 68 "../llvm/include/llvm/ADT/SmallPtrSet.h" , 69 # 68 "../llvm/include/llvm/ADT/SmallPtrSet.h" , __PRETTY_FUNCTION__)) ; CurArray[SmallSize] = 0; clear(); } ~SmallPtrSetImpl(); public: bool empty() const { return size() == 0; } unsigned size() const { return NumElements; } void clear() { if (!isSmall() && NumElements*4 < CurArraySize && CurArraySize > 32) return shrink_and_clear(); memset(CurArray, -1, CurArraySize*sizeof(void*)); NumElements = 0; NumTombstones = 0; } protected: static void *getTombstoneMarker() { return reinterpret_cast(-2); } static void *getEmptyMarker() { return reinterpret_cast(-1); } bool insert_imp(const void * Ptr); bool erase_imp(const void * Ptr); bool count_imp(const void * Ptr) const { if (isSmall()) { for (const void *const *APtr = SmallArray, *const *E = SmallArray+NumElements; APtr != E; ++APtr) if (*APtr == Ptr) return true; return false; } return *FindBucketFor(Ptr) == Ptr; } private: bool isSmall() const { return CurArray == SmallArray; } unsigned Hash(const void *Ptr) const { return static_cast(((uintptr_t)Ptr >> 4) & (CurArraySize-1)); } const void * const *FindBucketFor(const void *Ptr) const; void shrink_and_clear(); void Grow(unsigned NewSize); void operator=(const SmallPtrSetImpl &RHS); protected: void CopyFrom(const SmallPtrSetImpl &RHS); }; class SmallPtrSetIteratorImpl { protected: const void *const *Bucket; public: explicit SmallPtrSetIteratorImpl(const void *const *BP) : Bucket(BP) { AdvanceIfNotValid(); } bool operator==(const SmallPtrSetIteratorImpl &RHS) const { return Bucket == RHS.Bucket; } bool operator!=(const SmallPtrSetIteratorImpl &RHS) const { return Bucket != RHS.Bucket; } protected: void AdvanceIfNotValid() { while (*Bucket == SmallPtrSetImpl::getEmptyMarker() || *Bucket == SmallPtrSetImpl::getTombstoneMarker()) ++Bucket; } }; template class SmallPtrSetIterator : public SmallPtrSetIteratorImpl { typedef PointerLikeTypeTraits PtrTraits; public: typedef PtrTy value_type; typedef PtrTy reference; typedef PtrTy pointer; typedef std::ptrdiff_t difference_type; typedef std::forward_iterator_tag iterator_category; explicit SmallPtrSetIterator(const void *const *BP) : SmallPtrSetIteratorImpl(BP) {} const PtrTy operator*() const { return PtrTraits::getFromVoidPointer(const_cast(*Bucket)); } inline SmallPtrSetIterator& operator++() { ++Bucket; AdvanceIfNotValid(); return *this; } SmallPtrSetIterator operator++(int) { SmallPtrSetIterator tmp = *this; ++*this; return tmp; } }; template struct RoundUpToPowerOfTwo; template struct RoundUpToPowerOfTwoH { enum { Val = N }; }; template struct RoundUpToPowerOfTwoH { enum { Val = RoundUpToPowerOfTwo<(N|(N-1)) + 1>::Val }; }; template struct RoundUpToPowerOfTwo { enum { Val = RoundUpToPowerOfTwoH::Val }; }; template class SmallPtrSet : public SmallPtrSetImpl { enum { SmallSizePowTwo = RoundUpToPowerOfTwo::Val }; const void *SmallStorage[SmallSizePowTwo+1]; typedef PointerLikeTypeTraits PtrTraits; public: SmallPtrSet() : SmallPtrSetImpl(SmallStorage, SmallSizePowTwo) {} SmallPtrSet(const SmallPtrSet &that) : SmallPtrSetImpl(SmallStorage, that) {} template SmallPtrSet(It I, It E) : SmallPtrSetImpl(SmallStorage, SmallSizePowTwo) { insert(I, E); } bool insert(PtrType Ptr) { return insert_imp(PtrTraits::getAsVoidPointer(Ptr)); } bool erase(PtrType Ptr) { return erase_imp(PtrTraits::getAsVoidPointer(Ptr)); } bool count(PtrType Ptr) const { return count_imp(PtrTraits::getAsVoidPointer(Ptr)); } template void insert(IterT I, IterT E) { for (; I != E; ++I) insert(*I); } typedef SmallPtrSetIterator iterator; typedef SmallPtrSetIterator const_iterator; inline iterator begin() const { return iterator(CurArray); } inline iterator end() const { return iterator(CurArray+CurArraySize); } const SmallPtrSet& operator=(const SmallPtrSet &RHS) { CopyFrom(RHS); return *this; } }; } # 17 "../llvm/lib/VMCore/LeaksContext.h" 2 namespace llvm { template struct PrinterTrait { static void print(const T* P) { errs() << P; } }; template<> struct PrinterTrait { static void print(const Value* P) { errs() << *P; } }; template struct LeakDetectorImpl { explicit LeakDetectorImpl(const char* const name = "") : Cache(0), Name(name) { } void clear() { Cache = 0; Ts.clear(); } void setName(const char* n) { Name = n; } void addGarbage(const T* o) { ((Ts.count(o) == 0 && "Object already in set!") ? static_cast (0) : __assert_fail ("Ts.count(o) == 0 && \"Object already in set!\"", "../llvm/lib/VMCore/LeaksContext.h", 50, __PRETTY_FUNCTION__)); if (Cache) { ((Cache != o && "Object already in set!") ? static_cast (0) : __assert_fail ("Cache != o && \"Object already in set!\"", "../llvm/lib/VMCore/LeaksContext.h", 52, __PRETTY_FUNCTION__)); Ts.insert(Cache); } Cache = o; } void removeGarbage(const T* o) { if (o == Cache) Cache = 0; else Ts.erase(o); } bool hasGarbage(const std::string& Message) { addGarbage(0); ((Cache == 0 && "No value should be cached anymore!") ? static_cast (0) : __assert_fail ("Cache == 0 && \"No value should be cached anymore!\"", "../llvm/lib/VMCore/LeaksContext.h", 68, __PRETTY_FUNCTION__)); if (!Ts.empty()) { errs() << "Leaked " << Name << " objects found: " << Message << ":\n"; for (typename SmallPtrSet::iterator I = Ts.begin(), E = Ts.end(); I != E; ++I) { errs() << '\t'; PrinterTrait::print(*I); errs() << '\n'; } errs() << '\n'; return true; } return false; } private: SmallPtrSet Ts; const T* Cache; const char* Name; }; } # 21 "../llvm/lib/VMCore/LLVMContextImpl.h" 2 # 1 "../llvm/include/llvm/Metadata.h" 1 # 21 "../llvm/include/llvm/Metadata.h" # 1 "../llvm/include/llvm/ADT/FoldingSet.h" 1 # 23 "../llvm/include/llvm/ADT/FoldingSet.h" namespace llvm { class APFloat; class APInt; class BumpPtrAllocator; # 102 "../llvm/include/llvm/ADT/FoldingSet.h" class FoldingSetNodeID; # 111 "../llvm/include/llvm/ADT/FoldingSet.h" class FoldingSetImpl { protected: void **Buckets; unsigned NumBuckets; unsigned NumNodes; public: explicit FoldingSetImpl(unsigned Log2InitSize = 6); virtual ~FoldingSetImpl(); class Node { private: void *NextInFoldingSetBucket; public: Node() : NextInFoldingSetBucket(0) {} void *getNextInBucket() const { return NextInFoldingSetBucket; } void SetNextInBucket(void *N) { NextInFoldingSetBucket = N; } }; void clear(); bool RemoveNode(Node *N); Node *GetOrInsertNode(Node *N); Node *FindNodeOrInsertPos(const FoldingSetNodeID &ID, void *&InsertPos); void InsertNode(Node *N, void *InsertPos); void InsertNode(Node *N) { Node *Inserted = GetOrInsertNode(N); (void)Inserted; ((Inserted == N && "Node already inserted!") ? static_cast (0) : __assert_fail ("Inserted == N && \"Node already inserted!\"", "../llvm/include/llvm/ADT/FoldingSet.h", 174, __PRETTY_FUNCTION__)); } unsigned size() const { return NumNodes; } bool empty() const { return NumNodes == 0; } private: void GrowHashTable(); protected: virtual void GetNodeProfile(Node *N, FoldingSetNodeID &ID) const = 0; virtual bool NodeEquals(Node *N, const FoldingSetNodeID &ID, FoldingSetNodeID &TempID) const=0; virtual unsigned ComputeNodeHash(Node *N, FoldingSetNodeID &TempID) const = 0; }; template struct FoldingSetTrait; template struct DefaultFoldingSetTrait { static void Profile(const T &X, FoldingSetNodeID &ID) { X.Profile(ID); } static void Profile(T &X, FoldingSetNodeID &ID) { X.Profile(ID); } static inline bool Equals(T &X, const FoldingSetNodeID &ID, FoldingSetNodeID &TempID); static inline unsigned ComputeHash(T &X, FoldingSetNodeID &TempID); }; template struct FoldingSetTrait : public DefaultFoldingSetTrait {}; template struct ContextualFoldingSetTrait; template struct DefaultContextualFoldingSetTrait { static void Profile(T &X, FoldingSetNodeID &ID, Ctx Context) { X.Profile(ID, Context); } static inline bool Equals(T &X, const FoldingSetNodeID &ID, FoldingSetNodeID &TempID, Ctx Context); static inline unsigned ComputeHash(T &X, FoldingSetNodeID &TempID, Ctx Context); }; template struct ContextualFoldingSetTrait : public DefaultContextualFoldingSetTrait {}; class FoldingSetNodeIDRef { const unsigned *Data; size_t Size; public: FoldingSetNodeIDRef() : Data(0), Size(0) {} FoldingSetNodeIDRef(const unsigned *D, size_t S) : Data(D), Size(S) {} unsigned ComputeHash() const; bool operator==(FoldingSetNodeIDRef) const; const unsigned *getData() const { return Data; } size_t getSize() const { return Size; } }; class FoldingSetNodeID { SmallVector Bits; public: FoldingSetNodeID() {} FoldingSetNodeID(FoldingSetNodeIDRef Ref) : Bits(Ref.getData(), Ref.getData() + Ref.getSize()) {} void AddPointer(const void *Ptr); void AddInteger(signed I); void AddInteger(unsigned I); void AddInteger(long I); void AddInteger(unsigned long I); void AddInteger(long long I); void AddInteger(unsigned long long I); void AddBoolean(bool B) { AddInteger(B ? 1U : 0U); } void AddString(StringRef String); void AddNodeID(const FoldingSetNodeID &ID); template inline void Add(const T &x) { FoldingSetTrait::Profile(x, *this); } inline void clear() { Bits.clear(); } unsigned ComputeHash() const; bool operator==(const FoldingSetNodeID &RHS) const; bool operator==(const FoldingSetNodeIDRef RHS) const; FoldingSetNodeIDRef Intern(BumpPtrAllocator &Allocator) const; }; typedef FoldingSetImpl::Node FoldingSetNode; template class FoldingSetIterator; template class FoldingSetBucketIterator; template inline bool DefaultFoldingSetTrait::Equals(T &X, const FoldingSetNodeID &ID, FoldingSetNodeID &TempID) { FoldingSetTrait::Profile(X, TempID); return TempID == ID; } template inline unsigned DefaultFoldingSetTrait::ComputeHash(T &X, FoldingSetNodeID &TempID) { FoldingSetTrait::Profile(X, TempID); return TempID.ComputeHash(); } template inline bool DefaultContextualFoldingSetTrait::Equals(T &X, const FoldingSetNodeID &ID, FoldingSetNodeID &TempID, Ctx Context) { ContextualFoldingSetTrait::Profile(X, TempID, Context); return TempID == ID; } template inline unsigned DefaultContextualFoldingSetTrait::ComputeHash(T &X, FoldingSetNodeID &TempID, Ctx Context) { ContextualFoldingSetTrait::Profile(X, TempID, Context); return TempID.ComputeHash(); } template class FoldingSet : public FoldingSetImpl { private: virtual void GetNodeProfile(Node *N, FoldingSetNodeID &ID) const { T *TN = static_cast(N); FoldingSetTrait::Profile(*TN, ID); } virtual bool NodeEquals(Node *N, const FoldingSetNodeID &ID, FoldingSetNodeID &TempID) const { T *TN = static_cast(N); return FoldingSetTrait::Equals(*TN, ID, TempID); } virtual unsigned ComputeNodeHash(Node *N, FoldingSetNodeID &TempID) const { T *TN = static_cast(N); return FoldingSetTrait::ComputeHash(*TN, TempID); } public: explicit FoldingSet(unsigned Log2InitSize = 6) : FoldingSetImpl(Log2InitSize) {} typedef FoldingSetIterator iterator; iterator begin() { return iterator(Buckets); } iterator end() { return iterator(Buckets+NumBuckets); } typedef FoldingSetIterator const_iterator; const_iterator begin() const { return const_iterator(Buckets); } const_iterator end() const { return const_iterator(Buckets+NumBuckets); } typedef FoldingSetBucketIterator bucket_iterator; bucket_iterator bucket_begin(unsigned hash) { return bucket_iterator(Buckets + (hash & (NumBuckets-1))); } bucket_iterator bucket_end(unsigned hash) { return bucket_iterator(Buckets + (hash & (NumBuckets-1)), true); } T *GetOrInsertNode(Node *N) { return static_cast(FoldingSetImpl::GetOrInsertNode(N)); } T *FindNodeOrInsertPos(const FoldingSetNodeID &ID, void *&InsertPos) { return static_cast(FoldingSetImpl::FindNodeOrInsertPos(ID, InsertPos)); } }; # 450 "../llvm/include/llvm/ADT/FoldingSet.h" template class ContextualFoldingSet : public FoldingSetImpl { private: Ctx Context; virtual void GetNodeProfile(FoldingSetImpl::Node *N, FoldingSetNodeID &ID) const { T *TN = static_cast(N); ContextualFoldingSetTrait::Profile(*TN, ID, Context); } virtual bool NodeEquals(FoldingSetImpl::Node *N, const FoldingSetNodeID &ID, FoldingSetNodeID &TempID) const { T *TN = static_cast(N); return ContextualFoldingSetTrait::Equals(*TN, ID, TempID, Context); } virtual unsigned ComputeNodeHash(FoldingSetImpl::Node *N, FoldingSetNodeID &TempID) const { T *TN = static_cast(N); return ContextualFoldingSetTrait::ComputeHash(*TN, TempID, Context); } public: explicit ContextualFoldingSet(Ctx Context, unsigned Log2InitSize = 6) : FoldingSetImpl(Log2InitSize), Context(Context) {} Ctx getContext() const { return Context; } typedef FoldingSetIterator iterator; iterator begin() { return iterator(Buckets); } iterator end() { return iterator(Buckets+NumBuckets); } typedef FoldingSetIterator const_iterator; const_iterator begin() const { return const_iterator(Buckets); } const_iterator end() const { return const_iterator(Buckets+NumBuckets); } typedef FoldingSetBucketIterator bucket_iterator; bucket_iterator bucket_begin(unsigned hash) { return bucket_iterator(Buckets + (hash & (NumBuckets-1))); } bucket_iterator bucket_end(unsigned hash) { return bucket_iterator(Buckets + (hash & (NumBuckets-1)), true); } T *GetOrInsertNode(Node *N) { return static_cast(FoldingSetImpl::GetOrInsertNode(N)); } T *FindNodeOrInsertPos(const FoldingSetNodeID &ID, void *&InsertPos) { return static_cast(FoldingSetImpl::FindNodeOrInsertPos(ID, InsertPos)); } }; class FoldingSetIteratorImpl { protected: FoldingSetNode *NodePtr; FoldingSetIteratorImpl(void **Bucket); void advance(); public: bool operator==(const FoldingSetIteratorImpl &RHS) const { return NodePtr == RHS.NodePtr; } bool operator!=(const FoldingSetIteratorImpl &RHS) const { return NodePtr != RHS.NodePtr; } }; template class FoldingSetIterator : public FoldingSetIteratorImpl { public: explicit FoldingSetIterator(void **Bucket) : FoldingSetIteratorImpl(Bucket) {} T &operator*() const { return *static_cast(NodePtr); } T *operator->() const { return static_cast(NodePtr); } inline FoldingSetIterator &operator++() { advance(); return *this; } FoldingSetIterator operator++(int) { FoldingSetIterator tmp = *this; ++*this; return tmp; } }; class FoldingSetBucketIteratorImpl { protected: void *Ptr; explicit FoldingSetBucketIteratorImpl(void **Bucket); FoldingSetBucketIteratorImpl(void **Bucket, bool) : Ptr(Bucket) {} void advance() { void *Probe = static_cast(Ptr)->getNextInBucket(); uintptr_t x = reinterpret_cast(Probe) & ~0x1; Ptr = reinterpret_cast(x); } public: bool operator==(const FoldingSetBucketIteratorImpl &RHS) const { return Ptr == RHS.Ptr; } bool operator!=(const FoldingSetBucketIteratorImpl &RHS) const { return Ptr != RHS.Ptr; } }; template class FoldingSetBucketIterator : public FoldingSetBucketIteratorImpl { public: explicit FoldingSetBucketIterator(void **Bucket) : FoldingSetBucketIteratorImpl(Bucket) {} FoldingSetBucketIterator(void **Bucket, bool) : FoldingSetBucketIteratorImpl(Bucket, true) {} T &operator*() const { return *static_cast(Ptr); } T *operator->() const { return static_cast(Ptr); } inline FoldingSetBucketIterator &operator++() { advance(); return *this; } FoldingSetBucketIterator operator++(int) { FoldingSetBucketIterator tmp = *this; ++*this; return tmp; } }; template class FoldingSetNodeWrapper : public FoldingSetNode { T data; public: explicit FoldingSetNodeWrapper(const T &x) : data(x) {} virtual ~FoldingSetNodeWrapper() {} template explicit FoldingSetNodeWrapper(const A1 &a1) : data(a1) {} template explicit FoldingSetNodeWrapper(const A1 &a1, const A2 &a2) : data(a1,a2) {} template explicit FoldingSetNodeWrapper(const A1 &a1, const A2 &a2, const A3 &a3) : data(a1,a2,a3) {} template explicit FoldingSetNodeWrapper(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) : data(a1,a2,a3,a4) {} template explicit FoldingSetNodeWrapper(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5) : data(a1,a2,a3,a4,a5) {} void Profile(FoldingSetNodeID &ID) { FoldingSetTrait::Profile(data, ID); } T &getValue() { return data; } const T &getValue() const { return data; } operator T&() { return data; } operator const T&() const { return data; } }; class FastFoldingSetNode : public FoldingSetNode { FoldingSetNodeID FastID; protected: explicit FastFoldingSetNode(const FoldingSetNodeID &ID) : FastID(ID) {} public: void Profile(FoldingSetNodeID &ID) const { ID.AddNodeID(FastID); } }; template struct FoldingSetTrait { static inline void Profile(T *X, FoldingSetNodeID &ID) { ID.AddPointer(X); } }; } # 22 "../llvm/include/llvm/Metadata.h" 2 namespace llvm { class Constant; class Instruction; class LLVMContext; class Module; template class SmallVectorImpl; template class SymbolTableListTraits; class MDString : public Value { virtual void anchor(); MDString(const MDString &); StringRef Str; explicit MDString(LLVMContext &C, StringRef S); public: 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 { return Str; } unsigned getLength() const { return (unsigned)Str.size(); } typedef StringRef::iterator iterator; iterator begin() const { return Str.begin(); } iterator end() const { return Str.end(); } static inline bool classof(const MDString *) { return true; } static bool classof(const Value *V) { return V->getValueID() == MDStringVal; } }; class MDNodeOperand; class MDNode : public Value, public FoldingSetNode { MDNode(const MDNode &); void operator=(const MDNode &); friend class MDNodeOperand; friend class LLVMContextImpl; unsigned NumOperands; enum { FunctionLocalBit = 1 << 0, NotUniquedBit = 1 << 1, DestroyFlag = 1 << 2 }; enum FunctionLocalness { FL_Unknown = -1, FL_No = 0, FL_Yes = 1 }; void replaceOperand(MDNodeOperand *Op, Value *NewVal); ~MDNode(); MDNode(LLVMContext &C, ArrayRef Vals, bool isFunctionLocal); static MDNode *getMDNode(LLVMContext &C, ArrayRef Vals, FunctionLocalness FL, bool Insert = true); public: static MDNode *get(LLVMContext &Context, ArrayRef Vals); static MDNode *getWhenValsUnresolved(LLVMContext &Context, ArrayRef Vals, bool isFunctionLocal); static MDNode *getIfExists(LLVMContext &Context, ArrayRef Vals); static MDNode *getTemporary(LLVMContext &Context, ArrayRef Vals); static void deleteTemporary(MDNode *N); Value *getOperand(unsigned i) const; unsigned getNumOperands() const { return NumOperands; } bool isFunctionLocal() const { return (getSubclassDataFromValue() & FunctionLocalBit) != 0; } const Function *getFunction() const; void Profile(FoldingSetNodeID &ID) const; static inline bool classof(const MDNode *) { return true; } static bool classof(const Value *V) { return V->getValueID() == MDNodeVal; } private: void destroy(); bool isNotUniqued() const { return (getSubclassDataFromValue() & NotUniquedBit) != 0; } void setIsNotUniqued(); void setValueSubclassData(unsigned short D) { Value::setValueSubclassData(D); } }; class NamedMDNode : public ilist_node { friend class SymbolTableListTraits; friend struct ilist_traits; friend class LLVMContextImpl; friend class Module; NamedMDNode(const NamedMDNode &); std::string Name; Module *Parent; void *Operands; void setParent(Module *M) { Parent = M; } explicit NamedMDNode(const Twine &N); public: void eraseFromParent(); void dropAllReferences(); ~NamedMDNode(); inline Module *getParent() { return Parent; } inline const Module *getParent() const { return Parent; } MDNode *getOperand(unsigned i) const; unsigned getNumOperands() const; void addOperand(MDNode *M); StringRef getName() const; void print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW = 0) const; void dump() const; }; } # 24 "../llvm/lib/VMCore/LLVMContextImpl.h" 2 # 1 "../llvm/include/llvm/Support/ValueHandle.h" 1 # 21 "../llvm/include/llvm/Support/ValueHandle.h" namespace llvm { class ValueHandleBase; template<> class PointerLikeTypeTraits { public: static inline void *getAsVoidPointer(ValueHandleBase** P) { return P; } static inline ValueHandleBase **getFromVoidPointer(void *P) { return static_cast(P); } enum { NumLowBitsAvailable = 2 }; }; class ValueHandleBase { friend class Value; protected: enum HandleBaseKind { Assert, Callback, Tracking, Weak }; private: PointerIntPair PrevPair; ValueHandleBase *Next; Value *VP; explicit ValueHandleBase(const ValueHandleBase&); public: explicit ValueHandleBase(HandleBaseKind Kind) : PrevPair(0, Kind), Next(0), VP(0) {} ValueHandleBase(HandleBaseKind Kind, Value *V) : PrevPair(0, Kind), Next(0), VP(V) { if (isValid(VP)) AddToUseList(); } ValueHandleBase(HandleBaseKind Kind, const ValueHandleBase &RHS) : PrevPair(0, Kind), Next(0), VP(RHS.VP) { if (isValid(VP)) AddToExistingUseList(RHS.getPrevPtr()); } ~ValueHandleBase() { if (isValid(VP)) RemoveFromUseList(); } Value *operator=(Value *RHS) { if (VP == RHS) return RHS; if (isValid(VP)) RemoveFromUseList(); VP = RHS; if (isValid(VP)) AddToUseList(); return RHS; } Value *operator=(const ValueHandleBase &RHS) { if (VP == RHS.VP) return RHS.VP; if (isValid(VP)) RemoveFromUseList(); VP = RHS.VP; if (isValid(VP)) AddToExistingUseList(RHS.getPrevPtr()); return VP; } Value *operator->() const { return getValPtr(); } Value &operator*() const { return *getValPtr(); } protected: Value *getValPtr() const { return VP; } static bool isValid(Value *V) { return V && V != DenseMapInfo::getEmptyKey() && V != DenseMapInfo::getTombstoneKey(); } private: static void ValueIsDeleted(Value *V); static void ValueIsRAUWd(Value *Old, Value *New); ValueHandleBase **getPrevPtr() const { return PrevPair.getPointer(); } HandleBaseKind getKind() const { return PrevPair.getInt(); } void setPrevPtr(ValueHandleBase **Ptr) { PrevPair.setPointer(Ptr); } void AddToExistingUseList(ValueHandleBase **List); void AddToExistingUseListAfter(ValueHandleBase *Node); void AddToUseList(); void RemoveFromUseList(); }; class WeakVH : public ValueHandleBase { public: WeakVH() : ValueHandleBase(Weak) {} WeakVH(Value *P) : ValueHandleBase(Weak, P) {} WeakVH(const WeakVH &RHS) : ValueHandleBase(Weak, RHS) {} Value *operator=(Value *RHS) { return ValueHandleBase::operator=(RHS); } Value *operator=(const ValueHandleBase &RHS) { return ValueHandleBase::operator=(RHS); } operator Value*() const { return getValPtr(); } }; template struct simplify_type; template<> struct simplify_type { typedef Value* SimpleType; static SimpleType getSimplifiedValue(const WeakVH &WVH) { return static_cast(WVH); } }; template<> struct simplify_type : public simplify_type {}; # 177 "../llvm/include/llvm/Support/ValueHandle.h" template class AssertingVH : public ValueHandleBase { ValueTy *getValPtr() const { return static_cast(ValueHandleBase::getValPtr()); } void setValPtr(ValueTy *P) { ValueHandleBase::operator=(GetAsValue(P)); } # 199 "../llvm/include/llvm/Support/ValueHandle.h" static Value *GetAsValue(Value *V) { return V; } static Value *GetAsValue(const Value *V) { return const_cast(V); } public: AssertingVH() : ValueHandleBase(Assert) {} AssertingVH(ValueTy *P) : ValueHandleBase(Assert, GetAsValue(P)) {} AssertingVH(const AssertingVH &RHS) : ValueHandleBase(Assert, RHS) {} operator ValueTy*() const { return getValPtr(); } ValueTy *operator=(ValueTy *RHS) { setValPtr(RHS); return getValPtr(); } ValueTy *operator=(const AssertingVH &RHS) { setValPtr(RHS.getValPtr()); return getValPtr(); } ValueTy *operator->() const { return getValPtr(); } ValueTy &operator*() const { return *getValPtr(); } }; template struct simplify_type; template<> struct simplify_type > { typedef Value* SimpleType; static SimpleType getSimplifiedValue(const AssertingVH &AVH) { return static_cast(AVH); } }; template<> struct simplify_type > : public simplify_type > {}; template struct DenseMapInfo > { typedef DenseMapInfo PointerInfo; static inline AssertingVH getEmptyKey() { return AssertingVH(PointerInfo::getEmptyKey()); } static inline T* getTombstoneKey() { return AssertingVH(PointerInfo::getTombstoneKey()); } static unsigned getHashValue(const AssertingVH &Val) { return PointerInfo::getHashValue(Val); } static bool isEqual(const AssertingVH &LHS, const AssertingVH &RHS) { return LHS == RHS; } }; template struct isPodLike > { static const bool value = false; }; # 281 "../llvm/include/llvm/Support/ValueHandle.h" template class TrackingVH : public ValueHandleBase { void CheckValidity() const { Value *VP = ValueHandleBase::getValPtr(); if (!VP) return; ((ValueHandleBase::isValid(VP) && "Tracked Value was deleted!") ? static_cast (0) : __assert_fail ("ValueHandleBase::isValid(VP) && \"Tracked Value was deleted!\"", "../llvm/include/llvm/Support/ValueHandle.h", 292, __PRETTY_FUNCTION__)); ((isa(VP) && "Tracked Value was replaced by one with an invalid type!") ? static_cast (0) : __assert_fail ("isa(VP) && \"Tracked Value was replaced by one with an invalid type!\"", "../llvm/include/llvm/Support/ValueHandle.h" # 298 "../llvm/include/llvm/Support/ValueHandle.h" , 299 # 298 "../llvm/include/llvm/Support/ValueHandle.h" , __PRETTY_FUNCTION__)) ; } ValueTy *getValPtr() const { CheckValidity(); return (ValueTy*)ValueHandleBase::getValPtr(); } void setValPtr(ValueTy *P) { CheckValidity(); ValueHandleBase::operator=(GetAsValue(P)); } static Value *GetAsValue(Value *V) { return V; } static Value *GetAsValue(const Value *V) { return const_cast(V); } public: TrackingVH() : ValueHandleBase(Tracking) {} TrackingVH(ValueTy *P) : ValueHandleBase(Tracking, GetAsValue(P)) {} TrackingVH(const TrackingVH &RHS) : ValueHandleBase(Tracking, RHS) {} operator ValueTy*() const { return getValPtr(); } ValueTy *operator=(ValueTy *RHS) { setValPtr(RHS); return getValPtr(); } ValueTy *operator=(const TrackingVH &RHS) { setValPtr(RHS.getValPtr()); return getValPtr(); } ValueTy *operator->() const { return getValPtr(); } ValueTy &operator*() const { return *getValPtr(); } }; template struct simplify_type; template<> struct simplify_type > { typedef Value* SimpleType; static SimpleType getSimplifiedValue(const TrackingVH &AVH) { return static_cast(AVH); } }; template<> struct simplify_type > : public simplify_type > {}; class CallbackVH : public ValueHandleBase { protected: CallbackVH(const CallbackVH &RHS) : ValueHandleBase(Callback, RHS) {} virtual ~CallbackVH(); void setValPtr(Value *P) { ValueHandleBase::operator=(P); } public: CallbackVH() : ValueHandleBase(Callback) {} CallbackVH(Value *P) : ValueHandleBase(Callback, P) {} operator Value*() const { return getValPtr(); } # 383 "../llvm/include/llvm/Support/ValueHandle.h" virtual void deleted() { setValPtr(__null); } virtual void allUsesReplacedWith(Value *) {} }; template struct simplify_type; template<> struct simplify_type { typedef Value* SimpleType; static SimpleType getSimplifiedValue(const CallbackVH &CVH) { return static_cast(CVH); } }; template<> struct simplify_type : public simplify_type {}; } # 25 "../llvm/lib/VMCore/LLVMContextImpl.h" 2 # 1 "../llvm/include/llvm/ADT/DenseMap.h" 1 # 25 "../llvm/include/llvm/ADT/DenseMap.h" # 1 "/usr/include/c++/4.5/cassert" 1 3 # 43 "/usr/include/c++/4.5/cassert" 3 # 44 "/usr/include/c++/4.5/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/include/c++/4.5/cassert" 2 3 # 26 "../llvm/include/llvm/ADT/DenseMap.h" 2 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 27 "../llvm/include/llvm/ADT/DenseMap.h" 2 # 1 "/usr/include/c++/4.5/cstring" 1 3 # 41 "/usr/include/c++/4.5/cstring" 3 # 42 "/usr/include/c++/4.5/cstring" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 45 "/usr/include/c++/4.5/cstring" 2 3 # 28 "../llvm/include/llvm/ADT/DenseMap.h" 2 namespace llvm { template, typename ValueInfoT = DenseMapInfo, bool IsConst = false> class DenseMapIterator; template, typename ValueInfoT = DenseMapInfo > class DenseMap { typedef std::pair BucketT; unsigned NumBuckets; BucketT *Buckets; unsigned NumEntries; unsigned NumTombstones; public: typedef KeyT key_type; typedef ValueT mapped_type; typedef BucketT value_type; DenseMap(const DenseMap &other) { NumBuckets = 0; CopyFrom(other); } explicit DenseMap(unsigned NumInitBuckets = 0) { init(NumInitBuckets); } template DenseMap(const InputIt &I, const InputIt &E) { init(NextPowerOf2(std::distance(I, E))); insert(I, E); } ~DenseMap() { const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey(); for (BucketT *P = Buckets, *E = Buckets+NumBuckets; P != E; ++P) { if (!KeyInfoT::isEqual(P->first, EmptyKey) && !KeyInfoT::isEqual(P->first, TombstoneKey)) P->second.~ValueT(); P->first.~KeyT(); } if (NumBuckets) memset((void*)Buckets, 0x5a, sizeof(BucketT)*NumBuckets); operator delete(Buckets); } typedef DenseMapIterator iterator; typedef DenseMapIterator const_iterator; inline iterator begin() { return empty() ? end() : iterator(Buckets, Buckets+NumBuckets); } inline iterator end() { return iterator(Buckets+NumBuckets, Buckets+NumBuckets); } inline const_iterator begin() const { return empty() ? end() : const_iterator(Buckets, Buckets+NumBuckets); } inline const_iterator end() const { return const_iterator(Buckets+NumBuckets, Buckets+NumBuckets); } bool empty() const { return NumEntries == 0; } unsigned size() const { return NumEntries; } void resize(size_t Size) { if (Size > NumBuckets) grow(Size); } void clear() { if (NumEntries == 0 && NumTombstones == 0) return; if (NumEntries * 4 < NumBuckets && NumBuckets > 64) { shrink_and_clear(); return; } const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey(); for (BucketT *P = Buckets, *E = Buckets+NumBuckets; P != E; ++P) { if (!KeyInfoT::isEqual(P->first, EmptyKey)) { if (!KeyInfoT::isEqual(P->first, TombstoneKey)) { P->second.~ValueT(); --NumEntries; } P->first = EmptyKey; } } ((NumEntries == 0 && "Node count imbalance!") ? static_cast (0) : __assert_fail ("NumEntries == 0 && \"Node count imbalance!\"", "../llvm/include/llvm/ADT/DenseMap.h", 127, __PRETTY_FUNCTION__)); NumTombstones = 0; } bool count(const KeyT &Val) const { BucketT *TheBucket; return LookupBucketFor(Val, TheBucket); } iterator find(const KeyT &Val) { BucketT *TheBucket; if (LookupBucketFor(Val, TheBucket)) return iterator(TheBucket, Buckets+NumBuckets); return end(); } const_iterator find(const KeyT &Val) const { BucketT *TheBucket; if (LookupBucketFor(Val, TheBucket)) return const_iterator(TheBucket, Buckets+NumBuckets); return end(); } ValueT lookup(const KeyT &Val) const { BucketT *TheBucket; if (LookupBucketFor(Val, TheBucket)) return TheBucket->second; return ValueT(); } std::pair insert(const std::pair &KV) { BucketT *TheBucket; if (LookupBucketFor(KV.first, TheBucket)) return std::make_pair(iterator(TheBucket, Buckets+NumBuckets), false); TheBucket = InsertIntoBucket(KV.first, KV.second, TheBucket); return std::make_pair(iterator(TheBucket, Buckets+NumBuckets), true); } template 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->second.~ValueT(); TheBucket->first = getTombstoneKey(); --NumEntries; ++NumTombstones; return true; } void erase(iterator I) { BucketT *TheBucket = &*I; TheBucket->second.~ValueT(); TheBucket->first = getTombstoneKey(); --NumEntries; ++NumTombstones; } void swap(DenseMap& RHS) { std::swap(NumBuckets, RHS.NumBuckets); std::swap(Buckets, RHS.Buckets); std::swap(NumEntries, RHS.NumEntries); std::swap(NumTombstones, RHS.NumTombstones); } value_type& FindAndConstruct(const KeyT &Key) { BucketT *TheBucket; if (LookupBucketFor(Key, TheBucket)) return *TheBucket; return *InsertIntoBucket(Key, ValueT(), TheBucket); } ValueT &operator[](const KeyT &Key) { return FindAndConstruct(Key).second; } DenseMap& operator=(const DenseMap& other) { CopyFrom(other); return *this; } bool isPointerIntoBucketsArray(const void *Ptr) const { return Ptr >= Buckets && Ptr < Buckets+NumBuckets; } const void *getPointerIntoBucketsArray() const { return Buckets; } private: void CopyFrom(const DenseMap& other) { if (NumBuckets != 0 && (!isPodLike::value || !isPodLike::value)) { const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey(); for (BucketT *P = Buckets, *E = Buckets+NumBuckets; P != E; ++P) { if (!KeyInfoT::isEqual(P->first, EmptyKey) && !KeyInfoT::isEqual(P->first, TombstoneKey)) P->second.~ValueT(); P->first.~KeyT(); } } NumEntries = other.NumEntries; NumTombstones = other.NumTombstones; if (NumBuckets) { memset((void*)Buckets, 0x5a, sizeof(BucketT)*NumBuckets); operator delete(Buckets); } NumBuckets = other.NumBuckets; if (NumBuckets == 0) { Buckets = 0; return; } Buckets = static_cast(operator new(sizeof(BucketT) * NumBuckets)); if (isPodLike::value && isPodLike::value) memcpy(Buckets, other.Buckets, NumBuckets * sizeof(BucketT)); else for (size_t i = 0; i < NumBuckets; ++i) { new (&Buckets[i].first) KeyT(other.Buckets[i].first); if (!KeyInfoT::isEqual(Buckets[i].first, getEmptyKey()) && !KeyInfoT::isEqual(Buckets[i].first, getTombstoneKey())) new (&Buckets[i].second) ValueT(other.Buckets[i].second); } } BucketT *InsertIntoBucket(const KeyT &Key, const ValueT &Value, BucketT *TheBucket) { # 291 "../llvm/include/llvm/ADT/DenseMap.h" ++NumEntries; if (NumEntries*4 >= NumBuckets*3) { this->grow(NumBuckets * 2); LookupBucketFor(Key, TheBucket); } if (NumBuckets-(NumEntries+NumTombstones) < NumBuckets/8) { this->grow(NumBuckets); LookupBucketFor(Key, TheBucket); } if (!KeyInfoT::isEqual(TheBucket->first, getEmptyKey())) --NumTombstones; TheBucket->first = Key; new (&TheBucket->second) ValueT(Value); return TheBucket; } static unsigned getHashValue(const KeyT &Val) { return KeyInfoT::getHashValue(Val); } static const KeyT getEmptyKey() { return KeyInfoT::getEmptyKey(); } static const KeyT getTombstoneKey() { return KeyInfoT::getTombstoneKey(); } bool LookupBucketFor(const KeyT &Val, BucketT *&FoundBucket) const { unsigned BucketNo = getHashValue(Val); unsigned ProbeAmt = 1; BucketT *BucketsPtr = Buckets; if (NumBuckets == 0) { FoundBucket = 0; return false; } BucketT *FoundTombstone = 0; const KeyT EmptyKey = getEmptyKey(); const KeyT TombstoneKey = getTombstoneKey(); ((!KeyInfoT::isEqual(Val, EmptyKey) && !KeyInfoT::isEqual(Val, TombstoneKey) && "Empty/Tombstone value shouldn't be inserted into map!") ? static_cast (0) : __assert_fail ("!KeyInfoT::isEqual(Val, EmptyKey) && !KeyInfoT::isEqual(Val, TombstoneKey) && \"Empty/Tombstone value shouldn't be inserted into map!\"", "../llvm/include/llvm/ADT/DenseMap.h" # 338 "../llvm/include/llvm/ADT/DenseMap.h" , 340 # 338 "../llvm/include/llvm/ADT/DenseMap.h" , __PRETTY_FUNCTION__)) ; while (1) { BucketT *ThisBucket = BucketsPtr + (BucketNo & (NumBuckets-1)); if (KeyInfoT::isEqual(ThisBucket->first, Val)) { FoundBucket = ThisBucket; return true; } if (KeyInfoT::isEqual(ThisBucket->first, EmptyKey)) { if (FoundTombstone) ThisBucket = FoundTombstone; FoundBucket = FoundTombstone ? FoundTombstone : ThisBucket; return false; } if (KeyInfoT::isEqual(ThisBucket->first, TombstoneKey) && !FoundTombstone) FoundTombstone = ThisBucket; BucketNo += ProbeAmt++; } } void init(unsigned InitBuckets) { NumEntries = 0; NumTombstones = 0; NumBuckets = InitBuckets; if (InitBuckets == 0) { Buckets = 0; return; } ((InitBuckets && (InitBuckets & (InitBuckets-1)) == 0 && "# initial buckets must be a power of two!") ? static_cast (0) : __assert_fail ("InitBuckets && (InitBuckets & (InitBuckets-1)) == 0 && \"# initial buckets must be a power of two!\"", "../llvm/include/llvm/ADT/DenseMap.h" # 381 "../llvm/include/llvm/ADT/DenseMap.h" , 382 # 381 "../llvm/include/llvm/ADT/DenseMap.h" , __PRETTY_FUNCTION__)) ; Buckets = static_cast(operator new(sizeof(BucketT)*InitBuckets)); const KeyT EmptyKey = getEmptyKey(); for (unsigned i = 0; i != InitBuckets; ++i) new (&Buckets[i].first) KeyT(EmptyKey); } void grow(unsigned AtLeast) { unsigned OldNumBuckets = NumBuckets; BucketT *OldBuckets = Buckets; if (NumBuckets < 64) NumBuckets = 64; while (NumBuckets < AtLeast) NumBuckets <<= 1; NumTombstones = 0; Buckets = static_cast(operator new(sizeof(BucketT)*NumBuckets)); const KeyT EmptyKey = getEmptyKey(); for (unsigned i = 0, e = NumBuckets; i != e; ++i) new (&Buckets[i].first) KeyT(EmptyKey); const KeyT TombstoneKey = getTombstoneKey(); for (BucketT *B = OldBuckets, *E = OldBuckets+OldNumBuckets; B != E; ++B) { if (!KeyInfoT::isEqual(B->first, EmptyKey) && !KeyInfoT::isEqual(B->first, TombstoneKey)) { BucketT *DestBucket; bool FoundVal = LookupBucketFor(B->first, DestBucket); (void)FoundVal; ((!FoundVal && "Key already in new map?") ? static_cast (0) : __assert_fail ("!FoundVal && \"Key already in new map?\"", "../llvm/include/llvm/ADT/DenseMap.h", 417, __PRETTY_FUNCTION__)); DestBucket->first = B->first; new (&DestBucket->second) ValueT(B->second); B->second.~ValueT(); } B->first.~KeyT(); } if (OldNumBuckets) memset((void*)OldBuckets, 0x5a, sizeof(BucketT)*OldNumBuckets); operator delete(OldBuckets); } void shrink_and_clear() { unsigned OldNumBuckets = NumBuckets; BucketT *OldBuckets = Buckets; NumBuckets = NumEntries > 32 ? 1 << (Log2_32_Ceil(NumEntries) + 1) : 64; NumTombstones = 0; Buckets = static_cast(operator new(sizeof(BucketT)*NumBuckets)); const KeyT EmptyKey = getEmptyKey(); for (unsigned i = 0, e = NumBuckets; i != e; ++i) new (&Buckets[i].first) KeyT(EmptyKey); const KeyT TombstoneKey = getTombstoneKey(); for (BucketT *B = OldBuckets, *E = OldBuckets+OldNumBuckets; B != E; ++B) { if (!KeyInfoT::isEqual(B->first, EmptyKey) && !KeyInfoT::isEqual(B->first, TombstoneKey)) { B->second.~ValueT(); } B->first.~KeyT(); } memset((void*)OldBuckets, 0x5a, sizeof(BucketT)*OldNumBuckets); operator delete(OldBuckets); NumEntries = 0; } public: size_t getMemorySize() const { return NumBuckets * sizeof(BucketT); } }; template class DenseMapIterator { typedef std::pair Bucket; typedef DenseMapIterator ConstIterator; friend class DenseMapIterator; public: typedef ptrdiff_t difference_type; typedef typename conditional::type value_type; typedef value_type *pointer; typedef value_type &reference; typedef std::forward_iterator_tag iterator_category; private: pointer Ptr, End; public: DenseMapIterator() : Ptr(0), End(0) {} DenseMapIterator(pointer Pos, pointer E) : Ptr(Pos), End(E) { AdvancePastEmptyBuckets(); } DenseMapIterator(const DenseMapIterator& I) : Ptr(I.Ptr), End(I.End) {} reference operator*() const { return *Ptr; } pointer operator->() const { return Ptr; } bool operator==(const ConstIterator &RHS) const { return Ptr == RHS.operator->(); } bool operator!=(const ConstIterator &RHS) const { return Ptr != RHS.operator->(); } inline DenseMapIterator& operator++() { ++Ptr; AdvancePastEmptyBuckets(); return *this; } DenseMapIterator operator++(int) { DenseMapIterator tmp = *this; ++*this; return tmp; } private: void AdvancePastEmptyBuckets() { const KeyT Empty = KeyInfoT::getEmptyKey(); const KeyT Tombstone = KeyInfoT::getTombstoneKey(); while (Ptr != End && (KeyInfoT::isEqual(Ptr->first, Empty) || KeyInfoT::isEqual(Ptr->first, Tombstone))) ++Ptr; } }; template static inline size_t capacity_in_bytes(const DenseMap &X) { return X.getMemorySize(); } } # 29 "../llvm/lib/VMCore/LLVMContextImpl.h" 2 # 1 "../llvm/include/llvm/ADT/StringMap.h" 1 # 18 "../llvm/include/llvm/ADT/StringMap.h" # 1 "../llvm/include/llvm/Support/Allocator.h" 1 # 17 "../llvm/include/llvm/Support/Allocator.h" # 1 "../llvm/include/llvm/Support/AlignOf.h" 1 # 18 "../llvm/include/llvm/Support/AlignOf.h" namespace llvm { template struct AlignmentCalcImpl { char x; T t; private: AlignmentCalcImpl() {} }; # 35 "../llvm/include/llvm/Support/AlignOf.h" template struct AlignOf { enum { Alignment = static_cast(sizeof(AlignmentCalcImpl) - sizeof(T)) }; enum { Alignment_GreaterEqual_2Bytes = Alignment >= 2 ? 1 : 0 }; enum { Alignment_GreaterEqual_4Bytes = Alignment >= 4 ? 1 : 0 }; enum { Alignment_GreaterEqual_8Bytes = Alignment >= 8 ? 1 : 0 }; enum { Alignment_GreaterEqual_16Bytes = Alignment >= 16 ? 1 : 0 }; enum { Alignment_LessEqual_2Bytes = Alignment <= 2 ? 1 : 0 }; enum { Alignment_LessEqual_4Bytes = Alignment <= 4 ? 1 : 0 }; enum { Alignment_LessEqual_8Bytes = Alignment <= 8 ? 1 : 0 }; enum { Alignment_LessEqual_16Bytes = Alignment <= 16 ? 1 : 0 }; }; template static inline unsigned alignOf() { return AlignOf::Alignment; } } # 18 "../llvm/include/llvm/Support/Allocator.h" 2 # 1 "/usr/include/c++/4.5/cassert" 1 3 # 43 "/usr/include/c++/4.5/cassert" 3 # 44 "/usr/include/c++/4.5/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/include/c++/4.5/cassert" 2 3 # 22 "../llvm/include/llvm/Support/Allocator.h" 2 # 1 "/usr/include/c++/4.5/cstdlib" 1 3 # 41 "/usr/include/c++/4.5/cstdlib" 3 # 42 "/usr/include/c++/4.5/cstdlib" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 45 "/usr/include/c++/4.5/cstdlib" 2 3 # 23 "../llvm/include/llvm/Support/Allocator.h" 2 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 24 "../llvm/include/llvm/Support/Allocator.h" 2 namespace llvm { template struct ReferenceAdder { typedef T& result; }; template struct ReferenceAdder { typedef T result; }; class MallocAllocator { public: MallocAllocator() {} ~MallocAllocator() {} void Reset() {} void *Allocate(size_t Size, size_t ) { return malloc(Size); } template T *Allocate() { return static_cast(malloc(sizeof(T))); } template T *Allocate(size_t Num) { return static_cast(malloc(sizeof(T)*Num)); } void Deallocate(const void *Ptr) { free(const_cast(Ptr)); } void PrintStats() const {} }; class MemSlab { public: size_t Size; MemSlab *NextPtr; }; class SlabAllocator { public: virtual ~SlabAllocator(); virtual MemSlab *Allocate(size_t Size) = 0; virtual void Deallocate(MemSlab *Slab) = 0; }; class MallocSlabAllocator : public SlabAllocator { MallocAllocator Allocator; public: MallocSlabAllocator() : Allocator() { } virtual ~MallocSlabAllocator(); virtual MemSlab *Allocate(size_t Size); virtual void Deallocate(MemSlab *Slab); }; class BumpPtrAllocator { BumpPtrAllocator(const BumpPtrAllocator &); void operator=(const BumpPtrAllocator &); size_t SlabSize; size_t SizeThreshold; SlabAllocator &Allocator; MemSlab *CurSlab; char *CurPtr; char *End; size_t BytesAllocated; static char *AlignPtr(char *Ptr, size_t Alignment); void StartNewSlab(); void DeallocateSlabs(MemSlab *Slab); static MallocSlabAllocator DefaultSlabAllocator; template friend class SpecificBumpPtrAllocator; public: BumpPtrAllocator(size_t size = 4096, size_t threshold = 4096, SlabAllocator &allocator = DefaultSlabAllocator); ~BumpPtrAllocator(); void Reset(); void *Allocate(size_t Size, size_t Alignment); template T *Allocate() { return static_cast(Allocate(sizeof(T),AlignOf::Alignment)); } template T *Allocate(size_t Num) { return static_cast(Allocate(Num * sizeof(T), AlignOf::Alignment)); } template T *Allocate(size_t Num, size_t Alignment) { size_t EltSize = (sizeof(T)+Alignment-1)&(-Alignment); return static_cast(Allocate(Num * EltSize, Alignment)); } void Deallocate(const void * ) {} unsigned GetNumSlabs() const; void PrintStats() const; size_t getTotalMemory() const; }; template class SpecificBumpPtrAllocator { BumpPtrAllocator Allocator; public: SpecificBumpPtrAllocator(size_t size = 4096, size_t threshold = 4096, SlabAllocator &allocator = BumpPtrAllocator::DefaultSlabAllocator) : Allocator(size, threshold, allocator) {} ~SpecificBumpPtrAllocator() { DestroyAll(); } void DestroyAll() { MemSlab *Slab = Allocator.CurSlab; while (Slab) { char *End = Slab == Allocator.CurSlab ? Allocator.CurPtr : (char *)Slab + Slab->Size; for (char *Ptr = (char*)(Slab+1); Ptr < End; Ptr += sizeof(T)) { Ptr = Allocator.AlignPtr(Ptr, alignOf()); if (Ptr + sizeof(T) <= End) reinterpret_cast(Ptr)->~T(); } Slab = Slab->NextPtr; } Allocator.Reset(); } T *Allocate(size_t num = 1) { return Allocator.Allocate(num); } }; } inline void *operator new(size_t Size, llvm::BumpPtrAllocator &Allocator) { struct S { char c; union { double D; long double LD; long long L; void *P; } x; }; return Allocator.Allocate(Size, std::min((size_t)llvm::NextPowerOf2(Size), __builtin_offsetof (S, x))); } inline void operator delete(void *, llvm::BumpPtrAllocator &) {} # 19 "../llvm/include/llvm/ADT/StringMap.h" 2 # 1 "/usr/include/c++/4.5/cstring" 1 3 # 41 "/usr/include/c++/4.5/cstring" 3 # 42 "/usr/include/c++/4.5/cstring" 3 # 1 "/usr/include/c++/4.5/cstddef" 1 3 # 41 "/usr/include/c++/4.5/cstddef" 3 # 42 "/usr/include/c++/4.5/cstddef" 3 # 1 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 1 3 4 # 45 "/usr/include/c++/4.5/cstddef" 2 3 # 45 "/usr/include/c++/4.5/cstring" 2 3 # 20 "../llvm/include/llvm/ADT/StringMap.h" 2 namespace llvm { template class StringMapConstIterator; template class StringMapIterator; template class StringMapEntry; template class StringMapEntryInitializer { public: template static void Initialize(StringMapEntry &T, InitTy InitVal) { T.second = InitVal; } }; class StringMapEntryBase { unsigned StrLen; public: explicit StringMapEntryBase(unsigned Len) : StrLen(Len) {} unsigned getKeyLength() const { return StrLen; } }; class StringMapImpl { public: struct ItemBucket { unsigned FullHashValue; StringMapEntryBase *Item; }; protected: ItemBucket *TheTable; unsigned NumBuckets; unsigned NumItems; unsigned NumTombstones; unsigned ItemSize; protected: explicit StringMapImpl(unsigned itemSize) : ItemSize(itemSize) { TheTable = 0; NumBuckets = 0; NumItems = 0; NumTombstones = 0; } StringMapImpl(unsigned InitSize, unsigned ItemSize); void RehashTable(); unsigned LookupBucketFor(StringRef Key); int FindKey(StringRef Key) const; void RemoveKey(StringMapEntryBase *V); StringMapEntryBase *RemoveKey(StringRef Key); private: void init(unsigned Size); public: static StringMapEntryBase *getTombstoneVal() { return (StringMapEntryBase*)-1; } unsigned getNumBuckets() const { return NumBuckets; } unsigned getNumItems() const { return NumItems; } bool empty() const { return NumItems == 0; } unsigned size() const { return NumItems; } }; template class StringMapEntry : public StringMapEntryBase { public: ValueTy second; explicit StringMapEntry(unsigned strLen) : StringMapEntryBase(strLen), second() {} StringMapEntry(unsigned strLen, const ValueTy &V) : StringMapEntryBase(strLen), second(V) {} StringRef getKey() const { return StringRef(getKeyData(), getKeyLength()); } const ValueTy &getValue() const { return second; } ValueTy &getValue() { return second; } void setValue(const ValueTy &V) { second = V; } const char *getKeyData() const {return reinterpret_cast(this+1);} StringRef first() const { return StringRef(getKeyData(), getKeyLength()); } template static StringMapEntry *Create(const char *KeyStart, const char *KeyEnd, AllocatorTy &Allocator, InitType InitVal) { unsigned KeyLength = static_cast(KeyEnd-KeyStart); unsigned AllocSize = static_cast(sizeof(StringMapEntry))+ KeyLength+1; unsigned Alignment = alignOf(); StringMapEntry *NewItem = static_cast(Allocator.Allocate(AllocSize,Alignment)); new (NewItem) StringMapEntry(KeyLength); char *StrBuffer = const_cast(NewItem->getKeyData()); memcpy(StrBuffer, KeyStart, KeyLength); StrBuffer[KeyLength] = 0; StringMapEntryInitializer::Initialize(*NewItem, InitVal); return NewItem; } template static StringMapEntry *Create(const char *KeyStart, const char *KeyEnd, AllocatorTy &Allocator) { return Create(KeyStart, KeyEnd, Allocator, 0); } template static StringMapEntry *Create(const char *KeyStart, const char *KeyEnd, InitType InitVal) { MallocAllocator A; return Create(KeyStart, KeyEnd, A, InitVal); } static StringMapEntry *Create(const char *KeyStart, const char *KeyEnd) { return Create(KeyStart, KeyEnd, ValueTy()); } static StringMapEntry &GetStringMapEntryFromValue(ValueTy &V) { StringMapEntry *EPtr = 0; char *Ptr = reinterpret_cast(&V) - (reinterpret_cast(&EPtr->second) - reinterpret_cast(EPtr)); return *reinterpret_cast(Ptr); } static const StringMapEntry &GetStringMapEntryFromValue(const ValueTy &V) { return GetStringMapEntryFromValue(const_cast(V)); } static StringMapEntry &GetStringMapEntryFromKeyData(const char *KeyData) { char *Ptr = const_cast(KeyData) - sizeof(StringMapEntry); return *reinterpret_cast(Ptr); } template void Destroy(AllocatorTy &Allocator) { this->~StringMapEntry(); Allocator.Deallocate(this); } void Destroy() { MallocAllocator A; Destroy(A); } }; template class StringMap : public StringMapImpl { AllocatorTy Allocator; typedef StringMapEntry MapEntryTy; public: StringMap() : StringMapImpl(static_cast(sizeof(MapEntryTy))) {} explicit StringMap(unsigned InitialSize) : StringMapImpl(InitialSize, static_cast(sizeof(MapEntryTy))) {} explicit StringMap(AllocatorTy A) : StringMapImpl(static_cast(sizeof(MapEntryTy))), Allocator(A) {} explicit StringMap(const StringMap &RHS) : StringMapImpl(static_cast(sizeof(MapEntryTy))) { ((RHS.empty() && "Copy ctor from non-empty stringmap not implemented yet!") ? static_cast (0) : __assert_fail ("RHS.empty() && \"Copy ctor from non-empty stringmap not implemented yet!\"", "../llvm/include/llvm/ADT/StringMap.h" # 252 "../llvm/include/llvm/ADT/StringMap.h" , 253 # 252 "../llvm/include/llvm/ADT/StringMap.h" , __PRETTY_FUNCTION__)) ; (void)RHS; } void operator=(const StringMap &RHS) { ((RHS.empty() && "assignment from non-empty stringmap not implemented yet!") ? static_cast (0) : __assert_fail ("RHS.empty() && \"assignment from non-empty stringmap not implemented yet!\"", "../llvm/include/llvm/ADT/StringMap.h" # 257 "../llvm/include/llvm/ADT/StringMap.h" , 258 # 257 "../llvm/include/llvm/ADT/StringMap.h" , __PRETTY_FUNCTION__)) ; (void)RHS; clear(); } typedef typename ReferenceAdder::result AllocatorRefTy; typedef typename ReferenceAdder::result AllocatorCRefTy; AllocatorRefTy getAllocator() { return Allocator; } AllocatorCRefTy getAllocator() const { return Allocator; } typedef const char* key_type; typedef ValueTy mapped_type; typedef StringMapEntry value_type; typedef size_t size_type; typedef StringMapConstIterator const_iterator; typedef StringMapIterator iterator; 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 find(StringRef Key) { int Bucket = FindKey(Key); if (Bucket == -1) return end(); return iterator(TheTable+Bucket); } const_iterator find(StringRef Key) const { int Bucket = FindKey(Key); if (Bucket == -1) return end(); return const_iterator(TheTable+Bucket); } ValueTy lookup(StringRef Key) const { const_iterator it = find(Key); if (it != end()) return it->second; return ValueTy(); } ValueTy &operator[](StringRef Key) { return GetOrCreateValue(Key).getValue(); } size_type count(StringRef Key) const { return find(Key) == end() ? 0 : 1; } bool insert(MapEntryTy *KeyValue) { unsigned BucketNo = LookupBucketFor(KeyValue->getKey()); ItemBucket &Bucket = TheTable[BucketNo]; if (Bucket.Item && Bucket.Item != getTombstoneVal()) return false; if (Bucket.Item == getTombstoneVal()) --NumTombstones; Bucket.Item = KeyValue; ++NumItems; ((NumItems + NumTombstones <= NumBuckets) ? static_cast (0) : __assert_fail ("NumItems + NumTombstones <= NumBuckets", "../llvm/include/llvm/ADT/StringMap.h", 331, __PRETTY_FUNCTION__)); RehashTable(); return true; } void clear() { if (empty()) return; for (ItemBucket *I = TheTable, *E = TheTable+NumBuckets; I != E; ++I) { if (I->Item && I->Item != getTombstoneVal()) { static_cast(I->Item)->Destroy(Allocator); I->Item = 0; } } NumItems = 0; NumTombstones = 0; } template MapEntryTy &GetOrCreateValue(StringRef Key, InitTy Val) { unsigned BucketNo = LookupBucketFor(Key); ItemBucket &Bucket = TheTable[BucketNo]; if (Bucket.Item && Bucket.Item != getTombstoneVal()) return *static_cast(Bucket.Item); MapEntryTy *NewItem = MapEntryTy::Create(Key.begin(), Key.end(), Allocator, Val); if (Bucket.Item == getTombstoneVal()) --NumTombstones; ++NumItems; ((NumItems + NumTombstones <= NumBuckets) ? static_cast (0) : __assert_fail ("NumItems + NumTombstones <= NumBuckets", "../llvm/include/llvm/ADT/StringMap.h", 370, __PRETTY_FUNCTION__)); Bucket.Item = NewItem; RehashTable(); return *NewItem; } MapEntryTy &GetOrCreateValue(StringRef Key) { return GetOrCreateValue(Key, ValueTy()); } 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; } ~StringMap() { clear(); free(TheTable); } }; template class StringMapConstIterator { protected: StringMapImpl::ItemBucket *Ptr; public: typedef StringMapEntry value_type; explicit StringMapConstIterator(StringMapImpl::ItemBucket *Bucket, bool NoAdvance = false) : Ptr(Bucket) { if (!NoAdvance) AdvancePastEmptyBuckets(); } const value_type &operator*() const { return *static_cast*>(Ptr->Item); } const value_type *operator->() const { return static_cast*>(Ptr->Item); } bool operator==(const StringMapConstIterator &RHS) const { return Ptr == RHS.Ptr; } bool operator!=(const StringMapConstIterator &RHS) const { return Ptr != RHS.Ptr; } inline StringMapConstIterator& operator++() { ++Ptr; AdvancePastEmptyBuckets(); return *this; } StringMapConstIterator operator++(int) { StringMapConstIterator tmp = *this; ++*this; return tmp; } private: void AdvancePastEmptyBuckets() { while (Ptr->Item == 0 || Ptr->Item == StringMapImpl::getTombstoneVal()) ++Ptr; } }; template class StringMapIterator : public StringMapConstIterator { public: explicit StringMapIterator(StringMapImpl::ItemBucket *Bucket, bool NoAdvance = false) : StringMapConstIterator(Bucket, NoAdvance) { } StringMapEntry &operator*() const { return *static_cast*>(this->Ptr->Item); } StringMapEntry *operator->() const { return static_cast*>(this->Ptr->Item); } }; } # 32 "../llvm/lib/VMCore/LLVMContextImpl.h" 2 namespace llvm { class ConstantInt; class ConstantFP; class LLVMContext; class Type; class Value; struct DenseMapAPIntKeyInfo { struct KeyTy { APInt val; Type* type; KeyTy(const APInt& V, Type* Ty) : val(V), type(Ty) {} KeyTy(const KeyTy& that) : val(that.val), type(that.type) {} bool operator==(const KeyTy& that) const { return type == that.type && this->val == that.val; } bool operator!=(const KeyTy& that) const { return !this->operator==(that); } }; static inline KeyTy getEmptyKey() { return KeyTy(APInt(1,0), 0); } static inline KeyTy getTombstoneKey() { return KeyTy(APInt(1,1), 0); } static unsigned getHashValue(const KeyTy &Key) { return DenseMapInfo::getHashValue(Key.type) ^ Key.val.getHashValue(); } static bool isEqual(const KeyTy &LHS, const KeyTy &RHS) { return LHS == RHS; } }; struct DenseMapAPFloatKeyInfo { struct KeyTy { APFloat val; KeyTy(const APFloat& V) : val(V){} KeyTy(const KeyTy& that) : val(that.val) {} bool operator==(const KeyTy& that) const { return this->val.bitwiseIsEqual(that.val); } bool operator!=(const KeyTy& that) const { return !this->operator==(that); } }; static inline KeyTy getEmptyKey() { return KeyTy(APFloat(APFloat::Bogus,1)); } static inline KeyTy getTombstoneKey() { return KeyTy(APFloat(APFloat::Bogus,2)); } static unsigned getHashValue(const KeyTy &Key) { return Key.val.getHashValue(); } static bool isEqual(const KeyTy &LHS, const KeyTy &RHS) { return LHS == RHS; } }; class DebugRecVH : public CallbackVH { LLVMContextImpl *Ctx; int Idx; public: DebugRecVH(MDNode *n, LLVMContextImpl *ctx, int idx) : CallbackVH(n), Ctx(ctx), Idx(idx) {} MDNode *get() const { return cast_or_null(getValPtr()); } virtual void deleted(); virtual void allUsesReplacedWith(Value *VNew); }; class LLVMContextImpl { public: SmallPtrSet OwnedModules; LLVMContext::InlineAsmDiagHandlerTy InlineAsmDiagHandler; void *InlineAsmDiagContext; typedef DenseMap IntMapTy; IntMapTy IntConstants; typedef DenseMap FPMapTy; FPMapTy FPConstants; StringMap MDStringCache; FoldingSet MDNodeSet; SmallPtrSet NonUniquedMDNodes; ConstantUniqueMap AggZeroConstants; typedef ConstantUniqueMap, ArrayRef, ArrayType, ConstantArray, true > ArrayConstantsTy; ArrayConstantsTy ArrayConstants; typedef ConstantUniqueMap, ArrayRef, StructType, ConstantStruct, true > StructConstantsTy; StructConstantsTy StructConstants; typedef ConstantUniqueMap, ArrayRef, VectorType, ConstantVector> VectorConstantsTy; VectorConstantsTy VectorConstants; ConstantUniqueMap NullPtrConstants; ConstantUniqueMap UndefValueConstants; DenseMap , BlockAddress*> BlockAddresses; ConstantUniqueMap ExprConstants; ConstantUniqueMap InlineAsms; ConstantInt *TheTrueVal; ConstantInt *TheFalseVal; LeakDetectorImpl LLVMObjects; Type VoidTy, LabelTy, HalfTy, FloatTy, DoubleTy, MetadataTy; Type X86_FP80Ty, FP128Ty, PPC_FP128Ty, X86_MMXTy; IntegerType Int1Ty, Int8Ty, Int16Ty, Int32Ty, Int64Ty; BumpPtrAllocator TypeAllocator; DenseMap IntegerTypes; std::map, FunctionType*> FunctionTypes; std::map, StructType*> AnonStructTypes; StringMap NamedStructTypes; unsigned NamedStructTypesUniqueID; DenseMap, ArrayType*> ArrayTypes; DenseMap, VectorType*> VectorTypes; DenseMap PointerTypes; DenseMap, PointerType*> ASPointerTypes; typedef DenseMap ValueHandlesTy; ValueHandlesTy ValueHandles; StringMap CustomMDKindNames; typedef std::pair > MDPairTy; typedef SmallVector MDMapTy; DenseMap MetadataStore; DenseMap ScopeRecordIdx; std::vector ScopeRecords; DenseMap, int> ScopeInlinedAtIdx; std::vector > ScopeInlinedAtRecords; int getOrAddScopeRecordIdxEntry(MDNode *N, int ExistingIdx); int getOrAddScopeInlinedAtIdxEntry(MDNode *Scope, MDNode *IA,int ExistingIdx); LLVMContextImpl(LLVMContext &C); ~LLVMContextImpl(); }; } # 15 "../llvm/lib/VMCore/Type2.cpp" 2 using namespace llvm; void StructType::setBody(ArrayRef Elements, bool isPacked) { ((isOpaque() && "Struct body already set!") ? static_cast (0) : __assert_fail ("isOpaque() && \"Struct body already set!\"", "../llvm/lib/VMCore/Type2.cpp", 29, __PRETTY_FUNCTION__)); setSubclassData(getSubclassData() | SCDB_HasBody); if (isPacked) setSubclassData(getSubclassData() | SCDB_Packed); Type **Elts = getContext().pImpl-> TypeAllocator.Allocate(Elements.size()); memcpy(Elts, Elements.data(), sizeof(Elements[0])*Elements.size()); ContainedTys = Elts; NumContainedTys = Elements.size(); } PointerType::PointerType(Type *E, unsigned AddrSpace) : SequentialType(PointerTyID, E) { const unsigned oldNCT = NumContainedTys; setSubclassData(AddrSpace); ((oldNCT == NumContainedTys && "bitfield written out of bounds?") ? static_cast (0) : __assert_fail ("oldNCT == NumContainedTys && \"bitfield written out of bounds?\"", "../llvm/lib/VMCore/Type2.cpp", 56, __PRETTY_FUNCTION__)); }