diff options
author | Owen Anderson <resistor@mac.com> | 2009-08-05 23:16:16 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-08-05 23:16:16 +0000 |
commit | 03cb69fbd1ef003f94710f2d497515692ff5445a (patch) | |
tree | 09edb1b4c08827055064fa639d024649076349d7 /llvm/lib/VMCore/ConstantFold.cpp | |
parent | e148ceaf65e3704935b8bf0fdc0c7f44283acf6c (diff) | |
download | bcm5719-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/ConstantFold.cpp')
-rw-r--r-- | llvm/lib/VMCore/ConstantFold.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp index 081c7801400..da9b6aa9784 100644 --- a/llvm/lib/VMCore/ConstantFold.cpp +++ b/llvm/lib/VMCore/ConstantFold.cpp @@ -519,7 +519,7 @@ Constant *llvm::ConstantFoldInsertValueInstruction(LLVMContext &Context, Ops[i] = const_cast<Constant*>(Op); } if (isa<StructType>(AggTy)) - return ConstantStruct::get(Ops); + return ConstantStruct::get(Context, Ops); else return ConstantArray::get(cast<ArrayType>(AggTy), Ops); } @@ -548,7 +548,7 @@ Constant *llvm::ConstantFoldInsertValueInstruction(LLVMContext &Context, Ops[i] = const_cast<Constant*>(Op); } if (isa<StructType>(AggTy)) - return ConstantStruct::get(Ops); + return ConstantStruct::get(Context, Ops); else return ConstantArray::get(cast<ArrayType>(AggTy), Ops); } @@ -565,7 +565,7 @@ Constant *llvm::ConstantFoldInsertValueInstruction(LLVMContext &Context, } Constant *C; if (isa<StructType>(Agg->getType())) - C = ConstantStruct::get(Ops); + C = ConstantStruct::get(Context, Ops); else C = ConstantArray::get(cast<ArrayType>(Agg->getType()), Ops); return C; |