summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2015-09-08 08:21:11 +0000
committerJohn McCall <rjmccall@apple.com>2015-09-08 08:21:11 +0000
commitbd96e98af72b80c3d3b81849e45de92c8612475d (patch)
tree0514460cc0d07352312b101ae2e3aa47e1c9dfdd
parent7f416cc426384ad1f891addb61d93e7ca1ffa0f2 (diff)
downloadbcm5719-llvm-bd96e98af72b80c3d3b81849e45de92c8612475d.tar.gz
bcm5719-llvm-bd96e98af72b80c3d3b81849e45de92c8612475d.zip
Move BlockByrefHelpers back to CodeGenModule.h to placate MSVC.
llvm-svn: 246986
-rw-r--r--clang/lib/CodeGen/CGBlocks.h28
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h31
2 files changed, 30 insertions, 29 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.h b/clang/lib/CodeGen/CGBlocks.h
index 6be47c55b8e..1edabef4ec7 100644
--- a/clang/lib/CodeGen/CGBlocks.h
+++ b/clang/lib/CodeGen/CGBlocks.h
@@ -149,34 +149,6 @@ public:
CharUnits FieldOffset;
};
-/// A pair of helper functions for a __block variable.
-class BlockByrefHelpers : public llvm::FoldingSetNode {
-public:
- llvm::Constant *CopyHelper;
- llvm::Constant *DisposeHelper;
-
- /// The alignment of the field. This is important because
- /// different offsets to the field within the byref struct need to
- /// have different helper functions.
- CharUnits Alignment;
-
- BlockByrefHelpers(CharUnits alignment) : Alignment(alignment) {}
- BlockByrefHelpers(const BlockByrefHelpers &) = default;
- virtual ~BlockByrefHelpers();
-
- void Profile(llvm::FoldingSetNodeID &id) const {
- id.AddInteger(Alignment.getQuantity());
- profileImpl(id);
- }
- virtual void profileImpl(llvm::FoldingSetNodeID &id) const = 0;
-
- virtual bool needsCopy() const { return true; }
- virtual void emitCopy(CodeGenFunction &CGF, Address dest, Address src) = 0;
-
- virtual bool needsDispose() const { return true; }
- virtual void emitDispose(CodeGenFunction &CGF, Address field) = 0;
-};
-
/// CGBlockInfo - Information to generate a block literal.
class CGBlockInfo {
public:
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index fcc499392e5..4bb50a35f40 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -79,7 +79,6 @@ class CoverageSourceInfo;
namespace CodeGen {
-class BlockByrefHelpers;
class CallArgList;
class CodeGenFunction;
class CodeGenTBAA;
@@ -210,6 +209,36 @@ public:
void reportDiagnostics(DiagnosticsEngine &Diags, StringRef MainFile);
};
+/// A pair of helper functions for a __block variable.
+class BlockByrefHelpers : public llvm::FoldingSetNode {
+ // MSVC requires this type to be complete in order to process this
+ // header.
+public:
+ llvm::Constant *CopyHelper;
+ llvm::Constant *DisposeHelper;
+
+ /// The alignment of the field. This is important because
+ /// different offsets to the field within the byref struct need to
+ /// have different helper functions.
+ CharUnits Alignment;
+
+ BlockByrefHelpers(CharUnits alignment) : Alignment(alignment) {}
+ BlockByrefHelpers(const BlockByrefHelpers &) = default;
+ virtual ~BlockByrefHelpers();
+
+ void Profile(llvm::FoldingSetNodeID &id) const {
+ id.AddInteger(Alignment.getQuantity());
+ profileImpl(id);
+ }
+ virtual void profileImpl(llvm::FoldingSetNodeID &id) const = 0;
+
+ virtual bool needsCopy() const { return true; }
+ virtual void emitCopy(CodeGenFunction &CGF, Address dest, Address src) = 0;
+
+ virtual bool needsDispose() const { return true; }
+ virtual void emitDispose(CodeGenFunction &CGF, Address field) = 0;
+};
+
/// This class organizes the cross-function state that is used while generating
/// LLVM code.
class CodeGenModule : public CodeGenTypeCache {
OpenPOWER on IntegriCloud