LCOV - code coverage report
Current view: top level - lib/DebugInfo/PDB - PDBExtras.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 0 277 0.0 %
Date: 2017-09-14 15:23:50 Functions: 0 15 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===- PDBExtras.cpp - helper functions and classes for PDBs --------------===//
       2             : //
       3             : //                     The LLVM Compiler Infrastructure
       4             : //
       5             : // This file is distributed under the University of Illinois Open Source
       6             : // License. See LICENSE.TXT for details.
       7             : //
       8             : //===----------------------------------------------------------------------===//
       9             : 
      10             : #include "llvm/DebugInfo/PDB/PDBExtras.h"
      11             : #include "llvm/ADT/ArrayRef.h"
      12             : #include "llvm/DebugInfo/CodeView/Formatters.h"
      13             : #include "llvm/Support/raw_ostream.h"
      14             : 
      15             : using namespace llvm;
      16             : using namespace llvm::pdb;
      17             : 
      18             : #define CASE_OUTPUT_ENUM_CLASS_STR(Class, Value, Str, Stream)                  \
      19             :   case Class::Value:                                                           \
      20             :     Stream << Str;                                                             \
      21             :     break;
      22             : 
      23             : #define CASE_OUTPUT_ENUM_CLASS_NAME(Class, Value, Stream)                      \
      24             :   CASE_OUTPUT_ENUM_CLASS_STR(Class, Value, #Value, Stream)
      25             : 
      26           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
      27             :                                    const PDB_VariantType &Type) {
      28           0 :   switch (Type) {
      29           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_VariantType, Bool, OS)
      30           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_VariantType, Single, OS)
      31           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_VariantType, Double, OS)
      32           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_VariantType, Int8, OS)
      33           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_VariantType, Int16, OS)
      34           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_VariantType, Int32, OS)
      35           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_VariantType, Int64, OS)
      36           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_VariantType, UInt8, OS)
      37           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_VariantType, UInt16, OS)
      38           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_VariantType, UInt32, OS)
      39           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_VariantType, UInt64, OS)
      40           0 :     default:
      41           0 :       OS << "Unknown";
      42             :   }
      43           0 :   return OS;
      44             : }
      45             : 
      46           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
      47             :                                    const PDB_CallingConv &Conv) {
      48           0 :   OS << "__";
      49           0 :   switch (Conv) {
      50           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, NearC      , "cdecl", OS)
      51           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, FarC       , "cdecl", OS)
      52           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, NearPascal , "pascal", OS)
      53           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, FarPascal  , "pascal", OS)
      54           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, NearFast   , "fastcall", OS)
      55           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, FarFast    , "fastcall", OS)
      56           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, NearStdCall, "stdcall", OS)
      57           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, FarStdCall , "stdcall", OS)
      58           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, NearSysCall, "syscall", OS)
      59           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, FarSysCall , "syscall", OS)
      60           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, ThisCall   , "thiscall", OS)
      61           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, MipsCall   , "mipscall", OS)
      62           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, Generic    , "genericcall", OS)
      63           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, AlphaCall  , "alphacall", OS)
      64           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, PpcCall    , "ppccall", OS)
      65           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, SHCall     , "superhcall", OS)
      66           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, ArmCall    , "armcall", OS)
      67           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, AM33Call   , "am33call", OS)
      68           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, TriCall    , "tricall", OS)
      69           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, SH5Call    , "sh5call", OS)
      70           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, M32RCall   , "m32rcall", OS)
      71           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, ClrCall    , "clrcall", OS)
      72           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, Inline     , "inlinecall", OS)
      73           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, NearVector , "vectorcall", OS)
      74             :   }
      75           0 :   return OS;
      76             : }
      77             : 
      78           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_DataKind &Data) {
      79           0 :   switch (Data) {
      80           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, Unknown, "unknown", OS)
      81           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, Local, "local", OS)
      82           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, StaticLocal, "static local", OS)
      83           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, Param, "param", OS)
      84           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, ObjectPtr, "this ptr", OS)
      85           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, FileStatic, "static global", OS)
      86           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, Global, "global", OS)
      87           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, Member, "member", OS)
      88           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, StaticMember, "static member", OS)
      89           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, Constant, "const", OS)
      90             :   }
      91           0 :   return OS;
      92             : }
      93             : 
      94           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
      95             :                                    const codeview::RegisterId &Reg) {
      96           0 :   switch (Reg) {
      97           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, AL, OS)
      98           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, CL, OS)
      99           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, DL, OS)
     100           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, BL, OS)
     101           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, AH, OS)
     102           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, CH, OS)
     103           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, DH, OS)
     104           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, BH, OS)
     105           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, AX, OS)
     106           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, CX, OS)
     107           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, DX, OS)
     108           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, BX, OS)
     109           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, SP, OS)
     110           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, BP, OS)
     111           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, SI, OS)
     112           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, DI, OS)
     113           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, EAX, OS)
     114           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, ECX, OS)
     115           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, EDX, OS)
     116           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, EBX, OS)
     117           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, ESP, OS)
     118           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, EBP, OS)
     119           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, ESI, OS)
     120           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, EDI, OS)
     121           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, ES, OS)
     122           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, CS, OS)
     123           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, SS, OS)
     124           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, DS, OS)
     125           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, FS, OS)
     126           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, GS, OS)
     127           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, IP, OS)
     128           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RAX, OS)
     129           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RBX, OS)
     130           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RCX, OS)
     131           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RDX, OS)
     132           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RSI, OS)
     133           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RDI, OS)
     134           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RBP, OS)
     135           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RSP, OS)
     136           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R8, OS)
     137           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R9, OS)
     138           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R10, OS)
     139           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R11, OS)
     140           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R12, OS)
     141           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R13, OS)
     142           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R14, OS)
     143           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R15, OS)
     144           0 :   default:
     145           0 :     OS << static_cast<int>(Reg);
     146             :   }
     147           0 :   return OS;
     148             : }
     149             : 
     150           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_LocType &Loc) {
     151           0 :   switch (Loc) {
     152           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_LocType, Static, "static", OS)
     153           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_LocType, TLS, "tls", OS)
     154           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_LocType, RegRel, "regrel", OS)
     155           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_LocType, ThisRel, "thisrel", OS)
     156           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_LocType, Enregistered, "register", OS)
     157           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_LocType, BitField, "bitfield", OS)
     158           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_LocType, Slot, "slot", OS)
     159           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_LocType, IlRel, "IL rel", OS)
     160           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_LocType, MetaData, "metadata", OS)
     161           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_LocType, Constant, "constant", OS)
     162           0 :   default:
     163           0 :     OS << "Unknown";
     164             :   }
     165           0 :   return OS;
     166             : }
     167             : 
     168           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
     169             :                                    const codeview::ThunkOrdinal &Thunk) {
     170           0 :   switch (Thunk) {
     171           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::ThunkOrdinal, BranchIsland, OS)
     172           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::ThunkOrdinal, Pcode, OS)
     173           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::ThunkOrdinal, Standard, OS)
     174           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::ThunkOrdinal, ThisAdjustor, OS)
     175           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::ThunkOrdinal, TrampIncremental, OS)
     176           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::ThunkOrdinal, UnknownLoad, OS)
     177           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(codeview::ThunkOrdinal, Vcall, OS)
     178             :   }
     179           0 :   return OS;
     180             : }
     181             : 
     182           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
     183             :                                    const PDB_Checksum &Checksum) {
     184           0 :   switch (Checksum) {
     185           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Checksum, None, OS)
     186           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Checksum, MD5, OS)
     187           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Checksum, SHA1, OS)
     188             :   }
     189           0 :   return OS;
     190             : }
     191             : 
     192           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_Lang &Lang) {
     193           0 :   switch (Lang) {
     194           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, C, OS)
     195           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_Lang, Cpp, "C++", OS)
     196           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, Fortran, OS)
     197           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, Masm, OS)
     198           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, Pascal, OS)
     199           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, Basic, OS)
     200           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, Cobol, OS)
     201           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, Link, OS)
     202           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, Cvtres, OS)
     203           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, Cvtpgd, OS)
     204           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, CSharp, OS)
     205           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, VB, OS)
     206           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, ILAsm, OS)
     207           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, Java, OS)
     208           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, JScript, OS)
     209           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, MSIL, OS)
     210           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, HLSL, OS)
     211           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, D, OS)
     212             :   }
     213           0 :   return OS;
     214             : }
     215             : 
     216           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_SymType &Tag) {
     217           0 :   switch (Tag) {
     218           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Exe, OS)
     219           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Compiland, OS)
     220           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, CompilandDetails, OS)
     221           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, CompilandEnv, OS)
     222           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Function, OS)
     223           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Block, OS)
     224           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Data, OS)
     225           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Annotation, OS)
     226           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Label, OS)
     227           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, PublicSymbol, OS)
     228           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, UDT, OS)
     229           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Enum, OS)
     230           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, FunctionSig, OS)
     231           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, PointerType, OS)
     232           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, ArrayType, OS)
     233           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, BuiltinType, OS)
     234           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Typedef, OS)
     235           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, BaseClass, OS)
     236           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Friend, OS)
     237           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, FunctionArg, OS)
     238           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, FuncDebugStart, OS)
     239           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, FuncDebugEnd, OS)
     240           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, UsingNamespace, OS)
     241           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, VTableShape, OS)
     242           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, VTable, OS)
     243           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Custom, OS)
     244           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Thunk, OS)
     245           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, CustomType, OS)
     246           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, ManagedType, OS)
     247           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Dimension, OS)
     248           0 :   default:
     249           0 :     OS << "Unknown";
     250             :   }
     251           0 :   return OS;
     252             : }
     253             : 
     254           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
     255             :                                    const PDB_MemberAccess &Access) {
     256           0 :   switch (Access) {
     257           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_MemberAccess, Public, "public", OS)
     258           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_MemberAccess, Protected, "protected", OS)
     259           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_MemberAccess, Private, "private", OS)
     260             :   }
     261           0 :   return OS;
     262             : }
     263             : 
     264           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_UdtType &Type) {
     265           0 :   switch (Type) {
     266           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_UdtType, Class, "class", OS)
     267           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_UdtType, Struct, "struct", OS)
     268           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_UdtType, Interface, "interface", OS)
     269           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_UdtType, Union, "union", OS)
     270             :   }
     271           0 :   return OS;
     272             : }
     273             : 
     274           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
     275             :                                    const PDB_Machine &Machine) {
     276           0 :   switch (Machine) {
     277           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Am33, OS)
     278           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Amd64, OS)
     279           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Arm, OS)
     280           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, ArmNT, OS)
     281           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Ebc, OS)
     282           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, x86, OS)
     283           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Ia64, OS)
     284           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, M32R, OS)
     285           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Mips16, OS)
     286           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, MipsFpu, OS)
     287           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, MipsFpu16, OS)
     288           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, PowerPC, OS)
     289           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, PowerPCFP, OS)
     290           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, R4000, OS)
     291           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, SH3, OS)
     292           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, SH3DSP, OS)
     293           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, SH4, OS)
     294           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, SH5, OS)
     295           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Thumb, OS)
     296           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, WceMipsV2, OS)
     297           0 :   default:
     298           0 :     OS << "Unknown";
     299             :   }
     300           0 :   return OS;
     301             : }
     302             : 
     303           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const Variant &Value) {
     304           0 :   switch (Value.Type) {
     305           0 :     case PDB_VariantType::Bool:
     306           0 :       OS << (Value.Value.Bool ? "true" : "false");
     307           0 :       break;
     308           0 :     case PDB_VariantType::Double:
     309           0 :       OS << Value.Value.Double;
     310           0 :       break;
     311           0 :     case PDB_VariantType::Int16:
     312           0 :       OS << Value.Value.Int16;
     313             :       break;
     314           0 :     case PDB_VariantType::Int32:
     315           0 :       OS << Value.Value.Int32;
     316             :       break;
     317           0 :     case PDB_VariantType::Int64:
     318           0 :       OS << Value.Value.Int64;
     319           0 :       break;
     320           0 :     case PDB_VariantType::Int8:
     321           0 :       OS << static_cast<int>(Value.Value.Int8);
     322             :       break;
     323           0 :     case PDB_VariantType::Single:
     324           0 :       OS << Value.Value.Single;
     325           0 :       break;
     326           0 :     case PDB_VariantType::UInt16:
     327           0 :       OS << Value.Value.Double;
     328           0 :       break;
     329           0 :     case PDB_VariantType::UInt32:
     330           0 :       OS << Value.Value.UInt32;
     331             :       break;
     332           0 :     case PDB_VariantType::UInt64:
     333           0 :       OS << Value.Value.UInt64;
     334           0 :       break;
     335           0 :     case PDB_VariantType::UInt8:
     336           0 :       OS << static_cast<unsigned>(Value.Value.UInt8);
     337             :       break;
     338           0 :     case PDB_VariantType::String:
     339           0 :       OS << Value.Value.String;
     340           0 :       break;
     341           0 :     default:
     342           0 :       OS << Value.Type;
     343             :   }
     344           0 :   return OS;
     345             : }
     346             : 
     347           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
     348             :                                    const VersionInfo &Version) {
     349           0 :   OS << Version.Major << "." << Version.Minor << "." << Version.Build;
     350           0 :   return OS;
     351             : }
     352             : 
     353           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const TagStats &Stats) {
     354           0 :   for (auto Tag : Stats) {
     355           0 :     OS << Tag.first << ":" << Tag.second << " ";
     356             :   }
     357           0 :   return OS;
     358             : }

Generated by: LCOV version 1.13