aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-02 22:20:04 +0000
committerChris Lattner <sabre@nondot.org>2009-03-02 22:20:04 +0000
commit3daed52a57d03765223021f5f921bdc280c8f3cc (patch)
tree83c32ffe6aa7c2d08542c9ca83eec0b823df62ad
parent16167a6e3f7dfb7ed0babc5e0baab9fd140e959d (diff)
improve compatibility with GCC 4.4, patch by Michel Salim (PR3697)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65884 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/StmtIterator.h1
-rw-r--r--lib/AST/DeclBase.cpp1
-rw-r--r--lib/Basic/IdentifierTable.cpp1
-rw-r--r--lib/Basic/SourceLocation.cpp1
-rw-r--r--lib/Basic/Targets.cpp14
-rw-r--r--lib/Frontend/InitHeaderSearch.cpp1
-rw-r--r--lib/Lex/HeaderMap.cpp1
-rw-r--r--lib/Lex/HeaderSearch.cpp1
-rw-r--r--lib/Lex/PPMacroExpansion.cpp1
-rw-r--r--lib/Lex/Preprocessor.cpp1
10 files changed, 23 insertions, 0 deletions
diff --git a/include/clang/AST/StmtIterator.h b/include/clang/AST/StmtIterator.h
index 0e029841c0..360ec5f78b 100644
--- a/include/clang/AST/StmtIterator.h
+++ b/include/clang/AST/StmtIterator.h
@@ -16,6 +16,7 @@
#include "llvm/ADT/iterator.h"
#include <cassert>
+#include <stdint.h>
namespace clang {
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index 574de1675f..ca67e28c71 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -20,6 +20,7 @@
#include "clang/AST/Type.h"
#include "llvm/ADT/DenseMap.h"
#include <algorithm>
+#include <cstdio>
#include <functional>
#include <vector>
using namespace clang;
diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp
index 304c7a9b42..0f0b4f9b8c 100644
--- a/lib/Basic/IdentifierTable.cpp
+++ b/lib/Basic/IdentifierTable.cpp
@@ -18,6 +18,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/Bitcode/Serialize.h"
#include "llvm/Bitcode/Deserialize.h"
+#include <cstdio>
using namespace clang;
diff --git a/lib/Basic/SourceLocation.cpp b/lib/Basic/SourceLocation.cpp
index 8e068d6ac2..73e231adc8 100644
--- a/lib/Basic/SourceLocation.cpp
+++ b/lib/Basic/SourceLocation.cpp
@@ -17,6 +17,7 @@
#include "llvm/Bitcode/Serialize.h"
#include "llvm/Bitcode/Deserialize.h"
#include "llvm/Support/MemoryBuffer.h"
+#include <cstdio>
using namespace clang;
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index ef17d2d342..6973ec51d2 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -497,7 +497,21 @@ public:
virtual const char *getClobbers() const {
return "~{dirflag},~{fpsr},~{flags}";
}
+
+ virtual int HandleTargetOptions(std::string *StrArray, unsigned NumStrs,
+ std::string &ErrorReason);
};
+
+/// HandleTargetOptions - Handle target-specific options like -msse2 and
+/// friends. An array of arguments is passed in: if they are all valid, this
+/// should handle them and return -1. If there is an error, the index of the
+/// invalid argument should be returned along with an optional error string.
+int X86TargetInfo::HandleTargetOptions(std::string *StrArray, unsigned NumStrs,
+ std::string &ErrorReason) {
+ if (NumStrs == 0)
+ return -1;
+ return 0;
+}
bool
X86TargetInfo::validateAsmConstraint(const char *&Name,
diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index e7dd207abe..6383c2076b 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -19,6 +19,7 @@
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/System/Path.h"
#include "llvm/Config/config.h"
+#include <cstdio>
#include <vector>
using namespace clang;
diff --git a/lib/Lex/HeaderMap.cpp b/lib/Lex/HeaderMap.cpp
index 0b75af54d1..4c8b70eb78 100644
--- a/lib/Lex/HeaderMap.cpp
+++ b/lib/Lex/HeaderMap.cpp
@@ -18,6 +18,7 @@
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"
+#include <cstdio>
using namespace clang;
//===----------------------------------------------------------------------===//
diff --git a/lib/Lex/HeaderSearch.cpp b/lib/Lex/HeaderSearch.cpp
index 44ae35c8b7..2cc29ecbed 100644
--- a/lib/Lex/HeaderSearch.cpp
+++ b/lib/Lex/HeaderSearch.cpp
@@ -17,6 +17,7 @@
#include "clang/Basic/IdentifierTable.h"
#include "llvm/System/Path.h"
#include "llvm/ADT/SmallString.h"
+#include <cstdio>
using namespace clang;
HeaderSearch::HeaderSearch(FileManager &FM) : FileMgr(FM), FrameworkMap(64) {
diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp
index a8b09e5ede..6cb1908330 100644
--- a/lib/Lex/PPMacroExpansion.cpp
+++ b/lib/Lex/PPMacroExpansion.cpp
@@ -18,6 +18,7 @@
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/FileManager.h"
#include "clang/Lex/LexDiagnostic.h"
+#include <cstdio>
#include <ctime>
using namespace clang;
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index 26777d9170..2a9fa0a85b 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -38,6 +38,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Streams.h"
+#include <cstdio>
using namespace clang;
//===----------------------------------------------------------------------===//