freebsd-dev/contrib/llvm/patches/patch-r208961-clang-version-include.diff
Dimitry Andric a426b286c8 Add the clang patch for r265477. While here, add a description to the
patch for r263619, and unify all the URLs to point to svnweb.
2014-05-24 22:27:31 +00:00

40 lines
1.3 KiB
Diff

This patch adjusts clang's default include paths to add FreeBSD-specific
directories.
Introduced here: http://svnweb.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")