diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-22 00:24:57 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-22 00:24:57 +0000 |
commit | e922c0201916e0b980ab3cfe91e1413e68d55647 (patch) | |
tree | 663be741b84470d97945f01da459a3627af683fd /lib/Target/CBackend/CBackend.cpp | |
parent | 7cf12c7efd37dc12c3ed536a3f4c373dddac2b85 (diff) |
Get rid of the Pass+Context magic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend/CBackend.cpp')
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 96ed5d065c..4f0a5a8b4e 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -1238,7 +1238,7 @@ void CWriter::printConstant(Constant *CPV, bool Static) { Out << '{'; if (AT->getNumElements()) { Out << ' '; - Constant *CZ = Context->getNullValue(AT->getElementType()); + Constant *CZ = CPV->getContext().getNullValue(AT->getElementType()); printConstant(CZ, Static); for (unsigned i = 1, e = AT->getNumElements(); i != e; ++i) { Out << ", "; @@ -1263,7 +1263,7 @@ void CWriter::printConstant(Constant *CPV, bool Static) { assert(isa<ConstantAggregateZero>(CPV) || isa<UndefValue>(CPV)); const VectorType *VT = cast<VectorType>(CPV->getType()); Out << "{ "; - Constant *CZ = Context->getNullValue(VT->getElementType()); + Constant *CZ = CPV->getContext().getNullValue(VT->getElementType()); printConstant(CZ, Static); for (unsigned i = 1, e = VT->getNumElements(); i != e; ++i) { Out << ", "; @@ -1285,10 +1285,12 @@ void CWriter::printConstant(Constant *CPV, bool Static) { Out << '{'; if (ST->getNumElements()) { Out << ' '; - printConstant(Context->getNullValue(ST->getElementType(0)), Static); + printConstant( + CPV->getContext().getNullValue(ST->getElementType(0)), Static); for (unsigned i = 1, e = ST->getNumElements(); i != e; ++i) { Out << ", "; - printConstant(Context->getNullValue(ST->getElementType(i)), Static); + printConstant( + CPV->getContext().getNullValue(ST->getElementType(i)), Static); } } Out << " }"; @@ -3498,7 +3500,7 @@ void CWriter::visitStoreInst(StoreInst &I) { if (!ITy->isPowerOf2ByteWidth()) // We have a bit width that doesn't match an even power-of-2 byte // size. Consequently we must & the value with the type's bit mask - BitMask = Context->getConstantInt(ITy, ITy->getBitMask()); + BitMask = I.getContext().getConstantInt(ITy, ITy->getBitMask()); if (BitMask) Out << "(("; writeOperand(Operand); |