summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/clang.xcodeproj/project.pbxproj2
-rw-r--r--clang/include/clang/Basic/Builtins.h5
-rw-r--r--clang/lib/Basic/Builtins.cpp9
-rw-r--r--clang/lib/Lex/Preprocessor.cpp2
-rw-r--r--clang/tools/clang-cc/clang-cc.cpp1
5 files changed, 10 insertions, 9 deletions
diff --git a/clang/clang.xcodeproj/project.pbxproj b/clang/clang.xcodeproj/project.pbxproj
index 73ef1beeca3..c5098b534be 100644
--- a/clang/clang.xcodeproj/project.pbxproj
+++ b/clang/clang.xcodeproj/project.pbxproj
@@ -1712,6 +1712,7 @@
GCC_ENABLE_CPP_RTTI = NO;
GCC_ENABLE_PASCAL_STRINGS = NO;
GCC_ENABLE_SYMBOL_SEPARATION = NO;
+ GCC_ENABLE_TRIGRAPHS = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -1723,6 +1724,7 @@
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_THREADSAFE_STATICS = NO;
GCC_USE_GCC3_PFE_SUPPORT = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INSTALL_PATH = "$(HOME)/bin";
OTHER_LDFLAGS = (
"-lLLVMBitWriter",
diff --git a/clang/include/clang/Basic/Builtins.h b/clang/include/clang/Basic/Builtins.h
index 6463a4f6e51..f770c5089ee 100644
--- a/clang/include/clang/Basic/Builtins.h
+++ b/clang/include/clang/Basic/Builtins.h
@@ -53,13 +53,12 @@ class Context {
const Info *TSRecords;
unsigned NumTSRecords;
public:
- Context() : TSRecords(0), NumTSRecords(0) {}
+ Context(const TargetInfo &Target);
/// InitializeBuiltins - Mark the identifiers for all the builtins with their
/// appropriate builtin ID # and mark any non-portable builtin identifiers as
/// such.
- void InitializeBuiltins(IdentifierTable &Table, const TargetInfo &Target,
- bool NoBuiltins = false);
+ void InitializeBuiltins(IdentifierTable &Table, bool NoBuiltins = false);
/// \brief Popular the vector with the names of all of the builtins.
void GetBuiltinNames(llvm::SmallVectorImpl<const char *> &Names,
diff --git a/clang/lib/Basic/Builtins.cpp b/clang/lib/Basic/Builtins.cpp
index ebe0514fa00..2662114b4c8 100644
--- a/clang/lib/Basic/Builtins.cpp
+++ b/clang/lib/Basic/Builtins.cpp
@@ -30,11 +30,15 @@ const Builtin::Info &Builtin::Context::GetRecord(unsigned ID) const {
return TSRecords[ID - Builtin::FirstTSBuiltin];
}
+Builtin::Context::Context(const TargetInfo &Target) {
+ // Get the target specific builtins from the target.
+ Target.getTargetBuiltins(TSRecords, NumTSRecords);
+}
+
/// InitializeBuiltins - Mark the identifiers for all the builtins with their
/// appropriate builtin ID # and mark any non-portable builtin identifiers as
/// such.
void Builtin::Context::InitializeBuiltins(IdentifierTable &Table,
- const TargetInfo &Target,
bool NoBuiltins) {
// Step #1: mark all target-independent builtins with their ID's.
for (unsigned i = Builtin::NotBuiltin+1; i != Builtin::FirstTSBuiltin; ++i)
@@ -42,9 +46,6 @@ void Builtin::Context::InitializeBuiltins(IdentifierTable &Table,
(!NoBuiltins || !strchr(BuiltinInfo[i].Attributes, 'f')))
Table.get(BuiltinInfo[i].Name).setBuiltinID(i);
- // Get the target specific builtins from the target.
- Target.getTargetBuiltins(TSRecords, NumTSRecords);
-
// Step #2: Register target-specific builtins.
for (unsigned i = 0, e = NumTSRecords; i != e; ++i)
if (!TSRecords[i].Suppressed &&
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index 0a7d92eb83c..24ee5d8a8f9 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -51,7 +51,7 @@ Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts,
IdentifierInfoLookup* IILookup)
: Diags(&diags), Features(opts), Target(target),FileMgr(Headers.getFileMgr()),
SourceMgr(SM), HeaderInfo(Headers), Identifiers(opts, IILookup),
- CurPPLexer(0), CurDirLookup(0), Callbacks(0) {
+ BuiltinInfo(Target), CurPPLexer(0), CurDirLookup(0), Callbacks(0) {
ScratchBuf = new ScratchBuffer(SourceMgr);
CounterValue = 0; // __COUNTER__ starts at 0.
diff --git a/clang/tools/clang-cc/clang-cc.cpp b/clang/tools/clang-cc/clang-cc.cpp
index 840f0157cf9..04b871c4e15 100644
--- a/clang/tools/clang-cc/clang-cc.cpp
+++ b/clang/tools/clang-cc/clang-cc.cpp
@@ -2305,7 +2305,6 @@ int main(int argc, char **argv) {
// Initialize builtin info.
PP->getBuiltinInfo().InitializeBuiltins(PP->getIdentifierTable(),
- PP->getTargetInfo(),
PP->getLangOptions().NoBuiltin);
}
OpenPOWER on IntegriCloud