MC: clang-format MCContext. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237595 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach
2015-05-18 18:43:23 +00:00
parent 19696daa21
commit 7b81f734ee
2 changed files with 27 additions and 33 deletions

View File

@@ -62,7 +62,7 @@ MCContext::~MCContext() {
// we don't need to free them here.
// If the stream for the .secure_log_unique directive was created free it.
delete (raw_ostream*)SecureLog;
delete (raw_ostream *)SecureLog;
}
//===----------------------------------------------------------------------===//
@@ -81,7 +81,7 @@ void MCContext::reset() {
MCGenDwarfLabelEntries.clear();
DwarfDebugFlags = StringRef();
DwarfCompileUnitID = 0;
CurrentDwarfLoc = MCDwarfLoc(0,0,0,DWARF2_FLAG_IS_STMT,0,0);
CurrentDwarfLoc = MCDwarfLoc(0, 0, 0, DWARF2_FLAG_IS_STMT, 0, 0);
MachOUniquingMap.clear();
ELFUniquingMap.clear();
@@ -275,9 +275,10 @@ void MCContext::renameELFSection(const MCSectionELF *Section, StringRef Name) {
ELFSectionKey{Section->getSectionName(), GroupName, UniqueID});
auto I = ELFUniquingMap.insert(std::make_pair(
ELFSectionKey{Name, GroupName, UniqueID},
Section)).first;
Section))
.first;
StringRef CachedName = I->first.SectionName;
const_cast<MCSectionELF*>(Section)->setSectionName(CachedName);
const_cast<MCSectionELF *>(Section)->setSectionName(CachedName);
}
const MCSectionELF *
@@ -424,8 +425,8 @@ unsigned MCContext::getDwarfFile(StringRef Directory, StringRef FileName,
/// isValidDwarfFileNumber - takes a dwarf file number and returns true if it
/// currently is assigned and false otherwise.
bool MCContext::isValidDwarfFileNumber(unsigned FileNumber, unsigned CUID) {
const SmallVectorImpl<MCDwarfFile>& MCDwarfFiles = getMCDwarfFiles(CUID);
if(FileNumber == 0 || FileNumber >= MCDwarfFiles.size())
const SmallVectorImpl<MCDwarfFile> &MCDwarfFiles = getMCDwarfFiles(CUID);
if (FileNumber == 0 || FileNumber >= MCDwarfFiles.size())
return false;
return !MCDwarfFiles[FileNumber].Name.empty();
@@ -447,8 +448,8 @@ void MCContext::finalizeDwarfSections(MCStreamer &MCOS) {
sec->second.second = SectionEndSym;
++sec;
} else {
MapVector<const MCSection *, std::pair<MCSymbol *, MCSymbol *> >::iterator
to_erase = sec;
MapVector<const MCSection *, std::pair<MCSymbol *, MCSymbol *>>::iterator
to_erase = sec;
sec = SectionStartEndSyms.erase(to_erase);
}
}