Check function pointer first, before comparing function names.

llvm-svn: 106088
This commit is contained in:
Devang Patel 2010-06-16 06:42:02 +00:00
parent abd60dd1fc
commit d119da54de
1 changed files with 2 additions and 0 deletions

View 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();