diff options
author | Rahul Joshi <rjoshi@nvidia.com> | 2024-09-30 07:42:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-30 07:42:53 -0700 |
commit | 1b7b3b8d354a28f5fb1381c61c5663819d29a974 (patch) | |
tree | b2f8cd0338d794bb67a2e5f5f94f12fe02b133f8 /llvm/lib/IR/Function.cpp | |
parent | 38450dfdf5a7ce402a145d433883b252a67da561 (diff) | |
download | llvm-1b7b3b8d354a28f5fb1381c61c5663819d29a974.zip llvm-1b7b3b8d354a28f5fb1381c61c5663819d29a974.tar.gz llvm-1b7b3b8d354a28f5fb1381c61c5663819d29a974.tar.bz2 |
[NFC] Move intrinsic related functions to Intrinsic namespace (#110125)
Move static functions `Function::lookupIntrinsicID` and
`Function::isTargetIntrinsic` to Intrinsic namespace.
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r-- | llvm/lib/IR/Function.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index 863900c..052ee1f 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -952,12 +952,12 @@ static constexpr const char *const IntrinsicNameTable[] = { #include "llvm/IR/IntrinsicImpl.inc" #undef GET_INTRINSIC_TARGET_DATA -bool Function::isTargetIntrinsic(Intrinsic::ID IID) { +bool Intrinsic::isTargetIntrinsic(Intrinsic::ID IID) { return IID > TargetInfos[0].Count; } bool Function::isTargetIntrinsic() const { - return isTargetIntrinsic(IntID); + return Intrinsic::isTargetIntrinsic(IntID); } /// Find the segment of \c IntrinsicNameTable for intrinsics with the same @@ -982,7 +982,7 @@ findTargetSubtable(StringRef Name) { /// This does the actual lookup of an intrinsic ID which matches the given /// function name. -Intrinsic::ID Function::lookupIntrinsicID(StringRef Name) { +Intrinsic::ID Intrinsic::lookupIntrinsicID(StringRef Name) { auto [NameTable, Target] = findTargetSubtable(Name); int Idx = Intrinsic::lookupLLVMIntrinsicByName(NameTable, Name, Target); if (Idx == -1) @@ -1011,7 +1011,7 @@ void Function::updateAfterNameChange() { return; } HasLLVMReservedName = true; - IntID = lookupIntrinsicID(Name); + IntID = Intrinsic::lookupIntrinsicID(Name); } /// Returns a stable mangling for the type specified for use in the name |