Initialize another Context, in the hopes of unbreaking CBE.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 17 Jul 2009 16:20:23 +0000 (16:20 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 17 Jul 2009 16:20:23 +0000 (16:20 +0000)
llvm-svn: 76184

llvm/lib/Transforms/Utils/LowerAllocations.cpp

index cd45fea7b98b2f664d47dd1ddb7869256bb597d9..d7ca3134cf2d8450f07acc468708a1054ad80b6f 100644 (file)
@@ -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.