summaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCSection.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/MCSection.h
parent896192402204c5a9a519ccc6ecc6834888fa7d51 (diff)
downloadllvm-b1cc6f3dff96bfb26e0f5b62a187374b6a7629a1.tar.gz
llvm-b1cc6f3dff96bfb26e0f5b62a187374b6a7629a1.tar.bz2
llvm-b1cc6f3dff96bfb26e0f5b62a187374b6a7629a1.tar.xz
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/MCSection.h')
-rw-r--r--include/llvm/MC/MCSection.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/MC/MCSection.h b/include/llvm/MC/MCSection.h
index 21fdb6bd39..e5754249e9 100644
--- a/include/llvm/MC/MCSection.h
+++ b/include/llvm/MC/MCSection.h
@@ -14,6 +14,7 @@
#ifndef LLVM_MC_MCSECTION_H
#define LLVM_MC_MCSECTION_H
+#include "llvm/ADT/StringRef.h"
#include "llvm/MC/SectionKind.h"
#include "llvm/Support/Compiler.h"
@@ -49,6 +50,11 @@ namespace llvm {
virtual void PrintSwitchToSection(const MCAsmInfo &MAI,
raw_ostream &OS) const = 0;
+ // Convenience routines to get label names for the beginning/end of a
+ // section.
+ virtual std::string getLabelBeginName() const = 0;
+ virtual std::string getLabelEndName() const = 0;
+
/// isBaseAddressKnownZero - Return true if we know that this section will
/// get a base address of zero. In cases where we know that this is true we
/// can emit section offsets as direct references to avoid a subtraction