summaryrefslogtreecommitdiff
path: root/include/llvm/DerivedTypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/DerivedTypes.h')
-rw-r--r--include/llvm/DerivedTypes.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h
index ba35d783b8..1ae8cbd45b 100644
--- a/include/llvm/DerivedTypes.h
+++ b/include/llvm/DerivedTypes.h
@@ -263,7 +263,7 @@ public:
return T->getTypeID() == StructTyID;
}
- bool isPacked() const { return getSubclassData(); }
+ bool isPacked() const { return (0 != getSubclassData()) ? true : false; }
};
@@ -279,9 +279,12 @@ class SequentialType : public CompositeType {
PATypeHandle ContainedType; ///< Storage for the single contained type
SequentialType(const SequentialType &); // Do not implement!
const SequentialType &operator=(const SequentialType &); // Do not implement!
+
+ // avoiding warning: 'this' : used in base member initializer list
+ SequentialType* this_() { return this; }
protected:
SequentialType(TypeID TID, const Type *ElType)
- : CompositeType(TID), ContainedType(ElType, this) {
+ : CompositeType(TID), ContainedType(ElType, this_()) {
ContainedTys = &ContainedType;
NumContainedTys = 1;
}