[llvm-commits] [llvm] r64554 - in /llvm/trunk: include/llvm/Analysis/DebugInfo.h include/llvm/CodeGen/ScheduleDAG.h include/llvm/Transforms/Utils/Local.h lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Support/APFloat.cpp lib/System/Win32/Alarm.inc utils/TableGen/TGParser.cpp utils/TableGen/TGParser.h

Cedric Venet cedric.venet at laposte.net
Sat Feb 14 08:06:43 PST 2009


Author: venet
Date: Sat Feb 14 10:06:42 2009
New Revision: 64554

URL: http://llvm.org/viewvc/llvm-project?rev=64554&view=rev
Log:
Unbreak the build on win32.
Cleanup some warning.

Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync.

Only tested with VS2008. hope it does not break anything. feel free to revert.

Modified:
    llvm/trunk/include/llvm/Analysis/DebugInfo.h
    llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
    llvm/trunk/include/llvm/Transforms/Utils/Local.h
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
    llvm/trunk/lib/Support/APFloat.cpp
    llvm/trunk/lib/System/Win32/Alarm.inc
    llvm/trunk/utils/TableGen/TGParser.cpp
    llvm/trunk/utils/TableGen/TGParser.h

Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=64554&r1=64553&r2=64554&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Sat Feb 14 10:06:42 2009
@@ -27,8 +27,8 @@
   class Module;
   class Type;
   class Value;
-  class DbgStopPointInst;
-  class DbgDeclareInst;
+  struct DbgStopPointInst;
+  struct DbgDeclareInst;
   class Instruction;
 
   class DIDescriptor {

Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=64554&r1=64553&r2=64554&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Sat Feb 14 10:06:42 2009
@@ -217,7 +217,7 @@
   };
 
   /// SUnit - Scheduling unit. This is a node in the scheduling DAG.
-  struct SUnit {
+  class SUnit {
   private:
     SDNode *Node;                       // Representative node.
     MachineInstr *Instr;                // Alternatively, a MachineInstr.

Modified: llvm/trunk/include/llvm/Transforms/Utils/Local.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/Local.h?rev=64554&r1=64553&r2=64554&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/Local.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/Local.h Sat Feb 14 10:06:42 2009
@@ -25,7 +25,7 @@
 class AllocaInst;
 class ConstantExpr;
 class TargetData;
-class DbgInfoIntrinsic;
+struct DbgInfoIntrinsic;
 
 template<typename T> class SmallVectorImpl;
   

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=64554&r1=64553&r2=64554&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Sat Feb 14 10:06:42 2009
@@ -4718,8 +4718,9 @@
 namespace llvm {
 /// AsmOperandInfo - This contains information for each constraint that we are
 /// lowering.
-struct VISIBILITY_HIDDEN SDISelAsmOperandInfo :
+class VISIBILITY_HIDDEN SDISelAsmOperandInfo :
     public TargetLowering::AsmOperandInfo {
+public:
   /// CallOperand - If this is the result output operand or a clobber
   /// this is null, otherwise it is the incoming operand to the CallInst.
   /// This gets modified as the asm is processed.

Modified: llvm/trunk/lib/Support/APFloat.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=64554&r1=64553&r2=64554&view=diff

==============================================================================
--- llvm/trunk/lib/Support/APFloat.cpp (original)
+++ llvm/trunk/lib/Support/APFloat.cpp Sat Feb 14 10:06:42 2009
@@ -1239,7 +1239,7 @@
   case convolve(fcInfinity, fcInfinity):
     /* Differently signed infinities can only be validly
        subtracted.  */
-    if((sign ^ rhs.sign) != subtract) {
+    if(((sign ^ rhs.sign)!=0) != subtract) {
       makeNaN();
       return opInvalidOp;
     }

Modified: llvm/trunk/lib/System/Win32/Alarm.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Win32/Alarm.inc?rev=64554&r1=64553&r2=64554&view=diff

==============================================================================
--- llvm/trunk/lib/System/Win32/Alarm.inc (original)
+++ llvm/trunk/lib/System/Win32/Alarm.inc Sat Feb 14 10:06:42 2009
@@ -36,7 +36,7 @@
 }
 
 // Don't pull in all of the Windows headers.
-extern "C" _stdcall void Sleep(unsigned long);
+extern "C"  void __stdcall Sleep(unsigned long);
 
 void sys::Sleep(unsigned n) {
   Sleep(n*1000);

Modified: llvm/trunk/utils/TableGen/TGParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/TGParser.cpp?rev=64554&r1=64553&r2=64554&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/TGParser.cpp (original)
+++ llvm/trunk/utils/TableGen/TGParser.cpp Sat Feb 14 10:06:42 2009
@@ -124,7 +124,7 @@
 
 /// AddSubClass - Add SubClass as a subclass to CurRec, resolving its template
 /// args as SubClass's template arguments.
-bool TGParser::AddSubClass(Record *CurRec, class SubClassReference &SubClass) {
+bool TGParser::AddSubClass(Record *CurRec, SubClassReference &SubClass) {
   Record *SC = SubClass.Rec;
   // Add all of the values in the subclass into the current class.
   const std::vector<RecordVal> &Vals = SC->getValues();

Modified: llvm/trunk/utils/TableGen/TGParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/TGParser.h?rev=64554&r1=64553&r2=64554&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/TGParser.h (original)
+++ llvm/trunk/utils/TableGen/TGParser.h Sat Feb 14 10:06:42 2009
@@ -23,7 +23,7 @@
   struct RecTy;
   struct Init;
   struct MultiClass;
-  struct SubClassReference;
+  class SubClassReference;
   
   struct LetRecord {
     std::string Name;
@@ -66,7 +66,7 @@
   bool AddValue(Record *TheRec, LocTy Loc, const RecordVal &RV);
   bool SetValue(Record *TheRec, LocTy Loc, const std::string &ValName, 
                 const std::vector<unsigned> &BitList, Init *V);
-  bool AddSubClass(Record *Rec, class SubClassReference &SubClass);
+  bool AddSubClass(Record *Rec, SubClassReference &SubClass);
 
 private:  // Parser methods.
   bool ParseObjectList();





More information about the llvm-commits mailing list