diff options
author | Vedant Kumar <vsk@apple.com> | 2016-07-18 22:32:02 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2016-07-18 22:32:02 +0000 |
commit | d04929d875d7c1bd4627d534f0ab432243003e5e (patch) | |
tree | 6208b87a6710b40b42e0f2b2a0704f49dc6c4804 /clang/lib/CodeGen/CoverageMappingGen.cpp | |
parent | 4ced16dd2efd1793bd5c294c807d75737a06e7f6 (diff) | |
download | llvm-d04929d875d7c1bd4627d534f0ab432243003e5e.zip llvm-d04929d875d7c1bd4627d534f0ab432243003e5e.tar.gz llvm-d04929d875d7c1bd4627d534f0ab432243003e5e.tar.bz2 |
[Coverage] Remove '..' from filenames *after* getting an absolute path
Failure to do this breaks relative paths which begin with '..'.
This issue was caught by the (still nascent) coverage bot.
llvm-svn: 275924
Diffstat (limited to 'clang/lib/CodeGen/CoverageMappingGen.cpp')
-rw-r--r-- | clang/lib/CodeGen/CoverageMappingGen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp index c5495de..4debc7e 100644 --- a/clang/lib/CodeGen/CoverageMappingGen.cpp +++ b/clang/lib/CodeGen/CoverageMappingGen.cpp @@ -932,8 +932,8 @@ StringRef getCoverageSection(const CodeGenModule &CGM) { std::string normalizeFilename(StringRef Filename) { llvm::SmallString<256> Path(Filename); - llvm::sys::path::remove_dots(Path, /*remove_dot_dots=*/true); llvm::sys::fs::make_absolute(Path); + llvm::sys::path::remove_dots(Path, /*remove_dot_dots=*/true); return Path.str().str(); } |