]> granicus.if.org Git - clang/commit
Fix mangling for block literals.
authorEli Friedman <eli.friedman@gmail.com>
Mon, 1 Jul 2013 20:22:57 +0000 (20:22 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Mon, 1 Jul 2013 20:22:57 +0000 (20:22 +0000)
commit07369dde9d72213bf8a48288cd8b29999af9a40c
tree233db42fa4864f7c6d6c6ec64d1bbefe8d1acb8e
parent18a295d96d66c2d99b089882366966e460ed5072
Fix mangling for block literals.

Blocks, like lambdas, can be written in contexts which are required to be
treated as the same under ODR.  Unlike lambdas, it isn't possible to actually
take the address of a block, so the mangling of the block itself doesn't
matter. However, objects like static variables inside a block do need to
be mangled in a consistent way.

There are basically three components here. One, block literals need a
consistent numbering.  Two, objects/types inside a block literal need
to be mangled using it.  Three, objects/types inside a block literal need
to have their linkage computed correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185372 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
include/clang/AST/ASTContext.h
include/clang/AST/Decl.h
include/clang/AST/MangleNumberingContext.h [moved from include/clang/AST/LambdaMangleContext.h with 50% similarity]
include/clang/Sema/Sema.h
lib/AST/ASTContext.cpp
lib/AST/Decl.cpp
lib/AST/ItaniumMangle.cpp
lib/AST/MangleNumberingContext.cpp [moved from lib/AST/LambdaMangleContext.cpp with 71% similarity]
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
lib/Sema/SemaExpr.cpp
lib/Sema/SemaLambda.cpp
test/CXX/expr/expr.prim/expr.prim.lambda/blocks-irgen.mm
test/CodeGenObjCXX/mangle-blocks.mm