[llvm-shlib] Fix the version naming style of libLLVM for Windows (#85710)
[llvm-project.git] / llvm / lib / Target / TargetIntrinsicInfo.cpp
blobd44a34984c421538ea6ccbbdc4be52349551d3db
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.
11 //===----------------------------------------------------------------------===//
13 #include "llvm/Target/TargetIntrinsicInfo.h"
14 #include "llvm/ADT/StringMapEntry.h"
15 #include "llvm/IR/Function.h"
16 using namespace llvm;
18 TargetIntrinsicInfo::TargetIntrinsicInfo() = default;
20 TargetIntrinsicInfo::~TargetIntrinsicInfo() = default;
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());