[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
diff --git a/test/ELF/lto/ltopasses-custom.ll b/test/ELF/lto/ltopasses-custom.ll
index a75000d..23f1564 100644
--- a/test/ELF/lto/ltopasses-custom.ll
+++ b/test/ELF/lto/ltopasses-custom.ll
@@ -27,11 +27,11 @@
 ; RUN: not ld.lld -m elf_x86_64 %t.o -o %t2.so \
 ; RUN:   --lto-newpm-passes=iamnotapass -shared 2>&1 | \
 ; RUN:   FileCheck %s --check-prefix=INVALID
-; INVALID: unable to parse pass pipeline description: iamnotapass
+; INVALID: unable to parse pass pipeline description 'iamnotapass': unknown pass name 'iamnotapass'
 
 ; Check that invalid AA pipelines are rejected gracefully.
 ; RUN: not ld.lld -m elf_x86_64 %t.o -o %t2.so \
 ; RUN:   --lto-newpm-passes=globaldce --lto-aa-pipeline=patatino \
 ; RUN:   -shared 2>&1 | \
 ; RUN:   FileCheck %s --check-prefix=INVALIDAA
-; INVALIDAA: unable to parse AA pipeline description: patatino
+; INVALIDAA: unknown alias analysis name 'patatino'