diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp index 600a1036110c..2334db36ebd5 100644 --- a/lld/ELF/LTO.cpp +++ b/lld/ELF/LTO.cpp @@ -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; } diff --git a/lld/test/ELF/lto/ltopasses-custom.ll b/lld/test/ELF/lto/ltopasses-custom.ll index 3e982e079fb1..147411aca14c 100644 --- a/lld/test/ELF/lto/ltopasses-custom.ll +++ b/lld/test/ELF/lto/ltopasses-custom.ll @@ -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