From 708166f4d228508ae91fa4b9c6286091b1a88d7f Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Sat, 11 Jan 2014 00:23:16 +0000 Subject: [PATCH] Update function name and add some helpful comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198979 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index c606efac5b1..e6eb777ad8f 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -168,8 +168,9 @@ DIType DbgVariable::getType() const { } // end llvm namespace -/// Return Dwarf Version by checking module flags. -static unsigned getDwarfVersionFromModule(const Module *M) { +/// Return Dwarf Version by checking module flags and returning +/// the default version otherwise. +static unsigned getDwarfVersion(const Module *M) { Value *Val = M->getModuleFlag("Dwarf Version"); if (!Val) return dwarf::DWARF_VERSION; @@ -211,7 +212,7 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M) DwarfVersion = DwarfVersionNumber ? DwarfVersionNumber - : getDwarfVersionFromModule(MMI->getModule()); + : getDwarfVersion(MMI->getModule()); { NamedRegionTimer T(DbgTimerName, DWARFGroupName, TimePassesIsEnabled); -- 2.34.1