xref: /freebsd/contrib/llvm-project/llvm/lib/Target/TargetIntrinsicInfo.cpp (revision 62cfcf62f627e5093fb37026a6d8c98e4d2ef04c)
1 //===-- TargetIntrinsicInfo.cpp - Target Instruction Information ----------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements the TargetIntrinsicInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "llvm/Target/TargetIntrinsicInfo.h"
14 #include "llvm/ADT/StringMap.h"
15 #include "llvm/IR/Function.h"
16 using namespace llvm;
17 
18 TargetIntrinsicInfo::TargetIntrinsicInfo() {
19 }
20 
21 TargetIntrinsicInfo::~TargetIntrinsicInfo() {
22 }
23 
24 unsigned TargetIntrinsicInfo::getIntrinsicID(const Function *F) const {
25   const ValueName *ValName = F->getValueName();
26   if (!ValName)
27     return 0;
28   return lookupName(ValName->getKeyData(), ValName->getKeyLength());
29 }
30