summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Verifier.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-12-13 04:45:46 +0000
committerChris Lattner <sabre@nondot.org>2006-12-13 04:45:46 +0000
commitcb813314aad37146b3c90271a4a46aca8c66d900 (patch)
treed90ca6f0c91079f4ff066981501eb5001a0f19d5 /llvm/lib/VMCore/Verifier.cpp
parent50a995180966ecf83c1905a2fc0764713b1b6439 (diff)
downloadbcm5719-llvm-cb813314aad37146b3c90271a4a46aca8c66d900.tar.gz
bcm5719-llvm-cb813314aad37146b3c90271a4a46aca8c66d900.zip
only check non-external functions
llvm-svn: 32530
Diffstat (limited to 'llvm/lib/VMCore/Verifier.cpp')
-rw-r--r--llvm/lib/VMCore/Verifier.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp
index 38ce2525be7..472d451bde8 100644
--- a/llvm/lib/VMCore/Verifier.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud