forked from OSchip/llvm-project
static functions have a need for mangled name debug information too.
The mangler doesn't like non-prototyped functions so only use a mangled name for prototyped functions. rdar://11079003 llvm-svn: 154570
This commit is contained in:
parent
56ef374611
commit
db1554c035
|
@ -2009,12 +2009,13 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, QualType FnType,
|
|||
}
|
||||
Name = getFunctionName(FD);
|
||||
// Use mangled name as linkage name for c/c++ functions.
|
||||
if (!Fn->hasInternalLinkage())
|
||||
if (FD->hasPrototype()) {
|
||||
LinkageName = CGM.getMangledName(GD);
|
||||
Flags |= llvm::DIDescriptor::FlagPrototyped;
|
||||
}
|
||||
if (LinkageName == Name)
|
||||
LinkageName = StringRef();
|
||||
if (FD->hasPrototype())
|
||||
Flags |= llvm::DIDescriptor::FlagPrototyped;
|
||||
|
||||
if (const NamespaceDecl *NSDecl =
|
||||
dyn_cast_or_null<NamespaceDecl>(FD->getDeclContext()))
|
||||
FDContext = getOrCreateNameSpace(NSDecl);
|
||||
|
|
Loading…
Reference in New Issue