Check function pointer first, before comparing function names.
authorDevang Patel <dpatel@apple.com>
Wed, 16 Jun 2010 06:42:02 +0000 (06:42 +0000)
committerDevang Patel <dpatel@apple.com>
Wed, 16 Jun 2010 06:42:02 +0000 (06:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106088 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DebugInfo.cpp

index 6ef160b97260d1a568d3d31d3a8a86f54f1f93e3..c5cf3ffba57c31711c604a492b5842a0a1063fd5 100644 (file)
@@ -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();