mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-04 21:30:49 +00:00
Add ability to set TYPE and FLAGS field for section trivially
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22454 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5f48ff7d1f
commit
5f9cb59f05
@ -152,13 +152,16 @@ namespace llvm {
|
|||||||
|
|
||||||
/// getSection - Return the section with the specified name, creating a new
|
/// getSection - Return the section with the specified name, creating a new
|
||||||
/// section if one does not already exist.
|
/// section if one does not already exist.
|
||||||
ELFSection &getSection(const std::string &Name) {
|
ELFSection &getSection(const std::string &Name,
|
||||||
|
unsigned Type, unsigned Flags = 0) {
|
||||||
ELFSection *&SN = SectionLookup[Name];
|
ELFSection *&SN = SectionLookup[Name];
|
||||||
if (SN) return *SN;
|
if (SN) return *SN;
|
||||||
|
|
||||||
SectionList.push_back(Name);
|
SectionList.push_back(Name);
|
||||||
SN = &SectionList.back();
|
SN = &SectionList.back();
|
||||||
SN->SectionIdx = NumSections++;
|
SN->SectionIdx = NumSections++;
|
||||||
|
SN->Type = Type;
|
||||||
|
SN->Flags = Flags;
|
||||||
return *SN;
|
return *SN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user