Use function pointers, rather than references, to pass Destroyers

around, in the process cleaning up the various gcc/msvc compiler
workarounds.

llvm-svn: 149036
This commit is contained in:
Peter Collingbourne
2012-01-26 03:33:36 +00:00
parent e67bb67a9b
commit 1425b4556a
8 changed files with 41 additions and 55 deletions

View File

@@ -945,13 +945,13 @@ namespace {
class DestroyField : public EHScopeStack::Cleanup {
const FieldDecl *field;
CodeGenFunction::Destroyer &destroyer;
CodeGenFunction::Destroyer *destroyer;
bool useEHCleanupForArray;
public:
DestroyField(const FieldDecl *field, CodeGenFunction::Destroyer *destroyer,
bool useEHCleanupForArray)
: field(field), destroyer(*destroyer),
: field(field), destroyer(destroyer),
useEHCleanupForArray(useEHCleanupForArray) {}
void Emit(CodeGenFunction &CGF, Flags flags) {