summaryrefslogtreecommitdiffstats
path: root/lib/Basic
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-23 14:50:21 +0000
committered <ed@FreeBSD.org>2009-06-23 14:50:21 +0000
commitda468bf93e74598f985f4988936ee5ca2dc9a38c (patch)
tree64b43af65e97f7659637c9ac028e39af2e26b841 /lib/Basic
parent8927c19a5ed03bef55dac4b623688387bcc794dc (diff)
downloadFreeBSD-src-da468bf93e74598f985f4988936ee5ca2dc9a38c.zip
FreeBSD-src-da468bf93e74598f985f4988936ee5ca2dc9a38c.tar.gz
Import Clang r73954.
Diffstat (limited to 'lib/Basic')
-rw-r--r--lib/Basic/SourceManager.cpp5
-rw-r--r--lib/Basic/Targets.cpp1
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp
index 8dfc5d1..23a01c9 100644
--- a/lib/Basic/SourceManager.cpp
+++ b/lib/Basic/SourceManager.cpp
@@ -373,7 +373,10 @@ FileID SourceManager::createFileID(const ContentCache *File,
// Set LastFileIDLookup to the newly created file. The next getFileID call is
// almost guaranteed to be from that file.
- return LastFileIDLookup = FileID::get(SLocEntryTable.size()-1);
+ FileID FID = FileID::get(SLocEntryTable.size()-1);
+ if (File->FirstFID.isInvalid())
+ File->FirstFID = FID;
+ return LastFileIDLookup = FID;
}
/// createInstantiationLoc - Return a new SourceLocation that encodes the fact
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 13758ad..1d69e4e 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -169,6 +169,7 @@ static bool getDarwinNumber(const char *Triple, unsigned &Maj, unsigned &Min, un
}
static void getDarwinDefines(std::vector<char> &Defs, const LangOptions &Opts) {
+ Define(Defs, "__APPLE_CC__", "5621");
Define(Defs, "__APPLE__");
Define(Defs, "__MACH__");
Define(Defs, "OBJC_NEW_PROPERTIES");
OpenPOWER on IntegriCloud