From 7ce32460db35b73eab9bf96698f742977d12b196 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Tue, 27 Jan 2015 23:02:23 +0000 Subject: [PATCH] Run dos2unix against llvm-pdbdump. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227262 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-pdbdump/CMakeLists.txt | 56 +- tools/llvm-pdbdump/DIAExtras.cpp | 352 +++--- tools/llvm-pdbdump/DIAExtras.h | 254 ++-- tools/llvm-pdbdump/DIASymbol.cpp | 1936 ++++++++++++++--------------- tools/llvm-pdbdump/DIASymbol.h | 564 ++++----- tools/llvm-pdbdump/llvm-pdbdump.h | 62 +- 6 files changed, 1612 insertions(+), 1612 deletions(-) diff --git a/tools/llvm-pdbdump/CMakeLists.txt b/tools/llvm-pdbdump/CMakeLists.txt index 49f828cf200..6cad395b281 100644 --- a/tools/llvm-pdbdump/CMakeLists.txt +++ b/tools/llvm-pdbdump/CMakeLists.txt @@ -1,28 +1,28 @@ -set(MSVC_DIA_SDK_DIR "$ENV{VSINSTALLDIR}DIA SDK") - -# Due to a bug in MSVC 2013's installation software, it is possible -# for MSVC 2013 to write the DIA SDK into the Visual Studio 2012 -# install directory. If this happens, the installation is corrupt -# and there's nothing we can do. It happens with enough frequency -# though that we should handle it. We do so by simply checking that -# the DIA SDK folder exists. Should this happen you will need to -# uninstall VS 2012 and then re-install VS 2013. -if (IS_DIRECTORY ${MSVC_DIA_SDK_DIR}) - set(LLVM_LINK_COMPONENTS - Support - ) - - include_directories(${MSVC_DIA_SDK_DIR}/include) - if (CMAKE_SIZEOF_VOID_P EQUAL 8) - link_directories(${MSVC_DIA_SDK_DIR}/lib/amd64) - else() - link_directories(${MSVC_DIA_SDK_DIR}/lib) - endif() - - add_llvm_tool(llvm-pdbdump - llvm-pdbdump.cpp - DIAExtras.cpp - DIASymbol.cpp - ) - target_link_libraries(llvm-pdbdump diaguids) -endif() +set(MSVC_DIA_SDK_DIR "$ENV{VSINSTALLDIR}DIA SDK") + +# Due to a bug in MSVC 2013's installation software, it is possible +# for MSVC 2013 to write the DIA SDK into the Visual Studio 2012 +# install directory. If this happens, the installation is corrupt +# and there's nothing we can do. It happens with enough frequency +# though that we should handle it. We do so by simply checking that +# the DIA SDK folder exists. Should this happen you will need to +# uninstall VS 2012 and then re-install VS 2013. +if (IS_DIRECTORY ${MSVC_DIA_SDK_DIR}) + set(LLVM_LINK_COMPONENTS + Support + ) + + include_directories(${MSVC_DIA_SDK_DIR}/include) + if (CMAKE_SIZEOF_VOID_P EQUAL 8) + link_directories(${MSVC_DIA_SDK_DIR}/lib/amd64) + else() + link_directories(${MSVC_DIA_SDK_DIR}/lib) + endif() + + add_llvm_tool(llvm-pdbdump + llvm-pdbdump.cpp + DIAExtras.cpp + DIASymbol.cpp + ) + target_link_libraries(llvm-pdbdump diaguids) +endif() diff --git a/tools/llvm-pdbdump/DIAExtras.cpp b/tools/llvm-pdbdump/DIAExtras.cpp index 55d588f2cd5..eae4e4aede2 100644 --- a/tools/llvm-pdbdump/DIAExtras.cpp +++ b/tools/llvm-pdbdump/DIAExtras.cpp @@ -1,176 +1,176 @@ -//===- DIAExtras.cpp - Helper classes and functions for DIA C++ ---------*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -#include "llvm/Support/Format.h" -#include "llvm/Support/raw_ostream.h" - -#include "llvm-pdbdump.h" -#include "DIAExtras.h" - -using namespace llvm; -using namespace llvm::sys::windows; - -#define PRINT_ENUM_VALUE_CASE(Value) \ - case Value: \ - outs() << #Value; \ - break; - -raw_ostream &llvm::operator<<(raw_ostream &Stream, DiaSymTagEnum SymTag) { - switch (SymTag) { - PRINT_ENUM_VALUE_CASE(SymTagNull) - PRINT_ENUM_VALUE_CASE(SymTagExe) - PRINT_ENUM_VALUE_CASE(SymTagCompiland) - PRINT_ENUM_VALUE_CASE(SymTagCompilandDetails) - PRINT_ENUM_VALUE_CASE(SymTagCompilandEnv) - PRINT_ENUM_VALUE_CASE(SymTagFunction) - PRINT_ENUM_VALUE_CASE(SymTagBlock) - PRINT_ENUM_VALUE_CASE(SymTagData) - PRINT_ENUM_VALUE_CASE(SymTagAnnotation) - PRINT_ENUM_VALUE_CASE(SymTagLabel) - PRINT_ENUM_VALUE_CASE(SymTagPublicSymbol) - PRINT_ENUM_VALUE_CASE(SymTagUDT) - PRINT_ENUM_VALUE_CASE(SymTagEnum) - PRINT_ENUM_VALUE_CASE(SymTagFunctionType) - PRINT_ENUM_VALUE_CASE(SymTagPointerType) - PRINT_ENUM_VALUE_CASE(SymTagArrayType) - PRINT_ENUM_VALUE_CASE(SymTagBaseType) - PRINT_ENUM_VALUE_CASE(SymTagTypedef) - PRINT_ENUM_VALUE_CASE(SymTagBaseClass) - PRINT_ENUM_VALUE_CASE(SymTagFriend) - PRINT_ENUM_VALUE_CASE(SymTagFunctionArgType) - PRINT_ENUM_VALUE_CASE(SymTagFuncDebugStart) - PRINT_ENUM_VALUE_CASE(SymTagFuncDebugEnd) - PRINT_ENUM_VALUE_CASE(SymTagUsingNamespace) - PRINT_ENUM_VALUE_CASE(SymTagVTableShape) - PRINT_ENUM_VALUE_CASE(SymTagVTable) - PRINT_ENUM_VALUE_CASE(SymTagCustom) - PRINT_ENUM_VALUE_CASE(SymTagThunk) - PRINT_ENUM_VALUE_CASE(SymTagCustomType) - PRINT_ENUM_VALUE_CASE(SymTagManagedType) - PRINT_ENUM_VALUE_CASE(SymTagDimension) - PRINT_ENUM_VALUE_CASE(SymTagCallSite) - PRINT_ENUM_VALUE_CASE(SymTagInlineSite) - PRINT_ENUM_VALUE_CASE(SymTagBaseInterface) - PRINT_ENUM_VALUE_CASE(SymTagVectorType) - PRINT_ENUM_VALUE_CASE(SymTagMatrixType) - PRINT_ENUM_VALUE_CASE(SymTagHLSLType) -#if (_MSC_FULL_VER >= 180031101) - PRINT_ENUM_VALUE_CASE(SymTagCaller) - PRINT_ENUM_VALUE_CASE(SymTagCallee) -#endif - PRINT_ENUM_VALUE_CASE(SymTagMax) - } - outs() << " {" << (DWORD)SymTag << "}"; - return Stream; -} - -raw_ostream &llvm::operator<<(raw_ostream &Stream, CV_CPU_TYPE_e CpuType) { - switch (CpuType) { - PRINT_ENUM_VALUE_CASE(CV_CFL_8080) - PRINT_ENUM_VALUE_CASE(CV_CFL_8086) - PRINT_ENUM_VALUE_CASE(CV_CFL_80286) - PRINT_ENUM_VALUE_CASE(CV_CFL_80386) - PRINT_ENUM_VALUE_CASE(CV_CFL_80486) - PRINT_ENUM_VALUE_CASE(CV_CFL_PENTIUM) - PRINT_ENUM_VALUE_CASE(CV_CFL_PENTIUMPRO) - PRINT_ENUM_VALUE_CASE(CV_CFL_PENTIUMIII) - PRINT_ENUM_VALUE_CASE(CV_CFL_MIPS) - PRINT_ENUM_VALUE_CASE(CV_CFL_MIPS16) - PRINT_ENUM_VALUE_CASE(CV_CFL_MIPS32) - PRINT_ENUM_VALUE_CASE(CV_CFL_MIPS64) - PRINT_ENUM_VALUE_CASE(CV_CFL_MIPSI) - PRINT_ENUM_VALUE_CASE(CV_CFL_MIPSII) - PRINT_ENUM_VALUE_CASE(CV_CFL_MIPSIII) - PRINT_ENUM_VALUE_CASE(CV_CFL_MIPSIV) - PRINT_ENUM_VALUE_CASE(CV_CFL_MIPSV) - PRINT_ENUM_VALUE_CASE(CV_CFL_M68000) - PRINT_ENUM_VALUE_CASE(CV_CFL_M68010) - PRINT_ENUM_VALUE_CASE(CV_CFL_M68020) - PRINT_ENUM_VALUE_CASE(CV_CFL_M68030) - PRINT_ENUM_VALUE_CASE(CV_CFL_M68040) - PRINT_ENUM_VALUE_CASE(CV_CFL_ALPHA) - PRINT_ENUM_VALUE_CASE(CV_CFL_ALPHA_21164) - PRINT_ENUM_VALUE_CASE(CV_CFL_ALPHA_21164A) - PRINT_ENUM_VALUE_CASE(CV_CFL_ALPHA_21264) - PRINT_ENUM_VALUE_CASE(CV_CFL_ALPHA_21364) - PRINT_ENUM_VALUE_CASE(CV_CFL_PPC601) - PRINT_ENUM_VALUE_CASE(CV_CFL_PPC603) - PRINT_ENUM_VALUE_CASE(CV_CFL_PPC604) - PRINT_ENUM_VALUE_CASE(CV_CFL_PPC620) - PRINT_ENUM_VALUE_CASE(CV_CFL_PPCFP) - PRINT_ENUM_VALUE_CASE(CV_CFL_PPCBE) - PRINT_ENUM_VALUE_CASE(CV_CFL_SH3) - PRINT_ENUM_VALUE_CASE(CV_CFL_SH3E) - PRINT_ENUM_VALUE_CASE(CV_CFL_SH3DSP) - PRINT_ENUM_VALUE_CASE(CV_CFL_SH4) - PRINT_ENUM_VALUE_CASE(CV_CFL_SHMEDIA) - PRINT_ENUM_VALUE_CASE(CV_CFL_ARM3) - PRINT_ENUM_VALUE_CASE(CV_CFL_ARM4) - PRINT_ENUM_VALUE_CASE(CV_CFL_ARM4T) - PRINT_ENUM_VALUE_CASE(CV_CFL_ARM5) - PRINT_ENUM_VALUE_CASE(CV_CFL_ARM5T) - PRINT_ENUM_VALUE_CASE(CV_CFL_ARM6) - PRINT_ENUM_VALUE_CASE(CV_CFL_ARM_XMAC) - PRINT_ENUM_VALUE_CASE(CV_CFL_ARM_WMMX) - PRINT_ENUM_VALUE_CASE(CV_CFL_ARM7) - PRINT_ENUM_VALUE_CASE(CV_CFL_OMNI) - PRINT_ENUM_VALUE_CASE(CV_CFL_IA64) - PRINT_ENUM_VALUE_CASE(CV_CFL_IA64_2) - PRINT_ENUM_VALUE_CASE(CV_CFL_CEE) - PRINT_ENUM_VALUE_CASE(CV_CFL_AM33) - PRINT_ENUM_VALUE_CASE(CV_CFL_M32R) - PRINT_ENUM_VALUE_CASE(CV_CFL_TRICORE) - PRINT_ENUM_VALUE_CASE(CV_CFL_X64) - PRINT_ENUM_VALUE_CASE(CV_CFL_EBC) - PRINT_ENUM_VALUE_CASE(CV_CFL_THUMB) - PRINT_ENUM_VALUE_CASE(CV_CFL_ARMNT) -#if (_MSC_FULL_VER >= 180031101) - PRINT_ENUM_VALUE_CASE(CV_CFL_ARM64) -#endif - PRINT_ENUM_VALUE_CASE(CV_CFL_D3D11_SHADER) - } - outs() << " {" << llvm::format_hex((DWORD)CpuType, 2, true) << "}"; - return Stream; -} - -raw_ostream &llvm::operator<<(raw_ostream &Stream, - MachineTypeEnum MachineType) { - switch (MachineType) { - PRINT_ENUM_VALUE_CASE(MachineTypeUnknown) - PRINT_ENUM_VALUE_CASE(MachineTypeX86) - PRINT_ENUM_VALUE_CASE(MachineTypeR3000) - PRINT_ENUM_VALUE_CASE(MachineTypeR4000) - PRINT_ENUM_VALUE_CASE(MachineTypeR10000) - PRINT_ENUM_VALUE_CASE(MachineTypeWCEMIPSv2) - PRINT_ENUM_VALUE_CASE(MachineTypeAlpha) - PRINT_ENUM_VALUE_CASE(MachineTypeSH3) - PRINT_ENUM_VALUE_CASE(MachineTypeSH3DSP) - PRINT_ENUM_VALUE_CASE(MachineTypeSH3E) - PRINT_ENUM_VALUE_CASE(MachineTypeSH4) - PRINT_ENUM_VALUE_CASE(MachineTypeSH5) - PRINT_ENUM_VALUE_CASE(MachineTypeArm) - PRINT_ENUM_VALUE_CASE(MachineTypeThumb) - PRINT_ENUM_VALUE_CASE(MachineTypeArmNT) - PRINT_ENUM_VALUE_CASE(MachineTypeAM33) - PRINT_ENUM_VALUE_CASE(MachineTypePowerPC) - PRINT_ENUM_VALUE_CASE(MachineTypePowerPCFP) - PRINT_ENUM_VALUE_CASE(MachineTypeIa64) - PRINT_ENUM_VALUE_CASE(MachineTypeMips16) - PRINT_ENUM_VALUE_CASE(MachineTypeAlpha64) - PRINT_ENUM_VALUE_CASE(MachineTypeMipsFpu) - PRINT_ENUM_VALUE_CASE(MachineTypeMipsFpu16) - PRINT_ENUM_VALUE_CASE(MachineTypeTriCore) - PRINT_ENUM_VALUE_CASE(MachineTypeCEF) - PRINT_ENUM_VALUE_CASE(MachineTypeEBC) - PRINT_ENUM_VALUE_CASE(MachineTypeAmd64) - PRINT_ENUM_VALUE_CASE(MachineTypeM32R) - PRINT_ENUM_VALUE_CASE(MachineTypeCEE) - } - outs() << " {" << llvm::format_hex((DWORD)MachineType, 2, true) << "}"; - return Stream; -} +//===- DIAExtras.cpp - Helper classes and functions for DIA C++ ---------*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +#include "llvm/Support/Format.h" +#include "llvm/Support/raw_ostream.h" + +#include "llvm-pdbdump.h" +#include "DIAExtras.h" + +using namespace llvm; +using namespace llvm::sys::windows; + +#define PRINT_ENUM_VALUE_CASE(Value) \ + case Value: \ + outs() << #Value; \ + break; + +raw_ostream &llvm::operator<<(raw_ostream &Stream, DiaSymTagEnum SymTag) { + switch (SymTag) { + PRINT_ENUM_VALUE_CASE(SymTagNull) + PRINT_ENUM_VALUE_CASE(SymTagExe) + PRINT_ENUM_VALUE_CASE(SymTagCompiland) + PRINT_ENUM_VALUE_CASE(SymTagCompilandDetails) + PRINT_ENUM_VALUE_CASE(SymTagCompilandEnv) + PRINT_ENUM_VALUE_CASE(SymTagFunction) + PRINT_ENUM_VALUE_CASE(SymTagBlock) + PRINT_ENUM_VALUE_CASE(SymTagData) + PRINT_ENUM_VALUE_CASE(SymTagAnnotation) + PRINT_ENUM_VALUE_CASE(SymTagLabel) + PRINT_ENUM_VALUE_CASE(SymTagPublicSymbol) + PRINT_ENUM_VALUE_CASE(SymTagUDT) + PRINT_ENUM_VALUE_CASE(SymTagEnum) + PRINT_ENUM_VALUE_CASE(SymTagFunctionType) + PRINT_ENUM_VALUE_CASE(SymTagPointerType) + PRINT_ENUM_VALUE_CASE(SymTagArrayType) + PRINT_ENUM_VALUE_CASE(SymTagBaseType) + PRINT_ENUM_VALUE_CASE(SymTagTypedef) + PRINT_ENUM_VALUE_CASE(SymTagBaseClass) + PRINT_ENUM_VALUE_CASE(SymTagFriend) + PRINT_ENUM_VALUE_CASE(SymTagFunctionArgType) + PRINT_ENUM_VALUE_CASE(SymTagFuncDebugStart) + PRINT_ENUM_VALUE_CASE(SymTagFuncDebugEnd) + PRINT_ENUM_VALUE_CASE(SymTagUsingNamespace) + PRINT_ENUM_VALUE_CASE(SymTagVTableShape) + PRINT_ENUM_VALUE_CASE(SymTagVTable) + PRINT_ENUM_VALUE_CASE(SymTagCustom) + PRINT_ENUM_VALUE_CASE(SymTagThunk) + PRINT_ENUM_VALUE_CASE(SymTagCustomType) + PRINT_ENUM_VALUE_CASE(SymTagManagedType) + PRINT_ENUM_VALUE_CASE(SymTagDimension) + PRINT_ENUM_VALUE_CASE(SymTagCallSite) + PRINT_ENUM_VALUE_CASE(SymTagInlineSite) + PRINT_ENUM_VALUE_CASE(SymTagBaseInterface) + PRINT_ENUM_VALUE_CASE(SymTagVectorType) + PRINT_ENUM_VALUE_CASE(SymTagMatrixType) + PRINT_ENUM_VALUE_CASE(SymTagHLSLType) +#if (_MSC_FULL_VER >= 180031101) + PRINT_ENUM_VALUE_CASE(SymTagCaller) + PRINT_ENUM_VALUE_CASE(SymTagCallee) +#endif + PRINT_ENUM_VALUE_CASE(SymTagMax) + } + outs() << " {" << (DWORD)SymTag << "}"; + return Stream; +} + +raw_ostream &llvm::operator<<(raw_ostream &Stream, CV_CPU_TYPE_e CpuType) { + switch (CpuType) { + PRINT_ENUM_VALUE_CASE(CV_CFL_8080) + PRINT_ENUM_VALUE_CASE(CV_CFL_8086) + PRINT_ENUM_VALUE_CASE(CV_CFL_80286) + PRINT_ENUM_VALUE_CASE(CV_CFL_80386) + PRINT_ENUM_VALUE_CASE(CV_CFL_80486) + PRINT_ENUM_VALUE_CASE(CV_CFL_PENTIUM) + PRINT_ENUM_VALUE_CASE(CV_CFL_PENTIUMPRO) + PRINT_ENUM_VALUE_CASE(CV_CFL_PENTIUMIII) + PRINT_ENUM_VALUE_CASE(CV_CFL_MIPS) + PRINT_ENUM_VALUE_CASE(CV_CFL_MIPS16) + PRINT_ENUM_VALUE_CASE(CV_CFL_MIPS32) + PRINT_ENUM_VALUE_CASE(CV_CFL_MIPS64) + PRINT_ENUM_VALUE_CASE(CV_CFL_MIPSI) + PRINT_ENUM_VALUE_CASE(CV_CFL_MIPSII) + PRINT_ENUM_VALUE_CASE(CV_CFL_MIPSIII) + PRINT_ENUM_VALUE_CASE(CV_CFL_MIPSIV) + PRINT_ENUM_VALUE_CASE(CV_CFL_MIPSV) + PRINT_ENUM_VALUE_CASE(CV_CFL_M68000) + PRINT_ENUM_VALUE_CASE(CV_CFL_M68010) + PRINT_ENUM_VALUE_CASE(CV_CFL_M68020) + PRINT_ENUM_VALUE_CASE(CV_CFL_M68030) + PRINT_ENUM_VALUE_CASE(CV_CFL_M68040) + PRINT_ENUM_VALUE_CASE(CV_CFL_ALPHA) + PRINT_ENUM_VALUE_CASE(CV_CFL_ALPHA_21164) + PRINT_ENUM_VALUE_CASE(CV_CFL_ALPHA_21164A) + PRINT_ENUM_VALUE_CASE(CV_CFL_ALPHA_21264) + PRINT_ENUM_VALUE_CASE(CV_CFL_ALPHA_21364) + PRINT_ENUM_VALUE_CASE(CV_CFL_PPC601) + PRINT_ENUM_VALUE_CASE(CV_CFL_PPC603) + PRINT_ENUM_VALUE_CASE(CV_CFL_PPC604) + PRINT_ENUM_VALUE_CASE(CV_CFL_PPC620) + PRINT_ENUM_VALUE_CASE(CV_CFL_PPCFP) + PRINT_ENUM_VALUE_CASE(CV_CFL_PPCBE) + PRINT_ENUM_VALUE_CASE(CV_CFL_SH3) + PRINT_ENUM_VALUE_CASE(CV_CFL_SH3E) + PRINT_ENUM_VALUE_CASE(CV_CFL_SH3DSP) + PRINT_ENUM_VALUE_CASE(CV_CFL_SH4) + PRINT_ENUM_VALUE_CASE(CV_CFL_SHMEDIA) + PRINT_ENUM_VALUE_CASE(CV_CFL_ARM3) + PRINT_ENUM_VALUE_CASE(CV_CFL_ARM4) + PRINT_ENUM_VALUE_CASE(CV_CFL_ARM4T) + PRINT_ENUM_VALUE_CASE(CV_CFL_ARM5) + PRINT_ENUM_VALUE_CASE(CV_CFL_ARM5T) + PRINT_ENUM_VALUE_CASE(CV_CFL_ARM6) + PRINT_ENUM_VALUE_CASE(CV_CFL_ARM_XMAC) + PRINT_ENUM_VALUE_CASE(CV_CFL_ARM_WMMX) + PRINT_ENUM_VALUE_CASE(CV_CFL_ARM7) + PRINT_ENUM_VALUE_CASE(CV_CFL_OMNI) + PRINT_ENUM_VALUE_CASE(CV_CFL_IA64) + PRINT_ENUM_VALUE_CASE(CV_CFL_IA64_2) + PRINT_ENUM_VALUE_CASE(CV_CFL_CEE) + PRINT_ENUM_VALUE_CASE(CV_CFL_AM33) + PRINT_ENUM_VALUE_CASE(CV_CFL_M32R) + PRINT_ENUM_VALUE_CASE(CV_CFL_TRICORE) + PRINT_ENUM_VALUE_CASE(CV_CFL_X64) + PRINT_ENUM_VALUE_CASE(CV_CFL_EBC) + PRINT_ENUM_VALUE_CASE(CV_CFL_THUMB) + PRINT_ENUM_VALUE_CASE(CV_CFL_ARMNT) +#if (_MSC_FULL_VER >= 180031101) + PRINT_ENUM_VALUE_CASE(CV_CFL_ARM64) +#endif + PRINT_ENUM_VALUE_CASE(CV_CFL_D3D11_SHADER) + } + outs() << " {" << llvm::format_hex((DWORD)CpuType, 2, true) << "}"; + return Stream; +} + +raw_ostream &llvm::operator<<(raw_ostream &Stream, + MachineTypeEnum MachineType) { + switch (MachineType) { + PRINT_ENUM_VALUE_CASE(MachineTypeUnknown) + PRINT_ENUM_VALUE_CASE(MachineTypeX86) + PRINT_ENUM_VALUE_CASE(MachineTypeR3000) + PRINT_ENUM_VALUE_CASE(MachineTypeR4000) + PRINT_ENUM_VALUE_CASE(MachineTypeR10000) + PRINT_ENUM_VALUE_CASE(MachineTypeWCEMIPSv2) + PRINT_ENUM_VALUE_CASE(MachineTypeAlpha) + PRINT_ENUM_VALUE_CASE(MachineTypeSH3) + PRINT_ENUM_VALUE_CASE(MachineTypeSH3DSP) + PRINT_ENUM_VALUE_CASE(MachineTypeSH3E) + PRINT_ENUM_VALUE_CASE(MachineTypeSH4) + PRINT_ENUM_VALUE_CASE(MachineTypeSH5) + PRINT_ENUM_VALUE_CASE(MachineTypeArm) + PRINT_ENUM_VALUE_CASE(MachineTypeThumb) + PRINT_ENUM_VALUE_CASE(MachineTypeArmNT) + PRINT_ENUM_VALUE_CASE(MachineTypeAM33) + PRINT_ENUM_VALUE_CASE(MachineTypePowerPC) + PRINT_ENUM_VALUE_CASE(MachineTypePowerPCFP) + PRINT_ENUM_VALUE_CASE(MachineTypeIa64) + PRINT_ENUM_VALUE_CASE(MachineTypeMips16) + PRINT_ENUM_VALUE_CASE(MachineTypeAlpha64) + PRINT_ENUM_VALUE_CASE(MachineTypeMipsFpu) + PRINT_ENUM_VALUE_CASE(MachineTypeMipsFpu16) + PRINT_ENUM_VALUE_CASE(MachineTypeTriCore) + PRINT_ENUM_VALUE_CASE(MachineTypeCEF) + PRINT_ENUM_VALUE_CASE(MachineTypeEBC) + PRINT_ENUM_VALUE_CASE(MachineTypeAmd64) + PRINT_ENUM_VALUE_CASE(MachineTypeM32R) + PRINT_ENUM_VALUE_CASE(MachineTypeCEE) + } + outs() << " {" << llvm::format_hex((DWORD)MachineType, 2, true) << "}"; + return Stream; +} diff --git a/tools/llvm-pdbdump/DIAExtras.h b/tools/llvm-pdbdump/DIAExtras.h index 99d37e13c56..6561a09b74f 100644 --- a/tools/llvm-pdbdump/DIAExtras.h +++ b/tools/llvm-pdbdump/DIAExtras.h @@ -1,127 +1,127 @@ -//===- DIAExtras.h - Helper classes and functions for accessing DIA C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Defines helper types, classes, and functions for working with DIA. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_TOOLS_LLVMPDBDUMP_DIAEXTRAS_H -#define LLVM_TOOLS_LLVMPDBDUMP_DIAEXTRAS_H - -#include "llvm/ADT/SmallString.h" -#include "llvm/Support/raw_ostream.h" - -#include "COMExtras.h" - -namespace llvm { -namespace sys { -namespace windows { - -typedef llvm::SmallString<16> DIAString; - -template class DIAResult { -public: - DIAResult() : IsValid(false) {} - DIAResult(const T &ResultValue) : Result(ResultValue), IsValid(true) {} - - bool hasValue() const { return IsValid; } - T value() const { return Result; } - - void dump(StringRef Name, unsigned IndentLevel) const { - if (!hasValue()) - return; - outs().indent(IndentLevel); - outs() << Name << ": " << value() << "\n"; - } - -private: - T Result; - bool IsValid; -}; - -template <> -void DIAResult::dump(StringRef Name, unsigned IndentLevel) const { - if (!hasValue()) - return; - outs().indent(IndentLevel); - outs() << Name << ": " << (value() ? "true" : "false") << "\n"; -} - -template <> -void DIAResult::dump(StringRef Name, unsigned IndentLevel) const { - if (!hasValue()) - return; - std::string Guid8; - CComBSTR GuidBSTR(value()); - BSTRToUTF8(GuidBSTR.m_str, Guid8); - - outs().indent(IndentLevel); - outs() << Name << ": " << Guid8 << "\n"; -} - -// MSDN documents the IDiaSymbol::get_machineType method as returning a value -// from the CV_CPU_TYPE_e enumeration. This documentation is wrong, however, -// and this method actually returns a value from the IMAGE_FILE_xxx set of -// defines from winnt.h. These correspond to the platform magic number in -// the COFF file. This enumeration is built from the set of values in winnt.h -enum MachineTypeEnum { - MachineTypeUnknown = IMAGE_FILE_MACHINE_UNKNOWN, - MachineTypeX86 = IMAGE_FILE_MACHINE_I386, - MachineTypeR3000 = IMAGE_FILE_MACHINE_R3000, - MachineTypeR4000 = IMAGE_FILE_MACHINE_R4000, - MachineTypeR10000 = IMAGE_FILE_MACHINE_R10000, - MachineTypeWCEMIPSv2 = IMAGE_FILE_MACHINE_WCEMIPSV2, - MachineTypeAlpha = IMAGE_FILE_MACHINE_ALPHA, - MachineTypeSH3 = IMAGE_FILE_MACHINE_SH3, - MachineTypeSH3DSP = IMAGE_FILE_MACHINE_SH3DSP, - MachineTypeSH3E = IMAGE_FILE_MACHINE_SH3E, - MachineTypeSH4 = IMAGE_FILE_MACHINE_SH4, - MachineTypeSH5 = IMAGE_FILE_MACHINE_SH5, - MachineTypeArm = IMAGE_FILE_MACHINE_ARM, - MachineTypeThumb = IMAGE_FILE_MACHINE_THUMB, - MachineTypeArmNT = IMAGE_FILE_MACHINE_ARMNT, - MachineTypeAM33 = IMAGE_FILE_MACHINE_AM33, - MachineTypePowerPC = IMAGE_FILE_MACHINE_POWERPC, - MachineTypePowerPCFP = IMAGE_FILE_MACHINE_POWERPCFP, - MachineTypeIa64 = IMAGE_FILE_MACHINE_IA64, - MachineTypeMips16 = IMAGE_FILE_MACHINE_MIPS16, - MachineTypeAlpha64 = IMAGE_FILE_MACHINE_ALPHA64, - MachineTypeMipsFpu = IMAGE_FILE_MACHINE_MIPSFPU, - MachineTypeMipsFpu16 = IMAGE_FILE_MACHINE_MIPSFPU16, - MachineTypeTriCore = IMAGE_FILE_MACHINE_TRICORE, - MachineTypeCEF = IMAGE_FILE_MACHINE_CEF, - MachineTypeEBC = IMAGE_FILE_MACHINE_EBC, - MachineTypeAmd64 = IMAGE_FILE_MACHINE_AMD64, - MachineTypeM32R = IMAGE_FILE_MACHINE_M32R, - MachineTypeCEE = IMAGE_FILE_MACHINE_CEE, -}; - -// SymTagEnum has the unfortunate property that it is not only the name of -// the enum, but also the name of one of the values of the enum. So that we -// don't have to always type "enum SymTagEnum", we typedef this to a different -// name so that we can refer to it more easily. -typedef enum SymTagEnum DiaSymTagEnum; - -typedef CComPtr DiaSymbolPtr; - -} // namespace windows -} // namespace sys -} // namespace llvm - -namespace llvm { -class raw_ostream; - -raw_ostream &operator<<(raw_ostream &Stream, - llvm::sys::windows::DiaSymTagEnum SymTag); -raw_ostream &operator<<(raw_ostream &Stream, CV_CPU_TYPE_e CpuType); -raw_ostream &operator<<(raw_ostream &Stream, - llvm::sys::windows::MachineTypeEnum CpuType); -} - -#endif +//===- DIAExtras.h - Helper classes and functions for accessing DIA C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Defines helper types, classes, and functions for working with DIA. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_TOOLS_LLVMPDBDUMP_DIAEXTRAS_H +#define LLVM_TOOLS_LLVMPDBDUMP_DIAEXTRAS_H + +#include "llvm/ADT/SmallString.h" +#include "llvm/Support/raw_ostream.h" + +#include "COMExtras.h" + +namespace llvm { +namespace sys { +namespace windows { + +typedef llvm::SmallString<16> DIAString; + +template class DIAResult { +public: + DIAResult() : IsValid(false) {} + DIAResult(const T &ResultValue) : Result(ResultValue), IsValid(true) {} + + bool hasValue() const { return IsValid; } + T value() const { return Result; } + + void dump(StringRef Name, unsigned IndentLevel) const { + if (!hasValue()) + return; + outs().indent(IndentLevel); + outs() << Name << ": " << value() << "\n"; + } + +private: + T Result; + bool IsValid; +}; + +template <> +void DIAResult::dump(StringRef Name, unsigned IndentLevel) const { + if (!hasValue()) + return; + outs().indent(IndentLevel); + outs() << Name << ": " << (value() ? "true" : "false") << "\n"; +} + +template <> +void DIAResult::dump(StringRef Name, unsigned IndentLevel) const { + if (!hasValue()) + return; + std::string Guid8; + CComBSTR GuidBSTR(value()); + BSTRToUTF8(GuidBSTR.m_str, Guid8); + + outs().indent(IndentLevel); + outs() << Name << ": " << Guid8 << "\n"; +} + +// MSDN documents the IDiaSymbol::get_machineType method as returning a value +// from the CV_CPU_TYPE_e enumeration. This documentation is wrong, however, +// and this method actually returns a value from the IMAGE_FILE_xxx set of +// defines from winnt.h. These correspond to the platform magic number in +// the COFF file. This enumeration is built from the set of values in winnt.h +enum MachineTypeEnum { + MachineTypeUnknown = IMAGE_FILE_MACHINE_UNKNOWN, + MachineTypeX86 = IMAGE_FILE_MACHINE_I386, + MachineTypeR3000 = IMAGE_FILE_MACHINE_R3000, + MachineTypeR4000 = IMAGE_FILE_MACHINE_R4000, + MachineTypeR10000 = IMAGE_FILE_MACHINE_R10000, + MachineTypeWCEMIPSv2 = IMAGE_FILE_MACHINE_WCEMIPSV2, + MachineTypeAlpha = IMAGE_FILE_MACHINE_ALPHA, + MachineTypeSH3 = IMAGE_FILE_MACHINE_SH3, + MachineTypeSH3DSP = IMAGE_FILE_MACHINE_SH3DSP, + MachineTypeSH3E = IMAGE_FILE_MACHINE_SH3E, + MachineTypeSH4 = IMAGE_FILE_MACHINE_SH4, + MachineTypeSH5 = IMAGE_FILE_MACHINE_SH5, + MachineTypeArm = IMAGE_FILE_MACHINE_ARM, + MachineTypeThumb = IMAGE_FILE_MACHINE_THUMB, + MachineTypeArmNT = IMAGE_FILE_MACHINE_ARMNT, + MachineTypeAM33 = IMAGE_FILE_MACHINE_AM33, + MachineTypePowerPC = IMAGE_FILE_MACHINE_POWERPC, + MachineTypePowerPCFP = IMAGE_FILE_MACHINE_POWERPCFP, + MachineTypeIa64 = IMAGE_FILE_MACHINE_IA64, + MachineTypeMips16 = IMAGE_FILE_MACHINE_MIPS16, + MachineTypeAlpha64 = IMAGE_FILE_MACHINE_ALPHA64, + MachineTypeMipsFpu = IMAGE_FILE_MACHINE_MIPSFPU, + MachineTypeMipsFpu16 = IMAGE_FILE_MACHINE_MIPSFPU16, + MachineTypeTriCore = IMAGE_FILE_MACHINE_TRICORE, + MachineTypeCEF = IMAGE_FILE_MACHINE_CEF, + MachineTypeEBC = IMAGE_FILE_MACHINE_EBC, + MachineTypeAmd64 = IMAGE_FILE_MACHINE_AMD64, + MachineTypeM32R = IMAGE_FILE_MACHINE_M32R, + MachineTypeCEE = IMAGE_FILE_MACHINE_CEE, +}; + +// SymTagEnum has the unfortunate property that it is not only the name of +// the enum, but also the name of one of the values of the enum. So that we +// don't have to always type "enum SymTagEnum", we typedef this to a different +// name so that we can refer to it more easily. +typedef enum SymTagEnum DiaSymTagEnum; + +typedef CComPtr DiaSymbolPtr; + +} // namespace windows +} // namespace sys +} // namespace llvm + +namespace llvm { +class raw_ostream; + +raw_ostream &operator<<(raw_ostream &Stream, + llvm::sys::windows::DiaSymTagEnum SymTag); +raw_ostream &operator<<(raw_ostream &Stream, CV_CPU_TYPE_e CpuType); +raw_ostream &operator<<(raw_ostream &Stream, + llvm::sys::windows::MachineTypeEnum CpuType); +} + +#endif diff --git a/tools/llvm-pdbdump/DIASymbol.cpp b/tools/llvm-pdbdump/DIASymbol.cpp index bcbd71ff80d..753f6f9b4ea 100644 --- a/tools/llvm-pdbdump/DIASymbol.cpp +++ b/tools/llvm-pdbdump/DIASymbol.cpp @@ -1,968 +1,968 @@ -//===- DIASymbol.cpp - Dump debug info from a PDB file ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "llvm-pdbdump.h" -#include "DIASymbol.h" - -using namespace llvm::sys::windows; - -DIASymbol::DIASymbol(IDiaSymbol *DiaSymbol) : Symbol(DiaSymbol) { - Symbol->AddRef(); -} - -DIASymbol::~DIASymbol() { Symbol->Release(); } - -void DIASymbol::fullDump(int IndentLevel) { - getLexicalParent().dump("Lexical parent", IndentLevel); - getClassParent().dump("Class parent", IndentLevel); - getType().dump("Type", IndentLevel); - getArrayIndexType().dump("Array index type", IndentLevel); - getVirtualTableShape().dump("Vtable shape", IndentLevel); - getLowerBound().dump("Lower bound", IndentLevel); - getUpperBound().dump("Upper bound", IndentLevel); - getObjectPointerType().dump("Object pointer type", IndentLevel); - getContainer().dump("Container", IndentLevel); - getVirtualBaseTableType().dump("Virtual base table type", IndentLevel); - getUnmodifiedType().dump("Unmodified type", IndentLevel); - getSubType().dump("Sub type", IndentLevel); - getBaseSymbol().dump("Base symbol", IndentLevel); - -#if (_MSC_FULL_VER >= 180031101) - // These methods are only available on VS 2013 SP4 and higher. - isPGO().dump("Is PGO", IndentLevel); - hasValidPGOCounts().dump("Has valid PGO counts", IndentLevel); - isOptimizedForSpeed().dump("Is optimized for speed", IndentLevel); - getPGOEntryCount().dump("PGO entry count", IndentLevel); - getPGOEdgeCount().dump("PGO edge count", IndentLevel); - getPGODynamicInstructionCount().dump("PGO dynamic instruction count", - IndentLevel); - getStaticSize().dump("Static size", IndentLevel); - getFinalLiveStaticSize().dump("Final live static size", IndentLevel); - getPhaseName().dump("Phase name", IndentLevel); - hasControlFlowCheck().dump("Has control flow check", IndentLevel); -#endif - - getAccess().dump("Access", IndentLevel); - getAddressOffset().dump("Address Offset", IndentLevel); - getAddressSection().dump("Address Section", IndentLevel); - getAddressTaken().dump("Address Taken", IndentLevel); - getAge().dump("Age", IndentLevel); - getArrayIndexTypeId().dump("Array Index Type Id", IndentLevel); - getBackEndMajor().dump("Back End Major", IndentLevel); - getBackEndMinor().dump("Back End Minor", IndentLevel); - getBackEndBuild().dump("Back End Build", IndentLevel); - getBaseDataOffset().dump("Base Data Offset", IndentLevel); - getBaseDataSlot().dump("Base Data Slot", IndentLevel); - getBaseSymbolId().dump("Base Symbol Id", IndentLevel); - getBaseType().dump("Base Type", IndentLevel); - getBitPosition().dump("Bit Position", IndentLevel); - getBuiltInKind().dump("Built In Kind", IndentLevel); - getCallingConvention().dump("Calling Convention", IndentLevel); - getClassParentId().dump("Class Parent Id", IndentLevel); - isCode().dump("Code", IndentLevel); - isCompilerGenerated().dump("Compiler Generated", IndentLevel); - getCompilerName().dump("Compiler Name", IndentLevel); - hasConstructor().dump("Constructor", IndentLevel); - isConstType().dump("Const Type", IndentLevel); - getCount().dump("Count", IndentLevel); - getCountLiveRanges().dump("Count Live Ranges", IndentLevel); - hasCustomCallingConvention().dump("Custom Calling Convention", IndentLevel); - getDataKind().dump("Data Kind", IndentLevel); - isEditAndContinueEnabled().dump("Edit and Continue Enabled", IndentLevel); - hasFarReturn().dump("Far Return", IndentLevel); - getFrontEndMajor().dump("Front End Major", IndentLevel); - getFrontEndMinor().dump("Front End Minor", IndentLevel); - getFrontEndBuild().dump("Front End Build", IndentLevel); - isFunction().dump("Function", IndentLevel); - getGuid().dump("GUID", IndentLevel); - hasAlloca().dump("Has Alloca", IndentLevel); - hasAssignmentOperator().dump("Has Assignment Operator", IndentLevel); - hasCastOperator().dump("Has Cast Operator", IndentLevel); - hasDebugInfo().dump("Has Debug Info", IndentLevel); - hasEH().dump("Has EH", IndentLevel); - hasEHa().dump("Has EHa", IndentLevel); - hasInlAsm().dump("Has Inline Asm", IndentLevel); - hasLongJump().dump("Has longjmp", IndentLevel); - hasManagedCode().dump("Has Managed Code", IndentLevel); - hasNestedTypes().dump("Has Nested Types", IndentLevel); - hasSecurityChecks().dump("Has Security Checks", IndentLevel); - hasSEH().dump("Has SEH", IndentLevel); - hasSetJump().dump("Has setjmp", IndentLevel); - isIndirectVirtualBaseClass().dump("Is indirect virtual base", IndentLevel); - hasInlineAttribute().dump("Has inline declspec", IndentLevel); - hasInterruptReturn().dump("Has interrupt return", IndentLevel); - isBaseVirtualFunction().dump("Is base virtual function", IndentLevel); - isAcceleratorGroupSharedLocal().dump("Is Accelerator Group Shared Local", - IndentLevel); - isAcceleratorPointerTagLiveRange().dump( - "Is Accelerator Pointer Tag Live Range", IndentLevel); - isAcceleratorStubFunction().dump("Is Accelerator Stub Function", IndentLevel); - isAggregated().dump("Is aggregated", IndentLevel); - hasCTypes().dump("Has C types", IndentLevel); - isCVTCIL().dump("Was converted from MSIL", IndentLevel); - isDataAligned().dump("Is data aligned", IndentLevel); - isHLSLData().dump("Is HLSL data", IndentLevel); - isHotpatchable().dump("Is hot-patchable", IndentLevel); - isLTCG().dump("Is LTCG", IndentLevel); - isMatrixRowMajor().dump("Is matrix row major", IndentLevel); - isMSILNetmodule().dump("Is MSIL .netmodule", IndentLevel); - isMultipleInheritance().dump("Is multiple inheritance", IndentLevel); - isNaked().dump("Is naked", IndentLevel); - isOptimizedAway().dump("Is optimized away", IndentLevel); - isPointerBasedOnSymbolValue().dump("Is pointer based on symbol value", - IndentLevel); - isPointerToDataMember().dump("Is pointer to data member", IndentLevel); - isPointerToMemberFunction().dump("Is pointer to member function", - IndentLevel); - isReturnValue().dump("Is return value", IndentLevel); - isSdl().dump("Is SDL", IndentLevel); - isSingleInheritance().dump("Is single inheritance", IndentLevel); - isSplitted().dump("Is splitted", IndentLevel); - isStatic().dump("Is staic", IndentLevel); - isStripped().dump("Is stripped", IndentLevel); - isVirtualInheritance().dump("Is virtual inheritance", IndentLevel); - getLanguage().dump("Language", IndentLevel); - getLength().dump("Length", IndentLevel); - getLexicalParentId().dump("Lexical parent id", IndentLevel); - getLibraryName().dump("Library name", IndentLevel); - getLiveRangeLength().dump("Live range length", IndentLevel); - getLiveRangeStartAddressSection().dump("Live range start address section", - IndentLevel); - getLiveRangeStartAddressOffset().dump("Live range start address offset", - IndentLevel); - getLiveRangeStartRelativeVirtualAddress().dump("Live range start address RVA", - IndentLevel); - getLocationType().dump("Location type", IndentLevel); - getLowerBoundId().dump("Lower bound id", IndentLevel); - getMachineType().dump("Machine type", IndentLevel); - isManagedRef().dump("Managed", IndentLevel); - getMemorySpaceKind().dump("Memory space kind", IndentLevel); - isMsilRef().dump("MSIL", IndentLevel); - getName().dump("Name", IndentLevel); - isNested().dump("Nested", IndentLevel); - hasNoInlineAttribute().dump("Has noinline declspec", IndentLevel); - hasNoReturnAttribute().dump("Has noreturn declspec", IndentLevel); - getNoStackOrdering().dump("No stack ordering", IndentLevel); - isUnreached().dump("Not reached", IndentLevel); - getNumberOfAcceleratorPointerTags().dump("Number of accelerator pointer tags", - IndentLevel); - getNumberOfModifiers().dump("Number of modifiers", IndentLevel); - getNumberOfRegisterIndices().dump("Number of register indices", IndentLevel); - getNumberOfRows().dump("Number of rows", IndentLevel); - getNumberOfColumns().dump("Number of columns", IndentLevel); - getObjectFileName().dump("Object file name", IndentLevel); - getOemSymbolId().dump("OEM symbol id", IndentLevel); - getOffset().dump("Offset", IndentLevel); - hasOptimizedCodeDebugInfo().dump("Optimized code debug info", IndentLevel); - hasOverloadedOperator().dump("Overloaded operator", IndentLevel); - isPacked().dump("Packed", IndentLevel); - getPlatform().dump("Platform", IndentLevel); - isPureVirtual().dump("Pure", IndentLevel); - getRank().dump("Rank", IndentLevel); - isReference().dump("Reference", IndentLevel); - getRegisterId().dump("Register ID", IndentLevel); - getRegisterType().dump("Register type", IndentLevel); - getRelativeVirtualAddress().dump("RVA", IndentLevel); - isRestrictedType().dump("Restricted type", IndentLevel); - getSamplerSlot().dump("Sampler slot", IndentLevel); - isScoped().dump("Scoped", IndentLevel); - getSignature().dump("Signature", IndentLevel); - getSizeInUdt().dump("Size in UDT", IndentLevel); - getSlot().dump("Slot", IndentLevel); - getSourceFileName().dump("Source file name", IndentLevel); - getStride().dump("Stride", IndentLevel); - getSubTypeId().dump("Sub type ID", IndentLevel); - getSymbolsFileName().dump("File name", IndentLevel); - getSymIndexId().dump("Sym index ID", IndentLevel); - getSymTag().dump("Sym tag", IndentLevel); - getTargetOffset().dump("Target offset", IndentLevel); - getTargetRelativeVirtualAddress().dump("Target RVA", IndentLevel); - getTargetSection().dump("Target section", IndentLevel); - getTargetVirtualAddress().dump("Target virtual address", IndentLevel); - getTextureSlot().dump("Texture slot", IndentLevel); - getThisAdjust().dump("This adjust", IndentLevel); - getThunkOrdinal().dump("Thunk ordinal", IndentLevel); - getTimeStamp().dump("Time stamp", IndentLevel); - getToken().dump("Token", IndentLevel); - getUavSlot().dump("UAV slot", IndentLevel); - getUdtKind().dump("UDT kind", IndentLevel); - isUnalignedType().dump("Unaligned type", IndentLevel); - getUndecoratedName().dump("Undecorated name", IndentLevel); - getUnmodifiedTypeId().dump("Unmodified type id", IndentLevel); - getUpperBoundId().dump("Upper bound id", IndentLevel); - isVirtual().dump("Virtual", IndentLevel); - getVirtualAddress().dump("Virtual address", IndentLevel); - isVirtualBaseClass().dump("Virtual base class", IndentLevel); - getVirtualBaseDispIndex().dump("Virtual base disp index", IndentLevel); - getVirtualBaseOffset().dump("Virtual base offset", IndentLevel); - getVirtualBasePointerOffset().dump("Virtual base pointer offset", - IndentLevel); - getVirtualTableShapeId().dump("Vtable shape ID", IndentLevel); - isVolatileType().dump("Volatile type", IndentLevel); -} - -#if (_MSC_FULL_VER >= 180031101) -DIAResult DIASymbol::isPGO() { - return InternalGetDIAValue(&IDiaSymbol::get_isPGO); -} - -DIAResult DIASymbol::hasValidPGOCounts() { - return InternalGetDIAValue(&IDiaSymbol::get_hasValidPGOCounts); -} - -DIAResult DIASymbol::isOptimizedForSpeed() { - return InternalGetDIAValue(&IDiaSymbol::get_isOptimizedForSpeed); -} - -DIAResult DIASymbol::getPGOEntryCount() { - return InternalGetDIAValue(&IDiaSymbol::get_PGOEntryCount); -} - -DIAResult DIASymbol::getPGOEdgeCount() { - return InternalGetDIAValue(&IDiaSymbol::get_PGOEdgeCount); -} - -DIAResult DIASymbol::getPGODynamicInstructionCount() { - return InternalGetDIAValue(&IDiaSymbol::get_PGODynamicInstructionCount); -} - -DIAResult DIASymbol::getStaticSize() { - return InternalGetDIAValue(&IDiaSymbol::get_staticSize); -} - -DIAResult DIASymbol::getFinalLiveStaticSize() { - return InternalGetDIAValue(&IDiaSymbol::get_finalLiveStaticSize); -} - -DIAResult DIASymbol::getPhaseName() { - return InternalGetDIAStringValue(&IDiaSymbol::get_phaseName); -} - -DIAResult DIASymbol::hasControlFlowCheck() { - return InternalGetDIAValue(&IDiaSymbol::get_hasControlFlowCheck); -} -#endif - -DIAResult DIASymbol::getClassParent() { - return InternalGetDIAValue( - &IDiaSymbol::get_classParent); -} - -DIAResult DIASymbol::getType() { - return InternalGetDIAValue(&IDiaSymbol::get_type); -} - -DIAResult DIASymbol::getArrayIndexType() { - return InternalGetDIAValue( - &IDiaSymbol::get_arrayIndexType); -} - -DIAResult DIASymbol::getVirtualTableShape() { - return InternalGetDIAValue( - &IDiaSymbol::get_virtualTableShape); -} - -DIAResult DIASymbol::getLowerBound() { - return InternalGetDIAValue( - &IDiaSymbol::get_lowerBound); -} - -DIAResult DIASymbol::getUpperBound() { - return InternalGetDIAValue( - &IDiaSymbol::get_upperBound); -} - -DIAResult DIASymbol::getObjectPointerType() { - return InternalGetDIAValue( - &IDiaSymbol::get_objectPointerType); -} - -DIAResult DIASymbol::getContainer() { - return InternalGetDIAValue( - &IDiaSymbol::get_container); -} - -DIAResult DIASymbol::getVirtualBaseTableType() { - return InternalGetDIAValue( - &IDiaSymbol::get_virtualBaseTableType); -} - -DIAResult DIASymbol::getUnmodifiedType() { - return InternalGetDIAValue( - &IDiaSymbol::get_unmodifiedType); -} - -DIAResult DIASymbol::getSubType() { - return InternalGetDIAValue( - &IDiaSymbol::get_subType); -} - -DIAResult DIASymbol::getBaseSymbol() { - return InternalGetDIAValue( - &IDiaSymbol::get_baseSymbol); -} - -DIAResult DIASymbol::getAccess() { - return InternalGetDIAValue(&IDiaSymbol::get_access); -} - -DIAResult DIASymbol::getAddressOffset() { - return InternalGetDIAValue(&IDiaSymbol::get_addressOffset); -} - -DIAResult DIASymbol::getAddressSection() { - return InternalGetDIAValue(&IDiaSymbol::get_addressSection); -} - -DIAResult DIASymbol::getAddressTaken() { - return InternalGetDIAValue(&IDiaSymbol::get_addressTaken); -} - -DIAResult DIASymbol::getAge() { - return InternalGetDIAValue(&IDiaSymbol::get_age); -} - -DIAResult DIASymbol::getArrayIndexTypeId() { - return InternalGetDIAValue(&IDiaSymbol::get_arrayIndexTypeId); -} - -DIAResult DIASymbol::getBackEndMajor() { - return InternalGetDIAValue(&IDiaSymbol::get_backEndMajor); -} - -DIAResult DIASymbol::getBackEndMinor() { - - return InternalGetDIAValue(&IDiaSymbol::get_backEndMinor); -} - -DIAResult DIASymbol::getBackEndBuild() { - return InternalGetDIAValue(&IDiaSymbol::get_backEndBuild); -} - -DIAResult DIASymbol::getBackEndQFE() { - return InternalGetDIAValue(&IDiaSymbol::get_backEndQFE); -} - -DIAResult DIASymbol::getBaseDataOffset() { - return InternalGetDIAValue(&IDiaSymbol::get_baseDataOffset); -} - -DIAResult DIASymbol::getBaseDataSlot() { - return InternalGetDIAValue(&IDiaSymbol::get_baseDataSlot); -} - -DIAResult DIASymbol::getBaseSymbolId() { - return InternalGetDIAValue(&IDiaSymbol::get_baseSymbolId); -} - -DIAResult DIASymbol::getBaseType() { - return InternalGetDIAValue(&IDiaSymbol::get_baseType); -} - -DIAResult DIASymbol::getBitPosition() { - return InternalGetDIAValue(&IDiaSymbol::get_bitPosition); -} - -DIAResult DIASymbol::getBuiltInKind() { - return InternalGetDIAValue(&IDiaSymbol::get_builtInKind); -} - -DIAResult DIASymbol::getCallingConvention() { - return InternalGetDIAValue( - &IDiaSymbol::get_callingConvention); -} - -DIAResult DIASymbol::getClassParentId() { - return InternalGetDIAValue(&IDiaSymbol::get_classParentId); -} - -DIAResult DIASymbol::isCode() { - return InternalGetDIAValue(&IDiaSymbol::get_code); -} - -DIAResult DIASymbol::isCompilerGenerated() { - return InternalGetDIAValue(&IDiaSymbol::get_compilerGenerated); -} - -DIAResult DIASymbol::getCompilerName() { - return InternalGetDIAStringValue(&IDiaSymbol::get_compilerName); -} - -DIAResult DIASymbol::hasConstructor() { - return InternalGetDIAValue(&IDiaSymbol::get_constructor); -} - -DIAResult DIASymbol::isConstType() { - return InternalGetDIAValue(&IDiaSymbol::get_constType); -} - -DIAResult DIASymbol::getCount() { - return InternalGetDIAValue(&IDiaSymbol::get_count); -} - -DIAResult DIASymbol::getCountLiveRanges() { - return InternalGetDIAValue(&IDiaSymbol::get_countLiveRanges); -} - -DIAResult DIASymbol::hasCustomCallingConvention() { - return InternalGetDIAValue(&IDiaSymbol::get_customCallingConvention); -} - -DIAResult DIASymbol::getDataKind() { - return InternalGetDIAValue(&IDiaSymbol::get_dataKind); -} - -DIAResult DIASymbol::isEditAndContinueEnabled() { - return InternalGetDIAValue(&IDiaSymbol::get_editAndContinueEnabled); -} - -DIAResult DIASymbol::hasFarReturn() { - return InternalGetDIAValue(&IDiaSymbol::get_farReturn); -} - -DIAResult DIASymbol::getFrontEndMajor() { - return InternalGetDIAValue(&IDiaSymbol::get_frontEndMajor); -} - -DIAResult DIASymbol::getFrontEndMinor() { - return InternalGetDIAValue(&IDiaSymbol::get_frontEndMinor); -} - -DIAResult DIASymbol::getFrontEndBuild() { - return InternalGetDIAValue(&IDiaSymbol::get_frontEndBuild); -} - -DIAResult DIASymbol::getFrontEndQFE() { - return InternalGetDIAValue(&IDiaSymbol::get_frontEndQFE); -} - -DIAResult DIASymbol::isFunction() { - return InternalGetDIAValue(&IDiaSymbol::get_function); -} - -DIAResult DIASymbol::getGuid() { - return InternalGetDIAValue(&IDiaSymbol::get_guid); -} - -DIAResult DIASymbol::hasAlloca() { - return InternalGetDIAValue(&IDiaSymbol::get_hasAlloca); -} - -DIAResult DIASymbol::hasAssignmentOperator() { - return InternalGetDIAValue(&IDiaSymbol::get_hasAssignmentOperator); -} - -DIAResult DIASymbol::hasCastOperator() { - return InternalGetDIAValue(&IDiaSymbol::get_hasCastOperator); -} - -DIAResult DIASymbol::hasDebugInfo() { - return InternalGetDIAValue(&IDiaSymbol::get_hasDebugInfo); -} - -DIAResult DIASymbol::hasEH() { - return InternalGetDIAValue(&IDiaSymbol::get_hasEH); -} - -DIAResult DIASymbol::hasEHa() { - return InternalGetDIAValue(&IDiaSymbol::get_hasEHa); -} - -DIAResult DIASymbol::hasInlAsm() { - return InternalGetDIAValue(&IDiaSymbol::get_hasInlAsm); -} - -DIAResult DIASymbol::hasLongJump() { - return InternalGetDIAValue(&IDiaSymbol::get_hasLongJump); -} - -DIAResult DIASymbol::hasManagedCode() { - return InternalGetDIAValue(&IDiaSymbol::get_hasManagedCode); -} - -DIAResult DIASymbol::hasNestedTypes() { - return InternalGetDIAValue(&IDiaSymbol::get_hasNestedTypes); -} - -DIAResult DIASymbol::hasSecurityChecks() { - return InternalGetDIAValue(&IDiaSymbol::get_hasSecurityChecks); -} - -DIAResult DIASymbol::hasSEH() { - return InternalGetDIAValue(&IDiaSymbol::get_hasSEH); -} - -DIAResult DIASymbol::hasSetJump() { - return InternalGetDIAValue(&IDiaSymbol::get_hasSetJump); -} - -DIAResult DIASymbol::isIndirectVirtualBaseClass() { - return InternalGetDIAValue(&IDiaSymbol::get_indirectVirtualBaseClass); -} - -DIAResult DIASymbol::hasInlineAttribute() { - return InternalGetDIAValue(&IDiaSymbol::get_inlSpec); -} - -DIAResult DIASymbol::hasInterruptReturn() { - return InternalGetDIAValue(&IDiaSymbol::get_interruptReturn); -} - -DIAResult DIASymbol::isBaseVirtualFunction() { - return InternalGetDIAValue(&IDiaSymbol::get_intro); -} - -DIAResult DIASymbol::isIntrinsic() { - return InternalGetDIAValue(&IDiaSymbol::get_intrinsic); -} - -DIAResult DIASymbol::isAcceleratorGroupSharedLocal() { - return InternalGetDIAValue(&IDiaSymbol::get_isAcceleratorGroupSharedLocal); -} - -DIAResult DIASymbol::isAcceleratorPointerTagLiveRange() { - return InternalGetDIAValue(&IDiaSymbol::get_isAcceleratorPointerTagLiveRange); -} - -DIAResult DIASymbol::isAcceleratorStubFunction() { - return InternalGetDIAValue(&IDiaSymbol::get_isAcceleratorStubFunction); -} - -DIAResult DIASymbol::isAggregated() { - return InternalGetDIAValue(&IDiaSymbol::get_isAggregated); -} - -DIAResult DIASymbol::isConstructorVirtualBase() { - return InternalGetDIAValue(&IDiaSymbol::get_isConstructorVirtualBase); -} - -DIAResult DIASymbol::hasStrictGSCheck() { - return InternalGetDIAValue(&IDiaSymbol::get_strictGSCheck); -} - -DIAResult DIASymbol::isLocationControlFlowDependent() { - return InternalGetDIAValue(&IDiaSymbol::get_isLocationControlFlowDependent); -} - -DIAResult DIASymbol::hasCTypes() { - return InternalGetDIAValue(&IDiaSymbol::get_isCTypes); -} - -DIAResult DIASymbol::isCVTCIL() { - return InternalGetDIAValue(&IDiaSymbol::get_isCVTCIL); -} - -DIAResult DIASymbol::isDataAligned() { - return InternalGetDIAValue(&IDiaSymbol::get_isDataAligned); -} - -DIAResult DIASymbol::isHLSLData() { - return InternalGetDIAValue(&IDiaSymbol::get_isHLSLData); -} - -DIAResult DIASymbol::isHotpatchable() { - return InternalGetDIAValue(&IDiaSymbol::get_isHotpatchable); -} - -DIAResult DIASymbol::isLTCG() { - return InternalGetDIAValue(&IDiaSymbol::get_isLTCG); -} - -DIAResult DIASymbol::isMatrixRowMajor() { - return InternalGetDIAValue(&IDiaSymbol::get_isMatrixRowMajor); -} - -DIAResult DIASymbol::isMSILNetmodule() { - return InternalGetDIAValue(&IDiaSymbol::get_isMSILNetmodule); -} - -DIAResult DIASymbol::isMultipleInheritance() { - return InternalGetDIAValue(&IDiaSymbol::get_isMultipleInheritance); -} - -DIAResult DIASymbol::isNaked() { - return InternalGetDIAValue(&IDiaSymbol::get_isNaked); -} - -DIAResult DIASymbol::isOptimizedAway() { - return InternalGetDIAValue(&IDiaSymbol::get_isOptimizedAway); -} - -DIAResult DIASymbol::isPointerBasedOnSymbolValue() { - return InternalGetDIAValue(&IDiaSymbol::get_isPointerBasedOnSymbolValue); -} - -DIAResult DIASymbol::isPointerToDataMember() { - return InternalGetDIAValue(&IDiaSymbol::get_isPointerToDataMember); -} - -DIAResult DIASymbol::isPointerToMemberFunction() { - return InternalGetDIAValue(&IDiaSymbol::get_isPointerToMemberFunction); -} - -DIAResult DIASymbol::isReturnValue() { - return InternalGetDIAValue(&IDiaSymbol::get_isReturnValue); -} - -DIAResult DIASymbol::isSdl() { - return InternalGetDIAValue(&IDiaSymbol::get_isSdl); -} - -DIAResult DIASymbol::isSingleInheritance() { - return InternalGetDIAValue(&IDiaSymbol::get_isSingleInheritance); -} - -DIAResult DIASymbol::isSplitted() { - return InternalGetDIAValue(&IDiaSymbol::get_isSplitted); -} - -DIAResult DIASymbol::isStatic() { - return InternalGetDIAValue(&IDiaSymbol::get_isStatic); -} - -DIAResult DIASymbol::isStripped() { - return InternalGetDIAValue(&IDiaSymbol::get_isStripped); -} - -DIAResult DIASymbol::isVirtualInheritance() { - return InternalGetDIAValue(&IDiaSymbol::get_isVirtualInheritance); -} - -DIAResult DIASymbol::getLanguage() { - return InternalGetDIAValue(&IDiaSymbol::get_language); -} - -DIAResult DIASymbol::isSafeBuffers() { - return InternalGetDIAValue(&IDiaSymbol::get_isSafeBuffers); -} - -DIAResult DIASymbol::getLength() { - return InternalGetDIAValue(&IDiaSymbol::get_length); -} - -DIAResult DIASymbol::getLexicalParentId() { - return InternalGetDIAValue(&IDiaSymbol::get_lexicalParentId); -} - -DIAResult DIASymbol::getLexicalParent() { - return InternalGetDIAValue( - &IDiaSymbol::get_lexicalParent); -} - -DIAResult DIASymbol::getLocalBasePointerRegisterId() { - return InternalGetDIAValue(&IDiaSymbol::get_localBasePointerRegisterId); -} - -DIAResult DIASymbol::getLibraryName() { - return InternalGetDIAStringValue(&IDiaSymbol::get_libraryName); -} - -DIAResult DIASymbol::getLiveRangeLength() { - return InternalGetDIAValue(&IDiaSymbol::get_liveRangeLength); -} - -DIAResult DIASymbol::getLiveRangeStartAddressSection() { - return InternalGetDIAValue(&IDiaSymbol::get_liveRangeStartAddressSection); -} - -DIAResult DIASymbol::getLiveRangeStartAddressOffset() { - return InternalGetDIAValue(&IDiaSymbol::get_liveRangeStartAddressOffset); -} - -DIAResult DIASymbol::getLiveRangeStartRelativeVirtualAddress() { - return InternalGetDIAValue( - &IDiaSymbol::get_liveRangeStartRelativeVirtualAddress); -} - -DIAResult DIASymbol::getLocationType() { - return InternalGetDIAValue( - &IDiaSymbol::get_locationType); -} - -DIAResult DIASymbol::getLowerBoundId() { - return InternalGetDIAValue(&IDiaSymbol::get_lowerBoundId); -} - -DIAResult DIASymbol::getMachineType() { - return InternalGetDIAValue( - &IDiaSymbol::get_machineType); -} - -DIAResult DIASymbol::isManagedRef() { - return InternalGetDIAValue(&IDiaSymbol::get_managed); -} - -DIAResult DIASymbol::getMemorySpaceKind() { - return InternalGetDIAValue(&IDiaSymbol::get_memorySpaceKind); -} - -DIAResult DIASymbol::isMsilRef() { - return InternalGetDIAValue(&IDiaSymbol::get_msil); -} - -DIAResult DIASymbol::getName() { - return InternalGetDIAStringValue(&IDiaSymbol::get_name); -} - -DIAResult DIASymbol::isNested() { - return InternalGetDIAValue(&IDiaSymbol::get_nested); -} - -DIAResult DIASymbol::hasNoInlineAttribute() { - return InternalGetDIAValue(&IDiaSymbol::get_noInline); -} - -DIAResult DIASymbol::hasNoReturnAttribute() { - return InternalGetDIAValue(&IDiaSymbol::get_noReturn); -} - -DIAResult DIASymbol::getNoStackOrdering() { - return InternalGetDIAValue(&IDiaSymbol::get_noStackOrdering); -} - -DIAResult DIASymbol::isUnreached() { - return InternalGetDIAValue(&IDiaSymbol::get_notReached); -} - -DIAResult DIASymbol::getNumberOfAcceleratorPointerTags() { - return InternalGetDIAValue(&IDiaSymbol::get_numberOfAcceleratorPointerTags); -} - -DIAResult DIASymbol::getNumberOfModifiers() { - return InternalGetDIAValue(&IDiaSymbol::get_numberOfModifiers); -} - -DIAResult DIASymbol::getNumberOfRegisterIndices() { - return InternalGetDIAValue(&IDiaSymbol::get_numberOfRegisterIndices); -} - -DIAResult DIASymbol::getNumberOfRows() { - return InternalGetDIAValue(&IDiaSymbol::get_numberOfRows); -} - -DIAResult DIASymbol::getNumberOfColumns() { - return InternalGetDIAValue(&IDiaSymbol::get_numberOfColumns); -} - -DIAResult DIASymbol::getObjectFileName() { - return InternalGetDIAStringValue(&IDiaSymbol::get_objectFileName); -} - -DIAResult DIASymbol::getOemSymbolId() { - return InternalGetDIAValue(&IDiaSymbol::get_oemSymbolId); -} - -DIAResult DIASymbol::getOffset() { - return InternalGetDIAValue(&IDiaSymbol::get_offset); -} - -DIAResult DIASymbol::getOffsetInUdt() { - return InternalGetDIAValue(&IDiaSymbol::get_offsetInUdt); -} - -DIAResult DIASymbol::hasOptimizedCodeDebugInfo() { - return InternalGetDIAValue(&IDiaSymbol::get_optimizedCodeDebugInfo); -} - -DIAResult DIASymbol::hasOverloadedOperator() { - return InternalGetDIAValue(&IDiaSymbol::get_overloadedOperator); -} - -DIAResult DIASymbol::isPacked() { - return InternalGetDIAValue(&IDiaSymbol::get_packed); -} - -DIAResult DIASymbol::getPlatform() { - return InternalGetDIAValue(&IDiaSymbol::get_platform); -} - -DIAResult DIASymbol::isPureVirtual() { - return InternalGetDIAValue(&IDiaSymbol::get_pure); -} - -DIAResult DIASymbol::getRank() { - return InternalGetDIAValue(&IDiaSymbol::get_rank); -} - -DIAResult DIASymbol::isReference() { - return InternalGetDIAValue(&IDiaSymbol::get_reference); -} - -DIAResult DIASymbol::isRValueReference() { - return InternalGetDIAValue(&IDiaSymbol::get_RValueReference); -} - -DIAResult DIASymbol::getRegisterId() { - return InternalGetDIAValue(&IDiaSymbol::get_registerId); -} - -DIAResult DIASymbol::getRegisterType() { - return InternalGetDIAValue(&IDiaSymbol::get_registerType); -} - -DIAResult DIASymbol::getRelativeVirtualAddress() { - return InternalGetDIAValue(&IDiaSymbol::get_relativeVirtualAddress); -} - -DIAResult DIASymbol::isRestrictedType() { - return InternalGetDIAValue(&IDiaSymbol::get_restrictedType); -} - -DIAResult DIASymbol::getSamplerSlot() { - return InternalGetDIAValue(&IDiaSymbol::get_samplerSlot); -} - -DIAResult DIASymbol::isScoped() { - return InternalGetDIAValue(&IDiaSymbol::get_scoped); -} - -DIAResult DIASymbol::isRefUdt() { - return InternalGetDIAValue(&IDiaSymbol::get_isRefUdt); -} - -DIAResult DIASymbol::isValueUdt() { - return InternalGetDIAValue(&IDiaSymbol::get_isValueUdt); -} - -DIAResult DIASymbol::isInterfaceUdt() { - return InternalGetDIAValue(&IDiaSymbol::get_isInterfaceUdt); -} - -DIAResult DIASymbol::isCxxReturnUdt() { - return InternalGetDIAValue(&IDiaSymbol::get_isCxxReturnUdt); -} - -DIAResult DIASymbol::getSignature() { - return InternalGetDIAValue(&IDiaSymbol::get_signature); -} - -DIAResult DIASymbol::getSizeInUdt() { - return InternalGetDIAValue(&IDiaSymbol::get_sizeInUdt); -} - -DIAResult DIASymbol::getSlot() { - return InternalGetDIAValue(&IDiaSymbol::get_slot); -} - -DIAResult DIASymbol::getSourceFileName() { - return InternalGetDIAStringValue(&IDiaSymbol::get_sourceFileName); -} - -DIAResult DIASymbol::getStride() { - return InternalGetDIAValue(&IDiaSymbol::get_stride); -} - -DIAResult DIASymbol::getSubTypeId() { - return InternalGetDIAValue(&IDiaSymbol::get_subTypeId); -} - -DIAResult DIASymbol::getSymbolsFileName() { - return InternalGetDIAStringValue(&IDiaSymbol::get_symbolsFileName); -} - -DIAResult DIASymbol::getSymIndexId() { - return InternalGetDIAValue(&IDiaSymbol::get_symIndexId); -} - -DIAResult DIASymbol::getSymTag() { - return InternalGetDIAValue(&IDiaSymbol::get_symTag); -} - -DIAResult DIASymbol::getTargetOffset() { - return InternalGetDIAValue(&IDiaSymbol::get_targetOffset); -} - -DIAResult DIASymbol::getTargetRelativeVirtualAddress() { - return InternalGetDIAValue(&IDiaSymbol::get_targetRelativeVirtualAddress); -} - -DIAResult DIASymbol::getTargetSection() { - return InternalGetDIAValue(&IDiaSymbol::get_targetSection); -} - -DIAResult DIASymbol::getTargetVirtualAddress() { - return InternalGetDIAValue(&IDiaSymbol::get_targetVirtualAddress); -} - -DIAResult DIASymbol::getTextureSlot() { - return InternalGetDIAValue(&IDiaSymbol::get_textureSlot); -} - -DIAResult DIASymbol::getThisAdjust() { - return InternalGetDIAValue(&IDiaSymbol::get_thisAdjust); -} - -DIAResult DIASymbol::getThunkOrdinal() { - return InternalGetDIAValue( - &IDiaSymbol::get_thunkOrdinal); -} - -DIAResult DIASymbol::getTimeStamp() { - return InternalGetDIAValue(&IDiaSymbol::get_timeStamp); -} - -DIAResult DIASymbol::getToken() { - return InternalGetDIAValue(&IDiaSymbol::get_token); -} - -DIAResult DIASymbol::getUavSlot() { - return InternalGetDIAValue(&IDiaSymbol::get_uavSlot); -} - -DIAResult DIASymbol::getUdtKind() { - return InternalGetDIAValue(&IDiaSymbol::get_udtKind); -} - -DIAResult DIASymbol::isUnalignedType() { - return InternalGetDIAValue(&IDiaSymbol::get_unalignedType); -} - -DIAResult DIASymbol::getUndecoratedName() { - return InternalGetDIAStringValue(&IDiaSymbol::get_undecoratedName); -} - -DIAResult DIASymbol::getUnmodifiedTypeId() { - return InternalGetDIAValue(&IDiaSymbol::get_unmodifiedTypeId); -} - -DIAResult DIASymbol::getUpperBoundId() { - return InternalGetDIAValue(&IDiaSymbol::get_upperBoundId); -} - -DIAResult DIASymbol::isVirtual() { - return InternalGetDIAValue(&IDiaSymbol::get_virtual); -} - -DIAResult DIASymbol::getVirtualAddress() { - return InternalGetDIAValue(&IDiaSymbol::get_virtualAddress); -} - -DIAResult DIASymbol::isVirtualBaseClass() { - return InternalGetDIAValue(&IDiaSymbol::get_virtualBaseClass); -} - -DIAResult DIASymbol::getVirtualBaseDispIndex() { - return InternalGetDIAValue(&IDiaSymbol::get_virtualBaseDispIndex); -} - -DIAResult DIASymbol::getVirtualBaseOffset() { - return InternalGetDIAValue(&IDiaSymbol::get_virtualBaseOffset); -} - -DIAResult DIASymbol::getVirtualBasePointerOffset() { - return InternalGetDIAValue(&IDiaSymbol::get_virtualBasePointerOffset); -} - -DIAResult DIASymbol::getVirtualTableShapeId() { - return InternalGetDIAValue(&IDiaSymbol::get_virtualTableShapeId); -} - -DIAResult DIASymbol::isVolatileType() { - return InternalGetDIAValue(&IDiaSymbol::get_volatileType); -} +//===- DIASymbol.cpp - Dump debug info from a PDB file ----------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "llvm-pdbdump.h" +#include "DIASymbol.h" + +using namespace llvm::sys::windows; + +DIASymbol::DIASymbol(IDiaSymbol *DiaSymbol) : Symbol(DiaSymbol) { + Symbol->AddRef(); +} + +DIASymbol::~DIASymbol() { Symbol->Release(); } + +void DIASymbol::fullDump(int IndentLevel) { + getLexicalParent().dump("Lexical parent", IndentLevel); + getClassParent().dump("Class parent", IndentLevel); + getType().dump("Type", IndentLevel); + getArrayIndexType().dump("Array index type", IndentLevel); + getVirtualTableShape().dump("Vtable shape", IndentLevel); + getLowerBound().dump("Lower bound", IndentLevel); + getUpperBound().dump("Upper bound", IndentLevel); + getObjectPointerType().dump("Object pointer type", IndentLevel); + getContainer().dump("Container", IndentLevel); + getVirtualBaseTableType().dump("Virtual base table type", IndentLevel); + getUnmodifiedType().dump("Unmodified type", IndentLevel); + getSubType().dump("Sub type", IndentLevel); + getBaseSymbol().dump("Base symbol", IndentLevel); + +#if (_MSC_FULL_VER >= 180031101) + // These methods are only available on VS 2013 SP4 and higher. + isPGO().dump("Is PGO", IndentLevel); + hasValidPGOCounts().dump("Has valid PGO counts", IndentLevel); + isOptimizedForSpeed().dump("Is optimized for speed", IndentLevel); + getPGOEntryCount().dump("PGO entry count", IndentLevel); + getPGOEdgeCount().dump("PGO edge count", IndentLevel); + getPGODynamicInstructionCount().dump("PGO dynamic instruction count", + IndentLevel); + getStaticSize().dump("Static size", IndentLevel); + getFinalLiveStaticSize().dump("Final live static size", IndentLevel); + getPhaseName().dump("Phase name", IndentLevel); + hasControlFlowCheck().dump("Has control flow check", IndentLevel); +#endif + + getAccess().dump("Access", IndentLevel); + getAddressOffset().dump("Address Offset", IndentLevel); + getAddressSection().dump("Address Section", IndentLevel); + getAddressTaken().dump("Address Taken", IndentLevel); + getAge().dump("Age", IndentLevel); + getArrayIndexTypeId().dump("Array Index Type Id", IndentLevel); + getBackEndMajor().dump("Back End Major", IndentLevel); + getBackEndMinor().dump("Back End Minor", IndentLevel); + getBackEndBuild().dump("Back End Build", IndentLevel); + getBaseDataOffset().dump("Base Data Offset", IndentLevel); + getBaseDataSlot().dump("Base Data Slot", IndentLevel); + getBaseSymbolId().dump("Base Symbol Id", IndentLevel); + getBaseType().dump("Base Type", IndentLevel); + getBitPosition().dump("Bit Position", IndentLevel); + getBuiltInKind().dump("Built In Kind", IndentLevel); + getCallingConvention().dump("Calling Convention", IndentLevel); + getClassParentId().dump("Class Parent Id", IndentLevel); + isCode().dump("Code", IndentLevel); + isCompilerGenerated().dump("Compiler Generated", IndentLevel); + getCompilerName().dump("Compiler Name", IndentLevel); + hasConstructor().dump("Constructor", IndentLevel); + isConstType().dump("Const Type", IndentLevel); + getCount().dump("Count", IndentLevel); + getCountLiveRanges().dump("Count Live Ranges", IndentLevel); + hasCustomCallingConvention().dump("Custom Calling Convention", IndentLevel); + getDataKind().dump("Data Kind", IndentLevel); + isEditAndContinueEnabled().dump("Edit and Continue Enabled", IndentLevel); + hasFarReturn().dump("Far Return", IndentLevel); + getFrontEndMajor().dump("Front End Major", IndentLevel); + getFrontEndMinor().dump("Front End Minor", IndentLevel); + getFrontEndBuild().dump("Front End Build", IndentLevel); + isFunction().dump("Function", IndentLevel); + getGuid().dump("GUID", IndentLevel); + hasAlloca().dump("Has Alloca", IndentLevel); + hasAssignmentOperator().dump("Has Assignment Operator", IndentLevel); + hasCastOperator().dump("Has Cast Operator", IndentLevel); + hasDebugInfo().dump("Has Debug Info", IndentLevel); + hasEH().dump("Has EH", IndentLevel); + hasEHa().dump("Has EHa", IndentLevel); + hasInlAsm().dump("Has Inline Asm", IndentLevel); + hasLongJump().dump("Has longjmp", IndentLevel); + hasManagedCode().dump("Has Managed Code", IndentLevel); + hasNestedTypes().dump("Has Nested Types", IndentLevel); + hasSecurityChecks().dump("Has Security Checks", IndentLevel); + hasSEH().dump("Has SEH", IndentLevel); + hasSetJump().dump("Has setjmp", IndentLevel); + isIndirectVirtualBaseClass().dump("Is indirect virtual base", IndentLevel); + hasInlineAttribute().dump("Has inline declspec", IndentLevel); + hasInterruptReturn().dump("Has interrupt return", IndentLevel); + isBaseVirtualFunction().dump("Is base virtual function", IndentLevel); + isAcceleratorGroupSharedLocal().dump("Is Accelerator Group Shared Local", + IndentLevel); + isAcceleratorPointerTagLiveRange().dump( + "Is Accelerator Pointer Tag Live Range", IndentLevel); + isAcceleratorStubFunction().dump("Is Accelerator Stub Function", IndentLevel); + isAggregated().dump("Is aggregated", IndentLevel); + hasCTypes().dump("Has C types", IndentLevel); + isCVTCIL().dump("Was converted from MSIL", IndentLevel); + isDataAligned().dump("Is data aligned", IndentLevel); + isHLSLData().dump("Is HLSL data", IndentLevel); + isHotpatchable().dump("Is hot-patchable", IndentLevel); + isLTCG().dump("Is LTCG", IndentLevel); + isMatrixRowMajor().dump("Is matrix row major", IndentLevel); + isMSILNetmodule().dump("Is MSIL .netmodule", IndentLevel); + isMultipleInheritance().dump("Is multiple inheritance", IndentLevel); + isNaked().dump("Is naked", IndentLevel); + isOptimizedAway().dump("Is optimized away", IndentLevel); + isPointerBasedOnSymbolValue().dump("Is pointer based on symbol value", + IndentLevel); + isPointerToDataMember().dump("Is pointer to data member", IndentLevel); + isPointerToMemberFunction().dump("Is pointer to member function", + IndentLevel); + isReturnValue().dump("Is return value", IndentLevel); + isSdl().dump("Is SDL", IndentLevel); + isSingleInheritance().dump("Is single inheritance", IndentLevel); + isSplitted().dump("Is splitted", IndentLevel); + isStatic().dump("Is staic", IndentLevel); + isStripped().dump("Is stripped", IndentLevel); + isVirtualInheritance().dump("Is virtual inheritance", IndentLevel); + getLanguage().dump("Language", IndentLevel); + getLength().dump("Length", IndentLevel); + getLexicalParentId().dump("Lexical parent id", IndentLevel); + getLibraryName().dump("Library name", IndentLevel); + getLiveRangeLength().dump("Live range length", IndentLevel); + getLiveRangeStartAddressSection().dump("Live range start address section", + IndentLevel); + getLiveRangeStartAddressOffset().dump("Live range start address offset", + IndentLevel); + getLiveRangeStartRelativeVirtualAddress().dump("Live range start address RVA", + IndentLevel); + getLocationType().dump("Location type", IndentLevel); + getLowerBoundId().dump("Lower bound id", IndentLevel); + getMachineType().dump("Machine type", IndentLevel); + isManagedRef().dump("Managed", IndentLevel); + getMemorySpaceKind().dump("Memory space kind", IndentLevel); + isMsilRef().dump("MSIL", IndentLevel); + getName().dump("Name", IndentLevel); + isNested().dump("Nested", IndentLevel); + hasNoInlineAttribute().dump("Has noinline declspec", IndentLevel); + hasNoReturnAttribute().dump("Has noreturn declspec", IndentLevel); + getNoStackOrdering().dump("No stack ordering", IndentLevel); + isUnreached().dump("Not reached", IndentLevel); + getNumberOfAcceleratorPointerTags().dump("Number of accelerator pointer tags", + IndentLevel); + getNumberOfModifiers().dump("Number of modifiers", IndentLevel); + getNumberOfRegisterIndices().dump("Number of register indices", IndentLevel); + getNumberOfRows().dump("Number of rows", IndentLevel); + getNumberOfColumns().dump("Number of columns", IndentLevel); + getObjectFileName().dump("Object file name", IndentLevel); + getOemSymbolId().dump("OEM symbol id", IndentLevel); + getOffset().dump("Offset", IndentLevel); + hasOptimizedCodeDebugInfo().dump("Optimized code debug info", IndentLevel); + hasOverloadedOperator().dump("Overloaded operator", IndentLevel); + isPacked().dump("Packed", IndentLevel); + getPlatform().dump("Platform", IndentLevel); + isPureVirtual().dump("Pure", IndentLevel); + getRank().dump("Rank", IndentLevel); + isReference().dump("Reference", IndentLevel); + getRegisterId().dump("Register ID", IndentLevel); + getRegisterType().dump("Register type", IndentLevel); + getRelativeVirtualAddress().dump("RVA", IndentLevel); + isRestrictedType().dump("Restricted type", IndentLevel); + getSamplerSlot().dump("Sampler slot", IndentLevel); + isScoped().dump("Scoped", IndentLevel); + getSignature().dump("Signature", IndentLevel); + getSizeInUdt().dump("Size in UDT", IndentLevel); + getSlot().dump("Slot", IndentLevel); + getSourceFileName().dump("Source file name", IndentLevel); + getStride().dump("Stride", IndentLevel); + getSubTypeId().dump("Sub type ID", IndentLevel); + getSymbolsFileName().dump("File name", IndentLevel); + getSymIndexId().dump("Sym index ID", IndentLevel); + getSymTag().dump("Sym tag", IndentLevel); + getTargetOffset().dump("Target offset", IndentLevel); + getTargetRelativeVirtualAddress().dump("Target RVA", IndentLevel); + getTargetSection().dump("Target section", IndentLevel); + getTargetVirtualAddress().dump("Target virtual address", IndentLevel); + getTextureSlot().dump("Texture slot", IndentLevel); + getThisAdjust().dump("This adjust", IndentLevel); + getThunkOrdinal().dump("Thunk ordinal", IndentLevel); + getTimeStamp().dump("Time stamp", IndentLevel); + getToken().dump("Token", IndentLevel); + getUavSlot().dump("UAV slot", IndentLevel); + getUdtKind().dump("UDT kind", IndentLevel); + isUnalignedType().dump("Unaligned type", IndentLevel); + getUndecoratedName().dump("Undecorated name", IndentLevel); + getUnmodifiedTypeId().dump("Unmodified type id", IndentLevel); + getUpperBoundId().dump("Upper bound id", IndentLevel); + isVirtual().dump("Virtual", IndentLevel); + getVirtualAddress().dump("Virtual address", IndentLevel); + isVirtualBaseClass().dump("Virtual base class", IndentLevel); + getVirtualBaseDispIndex().dump("Virtual base disp index", IndentLevel); + getVirtualBaseOffset().dump("Virtual base offset", IndentLevel); + getVirtualBasePointerOffset().dump("Virtual base pointer offset", + IndentLevel); + getVirtualTableShapeId().dump("Vtable shape ID", IndentLevel); + isVolatileType().dump("Volatile type", IndentLevel); +} + +#if (_MSC_FULL_VER >= 180031101) +DIAResult DIASymbol::isPGO() { + return InternalGetDIAValue(&IDiaSymbol::get_isPGO); +} + +DIAResult DIASymbol::hasValidPGOCounts() { + return InternalGetDIAValue(&IDiaSymbol::get_hasValidPGOCounts); +} + +DIAResult DIASymbol::isOptimizedForSpeed() { + return InternalGetDIAValue(&IDiaSymbol::get_isOptimizedForSpeed); +} + +DIAResult DIASymbol::getPGOEntryCount() { + return InternalGetDIAValue(&IDiaSymbol::get_PGOEntryCount); +} + +DIAResult DIASymbol::getPGOEdgeCount() { + return InternalGetDIAValue(&IDiaSymbol::get_PGOEdgeCount); +} + +DIAResult DIASymbol::getPGODynamicInstructionCount() { + return InternalGetDIAValue(&IDiaSymbol::get_PGODynamicInstructionCount); +} + +DIAResult DIASymbol::getStaticSize() { + return InternalGetDIAValue(&IDiaSymbol::get_staticSize); +} + +DIAResult DIASymbol::getFinalLiveStaticSize() { + return InternalGetDIAValue(&IDiaSymbol::get_finalLiveStaticSize); +} + +DIAResult DIASymbol::getPhaseName() { + return InternalGetDIAStringValue(&IDiaSymbol::get_phaseName); +} + +DIAResult DIASymbol::hasControlFlowCheck() { + return InternalGetDIAValue(&IDiaSymbol::get_hasControlFlowCheck); +} +#endif + +DIAResult DIASymbol::getClassParent() { + return InternalGetDIAValue( + &IDiaSymbol::get_classParent); +} + +DIAResult DIASymbol::getType() { + return InternalGetDIAValue(&IDiaSymbol::get_type); +} + +DIAResult DIASymbol::getArrayIndexType() { + return InternalGetDIAValue( + &IDiaSymbol::get_arrayIndexType); +} + +DIAResult DIASymbol::getVirtualTableShape() { + return InternalGetDIAValue( + &IDiaSymbol::get_virtualTableShape); +} + +DIAResult DIASymbol::getLowerBound() { + return InternalGetDIAValue( + &IDiaSymbol::get_lowerBound); +} + +DIAResult DIASymbol::getUpperBound() { + return InternalGetDIAValue( + &IDiaSymbol::get_upperBound); +} + +DIAResult DIASymbol::getObjectPointerType() { + return InternalGetDIAValue( + &IDiaSymbol::get_objectPointerType); +} + +DIAResult DIASymbol::getContainer() { + return InternalGetDIAValue( + &IDiaSymbol::get_container); +} + +DIAResult DIASymbol::getVirtualBaseTableType() { + return InternalGetDIAValue( + &IDiaSymbol::get_virtualBaseTableType); +} + +DIAResult DIASymbol::getUnmodifiedType() { + return InternalGetDIAValue( + &IDiaSymbol::get_unmodifiedType); +} + +DIAResult DIASymbol::getSubType() { + return InternalGetDIAValue( + &IDiaSymbol::get_subType); +} + +DIAResult DIASymbol::getBaseSymbol() { + return InternalGetDIAValue( + &IDiaSymbol::get_baseSymbol); +} + +DIAResult DIASymbol::getAccess() { + return InternalGetDIAValue(&IDiaSymbol::get_access); +} + +DIAResult DIASymbol::getAddressOffset() { + return InternalGetDIAValue(&IDiaSymbol::get_addressOffset); +} + +DIAResult DIASymbol::getAddressSection() { + return InternalGetDIAValue(&IDiaSymbol::get_addressSection); +} + +DIAResult DIASymbol::getAddressTaken() { + return InternalGetDIAValue(&IDiaSymbol::get_addressTaken); +} + +DIAResult DIASymbol::getAge() { + return InternalGetDIAValue(&IDiaSymbol::get_age); +} + +DIAResult DIASymbol::getArrayIndexTypeId() { + return InternalGetDIAValue(&IDiaSymbol::get_arrayIndexTypeId); +} + +DIAResult DIASymbol::getBackEndMajor() { + return InternalGetDIAValue(&IDiaSymbol::get_backEndMajor); +} + +DIAResult DIASymbol::getBackEndMinor() { + + return InternalGetDIAValue(&IDiaSymbol::get_backEndMinor); +} + +DIAResult DIASymbol::getBackEndBuild() { + return InternalGetDIAValue(&IDiaSymbol::get_backEndBuild); +} + +DIAResult DIASymbol::getBackEndQFE() { + return InternalGetDIAValue(&IDiaSymbol::get_backEndQFE); +} + +DIAResult DIASymbol::getBaseDataOffset() { + return InternalGetDIAValue(&IDiaSymbol::get_baseDataOffset); +} + +DIAResult DIASymbol::getBaseDataSlot() { + return InternalGetDIAValue(&IDiaSymbol::get_baseDataSlot); +} + +DIAResult DIASymbol::getBaseSymbolId() { + return InternalGetDIAValue(&IDiaSymbol::get_baseSymbolId); +} + +DIAResult DIASymbol::getBaseType() { + return InternalGetDIAValue(&IDiaSymbol::get_baseType); +} + +DIAResult DIASymbol::getBitPosition() { + return InternalGetDIAValue(&IDiaSymbol::get_bitPosition); +} + +DIAResult DIASymbol::getBuiltInKind() { + return InternalGetDIAValue(&IDiaSymbol::get_builtInKind); +} + +DIAResult DIASymbol::getCallingConvention() { + return InternalGetDIAValue( + &IDiaSymbol::get_callingConvention); +} + +DIAResult DIASymbol::getClassParentId() { + return InternalGetDIAValue(&IDiaSymbol::get_classParentId); +} + +DIAResult DIASymbol::isCode() { + return InternalGetDIAValue(&IDiaSymbol::get_code); +} + +DIAResult DIASymbol::isCompilerGenerated() { + return InternalGetDIAValue(&IDiaSymbol::get_compilerGenerated); +} + +DIAResult DIASymbol::getCompilerName() { + return InternalGetDIAStringValue(&IDiaSymbol::get_compilerName); +} + +DIAResult DIASymbol::hasConstructor() { + return InternalGetDIAValue(&IDiaSymbol::get_constructor); +} + +DIAResult DIASymbol::isConstType() { + return InternalGetDIAValue(&IDiaSymbol::get_constType); +} + +DIAResult DIASymbol::getCount() { + return InternalGetDIAValue(&IDiaSymbol::get_count); +} + +DIAResult DIASymbol::getCountLiveRanges() { + return InternalGetDIAValue(&IDiaSymbol::get_countLiveRanges); +} + +DIAResult DIASymbol::hasCustomCallingConvention() { + return InternalGetDIAValue(&IDiaSymbol::get_customCallingConvention); +} + +DIAResult DIASymbol::getDataKind() { + return InternalGetDIAValue(&IDiaSymbol::get_dataKind); +} + +DIAResult DIASymbol::isEditAndContinueEnabled() { + return InternalGetDIAValue(&IDiaSymbol::get_editAndContinueEnabled); +} + +DIAResult DIASymbol::hasFarReturn() { + return InternalGetDIAValue(&IDiaSymbol::get_farReturn); +} + +DIAResult DIASymbol::getFrontEndMajor() { + return InternalGetDIAValue(&IDiaSymbol::get_frontEndMajor); +} + +DIAResult DIASymbol::getFrontEndMinor() { + return InternalGetDIAValue(&IDiaSymbol::get_frontEndMinor); +} + +DIAResult DIASymbol::getFrontEndBuild() { + return InternalGetDIAValue(&IDiaSymbol::get_frontEndBuild); +} + +DIAResult DIASymbol::getFrontEndQFE() { + return InternalGetDIAValue(&IDiaSymbol::get_frontEndQFE); +} + +DIAResult DIASymbol::isFunction() { + return InternalGetDIAValue(&IDiaSymbol::get_function); +} + +DIAResult DIASymbol::getGuid() { + return InternalGetDIAValue(&IDiaSymbol::get_guid); +} + +DIAResult DIASymbol::hasAlloca() { + return InternalGetDIAValue(&IDiaSymbol::get_hasAlloca); +} + +DIAResult DIASymbol::hasAssignmentOperator() { + return InternalGetDIAValue(&IDiaSymbol::get_hasAssignmentOperator); +} + +DIAResult DIASymbol::hasCastOperator() { + return InternalGetDIAValue(&IDiaSymbol::get_hasCastOperator); +} + +DIAResult DIASymbol::hasDebugInfo() { + return InternalGetDIAValue(&IDiaSymbol::get_hasDebugInfo); +} + +DIAResult DIASymbol::hasEH() { + return InternalGetDIAValue(&IDiaSymbol::get_hasEH); +} + +DIAResult DIASymbol::hasEHa() { + return InternalGetDIAValue(&IDiaSymbol::get_hasEHa); +} + +DIAResult DIASymbol::hasInlAsm() { + return InternalGetDIAValue(&IDiaSymbol::get_hasInlAsm); +} + +DIAResult DIASymbol::hasLongJump() { + return InternalGetDIAValue(&IDiaSymbol::get_hasLongJump); +} + +DIAResult DIASymbol::hasManagedCode() { + return InternalGetDIAValue(&IDiaSymbol::get_hasManagedCode); +} + +DIAResult DIASymbol::hasNestedTypes() { + return InternalGetDIAValue(&IDiaSymbol::get_hasNestedTypes); +} + +DIAResult DIASymbol::hasSecurityChecks() { + return InternalGetDIAValue(&IDiaSymbol::get_hasSecurityChecks); +} + +DIAResult DIASymbol::hasSEH() { + return InternalGetDIAValue(&IDiaSymbol::get_hasSEH); +} + +DIAResult DIASymbol::hasSetJump() { + return InternalGetDIAValue(&IDiaSymbol::get_hasSetJump); +} + +DIAResult DIASymbol::isIndirectVirtualBaseClass() { + return InternalGetDIAValue(&IDiaSymbol::get_indirectVirtualBaseClass); +} + +DIAResult DIASymbol::hasInlineAttribute() { + return InternalGetDIAValue(&IDiaSymbol::get_inlSpec); +} + +DIAResult DIASymbol::hasInterruptReturn() { + return InternalGetDIAValue(&IDiaSymbol::get_interruptReturn); +} + +DIAResult DIASymbol::isBaseVirtualFunction() { + return InternalGetDIAValue(&IDiaSymbol::get_intro); +} + +DIAResult DIASymbol::isIntrinsic() { + return InternalGetDIAValue(&IDiaSymbol::get_intrinsic); +} + +DIAResult DIASymbol::isAcceleratorGroupSharedLocal() { + return InternalGetDIAValue(&IDiaSymbol::get_isAcceleratorGroupSharedLocal); +} + +DIAResult DIASymbol::isAcceleratorPointerTagLiveRange() { + return InternalGetDIAValue(&IDiaSymbol::get_isAcceleratorPointerTagLiveRange); +} + +DIAResult DIASymbol::isAcceleratorStubFunction() { + return InternalGetDIAValue(&IDiaSymbol::get_isAcceleratorStubFunction); +} + +DIAResult DIASymbol::isAggregated() { + return InternalGetDIAValue(&IDiaSymbol::get_isAggregated); +} + +DIAResult DIASymbol::isConstructorVirtualBase() { + return InternalGetDIAValue(&IDiaSymbol::get_isConstructorVirtualBase); +} + +DIAResult DIASymbol::hasStrictGSCheck() { + return InternalGetDIAValue(&IDiaSymbol::get_strictGSCheck); +} + +DIAResult DIASymbol::isLocationControlFlowDependent() { + return InternalGetDIAValue(&IDiaSymbol::get_isLocationControlFlowDependent); +} + +DIAResult DIASymbol::hasCTypes() { + return InternalGetDIAValue(&IDiaSymbol::get_isCTypes); +} + +DIAResult DIASymbol::isCVTCIL() { + return InternalGetDIAValue(&IDiaSymbol::get_isCVTCIL); +} + +DIAResult DIASymbol::isDataAligned() { + return InternalGetDIAValue(&IDiaSymbol::get_isDataAligned); +} + +DIAResult DIASymbol::isHLSLData() { + return InternalGetDIAValue(&IDiaSymbol::get_isHLSLData); +} + +DIAResult DIASymbol::isHotpatchable() { + return InternalGetDIAValue(&IDiaSymbol::get_isHotpatchable); +} + +DIAResult DIASymbol::isLTCG() { + return InternalGetDIAValue(&IDiaSymbol::get_isLTCG); +} + +DIAResult DIASymbol::isMatrixRowMajor() { + return InternalGetDIAValue(&IDiaSymbol::get_isMatrixRowMajor); +} + +DIAResult DIASymbol::isMSILNetmodule() { + return InternalGetDIAValue(&IDiaSymbol::get_isMSILNetmodule); +} + +DIAResult DIASymbol::isMultipleInheritance() { + return InternalGetDIAValue(&IDiaSymbol::get_isMultipleInheritance); +} + +DIAResult DIASymbol::isNaked() { + return InternalGetDIAValue(&IDiaSymbol::get_isNaked); +} + +DIAResult DIASymbol::isOptimizedAway() { + return InternalGetDIAValue(&IDiaSymbol::get_isOptimizedAway); +} + +DIAResult DIASymbol::isPointerBasedOnSymbolValue() { + return InternalGetDIAValue(&IDiaSymbol::get_isPointerBasedOnSymbolValue); +} + +DIAResult DIASymbol::isPointerToDataMember() { + return InternalGetDIAValue(&IDiaSymbol::get_isPointerToDataMember); +} + +DIAResult DIASymbol::isPointerToMemberFunction() { + return InternalGetDIAValue(&IDiaSymbol::get_isPointerToMemberFunction); +} + +DIAResult DIASymbol::isReturnValue() { + return InternalGetDIAValue(&IDiaSymbol::get_isReturnValue); +} + +DIAResult DIASymbol::isSdl() { + return InternalGetDIAValue(&IDiaSymbol::get_isSdl); +} + +DIAResult DIASymbol::isSingleInheritance() { + return InternalGetDIAValue(&IDiaSymbol::get_isSingleInheritance); +} + +DIAResult DIASymbol::isSplitted() { + return InternalGetDIAValue(&IDiaSymbol::get_isSplitted); +} + +DIAResult DIASymbol::isStatic() { + return InternalGetDIAValue(&IDiaSymbol::get_isStatic); +} + +DIAResult DIASymbol::isStripped() { + return InternalGetDIAValue(&IDiaSymbol::get_isStripped); +} + +DIAResult DIASymbol::isVirtualInheritance() { + return InternalGetDIAValue(&IDiaSymbol::get_isVirtualInheritance); +} + +DIAResult DIASymbol::getLanguage() { + return InternalGetDIAValue(&IDiaSymbol::get_language); +} + +DIAResult DIASymbol::isSafeBuffers() { + return InternalGetDIAValue(&IDiaSymbol::get_isSafeBuffers); +} + +DIAResult DIASymbol::getLength() { + return InternalGetDIAValue(&IDiaSymbol::get_length); +} + +DIAResult DIASymbol::getLexicalParentId() { + return InternalGetDIAValue(&IDiaSymbol::get_lexicalParentId); +} + +DIAResult DIASymbol::getLexicalParent() { + return InternalGetDIAValue( + &IDiaSymbol::get_lexicalParent); +} + +DIAResult DIASymbol::getLocalBasePointerRegisterId() { + return InternalGetDIAValue(&IDiaSymbol::get_localBasePointerRegisterId); +} + +DIAResult DIASymbol::getLibraryName() { + return InternalGetDIAStringValue(&IDiaSymbol::get_libraryName); +} + +DIAResult DIASymbol::getLiveRangeLength() { + return InternalGetDIAValue(&IDiaSymbol::get_liveRangeLength); +} + +DIAResult DIASymbol::getLiveRangeStartAddressSection() { + return InternalGetDIAValue(&IDiaSymbol::get_liveRangeStartAddressSection); +} + +DIAResult DIASymbol::getLiveRangeStartAddressOffset() { + return InternalGetDIAValue(&IDiaSymbol::get_liveRangeStartAddressOffset); +} + +DIAResult DIASymbol::getLiveRangeStartRelativeVirtualAddress() { + return InternalGetDIAValue( + &IDiaSymbol::get_liveRangeStartRelativeVirtualAddress); +} + +DIAResult DIASymbol::getLocationType() { + return InternalGetDIAValue( + &IDiaSymbol::get_locationType); +} + +DIAResult DIASymbol::getLowerBoundId() { + return InternalGetDIAValue(&IDiaSymbol::get_lowerBoundId); +} + +DIAResult DIASymbol::getMachineType() { + return InternalGetDIAValue( + &IDiaSymbol::get_machineType); +} + +DIAResult DIASymbol::isManagedRef() { + return InternalGetDIAValue(&IDiaSymbol::get_managed); +} + +DIAResult DIASymbol::getMemorySpaceKind() { + return InternalGetDIAValue(&IDiaSymbol::get_memorySpaceKind); +} + +DIAResult DIASymbol::isMsilRef() { + return InternalGetDIAValue(&IDiaSymbol::get_msil); +} + +DIAResult DIASymbol::getName() { + return InternalGetDIAStringValue(&IDiaSymbol::get_name); +} + +DIAResult DIASymbol::isNested() { + return InternalGetDIAValue(&IDiaSymbol::get_nested); +} + +DIAResult DIASymbol::hasNoInlineAttribute() { + return InternalGetDIAValue(&IDiaSymbol::get_noInline); +} + +DIAResult DIASymbol::hasNoReturnAttribute() { + return InternalGetDIAValue(&IDiaSymbol::get_noReturn); +} + +DIAResult DIASymbol::getNoStackOrdering() { + return InternalGetDIAValue(&IDiaSymbol::get_noStackOrdering); +} + +DIAResult DIASymbol::isUnreached() { + return InternalGetDIAValue(&IDiaSymbol::get_notReached); +} + +DIAResult DIASymbol::getNumberOfAcceleratorPointerTags() { + return InternalGetDIAValue(&IDiaSymbol::get_numberOfAcceleratorPointerTags); +} + +DIAResult DIASymbol::getNumberOfModifiers() { + return InternalGetDIAValue(&IDiaSymbol::get_numberOfModifiers); +} + +DIAResult DIASymbol::getNumberOfRegisterIndices() { + return InternalGetDIAValue(&IDiaSymbol::get_numberOfRegisterIndices); +} + +DIAResult DIASymbol::getNumberOfRows() { + return InternalGetDIAValue(&IDiaSymbol::get_numberOfRows); +} + +DIAResult DIASymbol::getNumberOfColumns() { + return InternalGetDIAValue(&IDiaSymbol::get_numberOfColumns); +} + +DIAResult DIASymbol::getObjectFileName() { + return InternalGetDIAStringValue(&IDiaSymbol::get_objectFileName); +} + +DIAResult DIASymbol::getOemSymbolId() { + return InternalGetDIAValue(&IDiaSymbol::get_oemSymbolId); +} + +DIAResult DIASymbol::getOffset() { + return InternalGetDIAValue(&IDiaSymbol::get_offset); +} + +DIAResult DIASymbol::getOffsetInUdt() { + return InternalGetDIAValue(&IDiaSymbol::get_offsetInUdt); +} + +DIAResult DIASymbol::hasOptimizedCodeDebugInfo() { + return InternalGetDIAValue(&IDiaSymbol::get_optimizedCodeDebugInfo); +} + +DIAResult DIASymbol::hasOverloadedOperator() { + return InternalGetDIAValue(&IDiaSymbol::get_overloadedOperator); +} + +DIAResult DIASymbol::isPacked() { + return InternalGetDIAValue(&IDiaSymbol::get_packed); +} + +DIAResult DIASymbol::getPlatform() { + return InternalGetDIAValue(&IDiaSymbol::get_platform); +} + +DIAResult DIASymbol::isPureVirtual() { + return InternalGetDIAValue(&IDiaSymbol::get_pure); +} + +DIAResult DIASymbol::getRank() { + return InternalGetDIAValue(&IDiaSymbol::get_rank); +} + +DIAResult DIASymbol::isReference() { + return InternalGetDIAValue(&IDiaSymbol::get_reference); +} + +DIAResult DIASymbol::isRValueReference() { + return InternalGetDIAValue(&IDiaSymbol::get_RValueReference); +} + +DIAResult DIASymbol::getRegisterId() { + return InternalGetDIAValue(&IDiaSymbol::get_registerId); +} + +DIAResult DIASymbol::getRegisterType() { + return InternalGetDIAValue(&IDiaSymbol::get_registerType); +} + +DIAResult DIASymbol::getRelativeVirtualAddress() { + return InternalGetDIAValue(&IDiaSymbol::get_relativeVirtualAddress); +} + +DIAResult DIASymbol::isRestrictedType() { + return InternalGetDIAValue(&IDiaSymbol::get_restrictedType); +} + +DIAResult DIASymbol::getSamplerSlot() { + return InternalGetDIAValue(&IDiaSymbol::get_samplerSlot); +} + +DIAResult DIASymbol::isScoped() { + return InternalGetDIAValue(&IDiaSymbol::get_scoped); +} + +DIAResult DIASymbol::isRefUdt() { + return InternalGetDIAValue(&IDiaSymbol::get_isRefUdt); +} + +DIAResult DIASymbol::isValueUdt() { + return InternalGetDIAValue(&IDiaSymbol::get_isValueUdt); +} + +DIAResult DIASymbol::isInterfaceUdt() { + return InternalGetDIAValue(&IDiaSymbol::get_isInterfaceUdt); +} + +DIAResult DIASymbol::isCxxReturnUdt() { + return InternalGetDIAValue(&IDiaSymbol::get_isCxxReturnUdt); +} + +DIAResult DIASymbol::getSignature() { + return InternalGetDIAValue(&IDiaSymbol::get_signature); +} + +DIAResult DIASymbol::getSizeInUdt() { + return InternalGetDIAValue(&IDiaSymbol::get_sizeInUdt); +} + +DIAResult DIASymbol::getSlot() { + return InternalGetDIAValue(&IDiaSymbol::get_slot); +} + +DIAResult DIASymbol::getSourceFileName() { + return InternalGetDIAStringValue(&IDiaSymbol::get_sourceFileName); +} + +DIAResult DIASymbol::getStride() { + return InternalGetDIAValue(&IDiaSymbol::get_stride); +} + +DIAResult DIASymbol::getSubTypeId() { + return InternalGetDIAValue(&IDiaSymbol::get_subTypeId); +} + +DIAResult DIASymbol::getSymbolsFileName() { + return InternalGetDIAStringValue(&IDiaSymbol::get_symbolsFileName); +} + +DIAResult DIASymbol::getSymIndexId() { + return InternalGetDIAValue(&IDiaSymbol::get_symIndexId); +} + +DIAResult DIASymbol::getSymTag() { + return InternalGetDIAValue(&IDiaSymbol::get_symTag); +} + +DIAResult DIASymbol::getTargetOffset() { + return InternalGetDIAValue(&IDiaSymbol::get_targetOffset); +} + +DIAResult DIASymbol::getTargetRelativeVirtualAddress() { + return InternalGetDIAValue(&IDiaSymbol::get_targetRelativeVirtualAddress); +} + +DIAResult DIASymbol::getTargetSection() { + return InternalGetDIAValue(&IDiaSymbol::get_targetSection); +} + +DIAResult DIASymbol::getTargetVirtualAddress() { + return InternalGetDIAValue(&IDiaSymbol::get_targetVirtualAddress); +} + +DIAResult DIASymbol::getTextureSlot() { + return InternalGetDIAValue(&IDiaSymbol::get_textureSlot); +} + +DIAResult DIASymbol::getThisAdjust() { + return InternalGetDIAValue(&IDiaSymbol::get_thisAdjust); +} + +DIAResult DIASymbol::getThunkOrdinal() { + return InternalGetDIAValue( + &IDiaSymbol::get_thunkOrdinal); +} + +DIAResult DIASymbol::getTimeStamp() { + return InternalGetDIAValue(&IDiaSymbol::get_timeStamp); +} + +DIAResult DIASymbol::getToken() { + return InternalGetDIAValue(&IDiaSymbol::get_token); +} + +DIAResult DIASymbol::getUavSlot() { + return InternalGetDIAValue(&IDiaSymbol::get_uavSlot); +} + +DIAResult DIASymbol::getUdtKind() { + return InternalGetDIAValue(&IDiaSymbol::get_udtKind); +} + +DIAResult DIASymbol::isUnalignedType() { + return InternalGetDIAValue(&IDiaSymbol::get_unalignedType); +} + +DIAResult DIASymbol::getUndecoratedName() { + return InternalGetDIAStringValue(&IDiaSymbol::get_undecoratedName); +} + +DIAResult DIASymbol::getUnmodifiedTypeId() { + return InternalGetDIAValue(&IDiaSymbol::get_unmodifiedTypeId); +} + +DIAResult DIASymbol::getUpperBoundId() { + return InternalGetDIAValue(&IDiaSymbol::get_upperBoundId); +} + +DIAResult DIASymbol::isVirtual() { + return InternalGetDIAValue(&IDiaSymbol::get_virtual); +} + +DIAResult DIASymbol::getVirtualAddress() { + return InternalGetDIAValue(&IDiaSymbol::get_virtualAddress); +} + +DIAResult DIASymbol::isVirtualBaseClass() { + return InternalGetDIAValue(&IDiaSymbol::get_virtualBaseClass); +} + +DIAResult DIASymbol::getVirtualBaseDispIndex() { + return InternalGetDIAValue(&IDiaSymbol::get_virtualBaseDispIndex); +} + +DIAResult DIASymbol::getVirtualBaseOffset() { + return InternalGetDIAValue(&IDiaSymbol::get_virtualBaseOffset); +} + +DIAResult DIASymbol::getVirtualBasePointerOffset() { + return InternalGetDIAValue(&IDiaSymbol::get_virtualBasePointerOffset); +} + +DIAResult DIASymbol::getVirtualTableShapeId() { + return InternalGetDIAValue(&IDiaSymbol::get_virtualTableShapeId); +} + +DIAResult DIASymbol::isVolatileType() { + return InternalGetDIAValue(&IDiaSymbol::get_volatileType); +} diff --git a/tools/llvm-pdbdump/DIASymbol.h b/tools/llvm-pdbdump/DIASymbol.h index b2d4153594b..3e908e1e754 100644 --- a/tools/llvm-pdbdump/DIASymbol.h +++ b/tools/llvm-pdbdump/DIASymbol.h @@ -1,282 +1,282 @@ -//===- DIASymbol.h - Dump debug info from a PDB file ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Provides a wrapper around the IDiaSymbol interface. IDiaSymbol is used to -// represent any kind of symbol from functions, to compilands, to source files. -// It provides a monolithic interface of close to 200 operations, and the set -// of operations that are valid depends on the type of the symbol. Since it is -// not clearly documented which set of operations is valid for which type of -// symbol, the best way of figuring it out is to dump every method for every -// symbol, and see which methods return errors. This wrapper provides a clean -// way of doing this without involving needing to embed lots of unsightly -// HRESULT checking at every callsite. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_TOOLS_LLVMPDBDUMP_DIASYMBOL_H -#define LLVM_TOOLS_LLVMPDBDUMP_DIASYMBOL_H - -#include "DIAExtras.h" -#include "llvm/ADT/SmallString.h" - -namespace llvm { -namespace sys { -namespace windows { - -class DIASymbol { -public: - DIASymbol(IDiaSymbol *DiaSymbol); - ~DIASymbol(); - - /// Dumps the value of every property (if it exists) with a default name. - /// This is useful for understanding what symbol types support what methods - /// during development time. - void fullDump(int IndentLevel); - -// TODO: The following methods are present on IDiaSymbol but do not yet have -// wrapper methods. -// -// HRESULT get_value(VARIANT *pRetVal) = 0; -// HRESULT get_undecoratedNameEx(DWORD undecorateOptions, BSTR *name) = 0; -// HRESULT getSrcLineOnTypeDefn(IDiaLineNumber **ppResult) = 0; -// HRESULT get_dataBytes(DWORD cbData, DWORD *pcbData, BYTE *pbData) = 0; -// HRESULT get_types(DWORD cTypes, DWORD *pcTypes, IDiaSymbol **pTypes) = 0; -// HRESULT get_typeIds(DWORD cTypeIds, DWORD *pcTypeIds, DWORD *pdwTypeIds) = 0; -// HRESULT get_numericProperties(DWORD cnt, DWORD *pcnt, -// DWORD *pProperties) = 0; -// HRESULT get_modifierValues(DWORD cnt, DWORD *pcnt, WORD *pModifiers) = 0; -// HRESULT get_acceleratorPointerTags(DWORD cnt, DWORD *pcnt, DWORD -// *pPointerTags) = 0; -// HRESULT get_hfaFloat(BOOL *pRetVal) = 0; -// HRESULT get_hfaDouble(BOOL *pRetVal) = 0; -// HRESULT get_paramBasePointerRegisterId(DWORD *pRetVal) = 0; -// HRESULT get_isWinRTPointer(BOOL *pRetVal) = 0; - -#if (_MSC_FULL_VER >= 180031101) - // These methods are only available on VS 2013 SP 4 and higher. - DIAResult isPGO(); - DIAResult hasValidPGOCounts(); - DIAResult isOptimizedForSpeed(); - DIAResult getPGOEntryCount(); - DIAResult getPGOEdgeCount(); - DIAResult getPGODynamicInstructionCount(); - DIAResult getStaticSize(); - DIAResult getFinalLiveStaticSize(); - DIAResult getPhaseName(); - DIAResult hasControlFlowCheck(); -#endif - - DIAResult getLexicalParent(); - DIAResult getClassParent(); - DIAResult getType(); - DIAResult getArrayIndexType(); - DIAResult getVirtualTableShape(); - DIAResult getLowerBound(); - DIAResult getUpperBound(); - DIAResult getObjectPointerType(); - DIAResult getContainer(); - DIAResult getVirtualBaseTableType(); - DIAResult getUnmodifiedType(); - DIAResult getSubType(); - DIAResult getBaseSymbol(); - - DIAResult getAccess(); - DIAResult getAddressOffset(); - DIAResult getAddressSection(); - DIAResult getAge(); - DIAResult getArrayIndexTypeId(); - DIAResult getBackEndBuild(); - DIAResult getBackEndMajor(); - DIAResult getBackEndMinor(); - DIAResult getBackEndQFE(); - DIAResult getBaseDataOffset(); - DIAResult getBaseDataSlot(); - DIAResult getBaseSymbolId(); - DIAResult getBaseType(); - DIAResult getBitPosition(); - DIAResult getBuiltInKind(); - DIAResult getCallingConvention(); - DIAResult getClassParentId(); - DIAResult getCompilerName(); - DIAResult getCount(); - DIAResult getCountLiveRanges(); - DIAResult getFrontEndBuild(); - DIAResult getFrontEndMajor(); - DIAResult getFrontEndMinor(); - DIAResult getFrontEndQFE(); - DIAResult getLanguage(); - DIAResult getLexicalParentId(); - DIAResult getLibraryName(); - DIAResult getLiveRangeStartAddressOffset(); - DIAResult getLiveRangeStartAddressSection(); - DIAResult getLiveRangeStartRelativeVirtualAddress(); - DIAResult getLocalBasePointerRegisterId(); - DIAResult getLowerBoundId(); - DIAResult getMemorySpaceKind(); - DIAResult getName(); - DIAResult getNumberOfAcceleratorPointerTags(); - DIAResult getNumberOfColumns(); - DIAResult getNumberOfModifiers(); - DIAResult getNumberOfRegisterIndices(); - DIAResult getNumberOfRows(); - DIAResult getObjectFileName(); - DIAResult getOemSymbolId(); - DIAResult getOffsetInUdt(); - DIAResult getPlatform(); - DIAResult getRank(); - DIAResult getRegisterId(); - DIAResult getRegisterType(); - DIAResult getRelativeVirtualAddress(); - DIAResult getSamplerSlot(); - DIAResult getSignature(); - DIAResult getSizeInUdt(); - DIAResult getSlot(); - DIAResult getSourceFileName(); - DIAResult getStride(); - DIAResult getSubTypeId(); - DIAResult getSymbolsFileName(); - DIAResult getSymIndexId(); - DIAResult getTargetOffset(); - DIAResult getTargetRelativeVirtualAddress(); - DIAResult getTargetSection(); - DIAResult getTextureSlot(); - DIAResult getTimeStamp(); - DIAResult getToken(); - DIAResult getUavSlot(); - DIAResult getUndecoratedName(); - DIAResult getUnmodifiedTypeId(); - DIAResult getUpperBoundId(); - DIAResult getVirtualBaseDispIndex(); - DIAResult getVirtualBaseOffset(); - DIAResult getVirtualTableShapeId(); - DIAResult getDataKind(); - DIAResult getSymTag(); - DIAResult getGuid(); - DIAResult getOffset(); - DIAResult getThisAdjust(); - DIAResult getVirtualBasePointerOffset(); - DIAResult getLocationType(); - DIAResult getMachineType(); - DIAResult getThunkOrdinal(); - DIAResult getLength(); - DIAResult getLiveRangeLength(); - DIAResult getTargetVirtualAddress(); - DIAResult getVirtualAddress(); - DIAResult getUdtKind(); - DIAResult hasConstructor(); - DIAResult hasCustomCallingConvention(); - DIAResult hasFarReturn(); - DIAResult isCode(); - DIAResult isCompilerGenerated(); - DIAResult isConstType(); - DIAResult isEditAndContinueEnabled(); - DIAResult isFunction(); - DIAResult getAddressTaken(); - DIAResult getNoStackOrdering(); - DIAResult hasAlloca(); - DIAResult hasAssignmentOperator(); - DIAResult hasCTypes(); - DIAResult hasCastOperator(); - DIAResult hasDebugInfo(); - DIAResult hasEH(); - DIAResult hasEHa(); - DIAResult hasInlAsm(); - DIAResult hasInlineAttribute(); - DIAResult hasInterruptReturn(); - DIAResult hasLongJump(); - DIAResult hasManagedCode(); - DIAResult hasNestedTypes(); - DIAResult hasNoInlineAttribute(); - DIAResult hasNoReturnAttribute(); - DIAResult hasOptimizedCodeDebugInfo(); - DIAResult hasOverloadedOperator(); - DIAResult hasSEH(); - DIAResult hasSecurityChecks(); - DIAResult hasSetJump(); - DIAResult hasStrictGSCheck(); - DIAResult isAcceleratorGroupSharedLocal(); - DIAResult isAcceleratorPointerTagLiveRange(); - DIAResult isAcceleratorStubFunction(); - DIAResult isAggregated(); - DIAResult isBaseVirtualFunction(); - DIAResult isCVTCIL(); - DIAResult isConstructorVirtualBase(); - DIAResult isCxxReturnUdt(); - DIAResult isDataAligned(); - DIAResult isHLSLData(); - DIAResult isHotpatchable(); - DIAResult isIndirectVirtualBaseClass(); - DIAResult isInterfaceUdt(); - DIAResult isIntrinsic(); - DIAResult isLTCG(); - DIAResult isLocationControlFlowDependent(); - DIAResult isMSILNetmodule(); - DIAResult isManagedRef(); - DIAResult isMatrixRowMajor(); - DIAResult isMsilRef(); - DIAResult isMultipleInheritance(); - DIAResult isNaked(); - DIAResult isNested(); - DIAResult isOptimizedAway(); - DIAResult isPacked(); - DIAResult isPointerBasedOnSymbolValue(); - DIAResult isPointerToDataMember(); - DIAResult isPointerToMemberFunction(); - DIAResult isPureVirtual(); - DIAResult isRValueReference(); - DIAResult isRefUdt(); - DIAResult isReference(); - DIAResult isRestrictedType(); - DIAResult isReturnValue(); - DIAResult isSafeBuffers(); - DIAResult isScoped(); - DIAResult isSdl(); - DIAResult isSingleInheritance(); - DIAResult isSplitted(); - DIAResult isStatic(); - DIAResult isStripped(); - DIAResult isUnalignedType(); - DIAResult isUnreached(); - DIAResult isValueUdt(); - DIAResult isVirtual(); - DIAResult isVirtualBaseClass(); - DIAResult isVirtualInheritance(); - DIAResult isVolatileType(); - -private: - template - DIAResult - InternalGetDIAValue(HRESULT (__stdcall IDiaSymbol::*Method)(T *)) { - T Value; - if (S_OK == (Symbol->*Method)(&Value)) - return DIAResult(U(Value)); - else - return DIAResult(); - } - - DIAResult - InternalGetDIAStringValue(HRESULT (__stdcall IDiaSymbol::*Method)(BSTR *)) { - BSTR String16; - if (S_OK == (Symbol->*Method)(&String16)) { - std::string String8; - llvm::sys::windows::BSTRToUTF8(String16, String8); - SysFreeString(String16); - return DIAResult(DIAString(String8)); - } else - return DIAResult(); - } - - IDiaSymbol *Symbol; -}; - -} // namespace windows -} // namespace sys -} // namespace llvm - -#endif +//===- DIASymbol.h - Dump debug info from a PDB file ------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Provides a wrapper around the IDiaSymbol interface. IDiaSymbol is used to +// represent any kind of symbol from functions, to compilands, to source files. +// It provides a monolithic interface of close to 200 operations, and the set +// of operations that are valid depends on the type of the symbol. Since it is +// not clearly documented which set of operations is valid for which type of +// symbol, the best way of figuring it out is to dump every method for every +// symbol, and see which methods return errors. This wrapper provides a clean +// way of doing this without involving needing to embed lots of unsightly +// HRESULT checking at every callsite. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_TOOLS_LLVMPDBDUMP_DIASYMBOL_H +#define LLVM_TOOLS_LLVMPDBDUMP_DIASYMBOL_H + +#include "DIAExtras.h" +#include "llvm/ADT/SmallString.h" + +namespace llvm { +namespace sys { +namespace windows { + +class DIASymbol { +public: + DIASymbol(IDiaSymbol *DiaSymbol); + ~DIASymbol(); + + /// Dumps the value of every property (if it exists) with a default name. + /// This is useful for understanding what symbol types support what methods + /// during development time. + void fullDump(int IndentLevel); + +// TODO: The following methods are present on IDiaSymbol but do not yet have +// wrapper methods. +// +// HRESULT get_value(VARIANT *pRetVal) = 0; +// HRESULT get_undecoratedNameEx(DWORD undecorateOptions, BSTR *name) = 0; +// HRESULT getSrcLineOnTypeDefn(IDiaLineNumber **ppResult) = 0; +// HRESULT get_dataBytes(DWORD cbData, DWORD *pcbData, BYTE *pbData) = 0; +// HRESULT get_types(DWORD cTypes, DWORD *pcTypes, IDiaSymbol **pTypes) = 0; +// HRESULT get_typeIds(DWORD cTypeIds, DWORD *pcTypeIds, DWORD *pdwTypeIds) = 0; +// HRESULT get_numericProperties(DWORD cnt, DWORD *pcnt, +// DWORD *pProperties) = 0; +// HRESULT get_modifierValues(DWORD cnt, DWORD *pcnt, WORD *pModifiers) = 0; +// HRESULT get_acceleratorPointerTags(DWORD cnt, DWORD *pcnt, DWORD +// *pPointerTags) = 0; +// HRESULT get_hfaFloat(BOOL *pRetVal) = 0; +// HRESULT get_hfaDouble(BOOL *pRetVal) = 0; +// HRESULT get_paramBasePointerRegisterId(DWORD *pRetVal) = 0; +// HRESULT get_isWinRTPointer(BOOL *pRetVal) = 0; + +#if (_MSC_FULL_VER >= 180031101) + // These methods are only available on VS 2013 SP 4 and higher. + DIAResult isPGO(); + DIAResult hasValidPGOCounts(); + DIAResult isOptimizedForSpeed(); + DIAResult getPGOEntryCount(); + DIAResult getPGOEdgeCount(); + DIAResult getPGODynamicInstructionCount(); + DIAResult getStaticSize(); + DIAResult getFinalLiveStaticSize(); + DIAResult getPhaseName(); + DIAResult hasControlFlowCheck(); +#endif + + DIAResult getLexicalParent(); + DIAResult getClassParent(); + DIAResult getType(); + DIAResult getArrayIndexType(); + DIAResult getVirtualTableShape(); + DIAResult getLowerBound(); + DIAResult getUpperBound(); + DIAResult getObjectPointerType(); + DIAResult getContainer(); + DIAResult getVirtualBaseTableType(); + DIAResult getUnmodifiedType(); + DIAResult getSubType(); + DIAResult getBaseSymbol(); + + DIAResult getAccess(); + DIAResult getAddressOffset(); + DIAResult getAddressSection(); + DIAResult getAge(); + DIAResult getArrayIndexTypeId(); + DIAResult getBackEndBuild(); + DIAResult getBackEndMajor(); + DIAResult getBackEndMinor(); + DIAResult getBackEndQFE(); + DIAResult getBaseDataOffset(); + DIAResult getBaseDataSlot(); + DIAResult getBaseSymbolId(); + DIAResult getBaseType(); + DIAResult getBitPosition(); + DIAResult getBuiltInKind(); + DIAResult getCallingConvention(); + DIAResult getClassParentId(); + DIAResult getCompilerName(); + DIAResult getCount(); + DIAResult getCountLiveRanges(); + DIAResult getFrontEndBuild(); + DIAResult getFrontEndMajor(); + DIAResult getFrontEndMinor(); + DIAResult getFrontEndQFE(); + DIAResult getLanguage(); + DIAResult getLexicalParentId(); + DIAResult getLibraryName(); + DIAResult getLiveRangeStartAddressOffset(); + DIAResult getLiveRangeStartAddressSection(); + DIAResult getLiveRangeStartRelativeVirtualAddress(); + DIAResult getLocalBasePointerRegisterId(); + DIAResult getLowerBoundId(); + DIAResult getMemorySpaceKind(); + DIAResult getName(); + DIAResult getNumberOfAcceleratorPointerTags(); + DIAResult getNumberOfColumns(); + DIAResult getNumberOfModifiers(); + DIAResult getNumberOfRegisterIndices(); + DIAResult getNumberOfRows(); + DIAResult getObjectFileName(); + DIAResult getOemSymbolId(); + DIAResult getOffsetInUdt(); + DIAResult getPlatform(); + DIAResult getRank(); + DIAResult getRegisterId(); + DIAResult getRegisterType(); + DIAResult getRelativeVirtualAddress(); + DIAResult getSamplerSlot(); + DIAResult getSignature(); + DIAResult getSizeInUdt(); + DIAResult getSlot(); + DIAResult getSourceFileName(); + DIAResult getStride(); + DIAResult getSubTypeId(); + DIAResult getSymbolsFileName(); + DIAResult getSymIndexId(); + DIAResult getTargetOffset(); + DIAResult getTargetRelativeVirtualAddress(); + DIAResult getTargetSection(); + DIAResult getTextureSlot(); + DIAResult getTimeStamp(); + DIAResult getToken(); + DIAResult getUavSlot(); + DIAResult getUndecoratedName(); + DIAResult getUnmodifiedTypeId(); + DIAResult getUpperBoundId(); + DIAResult getVirtualBaseDispIndex(); + DIAResult getVirtualBaseOffset(); + DIAResult getVirtualTableShapeId(); + DIAResult getDataKind(); + DIAResult getSymTag(); + DIAResult getGuid(); + DIAResult getOffset(); + DIAResult getThisAdjust(); + DIAResult getVirtualBasePointerOffset(); + DIAResult getLocationType(); + DIAResult getMachineType(); + DIAResult getThunkOrdinal(); + DIAResult getLength(); + DIAResult getLiveRangeLength(); + DIAResult getTargetVirtualAddress(); + DIAResult getVirtualAddress(); + DIAResult getUdtKind(); + DIAResult hasConstructor(); + DIAResult hasCustomCallingConvention(); + DIAResult hasFarReturn(); + DIAResult isCode(); + DIAResult isCompilerGenerated(); + DIAResult isConstType(); + DIAResult isEditAndContinueEnabled(); + DIAResult isFunction(); + DIAResult getAddressTaken(); + DIAResult getNoStackOrdering(); + DIAResult hasAlloca(); + DIAResult hasAssignmentOperator(); + DIAResult hasCTypes(); + DIAResult hasCastOperator(); + DIAResult hasDebugInfo(); + DIAResult hasEH(); + DIAResult hasEHa(); + DIAResult hasInlAsm(); + DIAResult hasInlineAttribute(); + DIAResult hasInterruptReturn(); + DIAResult hasLongJump(); + DIAResult hasManagedCode(); + DIAResult hasNestedTypes(); + DIAResult hasNoInlineAttribute(); + DIAResult hasNoReturnAttribute(); + DIAResult hasOptimizedCodeDebugInfo(); + DIAResult hasOverloadedOperator(); + DIAResult hasSEH(); + DIAResult hasSecurityChecks(); + DIAResult hasSetJump(); + DIAResult hasStrictGSCheck(); + DIAResult isAcceleratorGroupSharedLocal(); + DIAResult isAcceleratorPointerTagLiveRange(); + DIAResult isAcceleratorStubFunction(); + DIAResult isAggregated(); + DIAResult isBaseVirtualFunction(); + DIAResult isCVTCIL(); + DIAResult isConstructorVirtualBase(); + DIAResult isCxxReturnUdt(); + DIAResult isDataAligned(); + DIAResult isHLSLData(); + DIAResult isHotpatchable(); + DIAResult isIndirectVirtualBaseClass(); + DIAResult isInterfaceUdt(); + DIAResult isIntrinsic(); + DIAResult isLTCG(); + DIAResult isLocationControlFlowDependent(); + DIAResult isMSILNetmodule(); + DIAResult isManagedRef(); + DIAResult isMatrixRowMajor(); + DIAResult isMsilRef(); + DIAResult isMultipleInheritance(); + DIAResult isNaked(); + DIAResult isNested(); + DIAResult isOptimizedAway(); + DIAResult isPacked(); + DIAResult isPointerBasedOnSymbolValue(); + DIAResult isPointerToDataMember(); + DIAResult isPointerToMemberFunction(); + DIAResult isPureVirtual(); + DIAResult isRValueReference(); + DIAResult isRefUdt(); + DIAResult isReference(); + DIAResult isRestrictedType(); + DIAResult isReturnValue(); + DIAResult isSafeBuffers(); + DIAResult isScoped(); + DIAResult isSdl(); + DIAResult isSingleInheritance(); + DIAResult isSplitted(); + DIAResult isStatic(); + DIAResult isStripped(); + DIAResult isUnalignedType(); + DIAResult isUnreached(); + DIAResult isValueUdt(); + DIAResult isVirtual(); + DIAResult isVirtualBaseClass(); + DIAResult isVirtualInheritance(); + DIAResult isVolatileType(); + +private: + template + DIAResult + InternalGetDIAValue(HRESULT (__stdcall IDiaSymbol::*Method)(T *)) { + T Value; + if (S_OK == (Symbol->*Method)(&Value)) + return DIAResult(U(Value)); + else + return DIAResult(); + } + + DIAResult + InternalGetDIAStringValue(HRESULT (__stdcall IDiaSymbol::*Method)(BSTR *)) { + BSTR String16; + if (S_OK == (Symbol->*Method)(&String16)) { + std::string String8; + llvm::sys::windows::BSTRToUTF8(String16, String8); + SysFreeString(String16); + return DIAResult(DIAString(String8)); + } else + return DIAResult(); + } + + IDiaSymbol *Symbol; +}; + +} // namespace windows +} // namespace sys +} // namespace llvm + +#endif diff --git a/tools/llvm-pdbdump/llvm-pdbdump.h b/tools/llvm-pdbdump/llvm-pdbdump.h index c8656a052d5..e73289cc00d 100644 --- a/tools/llvm-pdbdump/llvm-pdbdump.h +++ b/tools/llvm-pdbdump/llvm-pdbdump.h @@ -1,32 +1,32 @@ -//===- llvm-pdbdump.h - Common includes for llvm-pdbdump --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// Common defines and header includes for all llvm-pdbdump. The definitions -// here configure the necessary #defines and include system headers in the -// proper order for using DIA. -//===----------------------------------------------------------------------===// - -#ifndef LLVM_TOOLS_LLVMPDBDUMP_LLVMPDBDUMP_H -#define LLVM_TOOLS_LLVMPDBDUMP_LLVMPDBDUMP_H - -#define NTDDI_VERSION NTDDI_VISTA -#define _WIN32_WINNT _WIN32_WINNT_VISTA -#define WINVER _WIN32_WINNT_VISTA -#ifndef NOMINMAX -#define NOMINMAX -#endif - -// atlbase.h has to come before windows.h -#include -#include - -// DIA headers must come after windows headers. -#include -#include - +//===- llvm-pdbdump.h - Common includes for llvm-pdbdump --------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// Common defines and header includes for all llvm-pdbdump. The definitions +// here configure the necessary #defines and include system headers in the +// proper order for using DIA. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_TOOLS_LLVMPDBDUMP_LLVMPDBDUMP_H +#define LLVM_TOOLS_LLVMPDBDUMP_LLVMPDBDUMP_H + +#define NTDDI_VERSION NTDDI_VISTA +#define _WIN32_WINNT _WIN32_WINNT_VISTA +#define WINVER _WIN32_WINNT_VISTA +#ifndef NOMINMAX +#define NOMINMAX +#endif + +// atlbase.h has to come before windows.h +#include +#include + +// DIA headers must come after windows headers. +#include +#include + #endif \ No newline at end of file