|
@@ -139,6 +139,7 @@ static OnDiskData &getOnDiskData(const ASTUnit *AU) {
|
|
return *D;
|
|
return *D;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#if 0 // HLSL Change Starts - no support for PCH
|
|
static void erasePreambleFile(const ASTUnit *AU) {
|
|
static void erasePreambleFile(const ASTUnit *AU) {
|
|
getOnDiskData(AU).CleanPreambleFile();
|
|
getOnDiskData(AU).CleanPreambleFile();
|
|
}
|
|
}
|
|
@@ -158,6 +159,7 @@ static void removeOnDiskEntry(const ASTUnit *AU) {
|
|
static void setPreambleFile(const ASTUnit *AU, StringRef preambleFile) {
|
|
static void setPreambleFile(const ASTUnit *AU, StringRef preambleFile) {
|
|
getOnDiskData(AU).PreambleFile = preambleFile;
|
|
getOnDiskData(AU).PreambleFile = preambleFile;
|
|
}
|
|
}
|
|
|
|
+#endif // HLSL Change Ends - no support for PCH
|
|
|
|
|
|
static const std::string &getPreambleFile(const ASTUnit *AU) {
|
|
static const std::string &getPreambleFile(const ASTUnit *AU) {
|
|
return getOnDiskData(AU).PreambleFile;
|
|
return getOnDiskData(AU).PreambleFile;
|
|
@@ -208,7 +210,8 @@ void ASTUnit::addTemporaryFile(StringRef TempFile) {
|
|
/// errors in the source that occurs in the preamble), the number of
|
|
/// errors in the source that occurs in the preamble), the number of
|
|
/// reparses during which we'll skip even trying to precompile the
|
|
/// reparses during which we'll skip even trying to precompile the
|
|
/// preamble.
|
|
/// preamble.
|
|
-const unsigned DefaultPreambleRebuildInterval = 5;
|
|
|
|
|
|
+//const unsigned DefaultPreambleRebuildInterval = 5; // HLSL Change Starts - no support for PCH
|
|
|
|
+
|
|
|
|
|
|
/// \brief Tracks the number of ASTUnit objects that are currently active.
|
|
/// \brief Tracks the number of ASTUnit objects that are currently active.
|
|
///
|
|
///
|
|
@@ -1205,6 +1208,7 @@ error:
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#if 0 // HLSL Change Ends - no support for PCH
|
|
/// \brief Simple function to retrieve a path for a preamble precompiled header.
|
|
/// \brief Simple function to retrieve a path for a preamble precompiled header.
|
|
static std::string GetPreamblePCHPath() {
|
|
static std::string GetPreamblePCHPath() {
|
|
// FIXME: This is a hack so that we can override the preamble file during
|
|
// FIXME: This is a hack so that we can override the preamble file during
|
|
@@ -1219,6 +1223,7 @@ static std::string GetPreamblePCHPath() {
|
|
|
|
|
|
return Path.str();
|
|
return Path.str();
|
|
}
|
|
}
|
|
|
|
+#endif // HLSL Change Ends - no support for PCH
|
|
|
|
|
|
/// \brief Compute the preamble for the main file, providing the source buffer
|
|
/// \brief Compute the preamble for the main file, providing the source buffer
|
|
/// that corresponds to the main file along with a pair (bytes, start-of-line)
|
|
/// that corresponds to the main file along with a pair (bytes, start-of-line)
|
|
@@ -1310,6 +1315,7 @@ bool operator==(const ASTUnit::PreambleFileHash &LHS,
|
|
}
|
|
}
|
|
} // namespace clang
|
|
} // namespace clang
|
|
|
|
|
|
|
|
+#if 0 // HLSL Change Starts - no support for PCH
|
|
static std::pair<unsigned, unsigned>
|
|
static std::pair<unsigned, unsigned>
|
|
makeStandaloneRange(CharSourceRange Range, const SourceManager &SM,
|
|
makeStandaloneRange(CharSourceRange Range, const SourceManager &SM,
|
|
const LangOptions &LangOpts) {
|
|
const LangOptions &LangOpts) {
|
|
@@ -1354,6 +1360,7 @@ makeStandaloneDiagnostic(const LangOptions &LangOpts,
|
|
|
|
|
|
return OutDiag;
|
|
return OutDiag;
|
|
}
|
|
}
|
|
|
|
+#endif // HLSL Change Ends - no support for PCH
|
|
|
|
|
|
/// \brief Attempt to build or re-use a precompiled preamble when (re-)parsing
|
|
/// \brief Attempt to build or re-use a precompiled preamble when (re-)parsing
|
|
/// the source file.
|
|
/// the source file.
|
|
@@ -2884,6 +2891,7 @@ struct PCHLocatorInfo {
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#if 0 // HLSL Change Starts - no support for PCH
|
|
static bool PCHLocator(serialization::ModuleFile &M, void *UserData) {
|
|
static bool PCHLocator(serialization::ModuleFile &M, void *UserData) {
|
|
PCHLocatorInfo &Info = *static_cast<PCHLocatorInfo*>(UserData);
|
|
PCHLocatorInfo &Info = *static_cast<PCHLocatorInfo*>(UserData);
|
|
switch (M.Kind) {
|
|
switch (M.Kind) {
|
|
@@ -2901,6 +2909,7 @@ static bool PCHLocator(serialization::ModuleFile &M, void *UserData) {
|
|
|
|
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
+#endif // HLSL Change Ends - no support for PCH
|
|
|
|
|
|
const FileEntry *ASTUnit::getPCHFile() {
|
|
const FileEntry *ASTUnit::getPCHFile() {
|
|
#if 1 // HLSL Change Starts - no support for modules or PCH
|
|
#if 1 // HLSL Change Starts - no support for modules or PCH
|