diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-05-14 16:42:16 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-05-14 16:42:16 +0000 |
commit | 0a2171ccd50ad5fb7131e9827eaae03d9937332c (patch) | |
tree | b66395b21eebfc4e1c9e7d64ac6f6909d5d4b9a3 /clang/lib/CodeGen | |
parent | d9034f0b89701f6de6704bd7e889638f81cba3b4 (diff) | |
download | bcm5719-llvm-0a2171ccd50ad5fb7131e9827eaae03d9937332c.tar.gz bcm5719-llvm-0a2171ccd50ad5fb7131e9827eaae03d9937332c.zip |
Skip the asm prefix when storing the name in block info.
- Otherwise we emit internal names with embedded '\01' characters,
which confuses some tools.
- Ideally all the code which wants to get a "display name" for the
given function should follow one code path, but this should be a
monotonic improvement for now.
llvm-svn: 71774
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.h b/clang/lib/CodeGen/CGBlocks.h index e065e003d4e..56d3a2d3b10 100644 --- a/clang/lib/CodeGen/CGBlocks.h +++ b/clang/lib/CodeGen/CGBlocks.h @@ -140,7 +140,7 @@ public: /// BlockLiteralTy - The type of the block literal. const llvm::Type *BlockLiteralTy; - /// Name - the name of the function this block was created for, if any + /// Name - the name of the function this block was created for, if any. const char *Name; /// ByCopyDeclRefs - Variables from parent scopes that have been imported @@ -152,7 +152,11 @@ public: llvm::SmallVector<const BlockDeclRefExpr *, 8> ByRefDeclRefs; BlockInfo(const llvm::Type *blt, const char *n) - : BlockLiteralTy(blt), Name(n) {} + : BlockLiteralTy(blt), Name(n) { + // Skip asm prefix, if any. + if (Name && Name[0] == '\01') + ++Name; + } }; CGBuilderTy &Builder; |