Use compiling class instead of referrer for access checks.

bug:21869670
Change-Id: Ief329247e90202835e27fa38803e02dd2e2ae8ca
diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h
index 36503ce..b1ee824 100644
--- a/compiler/optimizing/builder.h
+++ b/compiler/optimizing/builder.h
@@ -222,8 +222,12 @@
 
   void MaybeRecordStat(MethodCompilationStat compilation_stat);
 
+  // Returns the outer-most compiling method's class.
   mirror::Class* GetOutermostCompilingClass() const;
 
+  // Returns the class whose method is being compiled.
+  mirror::Class* GetCompilingClass() const;
+
   // Returns whether `type_index` points to the outer-most compiling method's class.
   bool IsOutermostCompilingClass(uint16_t type_index) const;