aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis
diff options
context:
space:
mode:
authorCaroline Tice <ctice@apple.com>2009-08-31 21:19:37 +0000
committerCaroline Tice <ctice@apple.com>2009-08-31 21:19:37 +0000
commit248d5579576fdfb0f1dca59bc3c6cebb8a6976fc (patch)
tree389b40bb51c33a90478b8ed76858c339185d79af /include/llvm/Analysis
parent30e24e0e6f8e94a50ef6f08911724ef5d43762d7 (diff)
downloadexternal_llvm-248d5579576fdfb0f1dca59bc3c6cebb8a6976fc.zip
external_llvm-248d5579576fdfb0f1dca59bc3c6cebb8a6976fc.tar.gz
external_llvm-248d5579576fdfb0f1dca59bc3c6cebb8a6976fc.tar.bz2
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.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h
index b8a6ce3..314873a 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;
};