[cfe-commits] r114836 - /cfe/trunk/lib/Frontend/ASTUnit.cpp
Douglas Gregor
dgregor at apple.com
Mon Sep 27 09:43:25 PDT 2010
Author: dgregor
Date: Mon Sep 27 11:43:25 2010
New Revision: 114836
URL: http://llvm.org/viewvc/llvm-project?rev=114836&view=rev
Log:
Remove libclang logging code
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=114836&r1=114835&r2=114836&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Mon Sep 27 11:43:25 2010
@@ -749,20 +749,9 @@
getSourceManager());
StoredDiagnostics[I].setLocation(Loc);
}
-
- if (getenv("LIBCLANG_LOGGING"))
- fprintf(stderr, "libclang: using precompiled preamble for \"%s\" at "
- "\"%s\"\n",
- OriginalSourceFile.c_str(),
- PreambleFile.c_str());
-
} else {
PreprocessorOpts.PrecompiledPreambleBytes.first = 0;
PreprocessorOpts.PrecompiledPreambleBytes.second = false;
-
- if (getenv("LIBCLANG_LOGGING"))
- fprintf(stderr, "libclang: not using precompiled preamble for \"%s\"\n",
- OriginalSourceFile.c_str());
}
llvm::OwningPtr<TopLevelDeclTrackerAction> Act;
@@ -1226,13 +1215,6 @@
// Create the source manager.
Clang.setSourceManager(new SourceManager(getDiagnostics()));
- if (getenv("LIBCLANG_LOGGING"))
- fprintf(stderr, "libclang: creating precompiled preamble for \"%s\" at "
- "\"%s\" (%u bytes)\n",
- OriginalSourceFile.c_str(),
- PreamblePCHPath.c_str(),
- (unsigned)Preamble.size());
-
llvm::OwningPtr<PrecompilePreambleAction> Act;
Act.reset(new PrecompilePreambleAction(*this));
if (!Act->BeginSourceFile(Clang, Clang.getFrontendOpts().Inputs[0].second,
@@ -1247,11 +1229,6 @@
PreambleRebuildCounter = DefaultPreambleRebuildInterval;
PreprocessorOpts.eraseRemappedFile(
PreprocessorOpts.remapped_file_buffer_end() - 1);
-
- if (getenv("LIBCLANG_LOGGING"))
- fprintf(stderr, "libclang: precompiled preamble compilation for \"%s\" "
- "failed\n", OriginalSourceFile.c_str());
-
return 0;
}
@@ -1262,10 +1239,7 @@
if (Diagnostics->hasErrorOccurred()) {
// There were errors parsing the preamble, so no precompiled header was
// generated. Forget that we even tried.
-
- if (getenv("LIBCLANG_LOGGING"))
- fprintf(stderr, "libclang: precompiled preamble compilation for \"%s\" "
- "failed\n", OriginalSourceFile.c_str());
+ // FIXME: Should we leave a note for ourselves to try again?
llvm::sys::Path(FrontendOpts.OutputFile).eraseFromDisk();
Preamble.clear();
if (CreatedPreambleBuffer)
@@ -1304,11 +1278,7 @@
if (PreambleTimer)
PreambleTimer->stopTimer();
-
- if (getenv("LIBCLANG_LOGGING"))
- fprintf(stderr, "libclang: precompiled preamble for \"%s\" completed\n",
- OriginalSourceFile.c_str());
-
+
PreambleRebuildCounter = 1;
PreprocessorOpts.eraseRemappedFile(
PreprocessorOpts.remapped_file_buffer_end() - 1);
More information about the cfe-commits
mailing list