[cfe-commits] r64556 - in /cfe/trunk: Driver/ASTConsumers.h Driver/CacheTokens.cpp include/clang/Basic/FileManager.h include/clang/Basic/IdentifierTable.h include/clang/Basic/LangOptions.h include/clang/Basic/SourceManager.h lib/AST/Builtins.cpp lib/Basic/SourceManager.cpp
Cedric Venet
cedric.venet at laposte.net
Sat Feb 14 08:15:20 PST 2009
Author: venet
Date: Sat Feb 14 10:15:20 2009
New Revision: 64556
URL: http://llvm.org/viewvc/llvm-project?rev=64556&view=rev
Log:
Fix the build on win32.
Modified:
cfe/trunk/Driver/ASTConsumers.h
cfe/trunk/Driver/CacheTokens.cpp
cfe/trunk/include/clang/Basic/FileManager.h
cfe/trunk/include/clang/Basic/IdentifierTable.h
cfe/trunk/include/clang/Basic/LangOptions.h
cfe/trunk/include/clang/Basic/SourceManager.h
cfe/trunk/lib/AST/Builtins.cpp
cfe/trunk/lib/Basic/SourceManager.cpp
Modified: cfe/trunk/Driver/ASTConsumers.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/ASTConsumers.h?rev=64556&r1=64555&r2=64556&view=diff
==============================================================================
--- cfe/trunk/Driver/ASTConsumers.h (original)
+++ cfe/trunk/Driver/ASTConsumers.h Sat Feb 14 10:15:20 2009
@@ -30,7 +30,7 @@
class Preprocessor;
class PreprocessorFactory;
struct CompileOptions;
-struct LangOptions;
+class LangOptions;
ASTConsumer *CreateASTPrinter(llvm::raw_ostream* OS = NULL);
Modified: cfe/trunk/Driver/CacheTokens.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/CacheTokens.cpp?rev=64556&r1=64555&r2=64556&view=diff
==============================================================================
--- cfe/trunk/Driver/CacheTokens.cpp (original)
+++ cfe/trunk/Driver/CacheTokens.cpp Sat Feb 14 10:15:20 2009
@@ -26,6 +26,11 @@
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Streams.h"
+// FIXME: put this somewhere else?
+#ifndef S_ISDIR
+#define S_ISDIR(x) (((x)&_S_IFDIR)!=0)
+#endif
+
using namespace clang;
typedef uint32_t Offset;
Modified: cfe/trunk/include/clang/Basic/FileManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/FileManager.h?rev=64556&r1=64555&r2=64556&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/FileManager.h (original)
+++ cfe/trunk/include/clang/Basic/FileManager.h Sat Feb 14 10:15:20 2009
@@ -18,6 +18,7 @@
#include "llvm/ADT/OwningPtr.h"
#include "llvm/Bitcode/SerializationFwd.h"
#include "llvm/Support/Allocator.h"
+#include "llvm/Config/config.h" // for mode_t
#include <map>
#include <set>
#include <string>
Modified: cfe/trunk/include/clang/Basic/IdentifierTable.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/IdentifierTable.h?rev=64556&r1=64555&r2=64556&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/IdentifierTable.h (original)
+++ cfe/trunk/include/clang/Basic/IdentifierTable.h Sat Feb 14 10:15:20 2009
@@ -29,7 +29,7 @@
}
namespace clang {
- struct LangOptions;
+ class LangOptions;
class IdentifierInfo;
class IdentifierTable;
class SourceLocation;
Modified: cfe/trunk/include/clang/Basic/LangOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/LangOptions.h?rev=64556&r1=64555&r2=64556&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/LangOptions.h (original)
+++ cfe/trunk/include/clang/Basic/LangOptions.h Sat Feb 14 10:15:20 2009
@@ -20,8 +20,8 @@
/// LangOptions - This class keeps track of the various options that can be
/// enabled, which controls the dialect of C that is accepted.
-struct LangOptions {
-
+class LangOptions {
+public:
unsigned Trigraphs : 1; // Trigraphs in source files.
unsigned BCPLComment : 1; // BCPL-style '//' comments.
unsigned DollarIdents : 1; // '$' allowed in identifiers.
Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=64556&r1=64555&r2=64556&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Sat Feb 14 10:15:20 2009
@@ -571,7 +571,7 @@
FileManager &FMgr);
private:
- friend struct SrcMgr::ContentCache; // Used for deserialization.
+ friend class SrcMgr::ContentCache; // Used for deserialization.
/// isOffsetInFileID - Return true if the specified FileID contains the
/// specified SourceLocation offset. This is a very hot method.
Modified: cfe/trunk/lib/AST/Builtins.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Builtins.cpp?rev=64556&r1=64555&r2=64556&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Builtins.cpp (original)
+++ cfe/trunk/lib/AST/Builtins.cpp Sat Feb 14 10:15:20 2009
@@ -50,7 +50,7 @@
}
std::string Builtin::Context::getHeaderName(unsigned ID) const {
- char *Name = strchr(GetRecord(ID).Attributes, 'f');
+ const char *Name = strchr(GetRecord(ID).Attributes, 'f');
if (!Name)
return 0;
++Name;
@@ -59,7 +59,7 @@
return 0;
++Name;
- char *NameEnd = strchr(Name, ':');
+ const char *NameEnd = strchr(Name, ':');
assert(NameEnd && "Missing ':' after header name");
return std::string(Name, NameEnd);
}
@@ -67,7 +67,7 @@
bool
Builtin::Context::isPrintfLike(unsigned ID, unsigned &FormatIdx,
bool &HasVAListArg) {
- char *Printf = strpbrk(GetRecord(ID).Attributes, "pP");
+ const char *Printf = strpbrk(GetRecord(ID).Attributes, "pP");
if (!Printf)
return false;
@@ -77,7 +77,7 @@
assert(*Printf == ':' && "p or P specifier must have be followed by a ':'");
++Printf;
- char *PrintfEnd = strchr(Printf, ':');
+ const char *PrintfEnd = strchr(Printf, ':');
assert(PrintfEnd && "printf specifier must end with a ':'");
FormatIdx = strtol(Printf, 0, 10);
Modified: cfe/trunk/lib/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceManager.cpp?rev=64556&r1=64555&r2=64556&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/SourceManager.cpp (original)
+++ cfe/trunk/lib/Basic/SourceManager.cpp Sat Feb 14 10:15:20 2009
@@ -94,6 +94,12 @@
}
};
+// needed for FindNearestLineEntry (upper_bound of LineEntry)
+inline bool operator<(const LineEntry &lhs, const LineEntry &rhs) {
+ // FIXME: should check the other field?
+ return lhs.FileOffset < rhs.FileOffset;
+}
+
inline bool operator<(const LineEntry &E, unsigned Offset) {
return E.FileOffset < Offset;
}
More information about the cfe-commits
mailing list