diff options
author | Caroline Tice <ctice@apple.com> | 2009-08-31 21:19:37 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2009-08-31 21:19:37 +0000 |
commit | dc8f6049d11ee73835c7b7e9b7c6d0b9e6a2c9b1 (patch) | |
tree | 389b40bb51c33a90478b8ed76858c339185d79af /include/llvm/Analysis | |
parent | 42214899082bfb5b6f8c6a09d355fec9ef4a0e82 (diff) | |
download | llvm-dc8f6049d11ee73835c7b7e9b7c6d0b9e6a2c9b1.tar.gz llvm-dc8f6049d11ee73835c7b7e9b7c6d0b9e6a2c9b1.tar.bz2 llvm-dc8f6049d11ee73835c7b7e9b7c6d0b9e6a2c9b1.tar.xz |
Add flag to mark structs for Apple Block "byref" variables; also add code to
modify the type and location debug information for these variables to match the
programmer's expectations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80625 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/DebugInfo.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h index b8a6ce3cd5..314873a384 100644 --- a/include/llvm/Analysis/DebugInfo.h +++ b/include/llvm/Analysis/DebugInfo.h @@ -191,7 +191,8 @@ namespace llvm { FlagPrivate = 1 << 0, FlagProtected = 1 << 1, FlagFwdDecl = 1 << 2, - FlagAppleBlock = 1 << 3 + FlagAppleBlock = 1 << 3, + FlagBlockByrefStruct = 1 << 4 }; protected: @@ -235,6 +236,9 @@ namespace llvm { bool isAppleBlockExtension() const { return (getFlags() & FlagAppleBlock) != 0; } + bool isBlockByrefStruct() const { + return (getFlags() & FlagBlockByrefStruct) != 0; + } /// dump - print type. void dump() const; @@ -401,6 +405,12 @@ namespace llvm { /// Verify - Verify that a variable descriptor is well formed. bool Verify() const; + /// isBlockByrefVariable - Return true if the variable was declared as + /// a "__block" variable (Apple Blocks). + bool isBlockByrefVariable() const { + return getType().isBlockByrefStruct(); + } + /// dump - print variable. void dump() const; }; |