diff options
author | Owen Anderson <resistor@mac.com> | 2009-08-13 21:58:54 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-08-13 21:58:54 +0000 |
commit | 55f1c09e31cfc6744fb682e17a2a1a00d914694c (patch) | |
tree | e753e20c7186dc8138bef58089274bb5162a7cef /llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | |
parent | 41a750271b72216801366693bd0f41672892c487 (diff) | |
download | llvm-55f1c09e31cfc6744fb682e17a2a1a00d914694c.zip llvm-55f1c09e31cfc6744fb682e17a2a1a00d914694c.tar.gz llvm-55f1c09e31cfc6744fb682e17a2a1a00d914694c.tar.bz2 |
Push LLVMContexts through the IntegerType APIs.
llvm-svn: 78948
Diffstat (limited to 'llvm/lib/Bitcode/Writer/ValueEnumerator.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index 4712dea..783022c 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -198,7 +198,7 @@ void ValueEnumerator::EnumerateMetadata(const MetadataBase *MD) { if (*I) EnumerateValue(*I); else - EnumerateType(Type::VoidTy); + EnumerateType(Type::getVoidTy(MD->getContext())); } return; } else if (const NamedMDNode *N = dyn_cast<NamedMDNode>(MD)) { @@ -218,7 +218,8 @@ void ValueEnumerator::EnumerateMetadata(const MetadataBase *MD) { } void ValueEnumerator::EnumerateValue(const Value *V) { - assert(V->getType() != Type::VoidTy && "Can't insert void values!"); + assert(V->getType() != Type::getVoidTy(V->getContext()) && + "Can't insert void values!"); if (const MetadataBase *MB = dyn_cast<MetadataBase>(V)) return EnumerateMetadata(MB); @@ -358,7 +359,7 @@ void ValueEnumerator::incorporateFunction(const Function &F) { // Add all of the instructions. for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB) { for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I!=E; ++I) { - if (I->getType() != Type::VoidTy) + if (I->getType() != Type::getVoidTy(F.getContext())) EnumerateValue(I); } } |