TargetIntrinsicInfo.cpp 960 B

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