summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCRuntime.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGObjCRuntime.h')
-rw-r--r--clang/lib/CodeGen/CGObjCRuntime.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjCRuntime.h b/clang/lib/CodeGen/CGObjCRuntime.h
index cae32edf04f..28ee0f4e9f3 100644
--- a/clang/lib/CodeGen/CGObjCRuntime.h
+++ b/clang/lib/CodeGen/CGObjCRuntime.h
@@ -25,10 +25,11 @@
namespace llvm {
class Constant;
+ class Function;
+ class Module;
+ class StructLayout;
class Type;
class Value;
- class Module;
- class Function;
}
namespace clang {
@@ -36,6 +37,7 @@ namespace CodeGen {
class CodeGenFunction;
}
+ class FieldDecl;
class ObjCAtTryStmt;
class ObjCAtThrowStmt;
class ObjCAtSynchronizedStmt;
@@ -58,6 +60,24 @@ namespace CodeGen {
/// Implements runtime-specific code generation functions.
class CGObjCRuntime {
+protected:
+ // Utility functions for unified ivar access. These need to
+ // eventually be folded into other places (the structure layout
+ // code).
+
+ // Compute an offset to the given ivar, suitable for passing to
+ // EmitValueForIvarAtOffset. Note that the correct handling of
+ // bit-fields is carefully coordinated by these two, use caution!
+ uint64_t ComputeIvarBaseOffset(CodeGen::CodeGenModule &CGM,
+ const ObjCInterfaceDecl *OID,
+ const ObjCIvarDecl *Ivar);
+
+ LValue EmitValueForIvarAtOffset(CodeGen::CodeGenFunction &CGF,
+ const ObjCInterfaceDecl *OID,
+ llvm::Value *BaseValue,
+ const ObjCIvarDecl *Ivar,
+ unsigned CVRQualifiers,
+ llvm::Value *Offset);
public:
virtual ~CGObjCRuntime();
OpenPOWER on IntegriCloud