| Dale Johannesen | b842d52 | 2009-02-05 01:49:45 +0000 | [diff] [blame] | 1 | //===-- TargetIntrinsicInfo.cpp - Target Instruction Information ----------===// | 
|  | 2 | // | 
|  | 3 | //                     The LLVM Compiler Infrastructure | 
|  | 4 | // | 
|  | 5 | // This file is distributed under the University of Illinois Open Source | 
|  | 6 | // License. See LICENSE.TXT for details. | 
|  | 7 | // | 
|  | 8 | //===----------------------------------------------------------------------===// | 
|  | 9 | // | 
|  | 10 | // This file implements the TargetIntrinsicInfo class. | 
|  | 11 | // | 
|  | 12 | //===----------------------------------------------------------------------===// | 
|  | 13 |  | 
|  | 14 | #include "llvm/Target/TargetIntrinsicInfo.h" | 
| Jakob Stoklund Olesen | 923b5aa | 2009-10-15 18:49:26 +0000 | [diff] [blame] | 15 | #include "llvm/ADT/StringMap.h" | 
| Chandler Carruth | 9fb823b | 2013-01-02 11:36:10 +0000 | [diff] [blame] | 16 | #include "llvm/IR/Function.h" | 
| Dale Johannesen | b842d52 | 2009-02-05 01:49:45 +0000 | [diff] [blame] | 17 | using namespace llvm; | 
|  | 18 |  | 
| Jakob Stoklund Olesen | 923b5aa | 2009-10-15 18:49:26 +0000 | [diff] [blame] | 19 | TargetIntrinsicInfo::TargetIntrinsicInfo() { | 
| Dale Johannesen | b842d52 | 2009-02-05 01:49:45 +0000 | [diff] [blame] | 20 | } | 
|  | 21 |  | 
|  | 22 | TargetIntrinsicInfo::~TargetIntrinsicInfo() { | 
|  | 23 | } | 
| Jakob Stoklund Olesen | 923b5aa | 2009-10-15 18:49:26 +0000 | [diff] [blame] | 24 |  | 
| Tim Northover | 5fb414d | 2016-07-29 22:32:36 +0000 | [diff] [blame] | 25 | unsigned TargetIntrinsicInfo::getIntrinsicID(const Function *F) const { | 
| Jakob Stoklund Olesen | 923b5aa | 2009-10-15 18:49:26 +0000 | [diff] [blame] | 26 | const ValueName *ValName = F->getValueName(); | 
|  | 27 | if (!ValName) | 
|  | 28 | return 0; | 
|  | 29 | return lookupName(ValName->getKeyData(), ValName->getKeyLength()); | 
|  | 30 | } |