diff options
author | Chris Lattner <sabre@nondot.org> | 2006-12-13 04:45:46 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-12-13 04:45:46 +0000 |
commit | 4d17caadbca5e7ce54c756f2baf52c78ac18bf5c (patch) | |
tree | 91358beea5de090b9ad3b6935bfd4ae103836ed0 | |
parent | 41af71952606b5d916719365d586b5d544830793 (diff) |
only check non-external functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32530 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/Verifier.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 38ce2525be..472d451bde 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 |