From: Eric Christopher Date: Sat, 11 Jan 2014 00:23:16 +0000 (+0000) Subject: Update function name and add some helpful comments. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=708166f4d228508ae91fa4b9c6286091b1a88d7f;p=oota-llvm.git 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 --- 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);