aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Value.cpp
diff options
context:
space:
mode:
authorShih-wei Liao <sliao@google.com>2010-04-07 12:21:42 -0700
committerShih-wei Liao <sliao@google.com>2010-04-07 12:21:42 -0700
commite4454320b3cfffe926a487c33fbeb454366de2f8 (patch)
tree133c05da684edf4a3b2529bcacfa996298c455f6 /lib/VMCore/Value.cpp
parent20570085304f0a4ab4f112a01d77958bbd2827a1 (diff)
downloadexternal_llvm-e4454320b3cfffe926a487c33fbeb454366de2f8.zip
external_llvm-e4454320b3cfffe926a487c33fbeb454366de2f8.tar.gz
external_llvm-e4454320b3cfffe926a487c33fbeb454366de2f8.tar.bz2
libbcc
Change-Id: Ieaa3ebd5a38f370752495549f8870b534eeedfc5
Diffstat (limited to 'lib/VMCore/Value.cpp')
-rw-r--r--lib/VMCore/Value.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp
index 3759b8a..a36d262 100644
--- a/lib/VMCore/Value.cpp
+++ b/lib/VMCore/Value.cpp
@@ -45,11 +45,11 @@ Value::Value(const Type *ty, unsigned scid)
UseList(0), Name(0) {
if (isa<CallInst>(this) || isa<InvokeInst>(this))
assert((VTy->isFirstClassType() || VTy->isVoidTy() ||
- isa<OpaqueType>(ty) || VTy->getTypeID() == Type::StructTyID) &&
+ ty->isOpaqueTy() || VTy->isStructTy()) &&
"invalid CallInst type!");
else if (!isa<Constant>(this) && !isa<BasicBlock>(this))
assert((VTy->isFirstClassType() || VTy->isVoidTy() ||
- isa<OpaqueType>(ty)) &&
+ ty->isOpaqueTy()) &&
"Cannot create non-first-class values except for constants!");
}
@@ -320,7 +320,7 @@ void Value::replaceAllUsesWith(Value *New) {
}
Value *Value::stripPointerCasts() {
- if (!isa<PointerType>(getType()))
+ if (!getType()->isPointerTy())
return this;
Value *V = this;
do {
@@ -337,12 +337,12 @@ Value *Value::stripPointerCasts() {
} else {
return V;
}
- assert(isa<PointerType>(V->getType()) && "Unexpected operand type!");
+ assert(V->getType()->isPointerTy() && "Unexpected operand type!");
} while (1);
}
Value *Value::getUnderlyingObject(unsigned MaxLookup) {
- if (!isa<PointerType>(getType()))
+ if (!getType()->isPointerTy())
return this;
Value *V = this;
for (unsigned Count = 0; MaxLookup == 0 || Count < MaxLookup; ++Count) {
@@ -357,7 +357,7 @@ Value *Value::getUnderlyingObject(unsigned MaxLookup) {
} else {
return V;
}
- assert(isa<PointerType>(V->getType()) && "Unexpected operand type!");
+ assert(V->getType()->isPointerTy() && "Unexpected operand type!");
}
return V;
}