Always initialize the header search object as part of InitializePreprocessor;

not doing this has little to no utility.

llvm-svn: 86883
This commit is contained in:
Daniel Dunbar
2009-11-11 21:44:42 +00:00
parent 0c6c930f05
commit 2856ae444b
3 changed files with 12 additions and 9 deletions

View File

@@ -456,7 +456,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
/// environment ready to process a single file. This returns true on error.
///
void clang::InitializePreprocessor(Preprocessor &PP,
const PreprocessorOptions &InitOpts) {
const PreprocessorOptions &InitOpts,
const HeaderSearchOptions &HSOpts) {
std::vector<char> PredefineBuffer;
const char *LineDirective = "# 1 \"<built-in>\" 3\n";
@@ -501,4 +502,9 @@ void clang::InitializePreprocessor(Preprocessor &PP,
// Null terminate PredefinedBuffer and add it.
PredefineBuffer.push_back(0);
PP.setPredefines(&PredefineBuffer[0]);
// Initialize the header search object.
ApplyHeaderSearchOptions(PP.getHeaderSearchInfo(), HSOpts,
PP.getLangOptions(),
PP.getTargetInfo().getTriple());
}