summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-01-26 00:08:45 +0000
committerChris Lattner <sabre@nondot.org>2006-01-26 00:08:45 +0000
commit3188b73642df785db3bb64044194c953eab93b02 (patch)
treef025790a3fb80a3a5be05d35b12868417cd46e5c /lib
parent3f970fd567004adbb4ac21c011e85bc817b272d6 (diff)
downloadllvm-3188b73642df785db3bb64044194c953eab93b02.tar.gz
llvm-3188b73642df785db3bb64044194c953eab93b02.tar.bz2
llvm-3188b73642df785db3bb64044194c953eab93b02.tar.xz
Make sure the only user of InlineAsm's are direct calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25626 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Verifier.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index 36462388b3..8113d5bbbc 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -47,6 +47,7 @@
#include "llvm/Module.h"
#include "llvm/ModuleProvider.h"
#include "llvm/DerivedTypes.h"
+#include "llvm/InlineAsm.h"
#include "llvm/Instructions.h"
#include "llvm/Intrinsics.h"
#include "llvm/PassManager.h"
@@ -663,6 +664,9 @@ void Verifier::visitInstruction(Instruction &I) {
!EF->dominates(&BB->getParent()->getEntryBlock(), PredBB),
"Instruction does not dominate all uses!", Op, &I);
}
+ } else if (isa<InlineAsm>(I.getOperand(i))) {
+ Assert1(i == 0 && isa<CallInst>(I),
+ "Cannot take the address of an inline asm!", &I);
}
}
InstsInThisBlock.insert(&I);