From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Li Subject: Re: [PATCH] llvm: add script to display the deserialized LLVM IR Date: Wed, 26 Apr 2017 04:43:28 +0800 Message-ID: References: <20170311115813.23249-1-luc.vanoostenryck@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-it0-f53.google.com ([209.85.214.53]:38418 "EHLO mail-it0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934466AbdDYUn3 (ORCPT ); Tue, 25 Apr 2017 16:43:29 -0400 Received: by mail-it0-f53.google.com with SMTP id f187so21691405ite.1 for ; Tue, 25 Apr 2017 13:43:29 -0700 (PDT) In-Reply-To: <20170311115813.23249-1-luc.vanoostenryck@gmail.com> Sender: linux-sparse-owner@vger.kernel.org List-Id: linux-sparse@vger.kernel.org To: Luc Van Oostenryck Cc: Linux-Sparse , Dibyendu Majumdar On Sat, Mar 11, 2017 at 7:58 PM, Luc Van Oostenryck wrote: > The goal is to use this in some of test cases, by comparing > the expected output with the actual one. > > diff --git a/sparse-llvm-dis b/sparse-llvm-dis > new file mode 100755 > index 000000000..573f8bbd0 > --- /dev/null > +++ b/sparse-llvm-dis > @@ -0,0 +1,13 @@ > +#!/bin/sh > + > +set +e > + > +DIRNAME=`dirname $0` > +DIS=`"${LLVM_CONFIG:-llvm-config}" --bindir`/llvm-dis > + > +if [ $# -eq 0 ]; then > + echo "`basename $0`: no input files" > + exit 1 > +fi > + > +$DIRNAME/sparse-llvm $@ | $DIS Looks good. You might want to check llvm-dis and sparse-llvm is there. I assume this script will not be invoked if llvm is not there so it is not a big deal. Chris