diff options
Diffstat (limited to 'include/llvm/MC/MCSectionELF.h')
-rw-r--r-- | include/llvm/MC/MCSectionELF.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/llvm/MC/MCSectionELF.h b/include/llvm/MC/MCSectionELF.h index 59799158ad..139adbf45c 100644 --- a/include/llvm/MC/MCSectionELF.h +++ b/include/llvm/MC/MCSectionELF.h @@ -16,6 +16,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/MC/MCSection.h" +#include "llvm/MC/MCSymbol.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ELF.h" #include "llvm/Support/raw_ostream.h" @@ -60,8 +61,13 @@ public: StringRef getSectionName() const { return SectionName; } virtual std::string getLabelBeginName() const { - return SectionName.str() + "_begin"; } + if (Group) + return (SectionName.str() + '_' + Group->getName() + "_begin").str(); + return SectionName.str() + "_begin"; + } virtual std::string getLabelEndName() const { + if (Group) + return (SectionName.str() + '_' + Group->getName() + "_end").str(); return SectionName.str() + "_end"; } unsigned getType() const { return Type; } |