summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorCedric Venet <cedric.venet@laposte.net>2009-02-14 16:06:42 +0000
committerCedric Venet <cedric.venet@laposte.net>2009-02-14 16:06:42 +0000
commitd1e179d992099c0d01ea99def1fdb6b793f0319c (patch)
tree724676e2135b1a113ccbabf81d940d57ddf150b8 /llvm
parentd831cac2a79f3d557c2cad8f891de218d200ac1a (diff)
downloadbcm5719-llvm-d1e179d992099c0d01ea99def1fdb6b793f0319c.tar.gz
bcm5719-llvm-d1e179d992099c0d01ea99def1fdb6b793f0319c.zip
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. llvm-svn: 64554
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Analysis/DebugInfo.h4
-rw-r--r--llvm/include/llvm/CodeGen/ScheduleDAG.h2
-rw-r--r--llvm/include/llvm/Transforms/Utils/Local.h2
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp3
-rw-r--r--llvm/lib/Support/APFloat.cpp2
-rw-r--r--llvm/lib/System/Win32/Alarm.inc2
-rw-r--r--llvm/utils/TableGen/TGParser.cpp2
-rw-r--r--llvm/utils/TableGen/TGParser.h4
8 files changed, 11 insertions, 10 deletions
diff --git a/llvm/include/llvm/Analysis/DebugInfo.h b/llvm/include/llvm/Analysis/DebugInfo.h
index 5113d5f7737..164600e59d5 100644
--- a/llvm/include/llvm/Analysis/DebugInfo.h
+++ b/llvm/include/llvm/Analysis/DebugInfo.h
@@ -27,8 +27,8 @@ namespace llvm {
class Module;
class Type;
class Value;
- class DbgStopPointInst;
- class DbgDeclareInst;
+ struct DbgStopPointInst;
+ struct DbgDeclareInst;
class Instruction;
class DIDescriptor {
diff --git a/llvm/include/llvm/CodeGen/ScheduleDAG.h b/llvm/include/llvm/CodeGen/ScheduleDAG.h
index 38b437bdf01..685dc76d124 100644
--- a/llvm/include/llvm/CodeGen/ScheduleDAG.h
+++ b/llvm/include/llvm/CodeGen/ScheduleDAG.h
@@ -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.
diff --git a/llvm/include/llvm/Transforms/Utils/Local.h b/llvm/include/llvm/Transforms/Utils/Local.h
index 73389124b84..36c13f4c981 100644
--- a/llvm/include/llvm/Transforms/Utils/Local.h
+++ b/llvm/include/llvm/Transforms/Utils/Local.h
@@ -25,7 +25,7 @@ class PHINode;
class AllocaInst;
class ConstantExpr;
class TargetData;
-class DbgInfoIntrinsic;
+struct DbgInfoIntrinsic;
template<typename T> class SmallVectorImpl;
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index 47335d3f9a2..6139638dabc 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
@@ -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.
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index d8d414d7ea5..e7be299f30f 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -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;
}
diff --git a/llvm/lib/System/Win32/Alarm.inc b/llvm/lib/System/Win32/Alarm.inc
index dca9e08171f..c413b096e7e 100644
--- a/llvm/lib/System/Win32/Alarm.inc
+++ b/llvm/lib/System/Win32/Alarm.inc
@@ -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);
diff --git a/llvm/utils/TableGen/TGParser.cpp b/llvm/utils/TableGen/TGParser.cpp
index 4ff108d2603..1ea6b9816f6 100644
--- a/llvm/utils/TableGen/TGParser.cpp
+++ b/llvm/utils/TableGen/TGParser.cpp
@@ -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();
diff --git a/llvm/utils/TableGen/TGParser.h b/llvm/utils/TableGen/TGParser.h
index fd33aec0fb3..edbc4c1fc9d 100644
--- a/llvm/utils/TableGen/TGParser.h
+++ b/llvm/utils/TableGen/TGParser.h
@@ -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();
OpenPOWER on IntegriCloud