[DebugLine] Improve path handling.
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 14 Aug 2019 17:00:10 +0000 (17:00 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 14 Aug 2019 17:00:10 +0000 (17:00 +0000)
commitc0a9b1edca4192acc6128e92cdd17a5553118745
tree2f5da178e01344b0293969853c80f58e47fab8bd
parentaa3855694ff45fc51bd71774c8bb15738b83ef16
[DebugLine] Improve path handling.

After switching over LLDB's line table parser to libDebugInfo, we
noticed two regressions on the Windows bot. The problem is that when
obtaining a file from the line table prologue, we append paths without
specifying a path style. This leads to incorrect results on Windows for
debug info containing Posix paths:

  0x0000000000201000: /tmp\b.c, is_start_of_statement = TRUE

This patch is an attempt to fix that by guessing the path style whenever
possible.

Differential revision: https://reviews.llvm.org/D66227

llvm-svn: 368879
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp