Patch to correctly mangle block helper functions
when block literal is declared inside a ctor/dtor.
Fixes radr 8096995.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106700 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/Mangle.h b/lib/CodeGen/Mangle.h
index d10334d..ec575cc 100644
--- a/lib/CodeGen/Mangle.h
+++ b/lib/CodeGen/Mangle.h
@@ -19,6 +19,7 @@
#define LLVM_CLANG_CODEGEN_MANGLE_H
#include "CGCXX.h"
+#include "GlobalDecl.h"
#include "clang/AST/Type.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringRef.h"
@@ -133,7 +134,8 @@
llvm::SmallVectorImpl<char> &);
virtual void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type,
llvm::SmallVectorImpl<char> &);
- void mangleBlock(const BlockDecl *BD, llvm::SmallVectorImpl<char> &);
+ void mangleBlock(GlobalDecl GD,
+ const BlockDecl *BD, llvm::SmallVectorImpl<char> &);
void mangleInitDiscriminator() {
Discriminator = 0;
@@ -163,7 +165,7 @@
llvm::raw_svector_ostream &getStream() { return Out; }
- void mangleBlock(const BlockDecl *BD);
+ void mangleBlock(GlobalDecl GD, const BlockDecl *BD);
void mangleObjCMethodName(const ObjCMethodDecl *MD);
};