[clang] 0cc9710 - [Frontend] -MP: remove blank lines
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 28 20:46:32 PDT 2022
Author: Fangrui Song
Date: 2022-10-28T20:46:27-07:00
New Revision: 0cc9710a0dc0b1cc2e13aaa3778ba55cc0d37b84
URL: https://github.com/llvm/llvm-project/commit/0cc9710a0dc0b1cc2e13aaa3778ba55cc0d37b84
DIFF: https://github.com/llvm/llvm-project/commit/0cc9710a0dc0b1cc2e13aaa3778ba55cc0d37b84.diff
LOG: [Frontend] -MP: remove blank lines
GCC 10 removed blank lines for phony targets during a refactoring.
The blank lines seems unuseful, so let's follow suit.
Added:
Modified:
clang/lib/Frontend/DependencyFile.cpp
clang/test/Frontend/dependency-gen-phony.c
Removed:
################################################################################
diff --git a/clang/lib/Frontend/DependencyFile.cpp b/clang/lib/Frontend/DependencyFile.cpp
index 930d5b488b8f..159eaaa5c8e4 100644
--- a/clang/lib/Frontend/DependencyFile.cpp
+++ b/clang/lib/Frontend/DependencyFile.cpp
@@ -326,7 +326,7 @@ void DependencyFileGenerator::outputDependencyFile(DiagnosticsEngine &Diags) {
void DependencyFileGenerator::outputDependencyFile(llvm::raw_ostream &OS) {
// Write out the dependency targets, trying to avoid overly long
// lines when possible. We try our best to emit exactly the same
- // dependency file as GCC (4.2), assuming the included files are the
+ // dependency file as GCC>=10, assuming the included files are the
// same.
const unsigned MaxColumns = 75;
unsigned Columns = 0;
@@ -375,7 +375,6 @@ void DependencyFileGenerator::outputDependencyFile(llvm::raw_ostream &OS) {
for (auto I = Files.begin(), E = Files.end(); I != E; ++I) {
if (Index++ == InputFileIndex)
continue;
- OS << '\n';
PrintFilename(OS, *I, OutputFormat);
OS << ":\n";
}
diff --git a/clang/test/Frontend/dependency-gen-phony.c b/clang/test/Frontend/dependency-gen-phony.c
index 5bfb02ba819a..1c17a4878175 100644
--- a/clang/test/Frontend/dependency-gen-phony.c
+++ b/clang/test/Frontend/dependency-gen-phony.c
@@ -6,17 +6,13 @@
/// Verify that phony targets are only created for the extra dependency files,
/// and not the input file.
// CHECK:dependency-gen-phony.o: 1.extra 2.extra dependency-gen-phony.c \
-// CHECK-NEXT: Inputs{{/|\\\\}}empty.h
-// CHECK-EMPTY:
+// CHECK-NEXT: Inputs{{/|\\}}empty.h
// CHECK-NEXT:1.extra:
-// CHECK-EMPTY:
// CHECK-NEXT:2.extra:
-// CHECK-EMPTY:
// CHECK-NEXT:{{.*}}empty.h:
// CHECK-NOT:{{.}}
-// STDIO: -.o: Inputs{{/|\\\\}}empty.h
-// STDIO-EMPTY:
+// STDIO: -.o: Inputs{{/|\\}}empty.h
// STDIO-NEXT: {{.*}}empty.h:
// STDIO-NOT: {{.}}
More information about the cfe-commits
mailing list