Unbreak the build on win32.
authorCedric Venet <cedric.venet@laposte.net>
Sat, 14 Feb 2009 16:06:42 +0000 (16:06 +0000)
committerCedric Venet <cedric.venet@laposte.net>
Sat, 14 Feb 2009 16:06:42 +0000 (16:06 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64554 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 5113d5f77370c97b2ff98994366e4537ec6d2e07..164600e59d5cc1848fdbad615ba6583985732ced 100644 (file)
@@ -27,8 +27,8 @@ namespace llvm {
   class Module;
   class Type;
   class Value;
-  class DbgStopPointInst;
-  class DbgDeclareInst;
+  struct DbgStopPointInst;
+  struct DbgDeclareInst;
   class Instruction;
 
   class DIDescriptor {
index 38b437bdf01ac81fe9643e2802f9899b6d7b6be1..685dc76d124013412f1ce9c9324ced268ed84498 100644 (file)
@@ -217,7 +217,7 @@ namespace llvm {
   };
 
   /// 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.
index 73389124b8448d4ba803a7036b294c9414b5b193..36c13f4c981b6b53ec7f088b1dd7eb4db4df64ee 100644 (file)
@@ -25,7 +25,7 @@ class PHINode;
 class AllocaInst;
 class ConstantExpr;
 class TargetData;
-class DbgInfoIntrinsic;
+struct DbgInfoIntrinsic;
 
 template<typename T> class SmallVectorImpl;
   
index 47335d3f9a244aaa189b1b133d26e8ef83cf5b8a..6139638dabc1e288dd2132c8d9c7ce083a186c26 100644 (file)
@@ -4718,8 +4718,9 @@ isAllocatableRegister(unsigned Reg, MachineFunction &MF,
 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.
index d8d414d7ea5a166fd15dc343ba6d4539f32e59cc..e7be299f30ff043a09282a727e9f74375577de30 100644 (file)
@@ -1239,7 +1239,7 @@ APFloat::addOrSubtractSpecials(const APFloat &rhs, bool subtract)
   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;
     }
index dca9e08171f36bd012e8e9ec76a11e03094df897..c413b096e7e14cd78f26479f757b012dd534340f 100644 (file)
@@ -36,7 +36,7 @@ int sys::AlarmStatus() {
 }
 
 // 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);
index 4ff108d2603a40ffc8f9e78b279b72b54e6d5c91..1ea6b9816f6d34a3dac6451152a3ddb0939d6cf1 100644 (file)
@@ -124,7 +124,7 @@ bool TGParser::SetValue(Record *CurRec, LocTy Loc, const std::string &ValName,
 
 /// 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();
index fd33aec0fb321985c395c0c6cde0167bbf397602..edbc4c1fc9d7fb39fb23e243e48e5c30364fe2cd 100644 (file)
@@ -23,7 +23,7 @@ namespace llvm {
   struct RecTy;
   struct Init;
   struct MultiClass;
-  struct SubClassReference;
+  class SubClassReference;
   
   struct LetRecord {
     std::string Name;
@@ -66,7 +66,7 @@ private:  // Semantic analysis methods.
   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();