[llvm-commits] [poolalloc] r96246 - in /poolalloc/trunk: lib/PoolAllocate/PointerCompress.cpp tools/Pa/pa.cpp
John Criswell
criswell at uiuc.edu
Mon Feb 15 10:27:47 PST 2010
Author: criswell
Date: Mon Feb 15 12:27:47 2010
New Revision: 96246
URL: http://llvm.org/viewvc/llvm-project?rev=96246&view=rev
Log:
For now, build everything within the global context. This avoids assertion
problems caused by different poolalloc parts putting different values into
different contexts.
Modified:
poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp
poolalloc/trunk/tools/Pa/pa.cpp
Modified: poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp?rev=96246&r1=96245&r2=96246&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp Mon Feb 15 12:27:47 2010
@@ -274,7 +274,7 @@
Elements.push_back(ComputeCompressedType(STy->getElementType(i),
NodeOffset+SL->getElementOffset(i),
Nodes));
- return StructType::get(STy->getContext(),Elements);
+ return StructType::get(getGlobalContext(),Elements);
} else if (const ArrayType *ATy = dyn_cast<ArrayType>(OrigTy)) {
return ArrayType::get(ComputeCompressedType(ATy->getElementType(),
NodeOffset, Nodes),
Modified: poolalloc/trunk/tools/Pa/pa.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/tools/Pa/pa.cpp?rev=96246&r1=96245&r2=96246&view=diff
==============================================================================
--- poolalloc/trunk/tools/Pa/pa.cpp (original)
+++ poolalloc/trunk/tools/Pa/pa.cpp Mon Feb 15 12:27:47 2010
@@ -70,7 +70,6 @@
std::string mt;
std::string & msg = mt;
- LLVMContext Context;
try {
cl::ParseCommandLineOptions(argc, argv, " llvm system compiler\n");
sys::PrintStackTraceOnErrorSignal();
@@ -80,7 +79,7 @@
std::string ErrorMessage;
if (MemoryBuffer *Buffer
= MemoryBuffer::getFileOrSTDIN(InputFilename, &ErrorMessage)) {
- M.reset(ParseBitcodeFile(Buffer, Context, &ErrorMessage));
+ M.reset(ParseBitcodeFile(Buffer, getGlobalContext(), &ErrorMessage));
delete Buffer;
}
More information about the llvm-commits
mailing list