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/Transforms/Utils | |
| 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/Transforms/Utils')
| -rw-r--r-- | llvm/lib/Transforms/Utils/CodeExtractor.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Utils/LowerInvoke.cpp | 2 | 
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/CodeExtractor.cpp b/llvm/lib/Transforms/Utils/CodeExtractor.cpp index 80da263df55..d4f0c8095a1 100644 --- a/llvm/lib/Transforms/Utils/CodeExtractor.cpp +++ b/llvm/lib/Transforms/Utils/CodeExtractor.cpp @@ -275,7 +275,7 @@ Function *CodeExtractor::constructFunction(const Values &inputs,    if (AggregateArgs && (inputs.size() + outputs.size() > 0)) {      PointerType *StructPtr = -           PointerType::getUnqual(StructType::get(paramTy)); +           PointerType::getUnqual(StructType::get(M->getContext(), paramTy));      paramTy.clear();      paramTy.push_back(StructPtr);    } @@ -382,7 +382,7 @@ emitCallAndSwitchStatement(Function *newFunction, BasicBlock *codeReplacer,        ArgTypes.push_back((*v)->getType());      // Allocate a struct at the beginning of this function -    Type *StructArgTy = StructType::get(ArgTypes); +    Type *StructArgTy = StructType::get(newFunction->getContext(), ArgTypes);      Struct =        new AllocaInst(StructArgTy, 0, "structArg",                       codeReplacer->getParent()->begin()->begin()); diff --git a/llvm/lib/Transforms/Utils/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp index 4eac467e076..d16ceb42809 100644 --- a/llvm/lib/Transforms/Utils/LowerInvoke.cpp +++ b/llvm/lib/Transforms/Utils/LowerInvoke.cpp @@ -128,7 +128,7 @@ bool LowerInvoke::doInitialization(Module &M) {        Elements.push_back(JmpBufTy);        OpaqueType *OT = OpaqueType::get();        Elements.push_back(PointerType::getUnqual(OT)); -      PATypeHolder JBLType(StructType::get(Elements)); +      PATypeHolder JBLType(StructType::get(M.getContext(), Elements));        OT->refineAbstractTypeTo(JBLType.get());  // Complete the cycle.        JBLinkTy = JBLType.get();        M.addTypeName("llvm.sjljeh.jmpbufty", JBLinkTy);  | 

