forked from OSchip/llvm-project
[clang-scan-deps] remove dots and dots dots from the reported file dependency paths
This resolves differences observed on LLVM + Clang when running the comparison between canonical dependencies (full preprocessing, no file manager reused), and dependencies obtained when the file manager was reused between the full preprocessing invocations. llvm-svn: 371751
This commit is contained in:
parent
458c2759b1
commit
57a014d31f
|
@ -30,8 +30,12 @@ public:
|
|||
: DependencyFileGenerator(*Opts), Opts(std::move(Opts)), C(C) {}
|
||||
|
||||
void finishedMainFile(DiagnosticsEngine &Diags) override {
|
||||
for (const auto &File : getDependencies())
|
||||
C.handleFileDependency(*Opts, File);
|
||||
llvm::SmallString<256> CanonPath;
|
||||
for (const auto &File : getDependencies()) {
|
||||
CanonPath = File;
|
||||
llvm::sys::path::remove_dots(CanonPath, /*remove_dot_dot=*/true);
|
||||
C.handleFileDependency(*Opts, CanonPath);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
},
|
||||
{
|
||||
"directory": "DIR",
|
||||
"command": "clang -E DIR/subframework_header_dir_symlink_input2.m -FInputs/frameworks -iframework Inputs/frameworks_symlink",
|
||||
"command": "clang -E DIR/subframework_header_dir_symlink_input2.m -FInputs/frameworks -iframework Inputs/frameworks_symlink/../frameworks_symlink",
|
||||
"file": "DIR/subframework_header_dir_symlink_input2.m"
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue