aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCSectionELF.h
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2012-12-13 03:00:35 +0000
committerEric Christopher <echristo@gmail.com>2012-12-13 03:00:35 +0000
commitb1cc6f3dff96bfb26e0f5b62a187374b6a7629a1 (patch)
treec971a1ecaaed5a004be4077789aefabf95e32630 /include/llvm/MC/MCSectionELF.h
parent896192402204c5a9a519ccc6ecc6834888fa7d51 (diff)
downloadexternal_llvm-b1cc6f3dff96bfb26e0f5b62a187374b6a7629a1.zip
external_llvm-b1cc6f3dff96bfb26e0f5b62a187374b6a7629a1.tar.gz
external_llvm-b1cc6f3dff96bfb26e0f5b62a187374b6a7629a1.tar.bz2
Add a way of printing out an arbitrary label name for a section
given the section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170087 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCSectionELF.h')
-rw-r--r--include/llvm/MC/MCSectionELF.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/MC/MCSectionELF.h b/include/llvm/MC/MCSectionELF.h
index 329c75c..8c31d04 100644
--- a/include/llvm/MC/MCSectionELF.h
+++ b/include/llvm/MC/MCSectionELF.h
@@ -17,6 +17,8 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/MC/MCSection.h"
#include "llvm/Support/ELF.h"
+#include "llvm/Support/raw_ostream.h"
+#include "llvm/Support/Debug.h"
namespace llvm {
@@ -57,6 +59,13 @@ public:
bool ShouldOmitSectionDirective(StringRef Name, const MCAsmInfo &MAI) const;
StringRef getSectionName() const { return SectionName; }
+ virtual std::string getLabelBeginName() const {
+ dbgs() << SectionName.data();
+ dbgs() << "_begin" << "\n";
+ return SectionName.str() + "_begin"; }
+ virtual std::string getLabelEndName() const {
+ return SectionName.str() + "_end";
+ }
unsigned getType() const { return Type; }
unsigned getFlags() const { return Flags; }
unsigned getEntrySize() const { return EntrySize; }