diff options
author | Hartmut Kaiser <hartmut.kaiser@gmail.com> | 2007-10-17 14:56:40 +0000 |
---|---|---|
committer | Hartmut Kaiser <hartmut.kaiser@gmail.com> | 2007-10-17 14:56:40 +0000 |
commit | efd4a5144b03f61ebfd53d0245176f95e1170fb8 (patch) | |
tree | ae6b915d1e467e108f69328b1f3d069eb2cade1c | |
parent | c623096fe227a7705ccac5a5db514b64ccdfe6b2 (diff) | |
download | llvm-efd4a5144b03f61ebfd53d0245176f95e1170fb8.tar.gz llvm-efd4a5144b03f61ebfd53d0245176f95e1170fb8.tar.bz2 llvm-efd4a5144b03f61ebfd53d0245176f95e1170fb8.tar.xz |
Updated VC++ build system.
Silenced some VC warnings.
I'm getting linker errors, though: unresolved externals:
llvm::Split<class llvm::BasicBlock *,struct llvm::GraphTraits<class llvm::BasicBlock *> >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
and
llvm::Split<struct llvm::Inverse<class llvm::BasicBlock *>,struct llvm::GraphTraits<struct llvm::Inverse<class llvm::BasicBlock *> > >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
Where are these defined?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43073 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/ADT/APSInt.h | 2 | ||||
-rw-r--r-- | include/llvm/ADT/BitVector.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 4 | ||||
-rw-r--r-- | include/llvm/DerivedTypes.h | 7 | ||||
-rw-r--r-- | include/llvm/InstrTypes.h | 7 | ||||
-rw-r--r-- | include/llvm/Instructions.h | 4 | ||||
-rw-r--r-- | include/llvm/Support/Registry.h | 12 | ||||
-rw-r--r-- | include/llvm/Transforms/Utils/BasicInliner.h | 2 | ||||
-rw-r--r-- | utils/TableGen/FileLexer.l | 16 | ||||
-rw-r--r-- | win32/Analysis/Analysis.vcproj | 4 | ||||
-rw-r--r-- | win32/ExecutionEngine/ExecutionEngine.vcproj | 4 | ||||
-rw-r--r-- | win32/Transforms/Transforms.vcproj | 4 | ||||
-rw-r--r-- | win32/config.h | 7 |
13 files changed, 42 insertions, 33 deletions
diff --git a/include/llvm/ADT/APSInt.h b/include/llvm/ADT/APSInt.h index a04f8425ec..f5b511409f 100644 --- a/include/llvm/ADT/APSInt.h +++ b/include/llvm/ADT/APSInt.h @@ -25,7 +25,7 @@ class APSInt : public APInt { public: /// APSInt ctor - Create an APSInt with the specified width, default to /// unsigned. - explicit APSInt(unsigned BitWidth) : APInt(BitWidth, 0), IsUnsigned(true) {} + explicit APSInt(uint32_t BitWidth) : APInt(BitWidth, 0), IsUnsigned(true) {} APSInt(const APInt &I) : APInt(I), IsUnsigned(true) {} APSInt &operator=(const APSInt &RHS) { diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h index 000cdd3d67..927cfa9f78 100644 --- a/include/llvm/ADT/BitVector.h +++ b/include/llvm/ADT/BitVector.h @@ -57,7 +57,7 @@ public: } operator bool() const { - return (*WordRef) & (1L << BitPos); + return ((*WordRef) & (1L << BitPos)) ? true : false; } }; diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 1fd32c956e..80fbc8047f 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -64,7 +64,7 @@ public: //===----------------------------------------------------------------------===// // DomTreeNode - Dominator Tree Node template<class NodeT> class DominatorTreeBase; -class PostDominatorTree; +struct PostDominatorTree; class MachineBasicBlock; template <class NodeT> @@ -75,7 +75,7 @@ class DomTreeNodeBase { int DFSNumIn, DFSNumOut; template<class N> friend class DominatorTreeBase; - friend class PostDominatorTree; + friend struct PostDominatorTree; public: typedef typename std::vector<DomTreeNodeBase<NodeT> *>::iterator iterator; typedef typename std::vector<DomTreeNodeBase<NodeT> *>::const_iterator diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h index ba35d783b8..1ae8cbd45b 100644 --- a/include/llvm/DerivedTypes.h +++ b/include/llvm/DerivedTypes.h @@ -263,7 +263,7 @@ public: return T->getTypeID() == StructTyID; } - bool isPacked() const { return getSubclassData(); } + bool isPacked() const { return (0 != getSubclassData()) ? true : false; } }; @@ -279,9 +279,12 @@ class SequentialType : public CompositeType { PATypeHandle ContainedType; ///< Storage for the single contained type SequentialType(const SequentialType &); // Do not implement! const SequentialType &operator=(const SequentialType &); // Do not implement! + + // avoiding warning: 'this' : used in base member initializer list + SequentialType* this_() { return this; } protected: SequentialType(TypeID TID, const Type *ElType) - : CompositeType(TID), ContainedType(ElType, this) { + : CompositeType(TID), ContainedType(ElType, this_()) { ContainedTys = &ContainedType; NumContainedTys = 1; } diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index f7644e3dfa..22ad342d7f 100644 --- a/include/llvm/InstrTypes.h +++ b/include/llvm/InstrTypes.h @@ -84,12 +84,15 @@ public: class UnaryInstruction : public Instruction { Use Op; + + // avoiding warning: 'this' : used in base member initializer list + UnaryInstruction* this_() { return this; } protected: UnaryInstruction(const Type *Ty, unsigned iType, Value *V, Instruction *IB =0) - : Instruction(Ty, iType, &Op, 1, IB), Op(V, this) { + : Instruction(Ty, iType, &Op, 1, IB), Op(V, this_()) { } UnaryInstruction(const Type *Ty, unsigned iType, Value *V, BasicBlock *IAE) - : Instruction(Ty, iType, &Op, 1, IAE), Op(V, this) { + : Instruction(Ty, iType, &Op, 1, IAE), Op(V, this_()) { } public: // Out of line virtual method, so the vtable, etc has a home. diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index ec03030865..a4fcb820f4 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -256,7 +256,7 @@ public: /// setVolatile - Specify whether this is a volatile load or not. /// void setVolatile(bool V) { - SubclassData = (SubclassData & ~1) | V; + SubclassData = (SubclassData & ~1) | (V ? 1 : 0); } virtual LoadInst *clone() const; @@ -324,7 +324,7 @@ public: /// setVolatile - Specify whether this is a volatile load or not. /// void setVolatile(bool V) { - SubclassData = (SubclassData & ~1) | V; + SubclassData = (SubclassData & ~1) | (V ? 1 : 0); } /// Transparently provide more efficient getOperand methods. diff --git a/include/llvm/Support/Registry.h b/include/llvm/Support/Registry.h index 6f11ef1387..7488773bb4 100644 --- a/include/llvm/Support/Registry.h +++ b/include/llvm/Support/Registry.h @@ -67,7 +67,10 @@ namespace llvm { private: Registry(); // Do not implement. - static void Announce(node *); + static void Announce(const entry &E) { + for (listener *Cur = ListenerHead; Cur; Cur = Cur->Next) + Cur->registered(E); + } friend class node; static node *Head, *Tail; @@ -229,13 +232,6 @@ namespace llvm { } }; - - private: - static void Announce(const entry &E) { - for (listener *Cur = ListenerHead; Cur; Cur = Cur->Next) - Cur->registered(E); - } - }; } diff --git a/include/llvm/Transforms/Utils/BasicInliner.h b/include/llvm/Transforms/Utils/BasicInliner.h index 311047ccdd..a549ccf023 100644 --- a/include/llvm/Transforms/Utils/BasicInliner.h +++ b/include/llvm/Transforms/Utils/BasicInliner.h @@ -21,7 +21,7 @@ namespace llvm { class Function; class TargetData; - class BasicInlinerImpl; + struct BasicInlinerImpl; /// BasicInliner - BasicInliner provides function level inlining interface. /// Clients provide list of functions which are inline without using diff --git a/utils/TableGen/FileLexer.l b/utils/TableGen/FileLexer.l index 59bbdad7bf..561e8a1317 100644 --- a/utils/TableGen/FileLexer.l +++ b/utils/TableGen/FileLexer.l @@ -24,7 +24,7 @@ %option noreject %option noyymore -%x comment +%x in_comment %{ #include "llvm/Config/config.h" @@ -226,13 +226,13 @@ ${Identifier} { Filelval.StrVal = new std::string(yytext+1, yytext+yyleng); [ \t\n\r]+ { /* Ignore whitespace */ } -"/*" { BEGIN(comment); CommentDepth++; } -<comment>[^*/]* {} /* eat anything that's not a '*' or '/' */ -<comment>"*"+[^*/]* {} /* eat up '*'s not followed by '/'s */ -<comment>"/*" { ++CommentDepth; } -<comment>"/"+[^*/]* {} /* eat up /'s not followed by *'s */ -<comment>"*"+"/" { if (!--CommentDepth) { BEGIN(INITIAL); } } -<comment><<EOF>> { err() << "Unterminated comment!\n"; exit(1); } +"/*" { BEGIN(in_comment); CommentDepth++; } +<in_comment>[^*/]* {} /* eat anything that's not a '*' or '/' */ +<in_comment>"*"+[^*/]* {} /* eat up '*'s not followed by '/'s */ +<in_comment>"/*" { ++CommentDepth; } +<in_comment>"/"+[^*/]* {} /* eat up /'s not followed by *'s */ +<in_comment>"*"+"/" { if (!--CommentDepth) { BEGIN(INITIAL); } } +<in_comment><<EOF>> { err() << "Unterminated comment!\n"; exit(1); } . { return Filetext[0]; } diff --git a/win32/Analysis/Analysis.vcproj b/win32/Analysis/Analysis.vcproj index ef7dd45c50..7353e893df 100644 --- a/win32/Analysis/Analysis.vcproj +++ b/win32/Analysis/Analysis.vcproj @@ -41,7 +41,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\include;.." - PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB;__STDC_LIMIT_MACROS" + PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN32;_DEBUG;_LIB;__STDC_LIMIT_MACROS" StringPooling="true" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -111,7 +111,7 @@ <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\include;.." - PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_LIB;__STDC_LIMIT_MACROS" + PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN32;NDEBUG;_LIB;__STDC_LIMIT_MACROS" StringPooling="true" RuntimeLibrary="2" ForceConformanceInForLoopScope="true" diff --git a/win32/ExecutionEngine/ExecutionEngine.vcproj b/win32/ExecutionEngine/ExecutionEngine.vcproj index bf98b4978b..16bd5c647d 100644 --- a/win32/ExecutionEngine/ExecutionEngine.vcproj +++ b/win32/ExecutionEngine/ExecutionEngine.vcproj @@ -41,7 +41,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\include;.." - PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB;__STDC_LIMIT_MACROS" + PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN32;_DEBUG;_LIB;__STDC_LIMIT_MACROS" StringPooling="true" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -111,7 +111,7 @@ <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\include;.." - PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_LIB;__STDC_LIMIT_MACROS" + PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN32;NDEBUG;_LIB;__STDC_LIMIT_MACROS" StringPooling="true" RuntimeLibrary="2" ForceConformanceInForLoopScope="true" diff --git a/win32/Transforms/Transforms.vcproj b/win32/Transforms/Transforms.vcproj index 39fa990e5b..fcc5b1ae3a 100644 --- a/win32/Transforms/Transforms.vcproj +++ b/win32/Transforms/Transforms.vcproj @@ -405,6 +405,10 @@ > </File> <File + RelativePath="..\..\lib\Transforms\Utils\BasicInliner.cpp" + > + </File> + <File RelativePath="..\..\lib\Transforms\Utils\BreakCriticalEdges.cpp" > </File> diff --git a/win32/config.h b/win32/config.h index 5783636c88..a94c905650 100644 --- a/win32/config.h +++ b/win32/config.h @@ -1,8 +1,8 @@ /* This file is appended to config.h.in to form the Windows version of * config.h */ -#define PACKAGE_NAME "LLVM (win32 vc7.1)" -#define PACKAGE_VERSION 1.4 +#define PACKAGE_NAME "LLVM (win32 vc8.0)" +#define PACKAGE_VERSION 2.1 #define HAVE_WINDOWS_H 1 #define HAVE_LIMITS_H 1 #define HAVE_SYS_STAT_H 1 @@ -22,3 +22,6 @@ #define LLVM_ON_WIN32 1 #define strtoll strtol +#define stricmp _stricmp +#define strdup _strdup + |