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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to