diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-04-04 18:16:01 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-04-04 18:16:01 +0000 |
commit | 972d55851a39494dd9fb9ecef5efaf5e03d55ef5 (patch) | |
tree | c9ab0aa25416db33ba03ec48caa037c0cca9eaf7 /llvm | |
parent | 8ca44f0b5ca7dbba81e1da5186ed30f4dc44152d (diff) | |
download | bcm5719-llvm-972d55851a39494dd9fb9ecef5efaf5e03d55ef5.tar.gz bcm5719-llvm-972d55851a39494dd9fb9ecef5efaf5e03d55ef5.zip |
Don't mix overload and default values.
It makes it hard to see which one is being called.
llvm-svn: 234100
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/MC/MCContext.h | 29 | ||||
-rw-r--r-- | llvm/lib/MC/MCContext.cpp | 14 |
2 files changed, 26 insertions, 17 deletions
diff --git a/llvm/include/llvm/MC/MCContext.h b/llvm/include/llvm/MC/MCContext.h index e0688644575..848614c3fb8 100644 --- a/llvm/include/llvm/MC/MCContext.h +++ b/llvm/include/llvm/MC/MCContext.h @@ -298,18 +298,41 @@ namespace llvm { } const MCSectionELF *getELFSection(StringRef Section, unsigned Type, + unsigned Flags) { + return getELFSection(Section, Type, Flags, nullptr); + } + + const MCSectionELF *getELFSection(StringRef Section, unsigned Type, unsigned Flags, - const char *BeginSymName = nullptr); + const char *BeginSymName) { + return getELFSection(Section, Type, Flags, 0, "", BeginSymName); + } + + const MCSectionELF *getELFSection(StringRef Section, unsigned Type, + unsigned Flags, unsigned EntrySize, + StringRef Group) { + return getELFSection(Section, Type, Flags, EntrySize, Group, nullptr); + } const MCSectionELF *getELFSection(StringRef Section, unsigned Type, unsigned Flags, unsigned EntrySize, StringRef Group, - const char *BeginSymName = nullptr); + const char *BeginSymName) { + return getELFSection(Section, Type, Flags, EntrySize, Group, ~0, + BeginSymName); + } + + const MCSectionELF *getELFSection(StringRef Section, unsigned Type, + unsigned Flags, unsigned EntrySize, + StringRef Group, unsigned UniqueID) { + return getELFSection(Section, Type, Flags, EntrySize, Group, UniqueID, + nullptr); + } const MCSectionELF *getELFSection(StringRef Section, unsigned Type, unsigned Flags, unsigned EntrySize, StringRef Group, unsigned UniqueID, - const char *BeginSymName = nullptr); + const char *BeginSymName); const MCSectionELF *createELFRelSection(StringRef Name, unsigned Type, unsigned Flags, unsigned EntrySize, diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index 4443fc00fe0..34932ccd33a 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -262,12 +262,6 @@ MCContext::getMachOSection(StringRef Segment, StringRef Section, Reserved2, Kind, Begin); } -const MCSectionELF *MCContext::getELFSection(StringRef Section, unsigned Type, - unsigned Flags, - const char *BeginSymName) { - return getELFSection(Section, Type, Flags, 0, "", BeginSymName); -} - void MCContext::renameELFSection(const MCSectionELF *Section, StringRef Name) { StringRef GroupName; if (const MCSymbol *Group = Section->getGroup()) @@ -330,14 +324,6 @@ const MCSectionELF *MCContext::getELFSection(StringRef Section, unsigned Type, return Result; } -const MCSectionELF *MCContext::getELFSection(StringRef Section, unsigned Type, - unsigned Flags, unsigned EntrySize, - StringRef Group, - const char *BeginSymName) { - return getELFSection(Section, Type, Flags, EntrySize, Group, ~0, - BeginSymName); -} - const MCSectionELF *MCContext::CreateELFGroupSection() { MCSectionELF *Result = new (*this) MCSectionELF(".group", ELF::SHT_GROUP, 0, SectionKind::getReadOnly(), 4, |