diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-11 21:44:42 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-11 21:44:42 +0000 |
commit | 2856ae444ba29abbbefc489beb06decc02c78f83 (patch) | |
tree | badf83a73cf3edc87f5c93fa8e1e148f43768461 /clang/lib/Frontend/InitPreprocessor.cpp | |
parent | 0c6c930f05e9f7d8f35664146145ce7c5880eb40 (diff) | |
download | bcm5719-llvm-2856ae444ba29abbbefc489beb06decc02c78f83.tar.gz bcm5719-llvm-2856ae444ba29abbbefc489beb06decc02c78f83.zip |
Always initialize the header search object as part of InitializePreprocessor;
not doing this has little to no utility.
llvm-svn: 86883
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r-- | clang/lib/Frontend/InitPreprocessor.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 15ea9015a2d..ad70727c05e 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -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()); } |