[llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Jan 25 16:08:57 PST 2006
Changes in directory llvm/lib/VMCore:
Verifier.cpp updated: 1.145 -> 1.146
---
Log message:
Make sure the only user of InlineAsm's are direct calls.
---
Diffs of the changes: (+4 -0)
Verifier.cpp | 4 ++++
1 files changed, 4 insertions(+)
Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.145 llvm/lib/VMCore/Verifier.cpp:1.146
--- llvm/lib/VMCore/Verifier.cpp:1.145 Wed Jan 18 19:20:03 2006
+++ llvm/lib/VMCore/Verifier.cpp Wed Jan 25 18:08:45 2006
@@ -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 @@
!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);
More information about the llvm-commits
mailing list