Propagate the ASTContext to various AST traversal and lookup functions.
No functionality change (really).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68726 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index 095e224..3b1580c 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/lib/CodeGen/CGExprAgg.cpp
@@ -133,7 +133,9 @@
   // GCC union extension
   if (E->getType()->isUnionType()) {
     RecordDecl *SD = E->getType()->getAsRecordType()->getDecl();
-    LValue FieldLoc = CGF.EmitLValueForField(DestPtr, *SD->field_begin(), true, 0);
+    LValue FieldLoc = CGF.EmitLValueForField(DestPtr, 
+                                             *SD->field_begin(CGF.getContext()),
+                                             true, 0);
     EmitInitializationToLValue(E->getSubExpr(), FieldLoc);
     return;
   }
@@ -398,8 +400,8 @@
 #ifndef NDEBUG
       // Make sure that it's really an empty and not a failure of
       // semantic analysis.
-      for (RecordDecl::field_iterator Field = SD->field_begin(),
-                                   FieldEnd = SD->field_end();
+      for (RecordDecl::field_iterator Field = SD->field_begin(CGF.getContext()),
+                                   FieldEnd = SD->field_end(CGF.getContext());
            Field != FieldEnd; ++Field)
         assert(Field->isUnnamedBitfield() && "Only unnamed bitfields allowed");
 #endif
@@ -423,8 +425,8 @@
   
   // Here we iterate over the fields; this makes it simpler to both
   // default-initialize fields and skip over unnamed fields.
-  for (RecordDecl::field_iterator Field = SD->field_begin(),
-                               FieldEnd = SD->field_end();
+  for (RecordDecl::field_iterator Field = SD->field_begin(CGF.getContext()),
+                               FieldEnd = SD->field_end(CGF.getContext());
        Field != FieldEnd; ++Field) {
     // We're done once we hit the flexible array member
     if (Field->getType()->isIncompleteArrayType())