[cfe-commits] r55832 - /cfe/trunk/lib/Driver/InitHeaderSearch.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Fri Sep 5 02:41:21 PDT 2008
Author: akirtzidis
Date: Fri Sep 5 04:41:20 2008
New Revision: 55832
URL: http://llvm.org/viewvc/llvm-project?rev=55832&view=rev
Log:
Set different header search paths for the Windows platform.
Modified:
cfe/trunk/lib/Driver/InitHeaderSearch.cpp
Modified: cfe/trunk/lib/Driver/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/InitHeaderSearch.cpp?rev=55832&r1=55831&r2=55832&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Driver/InitHeaderSearch.cpp Fri Sep 5 04:41:20 2008
@@ -19,6 +19,7 @@
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/System/Path.h"
+#include "llvm/Config/config.h"
#include <vector>
@@ -105,6 +106,20 @@
void InitHeaderSearch::AddDefaultSystemIncludePaths(const LangOptions &Lang) {
// FIXME: temporary hack: hard-coded paths.
// FIXME: get these from the target?
+
+#ifdef LLVM_ON_WIN32
+ if (Lang.CPlusPlus) {
+ // Mingw32 GCC version 4
+ AddPath("c:/mingw/lib/gcc/mingw32/4.3.0/include/c++", System, true, false, false);
+ AddPath("c:/mingw/lib/gcc/mingw32/4.3.0/include/c++/mingw32", System, true, false, false);
+ AddPath("c:/mingw/lib/gcc/mingw32/4.3.0/include/c++/backward", System, true, false, false);
+ }
+
+ // Mingw32 GCC version 4
+ AddPath("C:/mingw/lib/gcc/mingw32/4.3.0/include", System, false, false, false);
+ AddPath("C:/mingw/include", System, false, false, false);
+#else
+
if (Lang.CPlusPlus) {
AddPath("/usr/include/c++/4.2.1", System, true, false, false);
AddPath("/usr/include/c++/4.2.1/i686-apple-darwin10", System, true, false,
@@ -144,11 +159,6 @@
// DragonFly
AddPath("/usr/include/c++/4.1", System, true, false, false);
-
- // Mingw32 GCC version 4
- AddPath("c:/mingw/lib/gcc/mingw32/4.3.0/include/c++", System, true, false, false);
- AddPath("c:/mingw/lib/gcc/mingw32/4.3.0/include/c++/mingw32", System, true, false, false);
- AddPath("c:/mingw/lib/gcc/mingw32/4.3.0/include/c++/backward", System, true, false, false);
}
AddPath("/usr/local/include", System, false, false, false);
@@ -217,13 +227,11 @@
// DragonFly
AddPath("/usr/libdata/gcc41", System, true, false, false);
- // Mingw32 GCC version 4
- AddPath("C:/mingw/lib/gcc/mingw32/4.3.0/include", System, false, false, false);
- AddPath("C:/mingw/include", System, false, false, false);
-
AddPath("/usr/include", System, false, false, false);
AddPath("/System/Library/Frameworks", System, true, false, true);
AddPath("/Library/Frameworks", System, true, false, true);
+
+#endif
}
void InitHeaderSearch::AddDefaultEnvVarPaths(const LangOptions &Lang) {
More information about the cfe-commits
mailing list