@@ -253,4 +253,51 @@ For later versions of Visual Studio, no setup is required.
253
253
<Item Name =" [Raw Bytes]" Condition =" sizeof($T1)==8" >(unsigned char *)Value.buffer,8</Item >
254
254
</Expand >
255
255
</Type >
256
+ <!-- llvm::Type has two fields, SubclassData and ContainedTys, the meaning of which change depending on the TypeID.
257
+ This visualiser decodes those fields based on the value of ID.
258
+ -->
259
+ <Type Name =" llvm::Type" >
260
+ <DisplayString >{ID}</DisplayString >
261
+ <Expand >
262
+ <Item Name =" ID" >ID</Item >
263
+
264
+ <Item Name =" NumBits" Condition =" ID == llvm::Type::TypeID::IntegerTyID" >SubclassData</Item >
265
+
266
+ <Item Name =" ReturnType" Condition =" ID == llvm::Type::TypeID::FunctionTyID" >*ContainedTys</Item >
267
+ <Synthetic Name =" Arguments" Condition =" ID == llvm::Type::TypeID::FunctionTyID" >
268
+ <DisplayString >{NumContainedTys - 1}</DisplayString >
269
+ <Expand >
270
+ <ArrayItems >
271
+ <Size >NumContainedTys - 1</Size >
272
+ <ValuePointer >ContainedTys + 1</ValuePointer >
273
+ </ArrayItems >
274
+ </Expand >
275
+ </Synthetic >
276
+ <Item Name =" IsVarArg" Condition =" ID == llvm::Type::TypeID::FunctionTyID" >SubclassData == 1</Item >
277
+
278
+ <Item Name =" HasBody" Condition =" ID == llvm::Type::TypeID::StructTyID" >(SubclassData & llvm::StructType::SCDB_HasBody) != 0</Item >
279
+ <Item Name =" Packed" Condition =" ID == llvm::Type::TypeID::StructTyID" >(SubclassData & llvm::StructType::SCDB_Packed) != 0</Item >
280
+ <Item Name =" IsLiteral" Condition =" ID == llvm::Type::TypeID::StructTyID" >(SubclassData & llvm::StructType::SCDB_IsLiteral) != 0</Item >
281
+ <Item Name =" IsSized" Condition =" ID == llvm::Type::TypeID::StructTyID" >(SubclassData & llvm::StructType::SCDB_IsSized) != 0</Item >
282
+ <Synthetic Name =" Members" Condition =" ID == llvm::Type::TypeID::StructTyID" >
283
+ <DisplayString >{NumContainedTys}</DisplayString >
284
+ <Expand >
285
+ <ArrayItems >
286
+ <Size >NumContainedTys</Size >
287
+ <ValuePointer >ContainedTys</ValuePointer >
288
+ </ArrayItems >
289
+ </Expand >
290
+ </Synthetic >
291
+
292
+ <Item Name =" ElementType" Condition =" ID == llvm::Type::TypeID::ArrayTyID || ID == llvm::Type::TypeID::VectorTyID" >*ContainedTys</Item >
293
+ <Item Name =" NumElements" Condition =" ID == llvm::Type::TypeID::ArrayTyID" >((llvm::ArrayType*)this)->NumElements</Item >
294
+
295
+ <Item Name =" AddressSpace" Condition =" ID == llvm::Type::TypeID::PointerTyID" >SubclassData</Item >
296
+ <Item Name =" PointeeType" Condition =" ID == llvm::Type::TypeID::PointerTyID" >*ContainedTys</Item >
297
+
298
+ <Item Name =" NumElements" Condition =" ID == llvm::Type::TypeID::VectorTyID" >((llvm::VectorType*)this)->NumElements</Item >
299
+
300
+ <Item Name =" Context" >Context</Item >
301
+ </Expand >
302
+ </Type >
256
303
</AutoVisualizer >
0 commit comments