freebsd-nq/contrib/llvm/patches/patch-01-clang-version-include.diff

28 lines
927 B
Diff

This patch adjusts clang's default include path add a FreeBSD base system
specific directory.
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"
@@ -336,6 +337,9 @@ void InitHeaderSearch::AddDefaultCIncludePaths(con
break;
}
break;
+ case llvm::Triple::FreeBSD:
+ AddPath("/usr/include/clang/" CLANG_VERSION_STRING, System, false);
+ break;
default:
break;
}