diff options
author | Victor Hernandez <vhernandez@apple.com> | 2010-01-18 22:55:08 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2010-01-18 22:55:08 +0000 |
commit | 06828f025d7b0b3cbb0567f1ae36de25c2c7dea3 (patch) | |
tree | 94578678431d4dd0e351efd776440ebb40b5b5a5 /llvm/lib/VMCore/Metadata.cpp | |
parent | 3338c1f5d222913b3e78f8c5de9f8b9ce81a1f5f (diff) | |
download | bcm5719-llvm-06828f025d7b0b3cbb0567f1ae36de25c2c7dea3.tar.gz bcm5719-llvm-06828f025d7b0b3cbb0567f1ae36de25c2c7dea3.zip |
Add comment that MDNode::getFunction() is not to be used by performance-critical code (currently only used by AsmWriter)
llvm-svn: 93802
Diffstat (limited to 'llvm/lib/VMCore/Metadata.cpp')
-rw-r--r-- | llvm/lib/VMCore/Metadata.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Metadata.cpp b/llvm/lib/VMCore/Metadata.cpp index 8a40fed1cca..7d783958882 100644 --- a/llvm/lib/VMCore/Metadata.cpp +++ b/llvm/lib/VMCore/Metadata.cpp @@ -154,7 +154,8 @@ static Function *assertLocalFunction(const MDNode *N) { // 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 *MDNode::getFunction() const { #ifndef NDEBUG return assertLocalFunction(this); |