[cfe-commits] r133710 - in /cfe/trunk: include/clang/Basic/FileManager.h lib/Frontend/CompilerInstance.cpp

Dylan Noblesmith nobled at dreamwidth.org
Thu Jun 23 05:20:57 PDT 2011


Author: nobled
Date: Thu Jun 23 07:20:57 2011
New Revision: 133710

URL: http://llvm.org/viewvc/llvm-project?rev=133710&view=rev
Log:
avoid using config.h in public headers

This is the only usage in clang's headers, and it's for a define
that only exists on CMake builds for the sake of the MSVC compiler,
so just use an ifdef instead.

Also add an include for config.h in a file that actually needs it,
and was picking it up by accident indirectly.


Modified:
    cfe/trunk/include/clang/Basic/FileManager.h
    cfe/trunk/lib/Frontend/CompilerInstance.cpp

Modified: cfe/trunk/include/clang/Basic/FileManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/FileManager.h?rev=133710&r1=133709&r2=133710&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/FileManager.h (original)
+++ cfe/trunk/include/clang/Basic/FileManager.h Thu Jun 23 07:20:57 2011
@@ -21,10 +21,13 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/Support/Allocator.h"
-#include "llvm/Config/config.h" // for mode_t
 // FIXME: Enhance libsystem to support inode and other fields in stat.
 #include <sys/types.h>
 
+#ifdef _MSC_VER
+typedef unsigned short mode_t;
+#endif
+
 struct stat;
 
 namespace llvm {

Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=133710&r1=133709&r2=133710&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Thu Jun 23 07:20:57 2011
@@ -38,6 +38,7 @@
 #include "llvm/Support/Program.h"
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/system_error.h"
+#include "llvm/Config/config.h"
 using namespace clang;
 
 CompilerInstance::CompilerInstance()





More information about the cfe-commits mailing list