[llvm-commits] CVS: llvm/lib/VMCore/Function.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Mar 24 22:33:01 PST 2006
Changes in directory llvm/lib/VMCore:
Function.cpp updated: 1.104 -> 1.105
---
Log message:
Implement Intrinsic::getName
---
Diffs of the changes: (+11 -0)
Function.cpp | 11 +++++++++++
1 files changed, 11 insertions(+)
Index: llvm/lib/VMCore/Function.cpp
diff -u llvm/lib/VMCore/Function.cpp:1.104 llvm/lib/VMCore/Function.cpp:1.105
--- llvm/lib/VMCore/Function.cpp:1.104 Thu Mar 9 14:35:01 2006
+++ llvm/lib/VMCore/Function.cpp Sat Mar 25 00:32:47 2006
@@ -213,6 +213,17 @@
return 0;
}
+const char *Intrinsic::getName(ID id) {
+ assert(id < num_intrinsics && "Invalid intrinsic ID!");
+ const char * const Table[] = {
+ "not_intrinsic",
+#define GET_INTRINSIC_NAME_TABLE
+#include "llvm/Intrinsics.gen"
+#undef GET_INTRINSIC_NAME_TABLE
+ };
+ return Table[id];
+}
+
Value *IntrinsicInst::StripPointerCasts(Value *Ptr) {
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) {
if (CE->getOpcode() == Instruction::Cast) {
More information about the llvm-commits
mailing list