aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCSymbol.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-17 05:49:08 +0000
committerChris Lattner <sabre@nondot.org>2009-08-17 05:49:08 +0000
commit975780bb595b57a45a8e6d72d8151b436314ce22 (patch)
tree608145582519a558587437839df9930c525629d7 /include/llvm/MC/MCSymbol.h
parentd3aa25e2a8b04853f03341b6275ef7718659b915 (diff)
downloadexternal_llvm-975780bb595b57a45a8e6d72d8151b436314ce22.zip
external_llvm-975780bb595b57a45a8e6d72d8151b436314ce22.tar.gz
external_llvm-975780bb595b57a45a8e6d72d8151b436314ce22.tar.bz2
change AsmPrinter to switch sections using AsmStreamer instead of
doing it directly. This requires const'izing a bunch of stuff that took sections, but this seems like the right semantic thing to do: emitting a label to a section shouldn't mutate the MCSection object itself, for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCSymbol.h')
-rw-r--r--include/llvm/MC/MCSymbol.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/MC/MCSymbol.h b/include/llvm/MC/MCSymbol.h
index e857eba..a5176bc 100644
--- a/include/llvm/MC/MCSymbol.h
+++ b/include/llvm/MC/MCSymbol.h
@@ -34,7 +34,7 @@ namespace llvm {
std::string Name;
/// Section - The section the symbol is defined in, or null if the symbol
/// has not been defined in the associated translation unit.
- MCSection *Section;
+ const MCSection *Section;
/// IsTemporary - True if this is an assembler temporary label, which
/// typically does not survive in the .o file's symbol table. Usually
@@ -55,8 +55,8 @@ namespace llvm {
void operator=(const MCSymbol&); // DO NOT IMPLEMENT
public:
- MCSection *getSection() const { return Section; }
- void setSection(MCSection *Value) { Section = Value; }
+ const MCSection *getSection() const { return Section; }
+ void setSection(const MCSection *S) { Section = S; }
bool isExternal() const { return IsExternal; }
void setExternal(bool Value) { IsExternal = Value; }