aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2009-03-19 23:26:52 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2009-03-19 23:26:52 +0000
commit2aa4c4e0b21990367ef15cd6d42ab9f9dd9ff29f (patch)
treeac51c35b589cd58106bb9afd41ad7ad20cb059a8 /lib
parent48555e87376e895bb596dd3f4879c6eb3f46ce4a (diff)
downloadexternal_llvm-2aa4c4e0b21990367ef15cd6d42ab9f9dd9ff29f.zip
external_llvm-2aa4c4e0b21990367ef15cd6d42ab9f9dd9ff29f.tar.gz
external_llvm-2aa4c4e0b21990367ef15cd6d42ab9f9dd9ff29f.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/CMakeLists.txt1
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp2
-rw-r--r--lib/System/Win32/Alarm.inc2
-rw-r--r--lib/System/Win32/Signals.inc22
4 files changed, 15 insertions, 12 deletions
diff --git a/lib/Analysis/CMakeLists.txt b/lib/Analysis/CMakeLists.txt
index f63054b..07a918b 100644
--- a/lib/Analysis/CMakeLists.txt
+++ b/lib/Analysis/CMakeLists.txt
@@ -16,6 +16,7 @@ add_llvm_library(LLVMAnalysis
IntervalPartition.cpp
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp
+ LiveValues.cpp
LoopInfo.cpp
LoopPass.cpp
LoopVR.cpp
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 3a8f40f..29be67b 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -2042,7 +2042,7 @@ addIntervalsForSpills(const LiveInterval &li,
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);
diff --git a/lib/System/Win32/Alarm.inc b/lib/System/Win32/Alarm.inc
index c413b09..e0d00a0 100644
--- a/lib/System/Win32/Alarm.inc
+++ b/lib/System/Win32/Alarm.inc
@@ -39,5 +39,5 @@ int sys::AlarmStatus() {
extern "C" void __stdcall Sleep(unsigned long);
void sys::Sleep(unsigned n) {
- Sleep(n*1000);
+ ::Sleep(n*1000);
}
diff --git a/lib/System/Win32/Signals.inc b/lib/System/Win32/Signals.inc
index 9276ef4..560ac38 100644
--- a/lib/System/Win32/Signals.inc
+++ b/lib/System/Win32/Signals.inc
@@ -14,6 +14,7 @@
#include "Win32.h"
#include <stdio.h>
#include <vector>
+#include <algorithm>
#ifdef __MINGW32__
#include <imagehlp.h>
@@ -111,6 +112,17 @@ void sys::SetInterruptFunction(void (*IF)()) {
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 @@ static BOOL WINAPI LLVMConsoleCtrlHandler(DWORD dwCtrlType) {
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();
-}
-