summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVictor Hernandez <vhernandez@apple.com>2010-01-18 22:55:08 +0000
committerVictor Hernandez <vhernandez@apple.com>2010-01-18 22:55:08 +0000
commit6cead7879aa8902905809e3853d31093a5511c2f (patch)
tree16a8e78937aae341d138be37d491c4b814e5cde2 /include
parent74733a7e46553e37295de9014c5d8a4bd59a0355 (diff)
downloadllvm-6cead7879aa8902905809e3853d31093a5511c2f.tar.gz
llvm-6cead7879aa8902905809e3853d31093a5511c2f.tar.bz2
llvm-6cead7879aa8902905809e3853d31093a5511c2f.tar.xz
Add comment that MDNode::getFunction() is not to be used by performance-critical code (currently only used by AsmWriter)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93802 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Metadata.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Metadata.h b/include/llvm/Metadata.h
index 179010b165..f64978cab4 100644
--- a/include/llvm/Metadata.h
+++ b/include/llvm/Metadata.h
@@ -154,7 +154,8 @@ public:
// getFunction - If this metadata is function-local and recursively has a
// function-local operand, return the first such operand's parent function.
- // Otherwise, return null.
+ // Otherwise, return null. getFunction() should not be used for performance-
+ // critical code because it recursively visits all the MDNode's operands.
Function *getFunction() const;
// destroy - Delete this node. Only when there are no uses.