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
This commit is contained in:
Eric Christopher 2014-01-11 00:23:16 +00:00
parent 050d29c5a7
commit 708166f4d2

View File

@ -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);