From ff8ac551a7f960299200b930d59b0f64d4838b9f Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 17 Jul 2009 16:20:23 +0000 Subject: [PATCH] Initialize another Context, in the hopes of unbreaking CBE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76184 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/LowerAllocations.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index cd45fea7b98..d7ca3134cf2 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/LowerAllocations.cpp @@ -87,6 +87,9 @@ Pass *llvm::createLowerAllocationsPass(bool LowerMallocArgToInteger) { // This function is always successful. // bool LowerAllocations::doInitialization(Module &M) { + // Ensure context initialization. + BasicBlockPass::doInitialization(M); + const Type *BPTy = Context->getPointerTypeUnqual(Type::Int8Ty); // Prototype malloc as "char* malloc(...)", because we don't know in // doInitialization whether size_t is int or long.