forked from OSchip/llvm-project
Attempt to make FreeBSD buildbot green.
It seems that __cxa_demangle function on the buildbot tried to demangle a variable "tlsvar" as a C++ symbol. Do not call that function unless it does not start with "_Z" which is the prefix of mangled names. llvm-svn: 257661
This commit is contained in:
parent
aae49c1944
commit
5fa978b4c0
|
@ -145,6 +145,11 @@ std::string elf2::demangle(StringRef Name) {
|
|||
#else
|
||||
if (!Config->Demangle)
|
||||
return Name;
|
||||
|
||||
// Return if it does not look like a C++ symbol.
|
||||
if (!Name.startswith("_Z"))
|
||||
return Name;
|
||||
|
||||
char *Buf =
|
||||
abi::__cxa_demangle(Name.str().c_str(), nullptr, nullptr, nullptr);
|
||||
if (!Buf)
|
||||
|
|
Loading…
Reference in New Issue