aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm16/lib/Target/TargetIntrinsicInfo.cpp
blob: d44a34984c421538ea6ccbbdc4be52349551d3db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//===-- TargetIntrinsicInfo.cpp - Target Instruction Information ----------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file implements the TargetIntrinsicInfo class.
//
//===----------------------------------------------------------------------===//

#include "llvm/Target/TargetIntrinsicInfo.h"
#include "llvm/ADT/StringMapEntry.h"
#include "llvm/IR/Function.h"
using namespace llvm;

TargetIntrinsicInfo::TargetIntrinsicInfo() = default;

TargetIntrinsicInfo::~TargetIntrinsicInfo() = default;

unsigned TargetIntrinsicInfo::getIntrinsicID(const Function *F) const {
  const ValueName *ValName = F->getValueName();
  if (!ValName)
    return 0;
  return lookupName(ValName->getKeyData(), ValName->getKeyLength());
}