Push the context through StructType::get.

Requires LLVM >= 78258. Also remove old #if's.
This commit is contained in:
Benjamin Kramer
2009-08-06 01:47:39 +02:00
parent de0d74dc68
commit 977fa551ee
22 changed files with 57 additions and 70 deletions

View File

@@ -16,7 +16,6 @@
#include <cassert>
#include "gen/llvm.h"
#include "gen/llvm-version.h"
#include "mars.h"
#include "module.h"
@@ -318,11 +317,7 @@ void DtoResolveTypeInfo(TypeInfoDeclaration* tid)
mdVals[TD_Confirm] = llvm::cast<MDNodeField>(irg->value);
mdVals[TD_Type] = llvm::UndefValue::get(DtoType(tid->tinfo));
// Construct the metadata
#if LLVM_REV < 77733
llvm::MetadataBase* metadata = gIR->context().getMDNode(mdVals, TD_NumFields);
#else
llvm::MetadataBase* metadata = llvm::MDNode::get(gIR->context(), mdVals, TD_NumFields);
#endif
// Insert it into the module
llvm::NamedMDNode::Create(metaname, &metadata, 1, gIR->module);
}