[llvm] r198979 - Update function name and add some helpful comments.

Eric Christopher echristo at gmail.com
Fri Jan 10 16:23:16 PST 2014


Author: echristo
Date: Fri Jan 10 18:23:16 2014
New Revision: 198979

URL: http://llvm.org/viewvc/llvm-project?rev=198979&view=rev
Log:
Update function name and add some helpful comments.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=198979&r1=198978&r2=198979&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Jan 10 18:23:16 2014
@@ -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, Mo
 
   DwarfVersion = DwarfVersionNumber
                      ? DwarfVersionNumber
-                     : getDwarfVersionFromModule(MMI->getModule());
+                     : getDwarfVersion(MMI->getModule());
 
   {
     NamedRegionTimer T(DbgTimerName, DWARFGroupName, TimePassesIsEnabled);





More information about the llvm-commits mailing list