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 | 47db941fd3e5a698c4417e38686ff6da6b2d81ee (patch) | |
tree | f1bc8ce05f4b4c0c6f5eb775c3e5b12eda35e2f1 /llvm/lib/Target/CBackend/CBackend.cpp | |
parent | 4565ef5b65b7d0b778b41836d70b806196cc8e24 (diff) | |
download | bcm5719-llvm-47db941fd3e5a698c4417e38686ff6da6b2d81ee.tar.gz bcm5719-llvm-47db941fd3e5a698c4417e38686ff6da6b2d81ee.zip |
Get rid of the Pass+Context magic.
llvm-svn: 76702
Diffstat (limited to 'llvm/lib/Target/CBackend/CBackend.cpp')
-rw-r--r-- | llvm/lib/Target/CBackend/CBackend.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/Target/CBackend/CBackend.cpp b/llvm/lib/Target/CBackend/CBackend.cpp index 96ed5d065ce..4f0a5a8b4ec 100644 --- a/llvm/lib/Target/CBackend/CBackend.cpp +++ b/llvm/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); |