diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 38ce2525be7..472d451bde8 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -334,12 +334,6 @@ void Verifier::visitFunction(Function &F) { F.getReturnType() == Type::VoidTy, "Functions cannot return aggregate values!", &F); - // Verify that this function (which has a body) is not named "llvm.*". It - // is not legal to define intrinsics. - if (F.getName().size() >= 5) - Assert1(F.getName().substr(0, 5) != "llvm.", - "llvm intrinsics cannot be defined!", &F); - // Check that this function meets the restrictions on this calling convention. switch (F.getCallingConv()) { default: @@ -371,6 +365,12 @@ void Verifier::visitFunction(Function &F) { } if (!F.isExternal()) { + // Verify that this function (which has a body) is not named "llvm.*". It + // is not legal to define intrinsics. + if (F.getName().size() >= 5) + Assert1(F.getName().substr(0, 5) != "llvm.", + "llvm intrinsics cannot be defined!", &F); + verifySymbolTable(F.getSymbolTable()); // Check the entry node