- 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
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})
#include "llvm/ADT/PointerIntPair.h"
namespace llvm {
- struct SUnit;
+ class SUnit;
class MachineConstantPool;
class MachineFunction;
class MachineModuleInfo;
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;
}
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
IntervalPartition.cpp
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp
+ LiveValues.cpp
LoopInfo.cpp
LoopPass.cpp
LoopVR.cpp
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);
extern "C" void __stdcall Sleep(unsigned long);
void sys::Sleep(unsigned n) {
- Sleep(n*1000);
+ ::Sleep(n*1000);
}
#include "Win32.h"
#include <stdio.h>
#include <vector>
+#include <algorithm>
#ifdef __MINGW32__
#include <imagehlp.h>
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() {
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();
-}
-
struct RecTy;
struct Init;
struct MultiClass;
- class SubClassReference;
+ struct SubClassReference;
struct LetRecord {
std::string Name;