blob: cf7dc804aaa661fb2ee9a2dd59429b724ac04db4 [file] [log] [blame]
Zachary Turner21473f72015-02-08 00:29:29 +00001//===- PDBSymbolExe.cpp - ---------------------------------------*- C++ -*-===//
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 <utility>
11
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"
17
18#if defined(_WIN32)
19#include <windows.h>
20#endif
21
22using namespace llvm;
23
24namespace {
25std::string GuidToString(PDB_UniqueId *Id) {
26#if defined(_WIN32)
27 GUID *Guid = reinterpret_cast<GUID *>(Id);
28 OLECHAR GuidBuf[40];
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),
33 ResultString);
34 return ResultString;
35#else
36 return std::string();
37#endif
38}
39}
40
41PDBSymbolExe::PDBSymbolExe(std::unique_ptr<IPDBRawSymbol> Symbol)
42 : PDBSymbol(std::move(Symbol)) {}
43
44void PDBSymbolExe::dump(llvm::raw_ostream &OS) const {
45}