diff options
| author | Teresa Johnson <tejohnson@google.com> | 2018-06-26 01:32:58 +0000 |
|---|---|---|
| committer | Teresa Johnson <tejohnson@google.com> | 2018-06-26 01:32:58 +0000 |
| commit | 9766fd64fba0c3a8a118aee795133a3bab69a0f5 (patch) | |
| tree | b2e530cf6be3e4eb3b84a656af76595886a97aee /llvm/test | |
| parent | 6f4fdfa9afd609352d07c47be1b040564fad4060 (diff) | |
| download | bcm5719-llvm-9766fd64fba0c3a8a118aee795133a3bab69a0f5.tar.gz bcm5719-llvm-9766fd64fba0c3a8a118aee795133a3bab69a0f5.zip | |
[ThinLTO] Add per-module indexes to combined index consistently
Summary:
Without this change we only add module paths to the combined index when
there is a module hash or at least one global value. Make this more
consistent by adding the module to the index whenever there is a summary
section, and it is a per-module summary (had a MODULE_CODE_SOURCE_FILENAME
record).
Since we will no longer add module paths lazily, add a new interface to get
the module info from the index that asserts it is already added.
Fixes PR37899.
Reviewers: Vlad, pcc
Subscribers: mehdi_amini, inglorion, steven_wu, llvm-commits
Differential Revision: https://reviews.llvm.org/D48511
llvm-svn: 335567
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/LTO/Resolution/X86/mod-asm-used.ll | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/test/LTO/Resolution/X86/mod-asm-used.ll b/llvm/test/LTO/Resolution/X86/mod-asm-used.ll index 5d49e80be39..8e02b6a444a 100644 --- a/llvm/test/LTO/Resolution/X86/mod-asm-used.ll +++ b/llvm/test/LTO/Resolution/X86/mod-asm-used.ll @@ -1,7 +1,11 @@ ; RUN: opt -module-summary -o %t.bc %s ; RUN: opt -module-summary -o %t2.bc %S/Inputs/mod-asm-used.ll -; RUN: llvm-lto2 run %t.bc -r %t.bc,foo,l %t2.bc -r %t2.bc,foo,pl -o %t3 -; RUN: llvm-nm %t3.* | FileCheck %s +; RUN: llvm-lto2 run %t.bc -r %t.bc,foo,l %t2.bc -r %t2.bc,foo,pl -o %t3 -save-temps +; RUN: llvm-nm %t3.? | FileCheck %s + +; RUN: llvm-dis %t3.index.bc -o - | FileCheck %s --check-prefix=INDEX +; INDEX: ^0 = module: (path: "{{.*}}mod-asm-used.ll.tmp.bc" +; INDEX: ^1 = module: (path: "{{.*}}mod-asm-used.ll.tmp2.bc" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" |

