From 1a76f00dde513a7bdf20b1c424ba31f3abeed2a6 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 28 Mar 2008 06:22:23 +0000 Subject: [PATCH] Simplify the conversion from "0x" numbers to a single digit number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48907 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/buildit/build_llvm | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/utils/buildit/build_llvm b/utils/buildit/build_llvm index c4bf69f1929..2ea0a29dafe 100755 --- a/utils/buildit/build_llvm +++ b/utils/buildit/build_llvm @@ -121,23 +121,7 @@ if ! test $? == 0 ; then fi # Install Version.h -if [ "x$LLVM_SUBMIT_SUBVERSION" = "x00" -o "x$LLVM_SUBMIT_SUBVERSION" = "x0" ]; then - RC_ProjectSourceSubversion=0 -else - case "$LLVM_SUBMIT_SUBVERSION" in - 01) RC_ProjectSourceSubversion=1 ;; - 02) RC_ProjectSourceSubversion=2 ;; - 03) RC_ProjectSourceSubversion=3 ;; - 04) RC_ProjectSourceSubversion=4 ;; - 05) RC_ProjectSourceSubversion=5 ;; - 06) RC_ProjectSourceSubversion=6 ;; - 07) RC_ProjectSourceSubversion=7 ;; - 08) RC_ProjectSourceSubversion=8 ;; - 09) RC_ProjectSourceSubversion=9 ;; - *) RC_ProjectSourceSubversion=$LLVM_SUBMIT_SUBVERSION ;; - esac -fi - +RC_ProjectSourceSubversion=`printf "%d" $LLVM_SUBMIT_SUBVERSION` echo "#define LLVM_VERSION ${RC_ProjectSourceVersion}" > $DEST_DIR$DEST_ROOT/include/llvm/Version.h echo "#define LLVM_MINOR_VERSION ${RC_ProjectSourceSubversion}" >> $DEST_DIR$DEST_ROOT/include/llvm/Version.h