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

Generated by: LCOV version 1.13