summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit0395553e35d19995b3af7d2450b2b5c35da362f1 (patch)
treed167a7cabf586207ebf56dd6b936b370395812c7 /llvm/lib/Analysis/DebugInfo.cpp
parent6feac8a39b6607c5be2a9284711b2a9da0feea8f (diff)
downloadbcm5719-llvm-0395553e35d19995b3af7d2450b2b5c35da362f1.tar.gz
bcm5719-llvm-0395553e35d19995b3af7d2450b2b5c35da362f1.zip
Refactor.
llvm-svn: 102661
Diffstat (limited to 'llvm/lib/Analysis/DebugInfo.cpp')
-rw-r--r--llvm/lib/Analysis/DebugInfo.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp
index 8ba19020b09..d33bb6042b2 100644
--- a/llvm/lib/Analysis/DebugInfo.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud