mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
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:
@@ -47,8 +47,10 @@ namespace llvm {
|
|||||||
class MCContext {
|
class MCContext {
|
||||||
MCContext(const MCContext &) = delete;
|
MCContext(const MCContext &) = delete;
|
||||||
MCContext &operator=(const MCContext &) = delete;
|
MCContext &operator=(const MCContext &) = delete;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef StringMap<MCSymbol *, BumpPtrAllocator &> SymbolTable;
|
typedef StringMap<MCSymbol *, BumpPtrAllocator &> SymbolTable;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// The SourceMgr for this object, if any.
|
/// The SourceMgr for this object, if any.
|
||||||
const SourceMgr *SrcMgr;
|
const SourceMgr *SrcMgr;
|
||||||
@@ -280,9 +282,7 @@ namespace llvm {
|
|||||||
/// want to, for example, iterate over all symbols. 'const' because we
|
/// want to, for example, iterate over all symbols. 'const' because we
|
||||||
/// still want any modifications to the table itself to use the MCContext
|
/// still want any modifications to the table itself to use the MCContext
|
||||||
/// APIs.
|
/// APIs.
|
||||||
const SymbolTable &getSymbols() const {
|
const SymbolTable &getSymbols() const { return Symbols; }
|
||||||
return Symbols;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
@@ -433,9 +433,7 @@ namespace llvm {
|
|||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
unsigned getDwarfCompileUnitID() {
|
unsigned getDwarfCompileUnitID() { return DwarfCompileUnitID; }
|
||||||
return DwarfCompileUnitID;
|
|
||||||
}
|
|
||||||
void setDwarfCompileUnitID(unsigned CUIndex) {
|
void setDwarfCompileUnitID(unsigned CUIndex) {
|
||||||
DwarfCompileUnitID = CUIndex;
|
DwarfCompileUnitID = CUIndex;
|
||||||
}
|
}
|
||||||
@@ -502,18 +500,13 @@ namespace llvm {
|
|||||||
char *getSecureLogFile() { return SecureLogFile; }
|
char *getSecureLogFile() { return SecureLogFile; }
|
||||||
raw_ostream *getSecureLog() { return SecureLog; }
|
raw_ostream *getSecureLog() { return SecureLog; }
|
||||||
bool getSecureLogUsed() { return SecureLogUsed; }
|
bool getSecureLogUsed() { return SecureLogUsed; }
|
||||||
void setSecureLog(raw_ostream *Value) {
|
void setSecureLog(raw_ostream *Value) { SecureLog = Value; }
|
||||||
SecureLog = Value;
|
void setSecureLogUsed(bool Value) { SecureLogUsed = Value; }
|
||||||
}
|
|
||||||
void setSecureLogUsed(bool Value) {
|
|
||||||
SecureLogUsed = Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
void *allocate(unsigned Size, unsigned Align = 8) {
|
void *allocate(unsigned Size, unsigned Align = 8) {
|
||||||
return Allocator.Allocate(Size, Align);
|
return Allocator.Allocate(Size, Align);
|
||||||
}
|
}
|
||||||
void deallocate(void *Ptr) {
|
void deallocate(void *Ptr) {}
|
||||||
}
|
|
||||||
|
|
||||||
// Unrecoverable error has occurred. Display the best diagnostic we can
|
// Unrecoverable error has occurred. Display the best diagnostic we can
|
||||||
// and bail via exit(1). For now, most MC backend errors are unrecoverable.
|
// and bail via exit(1). For now, most MC backend errors are unrecoverable.
|
||||||
|
|||||||
@@ -275,7 +275,8 @@ void MCContext::renameELFSection(const MCSectionELF *Section, StringRef Name) {
|
|||||||
ELFSectionKey{Section->getSectionName(), GroupName, UniqueID});
|
ELFSectionKey{Section->getSectionName(), GroupName, UniqueID});
|
||||||
auto I = ELFUniquingMap.insert(std::make_pair(
|
auto I = ELFUniquingMap.insert(std::make_pair(
|
||||||
ELFSectionKey{Name, GroupName, UniqueID},
|
ELFSectionKey{Name, GroupName, UniqueID},
|
||||||
Section)).first;
|
Section))
|
||||||
|
.first;
|
||||||
StringRef CachedName = I->first.SectionName;
|
StringRef CachedName = I->first.SectionName;
|
||||||
const_cast<MCSectionELF *>(Section)->setSectionName(CachedName);
|
const_cast<MCSectionELF *>(Section)->setSectionName(CachedName);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user