Fix up a couple of review comments:

Use an if statement instead of a pair of ternary operators checking
the same condition.
Use a cheap method call rather than returning the local symbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198351 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-01-02 21:03:28 +00:00
parent 932aa0d9f6
commit e151788aae
2 changed files with 9 additions and 9 deletions

View File

@@ -822,14 +822,14 @@ DwarfCompileUnit *DwarfDebug::constructDwarfCompileUnit(DICompileUnit DIUnit) {
if (!FirstCU)
FirstCU = NewCU;
NewCU->initSection(
useSplitDwarf() ? Asm->getObjFileLowering().getDwarfInfoDWOSection()
: Asm->getObjFileLowering().getDwarfInfoSection(),
useSplitDwarf() ? DwarfInfoDWOSectionSym : DwarfInfoSectionSym);
// If we're splitting the dwarf then construct the skeleton CU now.
if (useSplitDwarf())
if (useSplitDwarf()) {
NewCU->initSection(Asm->getObjFileLowering().getDwarfInfoDWOSection(),
DwarfInfoDWOSectionSym);
// If we're splitting the dwarf then construct the skeleton CU now.
NewCU->setSkeleton(constructSkeletonCU(NewCU));
} else
NewCU->initSection(Asm->getObjFileLowering().getDwarfInfoSection(),
DwarfInfoSectionSym);
CUMap.insert(std::make_pair(DIUnit, NewCU));
CUDieMap.insert(std::make_pair(Die, NewCU));