LLVM  13.0.0git
TargetIntrinsicInfo.cpp
Go to the documentation of this file.
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 
14 #include "llvm/ADT/StringMap.h"
15 #include "llvm/IR/Function.h"
16 using namespace llvm;
17 
19 }
20 
22 }
23 
25  const ValueName *ValName = F->getValueName();
26  if (!ValName)
27  return 0;
28  return lookupName(ValName->getKeyData(), ValName->getKeyLength());
29 }
llvm
Definition: AllocatorList.h:23
llvm::StringMapEntry
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
Definition: StringMapEntry.h:98
llvm::StringMapEntryBase::getKeyLength
size_t getKeyLength() const
Definition: StringMapEntry.h:29
llvm::Function
Definition: Function.h:61
F
#define F(x, y, z)
Definition: MD5.cpp:56
llvm::TargetIntrinsicInfo::TargetIntrinsicInfo
TargetIntrinsicInfo()
Definition: TargetIntrinsicInfo.cpp:18
llvm::TargetIntrinsicInfo::lookupName
virtual unsigned lookupName(const char *Name, unsigned Len) const =0
Look up target intrinsic by name.
StringMap.h
llvm::StringMapEntry::getKeyData
const char * getKeyData() const
getKeyData - Return the start of the string data that is the key for this value.
Definition: StringMapEntry.h:109
llvm::TargetIntrinsicInfo::~TargetIntrinsicInfo
virtual ~TargetIntrinsicInfo()
Definition: TargetIntrinsicInfo.cpp:21
llvm::TargetIntrinsicInfo::getIntrinsicID
virtual unsigned getIntrinsicID(const Function *F) const
Return the target intrinsic ID of a function, or 0.
Definition: TargetIntrinsicInfo.cpp:24
Function.h
TargetIntrinsicInfo.h