[all-commits] [llvm/llvm-project] cb22d7: [clang] Fix DIFile directory root on Windows

Keith Smiley via All-commits all-commits at lists.llvm.org
Mon Mar 14 20:10:49 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cb22d71806b784a9105803f38b2740ca6888392a
      https://github.com/llvm/llvm-project/commit/cb22d71806b784a9105803f38b2740ca6888392a
  Author: Keith Smiley <keithbsmiley at gmail.com>
  Date:   2022-03-14 (Mon, 14 Mar 2022)

  Changed paths:
    M clang/lib/CodeGen/CGDebugInfo.cpp
    M clang/test/CodeGen/debug-prefix-map.c

  Log Message:
  -----------
  [clang] Fix DIFile directory root on Windows

On unix systems this logic would not separate the file and directory of
the DIFile unless they shared more components at the start than just the
root path character. The logic to do this was unix specific so it didn't
work on Windows. Now we check if the entire root_path is the same as
what you were going to set as the Dir and use the full filepath in that
case.

Differential Revision: https://reviews.llvm.org/D111579




More information about the All-commits mailing list