diff options
author | Dan Gohman <gohman@apple.com> | 2010-07-14 21:12:44 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-07-14 21:12:44 +0000 |
commit | 79b78a43ece977899b654fe3c19d0c94f963c128 (patch) | |
tree | eceefcf9a6939a11dd3ea937b199ed41b4afc95a | |
parent | 40cf12fe775e0a689427f3c8779d8b6447bab3ca (diff) |
Just use getParent() instead of getModuleFromVal when the value is a Function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108358 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index d5b912bce1..5bc30430a7 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -2129,7 +2129,7 @@ void Value::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const { } else if (const MDNode *N = dyn_cast<MDNode>(this)) { const Function *F = N->getFunction(); SlotTracker SlotTable(F); - AssemblyWriter W(OS, SlotTable, F ? getModuleFromVal(F) : 0, AAW); + AssemblyWriter W(OS, SlotTable, F ? F->getParent() : 0, AAW); W.printMDNodeBody(N); } else if (const NamedMDNode *N = dyn_cast<NamedMDNode>(this)) { SlotTracker SlotTable(N->getParent()); |