-//===- DIASymbol.h - Dump debug info from a PDB file ------------*- C++ -*-===//\r
-//\r
-// The LLVM Compiler Infrastructure\r
-//\r
-// This file is distributed under the University of Illinois Open Source\r
-// License. See LICENSE.TXT for details.\r
-//\r
-//===----------------------------------------------------------------------===//\r
-//\r
-// Provides a wrapper around the IDiaSymbol interface. IDiaSymbol is used to\r
-// represent any kind of symbol from functions, to compilands, to source files.\r
-// It provides a monolithic interface of close to 200 operations, and the set\r
-// of operations that are valid depends on the type of the symbol. Since it is\r
-// not clearly documented which set of operations is valid for which type of\r
-// symbol, the best way of figuring it out is to dump every method for every\r
-// symbol, and see which methods return errors. This wrapper provides a clean\r
-// way of doing this without involving needing to embed lots of unsightly\r
-// HRESULT checking at every callsite.\r
-//\r
-//===----------------------------------------------------------------------===//\r
-\r
-#ifndef LLVM_TOOLS_LLVMPDBDUMP_DIASYMBOL_H\r
-#define LLVM_TOOLS_LLVMPDBDUMP_DIASYMBOL_H\r
-\r
-#include "DIAExtras.h"\r
-#include "llvm/ADT/SmallString.h"\r
-\r
-namespace llvm {\r
-namespace sys {\r
-namespace windows {\r
-\r
-class DIASymbol {\r
-public:\r
- DIASymbol(IDiaSymbol *DiaSymbol);\r
- ~DIASymbol();\r
-\r
- /// Dumps the value of every property (if it exists) with a default name.\r
- /// This is useful for understanding what symbol types support what methods\r
- /// during development time.\r
- void fullDump(int IndentLevel);\r
-\r
-// TODO: The following methods are present on IDiaSymbol but do not yet have\r
-// wrapper methods.\r
-//\r
-// HRESULT get_value(VARIANT *pRetVal) = 0;\r
-// HRESULT get_undecoratedNameEx(DWORD undecorateOptions, BSTR *name) = 0;\r
-// HRESULT getSrcLineOnTypeDefn(IDiaLineNumber **ppResult) = 0;\r
-// HRESULT get_dataBytes(DWORD cbData, DWORD *pcbData, BYTE *pbData) = 0;\r
-// HRESULT get_types(DWORD cTypes, DWORD *pcTypes, IDiaSymbol **pTypes) = 0;\r
-// HRESULT get_typeIds(DWORD cTypeIds, DWORD *pcTypeIds, DWORD *pdwTypeIds) = 0;\r
-// HRESULT get_numericProperties(DWORD cnt, DWORD *pcnt,\r
-// DWORD *pProperties) = 0;\r
-// HRESULT get_modifierValues(DWORD cnt, DWORD *pcnt, WORD *pModifiers) = 0;\r
-// HRESULT get_acceleratorPointerTags(DWORD cnt, DWORD *pcnt, DWORD\r
-// *pPointerTags) = 0;\r
-// HRESULT get_hfaFloat(BOOL *pRetVal) = 0;\r
-// HRESULT get_hfaDouble(BOOL *pRetVal) = 0;\r
-// HRESULT get_paramBasePointerRegisterId(DWORD *pRetVal) = 0;\r
-// HRESULT get_isWinRTPointer(BOOL *pRetVal) = 0;\r
-\r
-#if (_MSC_FULL_VER >= 180031101)\r
- // These methods are only available on VS 2013 SP 4 and higher.\r
- DIAResult<BOOL> isPGO();\r
- DIAResult<BOOL> hasValidPGOCounts();\r
- DIAResult<BOOL> isOptimizedForSpeed();\r
- DIAResult<DWORD> getPGOEntryCount();\r
- DIAResult<DWORD> getPGOEdgeCount();\r
- DIAResult<ULONGLONG> getPGODynamicInstructionCount();\r
- DIAResult<DWORD> getStaticSize();\r
- DIAResult<DWORD> getFinalLiveStaticSize();\r
- DIAResult<DIAString> getPhaseName();\r
- DIAResult<BOOL> hasControlFlowCheck();\r
-#endif\r
-\r
- DIAResult<DiaSymbolPtr> getLexicalParent();\r
- DIAResult<DiaSymbolPtr> getClassParent();\r
- DIAResult<DiaSymbolPtr> getType();\r
- DIAResult<DiaSymbolPtr> getArrayIndexType();\r
- DIAResult<DiaSymbolPtr> getVirtualTableShape();\r
- DIAResult<DiaSymbolPtr> getLowerBound();\r
- DIAResult<DiaSymbolPtr> getUpperBound();\r
- DIAResult<DiaSymbolPtr> getObjectPointerType();\r
- DIAResult<DiaSymbolPtr> getContainer();\r
- DIAResult<DiaSymbolPtr> getVirtualBaseTableType();\r
- DIAResult<DiaSymbolPtr> getUnmodifiedType();\r
- DIAResult<DiaSymbolPtr> getSubType();\r
- DIAResult<DiaSymbolPtr> getBaseSymbol();\r
-\r
- DIAResult<DWORD> getAccess();\r
- DIAResult<DWORD> getAddressOffset();\r
- DIAResult<DWORD> getAddressSection();\r
- DIAResult<DWORD> getAge();\r
- DIAResult<DWORD> getArrayIndexTypeId();\r
- DIAResult<DWORD> getBackEndBuild();\r
- DIAResult<DWORD> getBackEndMajor();\r
- DIAResult<DWORD> getBackEndMinor();\r
- DIAResult<DWORD> getBackEndQFE();\r
- DIAResult<DWORD> getBaseDataOffset();\r
- DIAResult<DWORD> getBaseDataSlot();\r
- DIAResult<DWORD> getBaseSymbolId();\r
- DIAResult<DWORD> getBaseType();\r
- DIAResult<DWORD> getBitPosition();\r
- DIAResult<DWORD> getBuiltInKind();\r
- DIAResult<CV_call_e> getCallingConvention();\r
- DIAResult<DWORD> getClassParentId();\r
- DIAResult<DIAString> getCompilerName();\r
- DIAResult<DWORD> getCount();\r
- DIAResult<DWORD> getCountLiveRanges();\r
- DIAResult<DWORD> getFrontEndBuild();\r
- DIAResult<DWORD> getFrontEndMajor();\r
- DIAResult<DWORD> getFrontEndMinor();\r
- DIAResult<DWORD> getFrontEndQFE();\r
- DIAResult<CV_CFL_LANG> getLanguage();\r
- DIAResult<DWORD> getLexicalParentId();\r
- DIAResult<DIAString> getLibraryName();\r
- DIAResult<DWORD> getLiveRangeStartAddressOffset();\r
- DIAResult<DWORD> getLiveRangeStartAddressSection();\r
- DIAResult<DWORD> getLiveRangeStartRelativeVirtualAddress();\r
- DIAResult<DWORD> getLocalBasePointerRegisterId();\r
- DIAResult<DWORD> getLowerBoundId();\r
- DIAResult<DWORD> getMemorySpaceKind();\r
- DIAResult<DIAString> getName();\r
- DIAResult<DWORD> getNumberOfAcceleratorPointerTags();\r
- DIAResult<DWORD> getNumberOfColumns();\r
- DIAResult<DWORD> getNumberOfModifiers();\r
- DIAResult<DWORD> getNumberOfRegisterIndices();\r
- DIAResult<DWORD> getNumberOfRows();\r
- DIAResult<DIAString> getObjectFileName();\r
- DIAResult<DWORD> getOemSymbolId();\r
- DIAResult<DWORD> getOffsetInUdt();\r
- DIAResult<CV_CPU_TYPE_e> getPlatform();\r
- DIAResult<DWORD> getRank();\r
- DIAResult<DWORD> getRegisterId();\r
- DIAResult<DWORD> getRegisterType();\r
- DIAResult<DWORD> getRelativeVirtualAddress();\r
- DIAResult<DWORD> getSamplerSlot();\r
- DIAResult<DWORD> getSignature();\r
- DIAResult<DWORD> getSizeInUdt();\r
- DIAResult<DWORD> getSlot();\r
- DIAResult<DIAString> getSourceFileName();\r
- DIAResult<DWORD> getStride();\r
- DIAResult<DWORD> getSubTypeId();\r
- DIAResult<DIAString> getSymbolsFileName();\r
- DIAResult<DWORD> getSymIndexId();\r
- DIAResult<DWORD> getTargetOffset();\r
- DIAResult<DWORD> getTargetRelativeVirtualAddress();\r
- DIAResult<DWORD> getTargetSection();\r
- DIAResult<DWORD> getTextureSlot();\r
- DIAResult<DWORD> getTimeStamp();\r
- DIAResult<DWORD> getToken();\r
- DIAResult<DWORD> getUavSlot();\r
- DIAResult<DIAString> getUndecoratedName();\r
- DIAResult<DWORD> getUnmodifiedTypeId();\r
- DIAResult<DWORD> getUpperBoundId();\r
- DIAResult<DWORD> getVirtualBaseDispIndex();\r
- DIAResult<DWORD> getVirtualBaseOffset();\r
- DIAResult<DWORD> getVirtualTableShapeId();\r
- DIAResult<DataKind> getDataKind();\r
- DIAResult<DiaSymTagEnum> getSymTag();\r
- DIAResult<GUID> getGuid();\r
- DIAResult<LONG> getOffset();\r
- DIAResult<LONG> getThisAdjust();\r
- DIAResult<LONG> getVirtualBasePointerOffset();\r
- DIAResult<LocationType> getLocationType();\r
- DIAResult<MachineTypeEnum> getMachineType();\r
- DIAResult<THUNK_ORDINAL> getThunkOrdinal();\r
- DIAResult<ULONGLONG> getLength();\r
- DIAResult<ULONGLONG> getLiveRangeLength();\r
- DIAResult<ULONGLONG> getTargetVirtualAddress();\r
- DIAResult<ULONGLONG> getVirtualAddress();\r
- DIAResult<UdtKind> getUdtKind();\r
- DIAResult<BOOL> hasConstructor();\r
- DIAResult<BOOL> hasCustomCallingConvention();\r
- DIAResult<BOOL> hasFarReturn();\r
- DIAResult<BOOL> isCode();\r
- DIAResult<BOOL> isCompilerGenerated();\r
- DIAResult<BOOL> isConstType();\r
- DIAResult<BOOL> isEditAndContinueEnabled();\r
- DIAResult<BOOL> isFunction();\r
- DIAResult<BOOL> getAddressTaken();\r
- DIAResult<BOOL> getNoStackOrdering();\r
- DIAResult<BOOL> hasAlloca();\r
- DIAResult<BOOL> hasAssignmentOperator();\r
- DIAResult<BOOL> hasCTypes();\r
- DIAResult<BOOL> hasCastOperator();\r
- DIAResult<BOOL> hasDebugInfo();\r
- DIAResult<BOOL> hasEH();\r
- DIAResult<BOOL> hasEHa();\r
- DIAResult<BOOL> hasInlAsm();\r
- DIAResult<BOOL> hasInlineAttribute();\r
- DIAResult<BOOL> hasInterruptReturn();\r
- DIAResult<BOOL> hasLongJump();\r
- DIAResult<BOOL> hasManagedCode();\r
- DIAResult<BOOL> hasNestedTypes();\r
- DIAResult<BOOL> hasNoInlineAttribute();\r
- DIAResult<BOOL> hasNoReturnAttribute();\r
- DIAResult<BOOL> hasOptimizedCodeDebugInfo();\r
- DIAResult<BOOL> hasOverloadedOperator();\r
- DIAResult<BOOL> hasSEH();\r
- DIAResult<BOOL> hasSecurityChecks();\r
- DIAResult<BOOL> hasSetJump();\r
- DIAResult<BOOL> hasStrictGSCheck();\r
- DIAResult<BOOL> isAcceleratorGroupSharedLocal();\r
- DIAResult<BOOL> isAcceleratorPointerTagLiveRange();\r
- DIAResult<BOOL> isAcceleratorStubFunction();\r
- DIAResult<BOOL> isAggregated();\r
- DIAResult<BOOL> isBaseVirtualFunction();\r
- DIAResult<BOOL> isCVTCIL();\r
- DIAResult<BOOL> isConstructorVirtualBase();\r
- DIAResult<BOOL> isCxxReturnUdt();\r
- DIAResult<BOOL> isDataAligned();\r
- DIAResult<BOOL> isHLSLData();\r
- DIAResult<BOOL> isHotpatchable();\r
- DIAResult<BOOL> isIndirectVirtualBaseClass();\r
- DIAResult<BOOL> isInterfaceUdt();\r
- DIAResult<BOOL> isIntrinsic();\r
- DIAResult<BOOL> isLTCG();\r
- DIAResult<BOOL> isLocationControlFlowDependent();\r
- DIAResult<BOOL> isMSILNetmodule();\r
- DIAResult<BOOL> isManagedRef();\r
- DIAResult<BOOL> isMatrixRowMajor();\r
- DIAResult<BOOL> isMsilRef();\r
- DIAResult<BOOL> isMultipleInheritance();\r
- DIAResult<BOOL> isNaked();\r
- DIAResult<BOOL> isNested();\r
- DIAResult<BOOL> isOptimizedAway();\r
- DIAResult<BOOL> isPacked();\r
- DIAResult<BOOL> isPointerBasedOnSymbolValue();\r
- DIAResult<BOOL> isPointerToDataMember();\r
- DIAResult<BOOL> isPointerToMemberFunction();\r
- DIAResult<BOOL> isPureVirtual();\r
- DIAResult<BOOL> isRValueReference();\r
- DIAResult<BOOL> isRefUdt();\r
- DIAResult<BOOL> isReference();\r
- DIAResult<BOOL> isRestrictedType();\r
- DIAResult<BOOL> isReturnValue();\r
- DIAResult<BOOL> isSafeBuffers();\r
- DIAResult<BOOL> isScoped();\r
- DIAResult<BOOL> isSdl();\r
- DIAResult<BOOL> isSingleInheritance();\r
- DIAResult<BOOL> isSplitted();\r
- DIAResult<BOOL> isStatic();\r
- DIAResult<BOOL> isStripped();\r
- DIAResult<BOOL> isUnalignedType();\r
- DIAResult<BOOL> isUnreached();\r
- DIAResult<BOOL> isValueUdt();\r
- DIAResult<BOOL> isVirtual();\r
- DIAResult<BOOL> isVirtualBaseClass();\r
- DIAResult<BOOL> isVirtualInheritance();\r
- DIAResult<BOOL> isVolatileType();\r
-\r
-private:\r
- template <class T, class U = T>\r
- DIAResult<U>\r
- InternalGetDIAValue(HRESULT (__stdcall IDiaSymbol::*Method)(T *)) {\r
- T Value;\r
- if (S_OK == (Symbol->*Method)(&Value))\r
- return DIAResult<U>(U(Value));\r
- else\r
- return DIAResult<U>();\r
- }\r
-\r
- DIAResult<DIAString>\r
- InternalGetDIAStringValue(HRESULT (__stdcall IDiaSymbol::*Method)(BSTR *)) {\r
- BSTR String16;\r
- if (S_OK == (Symbol->*Method)(&String16)) {\r
- std::string String8;\r
- llvm::sys::windows::BSTRToUTF8(String16, String8);\r
- SysFreeString(String16);\r
- return DIAResult<DIAString>(DIAString(String8));\r
- } else\r
- return DIAResult<DIAString>();\r
- }\r
-\r
- IDiaSymbol *Symbol;\r
-};\r
-\r
-} // namespace windows\r
-} // namespace sys\r
-} // namespace llvm\r
-\r
-#endif\r
+//===- 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<BOOL> isPGO();
+ DIAResult<BOOL> hasValidPGOCounts();
+ DIAResult<BOOL> isOptimizedForSpeed();
+ DIAResult<DWORD> getPGOEntryCount();
+ DIAResult<DWORD> getPGOEdgeCount();
+ DIAResult<ULONGLONG> getPGODynamicInstructionCount();
+ DIAResult<DWORD> getStaticSize();
+ DIAResult<DWORD> getFinalLiveStaticSize();
+ DIAResult<DIAString> getPhaseName();
+ DIAResult<BOOL> hasControlFlowCheck();
+#endif
+
+ DIAResult<DiaSymbolPtr> getLexicalParent();
+ DIAResult<DiaSymbolPtr> getClassParent();
+ DIAResult<DiaSymbolPtr> getType();
+ DIAResult<DiaSymbolPtr> getArrayIndexType();
+ DIAResult<DiaSymbolPtr> getVirtualTableShape();
+ DIAResult<DiaSymbolPtr> getLowerBound();
+ DIAResult<DiaSymbolPtr> getUpperBound();
+ DIAResult<DiaSymbolPtr> getObjectPointerType();
+ DIAResult<DiaSymbolPtr> getContainer();
+ DIAResult<DiaSymbolPtr> getVirtualBaseTableType();
+ DIAResult<DiaSymbolPtr> getUnmodifiedType();
+ DIAResult<DiaSymbolPtr> getSubType();
+ DIAResult<DiaSymbolPtr> getBaseSymbol();
+
+ DIAResult<DWORD> getAccess();
+ DIAResult<DWORD> getAddressOffset();
+ DIAResult<DWORD> getAddressSection();
+ DIAResult<DWORD> getAge();
+ DIAResult<DWORD> getArrayIndexTypeId();
+ DIAResult<DWORD> getBackEndBuild();
+ DIAResult<DWORD> getBackEndMajor();
+ DIAResult<DWORD> getBackEndMinor();
+ DIAResult<DWORD> getBackEndQFE();
+ DIAResult<DWORD> getBaseDataOffset();
+ DIAResult<DWORD> getBaseDataSlot();
+ DIAResult<DWORD> getBaseSymbolId();
+ DIAResult<DWORD> getBaseType();
+ DIAResult<DWORD> getBitPosition();
+ DIAResult<DWORD> getBuiltInKind();
+ DIAResult<CV_call_e> getCallingConvention();
+ DIAResult<DWORD> getClassParentId();
+ DIAResult<DIAString> getCompilerName();
+ DIAResult<DWORD> getCount();
+ DIAResult<DWORD> getCountLiveRanges();
+ DIAResult<DWORD> getFrontEndBuild();
+ DIAResult<DWORD> getFrontEndMajor();
+ DIAResult<DWORD> getFrontEndMinor();
+ DIAResult<DWORD> getFrontEndQFE();
+ DIAResult<CV_CFL_LANG> getLanguage();
+ DIAResult<DWORD> getLexicalParentId();
+ DIAResult<DIAString> getLibraryName();
+ DIAResult<DWORD> getLiveRangeStartAddressOffset();
+ DIAResult<DWORD> getLiveRangeStartAddressSection();
+ DIAResult<DWORD> getLiveRangeStartRelativeVirtualAddress();
+ DIAResult<DWORD> getLocalBasePointerRegisterId();
+ DIAResult<DWORD> getLowerBoundId();
+ DIAResult<DWORD> getMemorySpaceKind();
+ DIAResult<DIAString> getName();
+ DIAResult<DWORD> getNumberOfAcceleratorPointerTags();
+ DIAResult<DWORD> getNumberOfColumns();
+ DIAResult<DWORD> getNumberOfModifiers();
+ DIAResult<DWORD> getNumberOfRegisterIndices();
+ DIAResult<DWORD> getNumberOfRows();
+ DIAResult<DIAString> getObjectFileName();
+ DIAResult<DWORD> getOemSymbolId();
+ DIAResult<DWORD> getOffsetInUdt();
+ DIAResult<CV_CPU_TYPE_e> getPlatform();
+ DIAResult<DWORD> getRank();
+ DIAResult<DWORD> getRegisterId();
+ DIAResult<DWORD> getRegisterType();
+ DIAResult<DWORD> getRelativeVirtualAddress();
+ DIAResult<DWORD> getSamplerSlot();
+ DIAResult<DWORD> getSignature();
+ DIAResult<DWORD> getSizeInUdt();
+ DIAResult<DWORD> getSlot();
+ DIAResult<DIAString> getSourceFileName();
+ DIAResult<DWORD> getStride();
+ DIAResult<DWORD> getSubTypeId();
+ DIAResult<DIAString> getSymbolsFileName();
+ DIAResult<DWORD> getSymIndexId();
+ DIAResult<DWORD> getTargetOffset();
+ DIAResult<DWORD> getTargetRelativeVirtualAddress();
+ DIAResult<DWORD> getTargetSection();
+ DIAResult<DWORD> getTextureSlot();
+ DIAResult<DWORD> getTimeStamp();
+ DIAResult<DWORD> getToken();
+ DIAResult<DWORD> getUavSlot();
+ DIAResult<DIAString> getUndecoratedName();
+ DIAResult<DWORD> getUnmodifiedTypeId();
+ DIAResult<DWORD> getUpperBoundId();
+ DIAResult<DWORD> getVirtualBaseDispIndex();
+ DIAResult<DWORD> getVirtualBaseOffset();
+ DIAResult<DWORD> getVirtualTableShapeId();
+ DIAResult<DataKind> getDataKind();
+ DIAResult<DiaSymTagEnum> getSymTag();
+ DIAResult<GUID> getGuid();
+ DIAResult<LONG> getOffset();
+ DIAResult<LONG> getThisAdjust();
+ DIAResult<LONG> getVirtualBasePointerOffset();
+ DIAResult<LocationType> getLocationType();
+ DIAResult<MachineTypeEnum> getMachineType();
+ DIAResult<THUNK_ORDINAL> getThunkOrdinal();
+ DIAResult<ULONGLONG> getLength();
+ DIAResult<ULONGLONG> getLiveRangeLength();
+ DIAResult<ULONGLONG> getTargetVirtualAddress();
+ DIAResult<ULONGLONG> getVirtualAddress();
+ DIAResult<UdtKind> getUdtKind();
+ DIAResult<BOOL> hasConstructor();
+ DIAResult<BOOL> hasCustomCallingConvention();
+ DIAResult<BOOL> hasFarReturn();
+ DIAResult<BOOL> isCode();
+ DIAResult<BOOL> isCompilerGenerated();
+ DIAResult<BOOL> isConstType();
+ DIAResult<BOOL> isEditAndContinueEnabled();
+ DIAResult<BOOL> isFunction();
+ DIAResult<BOOL> getAddressTaken();
+ DIAResult<BOOL> getNoStackOrdering();
+ DIAResult<BOOL> hasAlloca();
+ DIAResult<BOOL> hasAssignmentOperator();
+ DIAResult<BOOL> hasCTypes();
+ DIAResult<BOOL> hasCastOperator();
+ DIAResult<BOOL> hasDebugInfo();
+ DIAResult<BOOL> hasEH();
+ DIAResult<BOOL> hasEHa();
+ DIAResult<BOOL> hasInlAsm();
+ DIAResult<BOOL> hasInlineAttribute();
+ DIAResult<BOOL> hasInterruptReturn();
+ DIAResult<BOOL> hasLongJump();
+ DIAResult<BOOL> hasManagedCode();
+ DIAResult<BOOL> hasNestedTypes();
+ DIAResult<BOOL> hasNoInlineAttribute();
+ DIAResult<BOOL> hasNoReturnAttribute();
+ DIAResult<BOOL> hasOptimizedCodeDebugInfo();
+ DIAResult<BOOL> hasOverloadedOperator();
+ DIAResult<BOOL> hasSEH();
+ DIAResult<BOOL> hasSecurityChecks();
+ DIAResult<BOOL> hasSetJump();
+ DIAResult<BOOL> hasStrictGSCheck();
+ DIAResult<BOOL> isAcceleratorGroupSharedLocal();
+ DIAResult<BOOL> isAcceleratorPointerTagLiveRange();
+ DIAResult<BOOL> isAcceleratorStubFunction();
+ DIAResult<BOOL> isAggregated();
+ DIAResult<BOOL> isBaseVirtualFunction();
+ DIAResult<BOOL> isCVTCIL();
+ DIAResult<BOOL> isConstructorVirtualBase();
+ DIAResult<BOOL> isCxxReturnUdt();
+ DIAResult<BOOL> isDataAligned();
+ DIAResult<BOOL> isHLSLData();
+ DIAResult<BOOL> isHotpatchable();
+ DIAResult<BOOL> isIndirectVirtualBaseClass();
+ DIAResult<BOOL> isInterfaceUdt();
+ DIAResult<BOOL> isIntrinsic();
+ DIAResult<BOOL> isLTCG();
+ DIAResult<BOOL> isLocationControlFlowDependent();
+ DIAResult<BOOL> isMSILNetmodule();
+ DIAResult<BOOL> isManagedRef();
+ DIAResult<BOOL> isMatrixRowMajor();
+ DIAResult<BOOL> isMsilRef();
+ DIAResult<BOOL> isMultipleInheritance();
+ DIAResult<BOOL> isNaked();
+ DIAResult<BOOL> isNested();
+ DIAResult<BOOL> isOptimizedAway();
+ DIAResult<BOOL> isPacked();
+ DIAResult<BOOL> isPointerBasedOnSymbolValue();
+ DIAResult<BOOL> isPointerToDataMember();
+ DIAResult<BOOL> isPointerToMemberFunction();
+ DIAResult<BOOL> isPureVirtual();
+ DIAResult<BOOL> isRValueReference();
+ DIAResult<BOOL> isRefUdt();
+ DIAResult<BOOL> isReference();
+ DIAResult<BOOL> isRestrictedType();
+ DIAResult<BOOL> isReturnValue();
+ DIAResult<BOOL> isSafeBuffers();
+ DIAResult<BOOL> isScoped();
+ DIAResult<BOOL> isSdl();
+ DIAResult<BOOL> isSingleInheritance();
+ DIAResult<BOOL> isSplitted();
+ DIAResult<BOOL> isStatic();
+ DIAResult<BOOL> isStripped();
+ DIAResult<BOOL> isUnalignedType();
+ DIAResult<BOOL> isUnreached();
+ DIAResult<BOOL> isValueUdt();
+ DIAResult<BOOL> isVirtual();
+ DIAResult<BOOL> isVirtualBaseClass();
+ DIAResult<BOOL> isVirtualInheritance();
+ DIAResult<BOOL> isVolatileType();
+
+private:
+ template <class T, class U = T>
+ DIAResult<U>
+ InternalGetDIAValue(HRESULT (__stdcall IDiaSymbol::*Method)(T *)) {
+ T Value;
+ if (S_OK == (Symbol->*Method)(&Value))
+ return DIAResult<U>(U(Value));
+ else
+ return DIAResult<U>();
+ }
+
+ DIAResult<DIAString>
+ 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>(DIAString(String8));
+ } else
+ return DIAResult<DIAString>();
+ }
+
+ IDiaSymbol *Symbol;
+};
+
+} // namespace windows
+} // namespace sys
+} // namespace llvm
+
+#endif