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
This commit is contained in:
Devang Patel 2010-06-16 06:42:02 +00:00
parent 2f7d5291de
commit ffd33cd364

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