Mercurial > projects > ldc
comparison gen/typinf.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 | 8c65217be813 |
children | 3297edb697eb |
comparison
equal
deleted
inserted
replaced
1342:16d9afa22df4 | 1343:c21a6654cce2 |
---|---|
292 LLGlobalVariable* meta = gIR->module->getGlobalVariable(metaname); | 292 LLGlobalVariable* meta = gIR->module->getGlobalVariable(metaname); |
293 // Don't generate metadata for non-concrete types | 293 // Don't generate metadata for non-concrete types |
294 // (such as tuple types, slice types, typeof(expr), etc.) | 294 // (such as tuple types, slice types, typeof(expr), etc.) |
295 if (!meta && tid->tinfo->toBasetype()->ty < Terror) { | 295 if (!meta && tid->tinfo->toBasetype()->ty < Terror) { |
296 // Construct the fields | 296 // Construct the fields |
297 LLConstant* mdVals[TD_NumFields]; | 297 MDNodeField* mdVals[TD_NumFields]; |
298 if (TD_Confirm >= 0) | 298 if (TD_Confirm >= 0) |
299 mdVals[TD_Confirm] = llvm::cast<LLConstant>(irg->value); | 299 mdVals[TD_Confirm] = llvm::cast<LLConstant>(irg->value); |
300 mdVals[TD_Type] = llvm::UndefValue::get(DtoType(tid->tinfo)); | 300 mdVals[TD_Type] = llvm::UndefValue::get(DtoType(tid->tinfo)); |
301 // Construct the metadata | 301 // Construct the metadata |
302 llvm::MDNode* metadata = llvm::MDNode::get(mdVals, TD_NumFields); | 302 llvm::MDNode* metadata = llvm::MDNode::get(mdVals, TD_NumFields); |