[llvm-commits] CVS: llvm/lib/Target/CBackend/CBackend.cpp
Chris Lattner
sabre at nondot.org
Sun Jan 14 18:28:12 PST 2007
Changes in directory llvm/lib/Target/CBackend:
CBackend.cpp updated: 1.316 -> 1.317
---
Log message:
rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.
This makes naming much more consistent. For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)
---
Diffs of the changes: (+7 -7)
CBackend.cpp | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
Index: llvm/lib/Target/CBackend/CBackend.cpp
diff -u llvm/lib/Target/CBackend/CBackend.cpp:1.316 llvm/lib/Target/CBackend/CBackend.cpp:1.317
--- llvm/lib/Target/CBackend/CBackend.cpp:1.316 Sun Jan 14 19:48:11 2007
+++ llvm/lib/Target/CBackend/CBackend.cpp Sun Jan 14 20:27:26 2007
@@ -366,7 +366,7 @@
std::ostream &
CWriter::printSimpleType(std::ostream &Out, const Type *Ty, bool isSigned,
const std::string &NameSoFar) {
- assert((Ty->isPrimitiveType() || Ty->isIntegral()) &&
+ assert((Ty->isPrimitiveType() || Ty->isInteger()) &&
"Invalid type for printSimpleType");
switch (Ty->getTypeID()) {
case Type::VoidTyID: return Out << "void " << NameSoFar;
@@ -399,7 +399,7 @@
std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty,
bool isSigned, const std::string &NameSoFar,
bool IgnoreName) {
- if (Ty->isPrimitiveType() || Ty->isIntegral()) {
+ if (Ty->isPrimitiveType() || Ty->isInteger()) {
printSimpleType(Out, Ty, isSigned, NameSoFar);
return Out;
}
@@ -1022,7 +1022,7 @@
}
if (NeedsExplicitCast) {
Out << "((";
- if (Ty->isIntegral() && Ty != Type::Int1Ty)
+ if (Ty->isInteger() && Ty != Type::Int1Ty)
printSimpleType(Out, Ty, TypeIsSigned);
else
printType(Out, Ty); // not integer, sign doesn't matter
@@ -1225,7 +1225,7 @@
// operand.
if (shouldCast) {
Out << "((";
- if (OpTy->isIntegral() && OpTy != Type::Int1Ty)
+ if (OpTy->isInteger() && OpTy != Type::Int1Ty)
printSimpleType(Out, OpTy, castIsSigned);
else
printType(Out, OpTy); // not integer, sign doesn't matter
@@ -1727,7 +1727,7 @@
void CWriter::printContainedStructs(const Type *Ty,
std::set<const StructType*> &StructPrinted){
// Don't walk through pointers.
- if (isa<PointerType>(Ty) || Ty->isPrimitiveType() || Ty->isIntegral()) return;
+ if (isa<PointerType>(Ty) || Ty->isPrimitiveType() || Ty->isInteger()) return;
// Print all contained types first.
for (Type::subtype_iterator I = Ty->subtype_begin(),
@@ -1848,8 +1848,8 @@
return false;
const Type *SrcTy = I.getOperand(0)->getType();
const Type *DstTy = I.getType();
- return (SrcTy->isFloatingPoint() && DstTy->isIntegral()) ||
- (DstTy->isFloatingPoint() && SrcTy->isIntegral());
+ return (SrcTy->isFloatingPoint() && DstTy->isInteger()) ||
+ (DstTy->isFloatingPoint() && SrcTy->isInteger());
}
void CWriter::printFunction(Function &F) {
More information about the llvm-commits
mailing list