include/clang/AST/APValue.h: Try to fix *900* of cast-qual warnings by g++.

llvm-svn: 144275
This commit is contained in:
NAKAMURA Takumi 2011-11-10 10:08:04 +00:00
parent 27dd3964ac
commit c5a9aaca11

View File

@ -262,11 +262,11 @@ public:
unsigned getStructNumBases() const {
assert(isStruct() && "Invalid accessor");
return ((StructData*)(char*)Data)->NumBases;
return ((const StructData*)(const char*)Data)->NumBases;
}
unsigned getStructNumFields() const {
assert(isStruct() && "Invalid accessor");
return ((StructData*)(char*)Data)->NumFields;
return ((const StructData*)(const char*)Data)->NumFields;
}
APValue &getStructBase(unsigned i) {
assert(isStruct() && "Invalid accessor");
@ -285,7 +285,7 @@ public:
const FieldDecl *getUnionField() const {
assert(isUnion() && "Invalid accessor");
return ((UnionData*)(char*)Data)->Field;
return ((const UnionData*)(const char*)Data)->Field;
}
APValue &getUnionValue() {
assert(isUnion() && "Invalid accessor");