Assume cxxabi.h exists on FreeBSD
authorRui Ueyama <ruiu@google.com>
Tue, 21 Oct 2014 20:02:00 +0000 (20:02 +0000)
committerRui Ueyama <ruiu@google.com>
Tue, 21 Oct 2014 20:02:00 +0000 (20:02 +0000)
HAVE_CXXABI_H is not defined on FreeBSD but the system actually
has the header. CMake test fails because the header depends on size_t.

llvm-svn: 220315

lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
lld/test/elf/X86_64/demangle.test

index 9dba86a9b8e62a2d78305791311db998c654f1b3..f542ac9f783ab920fafdeff3fcbec3d7e2383647 100644 (file)
@@ -22,7 +22,9 @@
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Path.h"
 
-#if HAVE_CXXABI_H
+// 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__)
 #include <cxxabi.h>
 #endif
 
index 9c0736dfae4c750b8dbc0912983c14bb94ac26c7..f762aa5e397f8900fa72cfb0492778d3e4aec292 100644 (file)
@@ -27,7 +27,9 @@
 #include "llvm/Support/Path.h"
 #include <algorithm>
 
-#if HAVE_CXXABI_H
+// 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__)
 #include <cxxabi.h>
 #endif
 
index 9f2c825ad441433792487dfa6a6ccf723f654386..820e6be9e03a5b46fbb071f47d1e0b7e959f5ab6 100644 (file)
@@ -6,6 +6,5 @@ RUN: lld -flavor gnu -target x86_64 %p/Inputs/undefcpp.o --noinhibit-exec 2>&1 |
 RUN: lld -flavor gnu -target x86_64 %p/Inputs/undefcpp.o --noinhibit-exec --no-demangle 2>&1 | FileCheck -check-prefix=NODEMANGLE %s
 RUN: lld -flavor gnu -target x86_64 %p/Inputs/undefcpp.o --noinhibit-exec --demangle 2>&1 | FileCheck -check-prefix=DEMANGLE %s
 
-XFAIL: freebsd
 #DEMANGLE: undefcpp.o: foo(char const*)
 #NODEMANGLE: undefcpp.o: _Z3fooPKc