a1f8ad145e
applied to our copy of llvm/clang. These can be applied in alphabetical order to a pristine llvm/clang 3.4 release source tree, to result in the same version used in FreeBSD. This is intended to clearly document all the changes until now, which mostly consist of cherry pickings from the respective upstream trunks, plus a number of hand-written FreeBSD-specific ones. Hopefully those can eventually be cleaned up and sent upstream too. MFC after: 1 week X-MFC-With: r263313
40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
This patch adjusts clang's default include paths to add FreeBSD-specific
|
|
directories.
|
|
|
|
Introduced here: http://svn.freebsd.org/changeset/base/208961
|
|
|
|
Index: tools/clang/lib/Frontend/InitHeaderSearch.cpp
|
|
===================================================================
|
|
--- tools/clang/lib/Frontend/InitHeaderSearch.cpp
|
|
+++ tools/clang/lib/Frontend/InitHeaderSearch.cpp
|
|
@@ -14,6 +14,7 @@
|
|
#include "clang/Frontend/Utils.h"
|
|
#include "clang/Basic/FileManager.h"
|
|
#include "clang/Basic/LangOptions.h"
|
|
+#include "clang/Basic/Version.h"
|
|
#include "clang/Config/config.h" // C_INCLUDE_DIRS
|
|
#include "clang/Lex/HeaderSearch.h"
|
|
#include "clang/Lex/HeaderSearchOptions.h"
|
|
@@ -333,6 +334,9 @@ void InitHeaderSearch::AddDefaultCIncludePaths(con
|
|
#endif
|
|
}
|
|
break;
|
|
+ case llvm::Triple::FreeBSD:
|
|
+ AddPath("/usr/include/clang/" CLANG_VERSION_STRING, System, false);
|
|
+ break;
|
|
|
|
default:
|
|
break;
|
|
@@ -423,11 +427,6 @@ AddDefaultCPlusPlusIncludePaths(const llvm::Triple
|
|
else
|
|
AddPath("/usr/include/c++/4.4", CXXSystem, false);
|
|
break;
|
|
- case llvm::Triple::FreeBSD:
|
|
- // FreeBSD 8.0
|
|
- // FreeBSD 7.3
|
|
- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.2", "", "", "", triple);
|
|
- break;
|
|
case llvm::Triple::OpenBSD: {
|
|
std::string t = triple.getTriple();
|
|
if (t.substr(0, 6) == "x86_64")
|