diff options
| author | Chris Lattner <sabre@nondot.org> | 2001-10-01 16:18:37 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2001-10-01 16:18:37 +0000 |
| commit | 4b717c0edc082166e85181fa70e76b17669aebe2 (patch) | |
| tree | 2f9e2828d1baeba95c31078d9181478d54ad37b9 /llvm/lib/VMCore/AsmWriter.cpp | |
| parent | 222b1f5775cfe38e3fc10dbf06e3e88b20b1c88f (diff) | |
| download | bcm5719-llvm-4b717c0edc082166e85181fa70e76b17669aebe2.tar.gz bcm5719-llvm-4b717c0edc082166e85181fa70e76b17669aebe2.zip | |
Add support for new style casts
llvm-svn: 694
Diffstat (limited to 'llvm/lib/VMCore/AsmWriter.cpp')
| -rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index 24d7cc8e7f3..e40006c2330 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -35,24 +35,24 @@ ostream &WriteAsOperand(ostream &Out, const Value *V, bool PrintType, if (PrintName && V->hasName()) { Out << " %" << V->getName(); } else { - if (const ConstPoolVal *CPV = V->castConstant()) { + if (const ConstPoolVal *CPV = dyn_cast<const ConstPoolVal>(V)) { Out << " " << CPV->getStrValue(); } else { int Slot; if (Table) { Slot = Table->getValSlot(V); } else { - if (const Type *Ty = V->castType()) { + if (const Type *Ty = dyn_cast<const Type>(V)) { return Out << " " << Ty; - } else if (const MethodArgument *MA = V->castMethodArgument()) { + } else if (const MethodArgument *MA =dyn_cast<const MethodArgument>(V)){ Table = new SlotCalculator(MA->getParent(), true); - } else if (const Instruction *I = V->castInstruction()) { + } else if (const Instruction *I = dyn_cast<const Instruction>(V)) { Table = new SlotCalculator(I->getParent()->getParent(), true); - } else if (const BasicBlock *BB = V->castBasicBlock()) { + } else if (const BasicBlock *BB = dyn_cast<const BasicBlock>(V)) { Table = new SlotCalculator(BB->getParent(), true); - } else if (const Method *Meth = V->castMethod()) { + } else if (const Method *Meth = dyn_cast<const Method>(V)) { Table = new SlotCalculator(Meth, true); - } else if (const Module *Mod = V->castModule()) { + } else if (const Module *Mod = dyn_cast<const Module>(V)) { Table = new SlotCalculator(Mod, true); } else { return Out << "BAD VALUE TYPE!"; |

