aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Writer/SlotCalculator.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-01 18:26:53 +0000
committerChris Lattner <sabre@nondot.org>2001-10-01 18:26:53 +0000
commitcfe26c930ae691ff3012736555846c45087e1a9e (patch)
treeb68b70097da64da9be4a068f62d7ae3d43e05896 /lib/Bytecode/Writer/SlotCalculator.cpp
parent9636a91649f168f41b477cba705287665e054f79 (diff)
Add more support for new style casts
Convert more code to use them git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Writer/SlotCalculator.cpp')
-rw-r--r--lib/Bytecode/Writer/SlotCalculator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Bytecode/Writer/SlotCalculator.cpp b/lib/Bytecode/Writer/SlotCalculator.cpp
index cac8f2e953..d0f37fb723 100644
--- a/lib/Bytecode/Writer/SlotCalculator.cpp
+++ b/lib/Bytecode/Writer/SlotCalculator.cpp
@@ -250,13 +250,13 @@ int SlotCalculator::insertVal(const Value *D, bool dontIgnore = false) {
if (!dontIgnore) // Don't ignore nonignorables!
if (D->getType() == Type::VoidTy || // Ignore void type nodes
(IgnoreNamedNodes && // Ignore named and constants
- (D->hasName() || D->isConstant()) && !D->isType())) {
+ (D->hasName() || isa<ConstPoolVal>(D)) && !isa<Type>(D))) {
SC_DEBUG("ignored value " << D << endl);
return -1; // We do need types unconditionally though
}
// If it's a type, make sure that all subtypes of the type are included...
- if (const Type *TheTy = D->castType()) {
+ if (const Type *TheTy = dyn_cast<const Type>(D)) {
SC_DEBUG(" Inserted type: " << TheTy->getDescription() << endl);
// Loop over any contained types in the definition... in reverse depth first
@@ -289,7 +289,7 @@ int SlotCalculator::doInsertVal(const Value *D) {
// Used for debugging DefSlot=-1 assertion...
//if (Typ == Type::TypeTy)
- // cerr << "Inserting type '" << D->castTypeAsserting()->getDescription() << "'!\n";
+ // cerr << "Inserting type '" << cast<Type>(D)->getDescription() << "'!\n";
if (Typ->isDerivedType()) {
int DefSlot = getValSlot(Typ);