[lld] r282335 - [LTO] Add a test for invalid alias analysis pipelines.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 24 13:05:53 PDT 2016
Author: davide
Date: Sat Sep 24 15:05:52 2016
New Revision: 282335
URL: http://llvm.org/viewvc/llvm-project?rev=282335&view=rev
Log:
[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).
Modified:
lld/trunk/ELF/LTO.cpp
lld/trunk/test/ELF/lto/ltopasses-custom.ll
Modified: lld/trunk/ELF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.cpp?rev=282335&r1=282334&r2=282335&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.cpp (original)
+++ lld/trunk/ELF/LTO.cpp Sat Sep 24 15:05:52 2016
@@ -67,7 +67,7 @@ static void runNewCustomLtoPasses(Module
// 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;
}
Modified: lld/trunk/test/ELF/lto/ltopasses-custom.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/ltopasses-custom.ll?rev=282335&r1=282334&r2=282335&view=diff
==============================================================================
--- lld/trunk/test/ELF/lto/ltopasses-custom.ll (original)
+++ lld/trunk/test/ELF/lto/ltopasses-custom.ll Sat Sep 24 15:05:52 2016
@@ -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
More information about the llvm-commits
mailing list