aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-04-29 20:40:36 +0000
committerDevang Patel <dpatel@apple.com>2010-04-29 20:40:36 +0000
commit719f6a9d9cf29d7daa33cfe43a9e7fe671b24df1 (patch)
tree01e6e771cd80a77912333220ed58fdf1c6c38bcf /lib/Analysis/DebugInfo.cpp
parent8c5358c93675b009ba2d57c3a5980f6bc58ba536 (diff)
downloadexternal_llvm-719f6a9d9cf29d7daa33cfe43a9e7fe671b24df1.zip
external_llvm-719f6a9d9cf29d7daa33cfe43a9e7fe671b24df1.tar.gz
external_llvm-719f6a9d9cf29d7daa33cfe43a9e7fe671b24df1.tar.bz2
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102661 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r--lib/Analysis/DebugInfo.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 8ba1902..d33bb60 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -402,6 +402,17 @@ uint64_t DIDerivedType::getOriginalTypeSize() const {
return getSizeInBits();
}
+/// isInlinedFnArgument - Return trule if this variable provides debugging
+/// information for an inlined function arguments.
+bool DIVariable::isInlinedFnArgument(const Function *CurFn) {
+ assert(CurFn && "Invalid function");
+ if (!getContext().isSubprogram())
+ return false;
+ // This variable is not inlined function argument if its scope
+ // does not describe current function.
+ return !(DISubprogram(getContext().getNode()).describes(CurFn));
+}
+
/// describes - Return true if this subprogram provides debugging
/// information for the function F.
bool DISubprogram::describes(const Function *F) {