From 03cb69fbd1ef003f94710f2d497515692ff5445a Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Wed, 5 Aug 2009 23:16:16 +0000 Subject: Privatize the StructType table, which unfortunately involves routing contexts through a number of APIs. llvm-svn: 78258 --- llvm/lib/VMCore/Core.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'llvm/lib/VMCore/Core.cpp') diff --git a/llvm/lib/VMCore/Core.cpp b/llvm/lib/VMCore/Core.cpp index 89983500b7b..6cce6782eea 100644 --- a/llvm/lib/VMCore/Core.cpp +++ b/llvm/lib/VMCore/Core.cpp @@ -217,7 +217,7 @@ LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, *E = ElementTypes + ElementCount; I != E; ++I) Tys.push_back(unwrap(*I)); - return wrap(StructType::get(Tys, Packed != 0)); + return wrap(StructType::get(getGlobalContext(), Tys, Packed != 0)); } unsigned LLVMCountStructElementTypes(LLVMTypeRef StructTy) { @@ -411,7 +411,8 @@ LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy, LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count, int Packed) { - return wrap(ConstantStruct::get(unwrap(ConstantVals, Count), + return wrap(ConstantStruct::get(getGlobalContext(), + unwrap(ConstantVals, Count), Count, Packed != 0)); } -- cgit v1.2.3