summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Core.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-08-05 23:16:16 +0000
committerOwen Anderson <resistor@mac.com>2009-08-05 23:16:16 +0000
commit03cb69fbd1ef003f94710f2d497515692ff5445a (patch)
tree09edb1b4c08827055064fa639d024649076349d7 /llvm/lib/VMCore/Core.cpp
parente148ceaf65e3704935b8bf0fdc0c7f44283acf6c (diff)
downloadbcm5719-llvm-03cb69fbd1ef003f94710f2d497515692ff5445a.tar.gz
bcm5719-llvm-03cb69fbd1ef003f94710f2d497515692ff5445a.zip
Privatize the StructType table, which unfortunately involves routing contexts through a number of APIs.
llvm-svn: 78258
Diffstat (limited to 'llvm/lib/VMCore/Core.cpp')
-rw-r--r--llvm/lib/VMCore/Core.cpp5
1 files changed, 3 insertions, 2 deletions
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<Constant>(ConstantVals, Count),
+ return wrap(ConstantStruct::get(getGlobalContext(),
+ unwrap<Constant>(ConstantVals, Count),
Count, Packed != 0));
}
OpenPOWER on IntegriCloud