diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-04-21 00:41:40 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-04-21 00:41:40 +0000 |
commit | 9e6c20bae697c908b7d368c0f79f5510d1006a65 (patch) | |
tree | ff6187dfdbe875898eafe552344b98f30b9bafc9 /lib/AST/ASTContext.cpp | |
parent | 3ca7ee9a40532167f67bde17fff5e678f183f3f2 (diff) |
Assert on a few conditions that (I believe) should hold
w.r.t. ASTContext::[gs]etFieldDecl, and the Field argument to
EmitObjCValueForIvar).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69639 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 48d9fe4ea9..e266774dde 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -18,6 +18,7 @@ #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" @@ -684,6 +685,7 @@ const RecordDecl *ASTContext::addRecordToClass(const ObjCInterfaceDecl *D) { void ASTContext::setFieldDecl(const ObjCInterfaceDecl *OI, const ObjCIvarDecl *Ivar, const ObjCIvarRefExpr *MRef) { + assert(MRef->getDecl() == Ivar); ASTFieldForIvarRef[MRef] = OI->lookupFieldDeclForIvar(*this, Ivar); } |