} // 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;
DwarfVersion = DwarfVersionNumber
? DwarfVersionNumber
- : getDwarfVersionFromModule(MMI->getModule());
+ : getDwarfVersion(MMI->getModule());
{
NamedRegionTimer T(DbgTimerName, DWARFGroupName, TimePassesIsEnabled);