[llvm-commits] [llvm] r80187 - in /llvm/trunk: include/llvm/MC/MCAssembler.h lib/MC/MCAssembler.cpp

Daniel Dunbar daniel at zuster.org
Wed Aug 26 17:38:04 PDT 2009


Author: ddunbar
Date: Wed Aug 26 19:38:04 2009
New Revision: 80187

URL: http://llvm.org/viewvc/llvm-project?rev=80187&view=rev
Log:
Try to make MSVC just a little happier.

Modified:
    llvm/trunk/include/llvm/MC/MCAssembler.h
    llvm/trunk/lib/MC/MCAssembler.cpp

Modified: llvm/trunk/include/llvm/MC/MCAssembler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAssembler.h?rev=80187&r1=80186&r2=80187&view=diff

==============================================================================
--- llvm/trunk/include/llvm/MC/MCAssembler.h (original)
+++ llvm/trunk/include/llvm/MC/MCAssembler.h Wed Aug 26 19:38:04 2009
@@ -287,7 +287,7 @@
 
 private:
   iplist<MCFragment> Fragments;
-  const MCSection &Section;
+  const MCSection *Section;
 
   /// Alignment - The maximum alignment seen in this section.
   unsigned Alignment;
@@ -321,7 +321,7 @@
   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; }

Modified: llvm/trunk/lib/MC/MCAssembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAssembler.cpp?rev=80187&r1=80186&r2=80187&view=diff

==============================================================================
--- llvm/trunk/lib/MC/MCAssembler.cpp (original)
+++ llvm/trunk/lib/MC/MCAssembler.cpp Wed Aug 26 19:38:04 2009
@@ -829,10 +829,10 @@
 
 /* *** */
 
-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)),





More information about the llvm-commits mailing list