aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorMarcos Pividori <mpividori@google.com>2016-12-13 17:46:32 +0000
committerMarcos Pividori <mpividori@google.com>2016-12-13 17:46:32 +0000
commit67dfacdd80791984a11d5ce3a4df8dad3043ed8f (patch)
tree4d8bc08a9f9b91014f33d3dd5d0d31ae19560f1c /llvm/tools/llvm-objdump/llvm-objdump.cpp
parent64d41473965d0e8d39f0c13fa38966ff0d365d8e (diff)
downloadllvm-67dfacdd80791984a11d5ce3a4df8dad3043ed8f.zip
llvm-67dfacdd80791984a11d5ce3a4df8dad3043ed8f.tar.gz
llvm-67dfacdd80791984a11d5ce3a4df8dad3043ed8f.tar.bz2
[libFuzzer] Implement DirName() for Windows.
Implement DirName from scratch to avoid dependencies on external libraries. It's based on MSDN documentation for Naming Files, Paths, and Namespaces. The algorithm can't simply start from the end and look backwards for the first separator, because we need to preserve the prefix that represent the root location. We shouldn't remove anything there. In Windows we have many different options, like: \\Server\Share\ , \ , C: , C:\ , \\?\C:\ , \\?\UNC\Server\Share\ We remove the last separator in the rest of the path, if it exists. It was implemented to have a similar behaviour to dirname() in linux, removing trailing separators, returning "." when the path doesn't contain separators, etc. Differential Revision: https://reviews.llvm.org/D27579 llvm-svn: 289562
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions