Mercurial > projects > ldc
comparison ir/irclass.cpp @ 1343:c21a6654cce2
Update for metadata changes in LLVM trunk.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Mon, 11 May 2009 11:59:22 +0200 |
parents | 4099548c80e0 |
children | 8d501abecd24 |
comparison
equal
deleted
inserted
replaced
1342:16d9afa22df4 | 1343:c21a6654cce2 |
---|---|
80 const LLType* type = DtoType(aggrdecl->type); | 80 const LLType* type = DtoType(aggrdecl->type); |
81 const LLType* bodyType = llvm::cast<LLPointerType>(type)->getElementType(); | 81 const LLType* bodyType = llvm::cast<LLPointerType>(type)->getElementType(); |
82 bool hasDestructor = (classdecl->dtor != NULL); | 82 bool hasDestructor = (classdecl->dtor != NULL); |
83 bool hasCustomDelete = (classdecl->aggDelete != NULL); | 83 bool hasCustomDelete = (classdecl->aggDelete != NULL); |
84 // Construct the fields | 84 // Construct the fields |
85 LLConstant* mdVals[CD_NumFields]; | 85 MDNodeField* mdVals[CD_NumFields]; |
86 mdVals[CD_BodyType] = llvm::UndefValue::get(bodyType); | 86 mdVals[CD_BodyType] = llvm::UndefValue::get(bodyType); |
87 mdVals[CD_Finalize] = LLConstantInt::get(LLType::Int1Ty, hasDestructor); | 87 mdVals[CD_Finalize] = LLConstantInt::get(LLType::Int1Ty, hasDestructor); |
88 mdVals[CD_CustomDelete] = LLConstantInt::get(LLType::Int1Ty, hasCustomDelete); | 88 mdVals[CD_CustomDelete] = LLConstantInt::get(LLType::Int1Ty, hasCustomDelete); |
89 // Construct the metadata | 89 // Construct the metadata |
90 llvm::MDNode* metadata = llvm::MDNode::get(mdVals, CD_NumFields); | 90 llvm::MDNode* metadata = llvm::MDNode::get(mdVals, CD_NumFields); |