[lld] r220326 - Use __cxa_demangle on FreeBSD to fix buildbots.
Rui Ueyama
ruiu at google.com
Tue Oct 21 14:05:01 PDT 2014
Author: ruiu
Date: Tue Oct 21 16:05:01 2014
New Revision: 220326
URL: http://llvm.org/viewvc/llvm-project?rev=220326&view=rev
Log:
Use __cxa_demangle on FreeBSD to fix buildbots.
Modified:
lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp?rev=220326&r1=220325&r2=220326&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp Tue Oct 21 16:05:01 2014
@@ -274,7 +274,7 @@ std::string ELFLinkingContext::demangle(
if (!symbolName.startswith("_Z"))
return symbolName;
-#if HAVE_CXXABI_H
+#if defined(HAVE_CXXABI_H) || defined (__FreeBSD__)
SmallString<256> symBuff;
StringRef nullTermSym = Twine(symbolName).toNullTerminatedStringRef(symBuff);
const char *cstr = nullTermSym.data();
Modified: lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp?rev=220326&r1=220325&r2=220326&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp Tue Oct 21 16:05:01 2014
@@ -29,7 +29,7 @@
// FreeBSD 10.0 has cxxabi.h but fails to define HAVE_CXXABI_H due to
// header dependency issues.
-#if defined(HAVE_CXXABI_H) || defined (__FreeBSD__)
+#if defined(HAVE_CXXABI_H) || defined(__FreeBSD__)
#include <cxxabi.h>
#endif
@@ -741,7 +741,7 @@ std::string MachOLinkingContext::demangl
if (!symbolName.startswith("__Z"))
return symbolName;
-#if HAVE_CXXABI_H
+#if defined(HAVE_CXXABI_H) || defined(__FreeBSD__)
SmallString<256> symBuff;
StringRef nullTermSym = Twine(symbolName).toNullTerminatedStringRef(symBuff);
// Mach-O has extra leading underscore that needs to be removed.
More information about the llvm-commits
mailing list