Fold a binary operator with constant operands when expanding code for a SCEV.
[llvm-complete.git] / win32 / dobison.cmd
blob0338e5e33b3a11d56c4050f24ba8da3c059e361f
1 @echo off
2 rem dobison.cmd prefix mode target source
3 rem prefix - passed to bison as -p<prefix>
4 rem mode - either debug or release
5 rem target - generated parser file name without extension
6 rem source - input to bison
8 if "%2"=="debug" (set flags=-tvdo) else (set flags=-vdo)
10 rem Test for presence of bison.
11 bison --help >NUL
12 if errorlevel 1 goto nobison
14 rem Run bison.
15 bison -p%1 %flags%%3.cpp %4 && move %3.hpp %3.h
16 exit
18 :nobison
19 echo Bison not found. Using pre-generated files.
20 copy %~pn4.cpp.cvs %3.cpp
21 copy %~pn4.h.cvs %3.h
22 exit