aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Function.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-25 06:32:47 +0000
committerChris Lattner <sabre@nondot.org>2006-03-25 06:32:47 +0000
commitb847423fc6653bc1fd0d1dde4f968502985d2c6a (patch)
tree8751a6afb051a22e7af13041ffdf97d5d072d7fb /lib/VMCore/Function.cpp
parente42dbed53ae145bd1b9b88c1903f0360904fea4e (diff)
Implement Intrinsic::getName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27108 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r--lib/VMCore/Function.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index ba07386f7e..eb3bf250a7 100644
--- a/lib/VMCore/Function.cpp
+++ b/lib/VMCore/Function.cpp
@@ -213,6 +213,17 @@ unsigned Function::getIntrinsicID() const {
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) {