]> granicus.if.org Git - clang/commit
Re-apply: Add python tool to dump and construct header maps
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Thu, 21 Jun 2018 21:45:24 +0000 (21:45 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Thu, 21 Jun 2018 21:45:24 +0000 (21:45 +0000)
commitbe7bb4eaa531e9f0794e11da7b52606c73953d6c
treed5d7b1f109bbe0133a5f65dd950a6b2a03f3572d
parent16a4b693139b7675bf95e82b436fe386988d577c
Re-apply: Add python tool to dump and construct header maps

Header maps are binary files used by Xcode, which are used to map
header names or paths to other locations. Clang has support for
those since its inception, but there's not a lot of header map
testing around.

Since it's a binary format, testing becomes pretty much brittle
and its hard to even know what's inside if you don't have the
appropriate tools.

Add a python based tool that allows creating and dumping header
maps based on a json description of those. While here, rewrite
tests to use the tool and remove the binary files from the tree.

This tool was initially written by Daniel Dunbar.

Thanks to Stella Stamenova for helping make this work on Windows.

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

rdar://problem/39994722

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335295 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
CMakeLists.txt
test/CMakeLists.txt
test/Modules/crash-vfs-headermaps.m
test/Preprocessor/Inputs/headermap-rel/foo.hmap [deleted file]
test/Preprocessor/Inputs/headermap-rel/foo.hmap.json [new file with mode: 0644]
test/Preprocessor/Inputs/headermap-rel2/project-headers.hmap [deleted file]
test/Preprocessor/Inputs/headermap-rel2/project-headers.hmap.json [new file with mode: 0644]
test/Preprocessor/Inputs/nonportable-hmaps/foo.hmap [deleted file]
test/Preprocessor/Inputs/nonportable-hmaps/foo.hmap.json [new file with mode: 0644]
test/Preprocessor/headermap-rel.c
test/Preprocessor/headermap-rel2.c
test/Preprocessor/nonportable-include-with-hmap.c
test/lit.cfg.py
utils/hmaptool/CMakeLists.txt [new file with mode: 0644]
utils/hmaptool/hmaptool [new file with mode: 0755]