forked from OSchip/llvm-project
Don't try to call getFileCharacteristic if the function declaration has an invalid source location (as is the case for the global allocation functions.
llvm-svn: 72671
This commit is contained in:
parent
2418712039
commit
0955f20473
|
@ -93,8 +93,9 @@ bool CXXNameMangler::mangleFunctionDecl(const FunctionDecl *FD) {
|
|||
!Context.getLangOptions().CPlusPlus ||
|
||||
// "main" is not mangled in C++
|
||||
FD->isMain() ||
|
||||
// No mangling in an "implicit extern C" header.
|
||||
Context.getSourceManager().getFileCharacteristic(FD->getLocation())
|
||||
// No mangling in an "implicit extern C" header.
|
||||
(FD->getLocation().isValid() &&
|
||||
Context.getSourceManager().getFileCharacteristic(FD->getLocation()))
|
||||
== SrcMgr::C_ExternCSystem ||
|
||||
// No name mangling in a C linkage specification.
|
||||
isInCLinkageSpecification(FD))
|
||||
|
|
Loading…
Reference in New Issue