From 94fb5f2a7066c427a9d3dac10a33ccbd02aac467 Mon Sep 17 00:00:00 2001 From: Cedric Venet Date: Sun, 17 Aug 2008 18:24:26 +0000 Subject: [PATCH] Make it compile on VC2005: - update VC projects. - Add an overload to llvm::Stream for <<, since std::hex and std::dec have type std::ios_base& (*)(std::ios_base&) in VC++. (templating the function don't work, due to ambiguities) - add ../ on several include in X86/AsmPrinter/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54898 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/Streams.h | 5 + .../X86/AsmPrinter/X86ATTAsmPrinter.cpp | 10 +- lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h | 6 +- lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp | 2 +- .../X86/AsmPrinter/X86IntelAsmPrinter.cpp | 6 +- .../X86/AsmPrinter/X86IntelAsmPrinter.h | 6 +- win32/Analysis/Analysis.vcproj | 8 - win32/CodeGen/CodeGen.vcproj | 56 +++--- win32/Support/Support.vcproj | 138 +++++++------- win32/TableGen/TableGen.vcproj | 176 ++++++++--------- win32/Transforms/Transforms.vcproj | 4 - win32/clang.sln | 7 +- win32/x86/x86.vcproj | 178 ++++++++++-------- 13 files changed, 318 insertions(+), 284 deletions(-) diff --git a/include/llvm/Support/Streams.h b/include/llvm/Support/Streams.h index 2444d5b6af3..e9208644da4 100644 --- a/include/llvm/Support/Streams.h +++ b/include/llvm/Support/Streams.h @@ -37,6 +37,11 @@ namespace llvm { StreamTy *stream() const { return Stream; } + inline BaseStream &operator << (std::ios_base &(*Func)(std::ios_base&)) { + if (Stream) *Stream << Func; + return *this; + } + inline BaseStream &operator << (StreamTy &(*Func)(StreamTy&)) { if (Stream) *Stream << Func; return *this; diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp index 8a6b60425ec..575762e623f 100644 --- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp @@ -15,11 +15,11 @@ #define DEBUG_TYPE "asm-printer" #include "X86ATTAsmPrinter.h" -#include "X86.h" -#include "X86COFF.h" -#include "X86MachineFunctionInfo.h" -#include "X86TargetMachine.h" -#include "X86TargetAsmInfo.h" +#include "../X86.h" +#include "../X86COFF.h" +#include "../X86MachineFunctionInfo.h" +#include "../X86TargetMachine.h" +#include "../X86TargetAsmInfo.h" #include "llvm/CallingConv.h" #include "llvm/DerivedTypes.h" #include "llvm/Module.h" diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h index f9479fd41d4..235c72efaee 100644 --- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h +++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h @@ -14,9 +14,9 @@ #ifndef X86ATTASMPRINTER_H #define X86ATTASMPRINTER_H -#include "X86.h" -#include "X86MachineFunctionInfo.h" -#include "X86TargetMachine.h" +#include "../X86.h" +#include "../X86MachineFunctionInfo.h" +#include "../X86TargetMachine.h" #include "llvm/ADT/StringSet.h" #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/CodeGen/DwarfWriter.h" diff --git a/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp index 8144ee85a9e..9b69264761b 100644 --- a/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp @@ -16,7 +16,7 @@ #include "X86ATTAsmPrinter.h" #include "X86IntelAsmPrinter.h" -#include "X86Subtarget.h" +#include "../X86Subtarget.h" using namespace llvm; /// createX86CodePrinterPass - Returns a pass that prints the X86 assembly code diff --git a/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp index 1822c1f914a..75812f34406 100644 --- a/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp @@ -15,9 +15,9 @@ #define DEBUG_TYPE "asm-printer" #include "X86IntelAsmPrinter.h" -#include "X86InstrInfo.h" -#include "X86TargetAsmInfo.h" -#include "X86.h" +#include "../X86InstrInfo.h" +#include "../X86TargetAsmInfo.h" +#include "../X86.h" #include "llvm/CallingConv.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" diff --git a/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h b/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h index c9ca072baf5..faf26bd0090 100644 --- a/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h +++ b/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h @@ -14,9 +14,9 @@ #ifndef X86INTELASMPRINTER_H #define X86INTELASMPRINTER_H -#include "X86.h" -#include "X86MachineFunctionInfo.h" -#include "X86TargetMachine.h" +#include "../X86.h" +#include "../X86MachineFunctionInfo.h" +#include "../X86TargetMachine.h" #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/ADT/StringSet.h" #include "llvm/Support/Compiler.h" diff --git a/win32/Analysis/Analysis.vcproj b/win32/Analysis/Analysis.vcproj index 5398ae5f8d6..5da06bed6ca 100644 --- a/win32/Analysis/Analysis.vcproj +++ b/win32/Analysis/Analysis.vcproj @@ -360,10 +360,6 @@ RelativePath="..\..\lib\Analysis\LibCallSemantics.cpp" > - - @@ -412,10 +408,6 @@ RelativePath="..\..\lib\Analysis\Trace.cpp" > - - diff --git a/win32/CodeGen/CodeGen.vcproj b/win32/CodeGen/CodeGen.vcproj index 10aa2d8c34f..ac797efc15c 100644 --- a/win32/CodeGen/CodeGen.vcproj +++ b/win32/CodeGen/CodeGen.vcproj @@ -304,30 +304,10 @@ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > - - - - - - - - - - @@ -336,6 +316,22 @@ RelativePath="..\..\lib\CodeGen\ELFWriter.h" > + + + + + + + + @@ -421,7 +417,7 @@ > + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + diff --git a/win32/TableGen/TableGen.vcproj b/win32/TableGen/TableGen.vcproj index aef3018aabd..913462b54de 100644 --- a/win32/TableGen/TableGen.vcproj +++ b/win32/TableGen/TableGen.vcproj @@ -1,7 +1,7 @@ + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + @@ -483,6 +487,10 @@ RelativePath="..\..\utils\TableGen\DAGISelEmitter.h" > + + diff --git a/win32/Transforms/Transforms.vcproj b/win32/Transforms/Transforms.vcproj index 6ed3766781e..ef57d430b11 100644 --- a/win32/Transforms/Transforms.vcproj +++ b/win32/Transforms/Transforms.vcproj @@ -443,10 +443,6 @@ RelativePath="..\..\lib\Transforms\Scalar\DeadStoreElimination.cpp" > - - diff --git a/win32/clang.sln b/win32/clang.sln index d6cc44ff5a4..b1257fdb73c 100644 --- a/win32/clang.sln +++ b/win32/clang.sln @@ -61,10 +61,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Analysis", "Analysis\Analys EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x86", "x86\x86.vcproj", "{144EEBF6-8C9B-4473-B715-2C821666AF6C}" ProjectSection(ProjectDependencies) = postProject + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} {339C2249-26B6-4172-B484-85653029AF57} = {339C2249-26B6-4172-B484-85653029AF57} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Transforms", "Transforms\Transforms.vcproj", "{C59374C1-9FC0-4147-B836-327DFDC52D99}" @@ -264,9 +265,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clangCodeGen", "..\tools\cl EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clangDriver", "..\tools\clang\win32\clangDriver\clangDriver.vcproj", "{7E7DA455-C276-4B93-8D02-8F7E2F629BAF}" ProjectSection(ProjectDependencies) = postProject - {030F6909-B2FA-4E53-BEA7-9A559CFC2F73} = {030F6909-B2FA-4E53-BEA7-9A559CFC2F73} - {AECB78DF-C319-4D49-B2FD-F98F62EBBDF4} = {AECB78DF-C319-4D49-B2FD-F98F62EBBDF4} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {AECB78DF-C319-4D49-B2FD-F98F62EBBDF4} = {AECB78DF-C319-4D49-B2FD-F98F62EBBDF4} {5125C3DB-FBD6-4BF8-8D8B-CE51D6E93BCD} = {5125C3DB-FBD6-4BF8-8D8B-CE51D6E93BCD} {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} @@ -280,6 +280,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clangDriver", "..\tools\cla {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} {6C98551A-4C36-4E74-8419-4D3EEEC9D8E0} = {6C98551A-4C36-4E74-8419-4D3EEEC9D8E0} + {030F6909-B2FA-4E53-BEA7-9A559CFC2F73} = {030F6909-B2FA-4E53-BEA7-9A559CFC2F73} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clangBasic", "..\tools\clang\win32\clangBasic\clangBasic.vcproj", "{298B4876-6EF1-4E80-85D7-72F80693BBEB}" diff --git a/win32/x86/x86.vcproj b/win32/x86/x86.vcproj index 7001947b812..78801743eee 100644 --- a/win32/x86/x86.vcproj +++ b/win32/x86/x86.vcproj @@ -89,6 +89,73 @@ Name="VCPostBuildEventTool" /> + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - @@ -415,10 +407,6 @@ RelativePath="..\..\lib\Target\X86\X86InstrX86-64.td" > - - @@ -447,6 +435,34 @@ RelativePath="..\..\lib\Target\X86\X86TargetMachine.cpp" > + + + + + + + + + + + + + +