[test] Make ThinLTO/X86/crash_debuginfo.ll work with -enable-new-pm=1
authorFangrui Song <i@maskray.me>
Tue, 27 Oct 2020 19:36:59 +0000 (12:36 -0700)
committerFangrui Song <i@maskray.me>
Tue, 27 Oct 2020 19:37:19 +0000 (12:37 -0700)
LegacyInlinerBase::doFinalization runs removeDeadFunctions() to remove bar but
the new PM inliner doesn't. Improve the test to use llvm-nm -U.

llvm/test/ThinLTO/X86/crash_debuginfo.ll

index d0d63f2..0186f00 100644 (file)
@@ -2,12 +2,10 @@
 ; RUN: opt -module-summary -o %t-src.bc %p/Inputs/crash_debuginfo.ll
 ; RUN: llvm-lto -thinlto -o %t-index %t-dst.bc %t-src.bc
 ; RUN: opt -function-import -inline -summary-file %t-index.thinlto.bc %t-dst.bc -o %t.out
-; RUN: llvm-nm %t.out | FileCheck %s
+; RUN: llvm-nm -U %t.out | FileCheck %s --implicit-check-not=_bar
 
 ; Verify that we import bar and inline it. It use to crash importing due to ODR type uniquing
-; CHECK-NOT: bar
-; CHECK: foo
-; CHECK-NOT: bar
+; CHECK: _foo
 
 ; ModuleID = 'test/ThinLTO/X86/crash_debuginfo.ll'
 source_filename = "test/ThinLTO/X86/crash_debuginfo.ll"