summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit06828f025d7b0b3cbb0567f1ae36de25c2c7dea3 (patch)
tree94578678431d4dd0e351efd776440ebb40b5b5a5 /llvm/include
parent3338c1f5d222913b3e78f8c5de9f8b9ce81a1f5f (diff)
downloadbcm5719-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/include')
-rw-r--r--llvm/include/llvm/Metadata.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/Metadata.h b/llvm/include/llvm/Metadata.h
index 179010b1657..f64978cab44 100644
--- a/llvm/include/llvm/Metadata.h
+++ b/llvm/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.
OpenPOWER on IntegriCloud