LCOV - code coverage report
Current view: top level - lib/DebugInfo/PDB - PDBExtras.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 57 271 21.0 %
Date: 2018-10-20 13:21:21 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          77 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
      73             :                                    const PDB_CallingConv &Conv) {
      74          77 :   OS << "__";
      75          77 :   switch (Conv) {
      76          31 :     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          77 :   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         227 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_SymType &Tag) {
     201         227 :   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           3 :     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 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, CallSite, OS)
     233           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, InlineSite, OS)
     234           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, BaseInterface, OS)
     235           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, VectorType, OS)
     236           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, MatrixType, OS)
     237           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, HLSLType, OS)
     238           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Caller, OS)
     239           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Callee, OS)
     240           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Export, OS)
     241           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, HeapAllocationSite, OS)
     242           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, CoffGroup, OS)
     243           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Inlinee, OS)
     244           0 :   default:
     245           0 :     OS << "Unknown SymTag " << uint32_t(Tag);
     246             :   }
     247         227 :   return OS;
     248             : }
     249             : 
     250           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
     251             :                                    const PDB_MemberAccess &Access) {
     252           0 :   switch (Access) {
     253           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_MemberAccess, Public, "public", OS)
     254           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_MemberAccess, Protected, "protected", OS)
     255           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_MemberAccess, Private, "private", OS)
     256             :   }
     257           0 :   return OS;
     258             : }
     259             : 
     260          60 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_UdtType &Type) {
     261          60 :   switch (Type) {
     262           2 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_UdtType, Class, "class", OS)
     263          56 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_UdtType, Struct, "struct", OS)
     264           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_UdtType, Interface, "interface", OS)
     265           2 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_UdtType, Union, "union", OS)
     266             :   }
     267          60 :   return OS;
     268             : }
     269             : 
     270           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
     271             :                                    const PDB_Machine &Machine) {
     272           0 :   switch (Machine) {
     273           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Am33, OS)
     274           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Amd64, OS)
     275           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Arm, OS)
     276           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, ArmNT, OS)
     277           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Ebc, OS)
     278           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, x86, OS)
     279           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Ia64, OS)
     280           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, M32R, OS)
     281           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Mips16, OS)
     282           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, MipsFpu, OS)
     283           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, MipsFpu16, OS)
     284           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, PowerPC, OS)
     285           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, PowerPCFP, OS)
     286           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, R4000, OS)
     287           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, SH3, OS)
     288           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, SH3DSP, OS)
     289           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, SH4, OS)
     290           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, SH5, OS)
     291           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Thumb, OS)
     292           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, WceMipsV2, OS)
     293           0 :   default:
     294           0 :     OS << "Unknown";
     295             :   }
     296           0 :   return OS;
     297             : }
     298             : 
     299           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
     300             :                                    const PDB_SourceCompression &Compression) {
     301           0 :   switch (Compression) {
     302           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SourceCompression, None, OS)
     303           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SourceCompression, Huffman, OS)
     304           0 :     CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SourceCompression, LZ, OS)
     305           0 :     CASE_OUTPUT_ENUM_CLASS_STR(PDB_SourceCompression, RunLengthEncoded, "RLE",
     306             :                                OS)
     307             :   }
     308           0 :   return OS;
     309             : }
     310             : 
     311         178 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const Variant &Value) {
     312         178 :   switch (Value.Type) {
     313           4 :     case PDB_VariantType::Bool:
     314           6 :       OS << (Value.Value.Bool ? "true" : "false");
     315           4 :       break;
     316           0 :     case PDB_VariantType::Double:
     317           0 :       OS << Value.Value.Double;
     318           0 :       break;
     319           6 :     case PDB_VariantType::Int16:
     320           6 :       OS << Value.Value.Int16;
     321             :       break;
     322         128 :     case PDB_VariantType::Int32:
     323         128 :       OS << Value.Value.Int32;
     324             :       break;
     325           6 :     case PDB_VariantType::Int64:
     326           6 :       OS << Value.Value.Int64;
     327           6 :       break;
     328           6 :     case PDB_VariantType::Int8:
     329           6 :       OS << static_cast<int>(Value.Value.Int8);
     330             :       break;
     331           0 :     case PDB_VariantType::Single:
     332           0 :       OS << Value.Value.Single;
     333           0 :       break;
     334          12 :     case PDB_VariantType::UInt16:
     335          12 :       OS << Value.Value.UInt16;
     336             :       break;
     337           8 :     case PDB_VariantType::UInt32:
     338           8 :       OS << Value.Value.UInt32;
     339             :       break;
     340           4 :     case PDB_VariantType::UInt64:
     341           4 :       OS << Value.Value.UInt64;
     342           4 :       break;
     343           4 :     case PDB_VariantType::UInt8:
     344           4 :       OS << static_cast<unsigned>(Value.Value.UInt8);
     345             :       break;
     346           0 :     case PDB_VariantType::String:
     347           0 :       OS << Value.Value.String;
     348           0 :       break;
     349           0 :     default:
     350           0 :       OS << Value.Type;
     351             :   }
     352         178 :   return OS;
     353             : }
     354             : 
     355           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
     356             :                                    const VersionInfo &Version) {
     357           0 :   OS << Version.Major << "." << Version.Minor << "." << Version.Build;
     358           0 :   return OS;
     359             : }
     360             : 
     361           0 : raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const TagStats &Stats) {
     362           0 :   for (auto Tag : Stats) {
     363           0 :     OS << Tag.first << ":" << Tag.second << " ";
     364             :   }
     365           0 :   return OS;
     366             : }

Generated by: LCOV version 1.13