[modules] Instead of storing absolute paths in a .pcm file, store the path to
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 5 Dec 2014 22:42:13 +0000 (22:42 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 5 Dec 2014 22:42:13 +0000 (22:42 +0000)
commit7ed1bc9eb0264e67b3d8f4cbe0044b13261820a2
treec8efda9f9bc84931ddb1df6e4c2581a53906edff
parent76b005398dc73dc504334d8a27989392e817d6b7
[modules] Instead of storing absolute paths in a .pcm file, store the path to
the root of the module and use paths relative to that directory wherever
possible. This is a step towards allowing explicit modules to be relocated
without being rebuilt, which is important for some kinds of distributed builds,
for good paths in diagnostics, and for appropriate .d output.

This is a recommit of r223443, reverted in r223465; when joining together
imported file paths, we now use the system's separator rather than always
using '/'. This avoids path mismatches between the original module build and
the module user on Windows (at least, in some cases). A more comprehensive
fix will follow.

llvm-svn: 223539
clang/include/clang/Serialization/ASTBitCodes.h
clang/include/clang/Serialization/ASTReader.h
clang/include/clang/Serialization/ASTWriter.h
clang/include/clang/Serialization/Module.h
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTReaderInternals.h
clang/lib/Serialization/ASTWriter.cpp