Try to make MSVC just a little happier.
authorDaniel Dunbar <daniel@zuster.org>
Thu, 27 Aug 2009 00:38:04 +0000 (00:38 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 27 Aug 2009 00:38:04 +0000 (00:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80187 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCAssembler.h
lib/MC/MCAssembler.cpp

index daa3ffe54dafe9b530da269a93ff2eefe0d6094b..6f9149b40c525e77da4650637130ededf427969e 100644 (file)
@@ -287,7 +287,7 @@ public:
 
 private:
   iplist<MCFragment> Fragments;
-  const MCSection &Section;
+  const MCSection *Section;
 
   /// Alignment - The maximum alignment seen in this section.
   unsigned Alignment;
@@ -321,7 +321,7 @@ public:
   MCSectionData();
   MCSectionData(const MCSection &Section, MCAssembler *A = 0);
 
-  const MCSection &getSection() const { return Section; }
+  const MCSection &getSection() const { return *Section; }
 
   unsigned getAlignment() const { return Alignment; }
   void setAlignment(unsigned Value) { Alignment = Value; }
index 9388df8df61de1b8eb3c9d3e9d2ef46248770f02..5fd67b25b2a6c87579269ad2ed523b1fff3528ca 100644 (file)
@@ -829,10 +829,10 @@ uint64_t MCFragment::getAddress() const {
 
 /* *** */
 
-MCSectionData::MCSectionData() : Section(*(MCSection*)0) {}
+MCSectionData::MCSectionData() : Section(0) {}
 
 MCSectionData::MCSectionData(const MCSection &_Section, MCAssembler *A)
-  : Section(_Section),
+  : Section(&_Section),
     Alignment(1),
     Address(~UINT64_C(0)),
     Size(~UINT64_C(0)),