This is a special code that indicates that it's a function id.
While I'm still not certain how to interpret these, we definitely
should *not* be using these values as indices into an array directly.
For now, when we encounter one of these, just print the numeric value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320775
91177308-0d34-0410-b5e6-
96231b3b80d8
static const uint32_t FirstNonSimpleIndex = 0x1000;
static const uint32_t SimpleKindMask = 0x000000ff;
static const uint32_t SimpleModeMask = 0x00000700;
+ static const uint32_t DecoratedItemIdMask = 0x80000000;
public:
TypeIndex() : Index(static_cast<uint32_t>(SimpleTypeKind::None)) {}
uint32_t getIndex() const { return Index; }
void setIndex(uint32_t I) { Index = I; }
bool isSimple() const { return Index < FirstNonSimpleIndex; }
+ bool isDecoratedItemId() const { return !!(Index & DecoratedItemIdMask); }
bool isNoneType() const { return *this == None(); }
std::string MinimalSymbolDumper::typeOrIdIndex(codeview::TypeIndex TI,
bool IsType) const {
- if (TI.isSimple())
+ if (TI.isSimple() || TI.isDecoratedItemId())
return formatv("{0}", TI).str();
auto &Container = IsType ? Types : Ids;
StringRef Name = Container.getTypeName(TI);