TargetIntrinsicInfo.cpp 926 B

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