[cfe-commits] r166650 - /cfe/trunk/lib/Frontend/ASTUnit.cpp
Douglas Gregor
dgregor at apple.com
Wed Oct 24 17:09:29 PDT 2012
Author: dgregor
Date: Wed Oct 24 19:09:28 2012
New Revision: 166650
URL: http://llvm.org/viewvc/llvm-project?rev=166650&view=rev
Log:
ASTUnit doesn't actually care about the predefines; don't record them.
Modified:
cfe/trunk/lib/Frontend/ASTUnit.cpp
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=166650&r1=166649&r2=166650&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Wed Oct 24 19:09:28 2012
@@ -506,7 +506,6 @@
HeaderSearch &HSI;
IntrusiveRefCntPtr<TargetOptions> &TargetOpts;
IntrusiveRefCntPtr<TargetInfo> &Target;
- std::string &Predefines;
unsigned &Counter;
unsigned NumHeaderInfos;
@@ -517,11 +516,10 @@
HeaderSearch &HSI,
IntrusiveRefCntPtr<TargetOptions> &TargetOpts,
IntrusiveRefCntPtr<TargetInfo> &Target,
- std::string &Predefines,
unsigned &Counter)
: PP(PP), Context(Context), LangOpt(LangOpt), HSI(HSI),
TargetOpts(TargetOpts), Target(Target),
- Predefines(Predefines), Counter(Counter), NumHeaderInfos(0),
+ Counter(Counter), NumHeaderInfos(0),
InitializedLanguage(false) {}
virtual bool ReadLanguageOptions(const LangOptions &LangOpts,
@@ -550,18 +548,6 @@
return false;
}
- virtual bool ReadPredefinesBuffer(const PCHPredefinesBlocks &Buffers,
- StringRef OriginalFileName,
- std::string &SuggestedPredefines,
- FileManager &FileMgr,
- bool Complain) {
- Predefines = Buffers[0].Data;
- for (unsigned I = 1, N = Buffers.size(); I != N; ++I) {
- Predefines += Buffers[I].Data;
- }
- return false;
- }
-
virtual void ReadHeaderFileInfo(const HeaderFileInfo &HFI, unsigned ID) {
HSI.setHeaderFileInfoForUID(HFI, NumHeaderInfos++);
}
@@ -768,7 +754,6 @@
// Gather Info for preprocessor construction later on.
HeaderSearch &HeaderInfo = *AST->HeaderInfo.get();
- std::string Predefines;
unsigned Counter;
OwningPtr<ASTReader> Reader;
@@ -808,7 +793,7 @@
Reader->setListener(new ASTInfoCollector(*AST->PP, Context,
AST->ASTFileLangOpts, HeaderInfo,
AST->TargetOpts, AST->Target,
- Predefines, Counter));
+ Counter));
switch (Reader->ReadAST(Filename, serialization::MK_MainFile,
ASTReader::ARR_None)) {
@@ -826,7 +811,6 @@
AST->OriginalSourceFile = Reader->getOriginalSourceFile();
- PP.setPredefines(Reader->getSuggestedPredefines());
PP.setCounterValue(Counter);
// Attach the AST reader to the AST context as an external AST
More information about the cfe-commits
mailing list