#include "clang/AST/Expr.h"
#include "clang/AST/ExternalASTSource.h"
#include "clang/AST/RecordLayout.h"
+#include "clang/AST/ExprObjC.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
#include "llvm/ADT/StringExtras.h"
void ASTContext::setFieldDecl(const ObjCInterfaceDecl *OI,
const ObjCIvarDecl *Ivar,
const ObjCIvarRefExpr *MRef) {
+ assert(MRef->getDecl() == Ivar);
ASTFieldForIvarRef[MRef] = OI->lookupFieldDeclForIvar(*this, Ivar);
}
const ObjCIvarDecl *Ivar,
const FieldDecl *Field,
unsigned CVRQualifiers) {
+ assert(Field == ObjectTy->getAsObjCInterfaceType()->getDecl()->lookupFieldDeclForIvar(CGM.getContext(), Ivar));
if (Ivar->isBitField())
return CGF.EmitLValueForBitfield(BaseValue, const_cast<FieldDecl *>(Field),
CVRQualifiers);
const ObjCIvarDecl *Ivar,
const FieldDecl *Field,
unsigned CVRQualifiers) {
+ assert(Field == ObjectTy->getAsObjCInterfaceType()->getDecl()->lookupFieldDeclForIvar(CGM.getContext(), Ivar));
if (Ivar->isBitField())
return CGF.EmitLValueForBitfield(BaseValue, const_cast<FieldDecl *>(Field),
CVRQualifiers);
const ObjCIvarDecl *Ivar,
const FieldDecl *Field,
unsigned CVRQualifiers) {
+ assert(Field == ObjectTy->getAsObjCInterfaceType()->getDecl()->lookupFieldDeclForIvar(CGM.getContext(), Ivar));
assert(ObjectTy->isObjCInterfaceType() &&
"CGObjCNonFragileABIMac::EmitObjCValueForIvar");
ObjCInterfaceDecl *ID = ObjectTy->getAsObjCInterfaceType()->getDecl();