diff options
author | Chris Lattner <sabre@nondot.org> | 2010-05-10 20:58:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-05-10 20:58:42 +0000 |
commit | 609de0068aed596182a74b9ad49fc7018f9db4b3 (patch) | |
tree | d91ef889a8738acd1b2750b26ca37521222c7296 /llvm | |
parent | 7e550caf4e66d705248e7670ca915755e67cd15d (diff) | |
download | bcm5719-llvm-609de0068aed596182a74b9ad49fc7018f9db4b3.tar.gz bcm5719-llvm-609de0068aed596182a74b9ad49fc7018f9db4b3.zip |
Simplify by using startswith instead of substr.
llvm-svn: 103430
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/VMCore/Verifier.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp index 6ad427218d7..819a5cba729 100644 --- a/llvm/lib/VMCore/Verifier.cpp +++ b/llvm/lib/VMCore/Verifier.cpp @@ -1152,7 +1152,7 @@ void Verifier::VerifyCallSite(CallSite CS) { Assert1(CS.arg_size() == FTy->getNumParams(), "Incorrect number of arguments passed to called function!", I); - // Verify that all arguments to the call match the function type... + // Verify that all arguments to the call match the function type. for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) Assert3(CS.getArgument(i)->getType() == FTy->getParamType(i), "Call parameter type does not match function signature!", @@ -1180,7 +1180,7 @@ void Verifier::VerifyCallSite(CallSite CS) { // Verify that there's no metadata unless it's a direct call to an intrinsic. if (!CS.getCalledFunction() || CS.getCalledFunction()->getName().size() < 5 || - CS.getCalledFunction()->getName().substr(0, 5) != "llvm.") { + !CS.getCalledFunction()->getName().startswith("llvm.")) { for (FunctionType::param_iterator PI = FTy->param_begin(), PE = FTy->param_end(); PI != PE; ++PI) Assert1(!PI->get()->isMetadataTy(), |