hanchenye-llvm-project/clang/test/Modules
Adrian Prantl 212c104ea3 Reapply "Avoid emitting redundant or unusable directories in DIFile metadata entries.""
This reverts commit r348280 and reapplies D55085 without modifications.

Original commit message:

    Avoid emitting redundant or unusable directories in DIFile metadata entries.

    As discussed on llvm-dev recently, Clang currently emits redundant
    directories in DIFile entries, such as

      .file      1 "/Volumes/Data/llvm" "/Volumes/Data/llvm/tools/clang/test/CodeGen/debug-info-abspath.c"

    This patch looks at any common prefix between the compilation
    directory and the (absolute) file path and strips the redundant
    part. More importantly it leaves the compilation directory empty if
    the two paths have no common prefix.

    After this patch the above entry is (assuming a compilation dir of "/Volumes/Data/llvm/_build"):

      .file 1 "/Volumes/Data/llvm" "tools/clang/test/CodeGen/debug-info-abspath.c"

    When building the FileCheck binary with debug info, this patch makes
    the build artifacts ~1kb smaller.

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

llvm-svn: 348513
2018-12-06 18:44:50 +00:00
..
Inputs [HeaderSearch] loadSubdirectoryModuleMaps should respect -working-directory 2018-11-14 01:08:03 +00:00
DebugInfoNamespace.cpp
DebugInfoSubmoduleImport.c
DebugInfoSubmodules.c
DebugInfoTransitiveImport.m
ExtDebugInfo.cpp Debug Info (-gmodules): emit full types for non-anchored template specializations 2018-10-24 00:06:02 +00:00
ExtDebugInfo.m
ModuleDebugInfo.cpp
ModuleDebugInfo.m
ModuleModuleDebugInfo.cpp
Rmodule-build.m
Werror-Wsystem-headers.m
Werror.m
add-remove-private.m
adl.cpp
anon-linkage.cpp
anon-namespace.cpp
anon-redecl.cpp
at-import-in-framework-header.m [Modules][ObjC] Warn on the use of '@import' in framework headers 2018-06-27 20:29:36 +00:00
attr-unavailable.m
auto-import-unavailable.cpp
auto-module-import.m
autolink.m
autolinkTBD.m
autoload-subdirectory.cpp Reapply r336660: [Modules] Autoload subdirectory modulemaps with specific LangOpts 2018-07-18 23:21:19 +00:00
available-is-better.cpp
bad-private-include.m [Modules] Honor -fmodule-name when handling private framework modules 2018-03-20 22:36:39 +00:00
build-fail-notes.m
builtin-import.mm
builtins.m
check-for-sanitizer-feature.cpp Improve diagnostics for config mismatches with -fmodule-file. 2018-05-24 20:03:51 +00:00
class-extension-protocol.m [Modules][ObjC] ASTReader should add protocols for class extensions 2018-04-27 18:01:23 +00:00
codegen-flags.test
codegen-nodep.test
codegen-opt.test
codegen.test Spurious commit just to help Richard, because git is weird. 2018-06-29 21:58:24 +00:00
compiler_builtins.m
compiler_builtins_aarch64.m
compiler_builtins_arm.m
compiler_builtins_x86.c
config-mismatch.cpp
config_macros.m
conflicts.m
const-var-init-update.cpp
crash-typo-correction-visibility.cpp
crash-vfs-headermaps.m [VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS. 2018-10-24 22:39:38 +00:00
crash-vfs-include-pch.m [VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS. 2018-10-24 22:39:38 +00:00
crash-vfs-ivfsoverlay.m [VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS. 2018-10-24 22:39:38 +00:00
crash-vfs-path-emptydir-entries.m [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
crash-vfs-path-symlink-component.m [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
crash-vfs-path-symlink-topheader.m [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
crash-vfs-path-traversal.m [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
crash-vfs-relative-incdir.m [VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS. 2018-10-24 22:39:38 +00:00
crash-vfs-relative-overlay.m [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
crash-vfs-run-reproducer.m [VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS. 2018-10-24 22:39:38 +00:00
crash-vfs-umbrella-frameworks.m [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
crashes.m
cstd.m
cxx-decls.cpp
cxx-dtor.cpp PR33924: merge local declarations that have linkage of some kind within 2018-07-04 02:25:38 +00:00
cxx-inline-namespace.cpp
cxx-irgen.cpp
cxx-linkage-cache.cpp
cxx-lookup.cpp
cxx-many-overloads.cpp
cxx-templates.cpp PR38627: Fix handling of exception specification adjustment for 2018-09-05 22:30:37 +00:00
cxx17-exception-spec.cpp Track the result of evaluating a computed noexcept specification on the 2018-05-03 03:58:32 +00:00
cxx17-inline-variables.cpp
cxx17.cpp
cycles.c
darwin_specific_modulemap_hacks.m
debug-info-moduleimport-in-module.m
debug-info-moduleimport.m
declare-use-compatible.cpp
declare-use.S
declare-use1.cpp
declare-use2.cpp
declare-use3.cpp
declare-use4.cpp
declare-use5.cpp
decldef.m
decldef.mm
deferred-lookup.cpp
dependency-dump-dependent-module.m
dependency-dump.m
dependency-gen-inferred-map.m
dependency-gen-pch.m
dependency-gen.m
dependency-gen.modulemap
diag-flags.cpp
diag-pragma.c
diag-pragma.cpp
diagnose-missing-import.m
diagnostic-options-out-of-date.m
diagnostics.modulemap
diamond-pch.c
diamond.c
direct-module-import.m
double-quotes.m Fix an assert in -Wquoted-include-in-framework-header 2018-09-20 19:00:03 +00:00
driver.c
elaborated-type-specifier-from-hidden-module.m
embed-files-compressed.cpp
embed-files.cpp
empty.modulemap
epic-fail.m
exception-spec.cpp PR38627: Fix handling of exception specification adjustment for 2018-09-05 22:30:37 +00:00
exclude-header.c
explicit-build-extra-files.cpp
explicit-build-flags.cpp
explicit-build-missing-files.cpp
explicit-build-overlap.cpp
explicit-build-prefer-self.cpp
explicit-build-relpath.cpp
explicit-build.cpp
exponential-paths.cpp
export_as_test.c
extensions.c
extern_c.cpp
extern_c_bad.cpp
extern_cxx.cpp
fatal-module-loader-error.m
filename.cpp
find-privateheaders.m
fmodules-validate-once-per-build-session.c
framework-name.m
framework-public-includes-private.m Fix tests from r335542 to use %hmaptool 2018-06-25 22:25:48 +00:00
friend-definition-2.cpp PR33924: merge local declarations that have linkage of some kind within 2018-07-04 02:25:38 +00:00
friend-definition.cpp Diagnose friend function template redefinitions. 2018-12-06 09:35:04 +00:00
getSourceDescriptor-crash.cpp
global-init.cpp
global_index.m
gnumode-non-benign.cpp
header-attribs.cpp
header-import.m
header-in-multiple-maps.cpp
hidden-definition.cpp
hidden-names.cpp
ignored_macros.m
implementation-of-module.m
implicit-build-config-out-of-date.m
implicit-built-Werror-using-W.cpp
implicit-map-dot-private.m
implicit-private-canonical.m
implicit-private-with-different-name.m
implicit-private-with-submodule.m [Modules] Improve .Private fix-its to handle 'explicit' and 'framework' 2018-06-15 20:13:28 +00:00
import-decl.cpp
import-self.m
import-syntax.c
import-textual-noguard.mm
import-textual.mm
include-own-headers.m
include-relative.c
include_next.c
incomplete-framework-module.m [Modules] Warning for module declarations lacking 'framework' qualifier 2018-06-01 01:26:18 +00:00
incomplete-module.m
incomplete-umbrella.m
inferred-attributes.mm
inferred-framework-case.m
inferred-frameworks.m
inferred-submodules.m
initializer_list.cpp
inner-struct-redefines-invisible.m
interface-visibility.m
internal-constants.cpp
invalid-pch-module-id.m
invalidate-identifiers.c
irgen.c
lambda-context.cpp
libc-libcxx.cpp
libstdcxx-ambiguous-internal.cpp
linkage-merge.cpp
linkage-merge.m
load-after-failure.m
load_failure.c
local-visibility.cpp Change return value of trivial visibility check. 2018-06-07 03:20:30 +00:00
localsubmodulevis.m
lookup-assert-protocol.m
lookup-assert.m
lookup.cpp
lookup.m
lsv-debuginfo.cpp Add an explicit -std=c++14 to this test. 2018-11-02 22:19:02 +00:00
macro-ambiguity.cpp
macro-hiding.cpp
macro-masking.cpp
macro-redefinition.cpp
macro-reexport.cpp
macro-undef-through-pch.m
macros.c
macros2.c
malformed-overload.m
malformed.cpp
merge-anon-in-extern_c.cpp
merge-anon-in-template.cpp
merge-class-definition-visibility.cpp
merge-decl-context.cpp
merge-decl-order.cpp
merge-deduced-return.cpp [modules] Defer merging deduced return types. 2018-08-03 01:00:01 +00:00
merge-dependent-friends.cpp
merge-enumerators.cpp
merge-fn-prototype-tags.c
merge-friends.cpp
merge-function-defs.cpp
merge-implicit-special-members.cpp
merge-lambdas.cpp [modules] Defer merging deduced return types. 2018-08-03 01:00:01 +00:00
merge-name-for-linkage.cpp
merge-nested-templates.cpp
merge-static-locals.cpp PR33924: merge local declarations that have linkage of some kind within 2018-07-04 02:25:38 +00:00
merge-target-features.cpp Improve diagnostics for config mismatches with -fmodule-file. 2018-05-24 20:03:51 +00:00
merge-template-friend.cpp
merge-template-members.cpp
merge-template-pattern-visibility-2.cpp Fix tracking of merged definitions when the merge target is also merged 2018-09-12 02:13:46 +00:00
merge-template-pattern-visibility-3.cpp Track definition merging on the canonical declaration even when local 2018-09-12 23:37:00 +00:00
merge-template-pattern-visibility.cpp
merge-template-specializations.cpp
merge-typedefs.cpp
merge-using-decls.cpp
merge-var-template-def.cpp
merge-vtable-codegen.cpp
method_pool.m
method_pool_write.m
minimal-identifier-tables.cpp
mismatch-diagnostics.cpp Fix test from r346439 to also work on Windows due to path separator differences. 2018-11-09 02:44:07 +00:00
misplaced-1.cpp
misplaced-2.cpp
misplaced-3.cpp
misplaced-4.cpp
misplaced-5.c
missing-flag.cpp
missing-header.m
missing-submodule.m
modify-module.m
modular_maps.cpp
module-debuginfo-prefix.m Reapply "Avoid emitting redundant or unusable directories in DIFile metadata entries."" 2018-12-06 18:44:50 +00:00
module-feature.m
module-file-modified.c
module-impl-with-link.c
module-imported-by-pch-path.m
module-imported-by-pch-with-modulemap.m [PCH+Modules] Load -fmodule-map-file content before including PCHs 2018-07-19 12:32:06 +00:00
module-map-path-hash.cpp
module-name-private.m
module-private.cpp
module_file_info.m NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects) 2018-10-30 20:31:30 +00:00
module_map_cwd.c
modulemap-locations.m
modules-cache-path-canonicalization.m
modules-with-same-name.m
modules.idx
multiple-include.cpp
namespaces.cpp
new-delete.cpp [modules] Do not serialize / deserialize pending new/delete mismatch 2018-06-28 01:57:04 +00:00
no-implicit-builds.cpp
no-implicit-maps.cpp
no-linkage.cpp
no-module-map.cpp [modules] Support use of -E on modules built from the command line. 2018-09-15 01:21:18 +00:00
no-stale-modtime.m
non-ambiguous-enum.m [Modules] Fix testcases from r331232 2018-04-30 22:57:02 +00:00
normal-module-map.cpp
objc-at-keyword.m
objc-categories.m
objc-category-2.m
objc-category-3.m
objc-category.m
objc-designated-init-mod.m
objc-hidden.m
objc-initializer.m
objc-method-redecl.m
objc_redef.m
odr.cpp
odr_hash-Friend.cpp Remove unnecessary options from test RUN lines. 2018-09-05 22:14:46 +00:00
odr_hash-Unresolved.cpp
odr_hash-blocks.cpp [ODRHash] Extend hash to support all Type's. 2018-09-04 22:53:19 +00:00
odr_hash-elaborated-types.cpp [ODRHash] Do not rely on Type* when computing the hash. 2018-06-28 13:28:44 +00:00
odr_hash-gnu.cpp Remove unnecessary options from test RUN lines. 2018-09-05 22:14:46 +00:00
odr_hash-vector.cpp [ODRHash] Extend hash to support all Type's. 2018-09-04 22:53:19 +00:00
odr_hash.cl [ODRHash] Extend hash to support all Type's. 2018-09-04 22:53:19 +00:00
odr_hash.cpp Add triple to test case. 2018-09-05 21:55:09 +00:00
odr_hash.mm [ODRHash] Extend hash to support all Type's. 2018-09-04 22:53:19 +00:00
on-demand-build.m
on-demand-macros.m
outofdate-rebuild.m
overloadable-attrs.cpp
parse-attributes.modulemap
path-resolution.modulemap
pch-module-macro.m
pch-used.m
pch-with-module-name.m
pch_container.m
pr19692.cpp
pr20399.cpp
pr20786.cpp
pr21217.cpp
pr21547.cpp
pr21687.cpp
pr24954.cpp
pr25501.cpp
pr26014.cpp
pr26179.cpp
pr27041.cpp
pr27186.cpp
pr27401.cpp PR33924: merge local declarations that have linkage of some kind within 2018-07-04 02:25:38 +00:00
pr27513.cpp
pr27699.cpp
pr27739.cpp
pr27754.cpp
pr27890.cpp
pr28332.cpp
pr28438.cpp
pr28752.cpp
pr28812.cpp
pr31469.cpp
pragma-pack.cpp
prebuilt-module.m
preprocess-build-diamond.m
preprocess-build.cpp
preprocess-decluse.cpp
preprocess-missing.modulemap
preprocess-module.cpp
preprocess-nested.cpp
preprocess-unavailable.cpp
preprocess.cpp
preprocess.m
private.cpp
private.modulemap
private1.cpp
protocol-redefinition.m Add protocol redefinition to the current scope/context 2018-06-30 00:49:27 +00:00
prune.m [test] Disable Modules/prune.m on NetBSD as it requires 'touch -a' 2018-12-05 11:17:50 +00:00
public-private.modulemap
rebuild.m
recursive.c
recursive_visibility.mm
redecl-add-after-load.cpp
redecl-found-building-chains.cpp
redecl-merge.m
redecl-merge2.m
redecl-namespaces.mm
redecl-templates.cpp
redeclarations.m
redecls.m
redefinition-c-tagtypes.m
redefinition-same-header.m
redundant-include.mm
relative-dep-gen.cpp Print correctly dependency paths on Windows 2018-09-13 14:27:32 +00:00
renamed.m
require-modular-includes.m
requires-coroutines.mm
requires-gnuinlineasm.m
requires.m
requires.mm
resolution-change.m [Modules] Do not emit relocation error when -fno-validate-pch is set 2018-08-01 09:50:02 +00:00
self-import-header.m
self-referencing-lambda.cpp [Modules] Update test to mention it requires C++14. 2018-03-23 00:16:06 +00:00
separate_map_tree.cpp
serialized-diags.m
shadow.m
shadowed-submodule.m
signal.m
static_assert.cpp
stddef.c
stddef.m
stress-objc.m
stress1.cpp
strict-decluse-headers.cpp Reapply "Fix regression in behavior of clang -x c++-header -fmodule-name=XXX" 2018-11-05 12:46:02 +00:00
strict-decluse.cpp
string_names.cpp
subdirectory-module-maps-working-dir.m [HeaderSearch] loadSubdirectoryModuleMaps should respect -working-directory 2018-11-14 01:08:03 +00:00
subframework-from-intermediate-path.m
subframeworks.m
submodule-in-private-mmap.m [Modules] Allow @import to reach submodules in private module maps 2018-05-02 02:25:03 +00:00
submodule-visibility-cycles.cpp
submodule-visibility.cpp
submodules-merge-defs.cpp Consistently create a new declaration when merging a pre-existing but 2018-09-12 02:13:47 +00:00
submodules-preprocess.cpp
submodules.cpp
submodules.m
suggest-include.cpp
system-out-of-date-test.m
system_headers.m
tag-injection.c
tag-injection.cpp
target-features.m [PATCH] [RISCV] Extend getTargetDefines for RISCVTargetInfo 2018-04-05 12:54:00 +00:00
target-platform-features.m [Modules] Add platform and environment features to requires clause 2018-09-18 17:11:13 +00:00
template-default-args.cpp
template-specialization-visibility.cpp
templates-2.mm
templates.mm CGDecl::emitStoresForConstant fix synthesized constant's name 2018-11-15 00:19:18 +00:00
textual-hdr-in-umbrella-hdr.m
textual-headers.cpp
thread-safety.cpp
typedef-tag-not-visible.m
typo.m
umbrella-header-include-builtin.mm
unavailable-local-visibility.test When we leave a module header, make that header visible in its 2018-09-12 23:09:23 +00:00
undefined-type-fixit1.cpp
unnecessary-module-map-parsing.c
unused-global-init.cpp
update-after-load.cpp
update-exception-spec.cpp
use-after-free.m
use-exportas-for-link.m Use export_as for autolinking frameworks 2018-04-16 19:42:32 +00:00
using-decl-friend-2.cpp
using-decl-friend.cpp
using-decl-inheritance.cpp
using-decl-redecl.cpp
using-decl.cpp
using-directive-redecl.cpp
using-directive.cpp
va_list.cpp
va_list.m
validate-system-headers.m
var-templates.cpp
visibility-in-instantiation.cpp
warn-unused-local-typedef.cpp
warning-mismatch.m
wildcard-submodule-exports.cpp
working-dir-flag.m