[llvm-commits] CVS: llvm/lib/VMCore/Function.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Sep 19 14:32:01 PDT 2003
Changes in directory llvm/lib/VMCore:
Function.cpp updated: 1.50 -> 1.51
---
Log message:
Reject "llvm." as a function name
---
Diffs of the changes:
Index: llvm/lib/VMCore/Function.cpp
diff -u llvm/lib/VMCore/Function.cpp:1.50 llvm/lib/VMCore/Function.cpp:1.51
--- llvm/lib/VMCore/Function.cpp:1.50 Tue Sep 16 23:58:59 2003
+++ llvm/lib/VMCore/Function.cpp Fri Sep 19 14:31:41 2003
@@ -158,9 +158,11 @@
/// llvm/Intrinsics.h.
///
unsigned Function::getIntrinsicID() const {
- if (getName().size() <= 5 || getName()[4] != '.' || getName()[0] != 'l' ||
+ if (getName().size() < 5 || getName()[4] != '.' || getName()[0] != 'l' ||
getName()[1] != 'l' || getName()[2] != 'v' || getName()[3] != 'm')
return 0; // All intrinsics start with 'llvm.'
+
+ assert(getName().size() != 5 && "'llvm.' is an invalid intrinsic name!");
// a table of all Alpha intrinsic functions
struct {
More information about the llvm-commits
mailing list