diff options
author | Devang Patel <dpatel@apple.com> | 2010-09-29 23:07:21 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-09-29 23:07:21 +0000 |
commit | 3cf763dc7a9741c14432710943ab66b439562881 (patch) | |
tree | b5d85ac49c63a6635450bd851141384b1bfc78dd /include | |
parent | e487b017e94393ec4e90e8bb02818cab39190787 (diff) | |
download | external_llvm-3cf763dc7a9741c14432710943ab66b439562881.zip external_llvm-3cf763dc7a9741c14432710943ab66b439562881.tar.gz external_llvm-3cf763dc7a9741c14432710943ab66b439562881.tar.bz2 |
Let FE mark a variable as artificial variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115102 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Analysis/DebugInfo.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h index 4fdbd3c..d76271a 100644 --- a/include/llvm/Analysis/DebugInfo.h +++ b/include/llvm/Analysis/DebugInfo.h @@ -501,6 +501,13 @@ namespace llvm { } unsigned getLineNumber() const { return getUnsignedField(4); } DIType getType() const { return getFieldAs<DIType>(5); } + + /// isArtificial - Return true if this variable is marked as "artificial". + bool isArtificial() const { + if (getVersion() <= llvm::LLVMDebugVersion8) + return false; + return (getUnsignedField(6) & FlagArtificial) != 0; + } /// Verify - Verify that a variable descriptor is well formed. @@ -738,7 +745,8 @@ namespace llvm { DIVariable CreateVariable(unsigned Tag, DIDescriptor Context, StringRef Name, DIFile F, unsigned LineNo, - DIType Ty, bool AlwaysPreserve = false); + DIType Ty, bool AlwaysPreserve = false, + unsigned Flags = 0); /// CreateComplexVariable - Create a new descriptor for the specified /// variable which has a complex address expression for its address. |