aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2016-07-29 20:32:59 +0000
committerTim Northover <tnorthover@apple.com>2016-07-29 20:32:59 +0000
commit6b3bd61283afdfb7ce6d645ef4ed233bc60322a1 (patch)
tree5b4e5ba39bd17afe6a083aaa5c35ee87cacbbd7f /llvm/lib/IR/Function.cpp
parent70c80b336b02a8e0f4d3f10a80787df111bee2b1 (diff)
downloadllvm-6b3bd61283afdfb7ce6d645ef4ed233bc60322a1.zip
llvm-6b3bd61283afdfb7ce6d645ef4ed233bc60322a1.tar.gz
llvm-6b3bd61283afdfb7ce6d645ef4ed233bc60322a1.tar.bz2
CodeGen: add new "intrinsic" MachineOperand kind.
This will be used during GlobalISel, where we need a more robust and readable way to write tests than a simple immediate ID. llvm-svn: 277209
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r--llvm/lib/IR/Function.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index e1223d0..54638ab 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -488,9 +488,7 @@ static ArrayRef<const char *> findTargetSubtable(StringRef Name) {
/// \brief This does the actual lookup of an intrinsic ID which
/// matches the given function name.
-static Intrinsic::ID lookupIntrinsicID(const ValueName *ValName) {
- StringRef Name = ValName->getKey();
-
+Intrinsic::ID Function::lookupIntrinsicID(StringRef Name) {
ArrayRef<const char *> NameTable = findTargetSubtable(Name);
int Idx = Intrinsic::lookupLLVMIntrinsicByName(NameTable, Name);
if (Idx == -1)
@@ -513,7 +511,7 @@ void Function::recalculateIntrinsicID() {
IntID = Intrinsic::not_intrinsic;
return;
}
- IntID = lookupIntrinsicID(ValName);
+ IntID = lookupIntrinsicID(ValName->getKey());
}
/// Returns a stable mangling for the type specified for use in the name