use an accessor instead of poking internals of a node.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80532 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-08-31 02:24:20 +00:00
parent b0fc781115
commit 2adb8306e2

View File

@ -196,7 +196,7 @@ void CallGraph::dump() const {
// is to dropAllReferences before calling this.
//
Function *CallGraph::removeFunctionFromModule(CallGraphNode *CGN) {
assert(CGN->CalledFunctions.empty() && "Cannot remove function from call "
assert(CGN->empty() && "Cannot remove function from call "
"graph if it references other functions!");
Function *F = CGN->getFunction(); // Get the function for the call graph node
delete CGN; // Delete the call graph node for this func