Add comments to fallsthrough cases. Also, this fixes PR1492

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37405 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov 2007-06-03 19:20:49 +00:00
parent 499d8f0c3b
commit fb45086027

View File

@ -242,16 +242,19 @@ int ExecutionEngine::runFunctionAsMain(Function *Fn,
cerr << "Invalid type for third argument of main() supplied\n"; cerr << "Invalid type for third argument of main() supplied\n";
abort(); abort();
} }
// FALLS THROUGH
case 2: case 2:
if (FTy->getParamType(1) != PPInt8Ty) { if (FTy->getParamType(1) != PPInt8Ty) {
cerr << "Invalid type for second argument of main() supplied\n"; cerr << "Invalid type for second argument of main() supplied\n";
abort(); abort();
} }
// FALLS THROUGH
case 1: case 1:
if (FTy->getParamType(0) != Type::Int32Ty) { if (FTy->getParamType(0) != Type::Int32Ty) {
cerr << "Invalid type for first argument of main() supplied\n"; cerr << "Invalid type for first argument of main() supplied\n";
abort(); abort();
} }
// FALLS THROUGH
case 0: case 0:
if (FTy->getReturnType() != Type::Int32Ty && if (FTy->getReturnType() != Type::Int32Ty &&
FTy->getReturnType() != Type::VoidTy) { FTy->getReturnType() != Type::VoidTy) {