Prevent generateASTNode from overwriting a file if it already exists
This commit is contained in:
parent
c52492f6c0
commit
26a8953060
@ -5,6 +5,14 @@ if [ "$1" == "" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f $1.cpp ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f $1.h ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
touch $1.cpp
|
touch $1.cpp
|
||||||
touch $1.h
|
touch $1.h
|
||||||
|
|
||||||
@ -39,4 +47,4 @@ llvm::Value* $1::codegen(IRBuilder* generator)
|
|||||||
return llvm::ConstantInt::getSigned(llvm::IntegerType::getInt32Ty(generator->getBuilder()->getContext()),
|
return llvm::ConstantInt::getSigned(llvm::IntegerType::getInt32Ty(generator->getBuilder()->getContext()),
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user