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/StringMapEntry.h"
15 #include "llvm/IR/Function.h"
16 using namespace llvm;
17 
18 TargetIntrinsicInfo::TargetIntrinsicInfo() = default;
19 
20 TargetIntrinsicInfo::~TargetIntrinsicInfo() = default;
21 
22 unsigned TargetIntrinsicInfo::getIntrinsicID(const Function *F) const {
23   const ValueName *ValName = F->getValueName();
24   if (!ValName)
25     return 0;
26   return lookupName(ValName->getKeyData(), ValName->getKeyLength());
27 }
28