[llvm-commits] [llvm] r67347 - in /llvm/trunk: CMakeLists.txt include/llvm/CodeGen/ScheduleDAG.h include/llvm/Support/CommandLine.h include/llvm/User.h lib/Analysis/CMakeLists.txt lib/CodeGen/LiveIntervalAnalysis.cpp lib/System/Win32/Alarm.inc lib/System/Win32/Signals.inc utils/TableGen/TGParser.h
Sebastian Redl
sebastian.redl at getdesigned.at
Thu Mar 19 16:26:53 PDT 2009
Author: cornedbee
Date: Thu Mar 19 18:26:52 2009
New Revision: 67347
URL: http://llvm.org/viewvc/llvm-project?rev=67347&view=rev
Log:
Fix the Win32 VS2008 build:
- Make type declarations match the struct/class keyword of the definition.
- Move AddSignalHandler into the namespace where it belongs.
- Correctly call functions from template base.
- Some other small changes.
With this patch, LLVM and Clang should build properly and with far less noise under VS2008.
Modified:
llvm/trunk/CMakeLists.txt
llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
llvm/trunk/include/llvm/Support/CommandLine.h
llvm/trunk/include/llvm/User.h
llvm/trunk/lib/Analysis/CMakeLists.txt
llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
llvm/trunk/lib/System/Win32/Alarm.inc
llvm/trunk/lib/System/Win32/Signals.inc
llvm/trunk/utils/TableGen/TGParser.h
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=67347&r1=67346&r2=67347&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Thu Mar 19 18:26:52 2009
@@ -145,7 +145,7 @@
add_definitions( -D_SCL_SECURE_NO_WARNINGS -DCRT_NONSTDC_NO_WARNINGS )
add_definitions( -D_SCL_SECURE_NO_DEPRECATE )
add_definitions( -wd4146 -wd4503 -wd4996 -wd4800 -wd4244 -wd4624 )
- add_definitions( -wd4355 -wd4715 )
+ add_definitions( -wd4355 -wd4715 -wd4180 -wd4345 -wd4224 )
endif( MSVC )
include_directories( ${LLVM_BINARY_DIR}/include ${LLVM_MAIN_INCLUDE_DIR})
Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=67347&r1=67346&r2=67347&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Thu Mar 19 18:26:52 2009
@@ -23,7 +23,7 @@
#include "llvm/ADT/PointerIntPair.h"
namespace llvm {
- struct SUnit;
+ class SUnit;
class MachineConstantPool;
class MachineFunction;
class MachineModuleInfo;
Modified: llvm/trunk/include/llvm/Support/CommandLine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=67347&r1=67346&r2=67347&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CommandLine.h (original)
+++ llvm/trunk/include/llvm/Support/CommandLine.h Thu Mar 19 18:26:52 2009
@@ -833,8 +833,8 @@
typename ParserClass::parser_data_type();
if (Parser.parse(*this, ArgName, Arg, Val))
return true; // Parse error!
- setValue(Val);
- setPosition(pos);
+ this->setValue(Val);
+ this->setPosition(pos);
return false;
}
Modified: llvm/trunk/include/llvm/User.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/User.h?rev=67347&r1=67346&r2=67347&view=diff
==============================================================================
--- llvm/trunk/include/llvm/User.h (original)
+++ llvm/trunk/include/llvm/User.h Thu Mar 19 18:26:52 2009
@@ -84,6 +84,10 @@
void operator delete(void*, unsigned) {
assert(0 && "Constructor throws?");
}
+ /// placement delete - required by std, but never called.
+ void operator delete(void*, unsigned, bool) {
+ assert(0 && "Constructor throws?");
+ }
protected:
template <int Idx, typename U> static Use &OpFrom(const U *that) {
return Idx < 0
Modified: llvm/trunk/lib/Analysis/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CMakeLists.txt?rev=67347&r1=67346&r2=67347&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/CMakeLists.txt (original)
+++ llvm/trunk/lib/Analysis/CMakeLists.txt Thu Mar 19 18:26:52 2009
@@ -16,6 +16,7 @@
IntervalPartition.cpp
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp
+ LiveValues.cpp
LoopInfo.cpp
LoopPass.cpp
LoopVR.cpp
Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=67347&r1=67346&r2=67347&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Thu Mar 19 18:26:52 2009
@@ -2042,7 +2042,7 @@
if (CanFold && !Ops.empty()) {
if (tryFoldMemoryOperand(MI, vrm, NULL, index, Ops, true, Slot,VReg)){
Folded = true;
- if (FoundUse > 0) {
+ if (FoundUse) {
// Also folded uses, do not issue a load.
eraseRestoreInfo(Id, index, VReg, RestoreMBBs, RestoreIdxes);
nI.removeRange(getLoadIndex(index), getUseIndex(index)+1);
Modified: llvm/trunk/lib/System/Win32/Alarm.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Win32/Alarm.inc?rev=67347&r1=67346&r2=67347&view=diff
==============================================================================
--- llvm/trunk/lib/System/Win32/Alarm.inc (original)
+++ llvm/trunk/lib/System/Win32/Alarm.inc Thu Mar 19 18:26:52 2009
@@ -39,5 +39,5 @@
extern "C" void __stdcall Sleep(unsigned long);
void sys::Sleep(unsigned n) {
- Sleep(n*1000);
+ ::Sleep(n*1000);
}
Modified: llvm/trunk/lib/System/Win32/Signals.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Win32/Signals.inc?rev=67347&r1=67346&r2=67347&view=diff
==============================================================================
--- llvm/trunk/lib/System/Win32/Signals.inc (original)
+++ llvm/trunk/lib/System/Win32/Signals.inc Thu Mar 19 18:26:52 2009
@@ -14,6 +14,7 @@
#include "Win32.h"
#include <stdio.h>
#include <vector>
+#include <algorithm>
#ifdef __MINGW32__
#include <imagehlp.h>
@@ -111,6 +112,17 @@
InterruptFunction = IF;
LeaveCriticalSection(&CriticalSection);
}
+
+
+/// AddSignalHandler - Add a function to be called when a signal is delivered
+/// to the process. The handler can have a cookie passed to it to identify
+/// what instance of the handler it is.
+void sys::AddSignalHandler(void (*FnPtr)(void *), void *Cookie) {
+ if (CallBacksToRun == 0)
+ CallBacksToRun = new std::vector<std::pair<void(*)(void*), void*> >();
+ CallBacksToRun->push_back(std::make_pair(FnPtr, Cookie));
+ RegisterHandler();
+}
}
static void Cleanup() {
@@ -256,13 +268,3 @@
return FALSE;
}
-/// AddSignalHandler - Add a function to be called when a signal is delivered
-/// to the process. The handler can have a cookie passed to it to identify
-/// what instance of the handler it is.
-void llvm::sys::AddSignalHandler(void (*FnPtr)(void *), void *Cookie) {
- if (CallBacksToRun == 0)
- CallBacksToRun = new std::vector<std::pair<void(*)(void*), void*> >();
- CallBacksToRun->push_back(std::make_pair(FnPtr, Cookie));
- RegisterHandler();
-}
-
Modified: llvm/trunk/utils/TableGen/TGParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/TGParser.h?rev=67347&r1=67346&r2=67347&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/TGParser.h (original)
+++ llvm/trunk/utils/TableGen/TGParser.h Thu Mar 19 18:26:52 2009
@@ -24,7 +24,7 @@
struct RecTy;
struct Init;
struct MultiClass;
- class SubClassReference;
+ struct SubClassReference;
struct LetRecord {
std::string Name;
More information about the llvm-commits
mailing list