Skip to content

Commit fe11f74

Browse files
author
Fedor Sergeev
committed
[NewPM] teach -passes= to emit meaningful error messages
All the PassBuilder::parse interfaces now return descriptive StringError instead of a plain bool. It allows to make -passes/aa-pipeline parsing errors context-specific and thus less confusing. TODO: ideally we should also make suggestions for misspelled pass names, but that requires some extensions to PassBuilder. Reviewed By: philip.pfaffe, chandlerc Differential Revision: https://reviews.llvm.org/D53246 git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@344685 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent cf5be82 commit fe11f74

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/ELF/lto/ltopasses-custom.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ define void @barrier() {
2727
; RUN: not ld.lld -m elf_x86_64 %t.o -o %t2.so \
2828
; RUN: --lto-newpm-passes=iamnotapass -shared 2>&1 | \
2929
; RUN: FileCheck %s --check-prefix=INVALID
30-
; INVALID: unable to parse pass pipeline description: iamnotapass
30+
; INVALID: unable to parse pass pipeline description 'iamnotapass': unknown pass name 'iamnotapass'
3131

3232
; Check that invalid AA pipelines are rejected gracefully.
3333
; RUN: not ld.lld -m elf_x86_64 %t.o -o %t2.so \
3434
; RUN: --lto-newpm-passes=globaldce --lto-aa-pipeline=patatino \
3535
; RUN: -shared 2>&1 | \
3636
; RUN: FileCheck %s --check-prefix=INVALIDAA
37-
; INVALIDAA: unable to parse AA pipeline description: patatino
37+
; INVALIDAA: unknown alias analysis name 'patatino'

0 commit comments

Comments
 (0)