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
|
@ -94,7 +94,8 @@ bool CXXNameMangler::mangleFunctionDecl(const FunctionDecl *FD) {
|
|||
// "main" is not mangled in C++
|
||||
FD->isMain() ||
|
||||
// No mangling in an "implicit extern C" header.
|
||||
Context.getSourceManager().getFileCharacteristic(FD->getLocation())
|
||||
(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