1 //===- PDBSymbolExe.cpp - ---------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
13 #include "llvm/DebugInfo/PDB/PDBSymbolExe.h"
14 #include "llvm/Support/ConvertUTF.h"
15 #include "llvm/Support/FileSystem.h"
16 #include "llvm/Support/raw_ostream.h"
25 std::string GuidToString(PDB_UniqueId *Id) {
27 GUID *Guid = reinterpret_cast<GUID *>(Id);
29 int Result = StringFromGUID2(*Guid, GuidBuf, 39);
30 const char *InputBytes = reinterpret_cast<const char *>(GuidBuf);
31 std::string ResultString;
32 convertUTF16ToUTF8String(ArrayRef<char>(InputBytes, Result * 2),
41 PDBSymbolExe::PDBSymbolExe(std::unique_ptr<IPDBRawSymbol> Symbol)
42 : PDBSymbol(std::move(Symbol)) {}
44 void PDBSymbolExe::dump(llvm::raw_ostream &OS) const {