aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-06-16 06:42:02 +0000
committerDevang Patel <dpatel@apple.com>2010-06-16 06:42:02 +0000
commitffd33cd36494cf29a0b0c80f00ed1a51b599b31f (patch)
tree855715f535e8d675a64a01a4b72379e986ae1ee2
parent2f7d5291de87bfa195884e84dc0efe9705c2215c (diff)
downloadexternal_llvm-ffd33cd36494cf29a0b0c80f00ed1a51b599b31f.zip
external_llvm-ffd33cd36494cf29a0b0c80f00ed1a51b599b31f.tar.gz
external_llvm-ffd33cd36494cf29a0b0c80f00ed1a51b599b31f.tar.bz2
Check function pointer first, before comparing function names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106088 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/DebugInfo.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 6ef160b..c5cf3ff 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -406,6 +406,8 @@ bool DIVariable::isInlinedFnArgument(const Function *CurFn) {
/// information for the function F.
bool DISubprogram::describes(const Function *F) {
assert(F && "Invalid function");
+ if (F == getFunction())
+ return true;
StringRef Name = getLinkageName();
if (Name.empty())
Name = getName();