mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-25 12:49:50 +00:00
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
This commit is contained in:
parent
74733a7e46
commit
6cead7879a
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user