summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2016-08-22 20:18:28 +0000
committerPete Cooper <peter_cooper@apple.com>2016-08-22 20:18:28 +0000
commita5f8c722c4faf70e40a6317ec3485650e19f9063 (patch)
treed8f4e46aabb192d4b596e014ab7ee7e5fef47899 /llvm/lib
parent775b5541291416bd03196ae0537f9b81cf1e84a3 (diff)
downloadbcm5719-llvm-a5f8c722c4faf70e40a6317ec3485650e19f9063.tar.gz
bcm5719-llvm-a5f8c722c4faf70e40a6317ec3485650e19f9063.zip
Add comments and an assert to follow-up on r279113. NFC.
Philip commented on r279113 to ask for better comments as to when to use the different versions of getName. Its also possible to assert in the simple case that we aren't an overloaded intrinsic as those have to use the more capable version of getName. Thanks for the comments Philip. llvm-svn: 279466
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/Function.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 90f94e696f3..fa34158e9c5 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -553,6 +553,8 @@ static std::string getMangledTypeStr(Type* Ty) {
StringRef Intrinsic::getName(ID id) {
assert(id < num_intrinsics && "Invalid intrinsic ID!");
+ assert(!isOverloaded(id) &&
+ "This version of getName does not support overloading");
return IntrinsicNameTable[id];
}
OpenPOWER on IntegriCloud