[LTO] Add a test for invalid alias analysis pipelines.

I found out this wasn't tested when looking at Vedant's coverage bot
numbers, so, thanks to him. While I'm here, switch the error message
to be lld-compliant (first letter lowercase).

llvm-svn: 282335
This commit is contained in:
Davide Italiano 2016-09-24 20:05:52 +00:00
parent 4fd9b7e16f
commit c79d196c8e
2 changed files with 8 additions and 1 deletions

View File

@ -67,7 +67,7 @@ static void runNewCustomLtoPasses(Module &M, TargetMachine &TM) {
// Parse a custom AA pipeline if asked to.
if (!PB.parseAAPipeline(AA, Config->LtoAAPipeline)) {
error("Unable to parse AA pipeline description: " + Config->LtoAAPipeline);
error("unable to parse AA pipeline description: " + Config->LtoAAPipeline);
return;
}

View File

@ -28,3 +28,10 @@ define void @barrier() {
; RUN: --lto-newpm-passes=iamnotapass -shared 2>&1 | \
; RUN: FileCheck %s --check-prefix=INVALID
; INVALID: unable to parse pass pipeline description: 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