[LLVMbugs] [Bug 21612] New: .d files should contain relative paths if relative paths are specified in the module map

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Nov 20 01:39:34 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=21612

            Bug ID: 21612
           Summary: .d files should contain relative paths if relative
                    paths are specified in the module map
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Modules
          Assignee: unassignedclangbugs at nondot.org
          Reporter: klimek at google.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Basic test (minus correct CHECK line ;)

test/Modules/dependency-gen.cppmap:
// RUN: cd %S
// RUN: %clang_cc1 -x c++ -fmodule-name=test -emit-module dependency-gen.cppmap
dependency-file %t.d -MT %t.pcm
// RUN: FileCheck %s < %t.d
module "test" {
  header "Inputs/dependency-gen.h"
}

Currently the .d file will contain the absolute path to
Inputs/dependency-gen.h, which is explicitly done when we create the C++ code
buffer with the #include lines.
The relative path in the module file means "relatively to the module file",
which is actually very similar to how -include directives are handled. The main
reason we can't trigger the same code path as -include currently is that we
don't have a file, as the code we parse is in a virtual buffer, which has no
way to point back to the module map file.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141120/c5967e6e/attachment.html>


More information about the llvm-bugs mailing list