aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/TargetIntrinsicInfo.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2009-10-15 18:49:26 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2009-10-15 18:49:26 +0000
commit0383606b657aa9770e6aee126b358afe9328ac4a (patch)
tree3125c0200a2c8e9c1015355851cd6d7615167502 /lib/Target/TargetIntrinsicInfo.cpp
parent20312d0bb8e06c6881010d54f857b6d482994470 (diff)
Clean up TargetIntrinsicInfo API. Add pure virtual methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84192 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetIntrinsicInfo.cpp')
-rw-r--r--lib/Target/TargetIntrinsicInfo.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/Target/TargetIntrinsicInfo.cpp b/lib/Target/TargetIntrinsicInfo.cpp
index d8da08e4f1..e049a1d3b6 100644
--- a/lib/Target/TargetIntrinsicInfo.cpp
+++ b/lib/Target/TargetIntrinsicInfo.cpp
@@ -12,11 +12,19 @@
//===----------------------------------------------------------------------===//
#include "llvm/Target/TargetIntrinsicInfo.h"
+#include "llvm/Function.h"
+#include "llvm/ADT/StringMap.h"
using namespace llvm;
-TargetIntrinsicInfo::TargetIntrinsicInfo(const char **desc, unsigned count)
- : Intrinsics(desc), NumIntrinsics(count) {
+TargetIntrinsicInfo::TargetIntrinsicInfo() {
}
TargetIntrinsicInfo::~TargetIntrinsicInfo() {
}
+
+unsigned TargetIntrinsicInfo::getIntrinsicID(Function *F) const {
+ const ValueName *ValName = F->getValueName();
+ if (!ValName)
+ return 0;
+ return lookupName(ValName->getKeyData(), ValName->getKeyLength());
+}