[llvm-commits] [llvm] r47367 - in /llvm/trunk: include/llvm/ADT/ include/llvm/Analysis/ include/llvm/CodeGen/ include/llvm/Target/ lib/Analysis/ lib/Analysis/IPA/ lib/Archive/ lib/AsmParser/ lib/Bitcode/Reader/ lib/CodeGen/ lib/ExecutionEngine/ lib/ExecutionEngine/Interpreter/ lib/ExecutionEngine/JIT/ lib/Support/ lib/Target/Sparc/ lib/Target/X86/ lib/Transforms/IPO/ lib/Transforms/Scalar/ lib/VMCore/ tools/llvm-ld/ tools/llvm-upgrade/ tools/llvmc/ utils/PerfectShuffle/ utils/TableGen/

Anton Korobeynikov asl at math.spbu.ru
Wed Feb 20 03:08:46 PST 2008


Author: asl
Date: Wed Feb 20 05:08:44 2008
New Revision: 47367

URL: http://llvm.org/viewvc/llvm-project?rev=47367&view=rev
Log:
Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.

Modified:
    llvm/trunk/include/llvm/ADT/BitVector.h
    llvm/trunk/include/llvm/ADT/DenseMap.h
    llvm/trunk/include/llvm/ADT/ilist
    llvm/trunk/include/llvm/Analysis/LoopInfo.h
    llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h
    llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h
    llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
    llvm/trunk/include/llvm/Target/SubtargetFeature.h
    llvm/trunk/include/llvm/Target/TargetJITInfo.h
    llvm/trunk/lib/Analysis/Analysis.cpp
    llvm/trunk/lib/Analysis/IPA/Andersens.cpp
    llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp
    llvm/trunk/lib/Analysis/ScalarEvolution.cpp
    llvm/trunk/lib/Archive/Archive.cpp
    llvm/trunk/lib/Archive/ArchiveInternals.h
    llvm/trunk/lib/AsmParser/LLLexer.cpp
    llvm/trunk/lib/AsmParser/Parser.cpp
    llvm/trunk/lib/Bitcode/Reader/BitReader.cpp
    llvm/trunk/lib/CodeGen/MachOWriter.cpp
    llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp
    llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp
    llvm/trunk/lib/ExecutionEngine/Interpreter/Execution.cpp
    llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
    llvm/trunk/lib/ExecutionEngine/Interpreter/Interpreter.cpp
    llvm/trunk/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
    llvm/trunk/lib/Support/CommandLine.cpp
    llvm/trunk/lib/Support/FileUtilities.cpp
    llvm/trunk/lib/Support/FoldingSet.cpp
    llvm/trunk/lib/Support/Statistic.cpp
    llvm/trunk/lib/Support/StringExtras.cpp
    llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp
    llvm/trunk/lib/Target/X86/X86JITInfo.cpp
    llvm/trunk/lib/Transforms/IPO/SimplifyLibCalls.cpp
    llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp
    llvm/trunk/lib/VMCore/AutoUpgrade.cpp
    llvm/trunk/lib/VMCore/ConstantFold.cpp
    llvm/trunk/lib/VMCore/Core.cpp
    llvm/trunk/lib/VMCore/Instructions.cpp
    llvm/trunk/lib/VMCore/Value.cpp
    llvm/trunk/tools/llvm-ld/llvm-ld.cpp
    llvm/trunk/tools/llvm-upgrade/UpgradeInternals.h
    llvm/trunk/tools/llvmc/llvmc.cpp
    llvm/trunk/utils/PerfectShuffle/PerfectShuffle.cpp
    llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
    llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
    llvm/trunk/utils/TableGen/CodeGenRegisters.h
    llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
    llvm/trunk/utils/TableGen/TGLexer.cpp

Modified: llvm/trunk/include/llvm/ADT/BitVector.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/BitVector.h?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/BitVector.h (original)
+++ llvm/trunk/include/llvm/ADT/BitVector.h Wed Feb 20 05:08:44 2008
@@ -16,8 +16,9 @@
 
 #include "llvm/Support/MathExtras.h"
 #include <algorithm>
-#include <cstdlib>
 #include <cassert>
+#include <cstdlib>
+#include <cstring>
 
 namespace llvm {
 

Modified: llvm/trunk/include/llvm/ADT/DenseMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/DenseMap.h (original)
+++ llvm/trunk/include/llvm/ADT/DenseMap.h Wed Feb 20 05:08:44 2008
@@ -313,7 +313,7 @@
     NumEntries = 0;
     NumTombstones = 0;
     NumBuckets = InitBuckets;
-    assert(InitBuckets && (InitBuckets & InitBuckets-1) == 0 &&
+    assert(InitBuckets && (InitBuckets & (InitBuckets-1)) == 0 &&
            "# initial buckets must be a power of two!");
     Buckets = reinterpret_cast<BucketT*>(new char[sizeof(BucketT)*InitBuckets]);
     // Initialize all the keys to EmptyKey.

Modified: llvm/trunk/include/llvm/ADT/ilist
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ilist?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/ilist (original)
+++ llvm/trunk/include/llvm/ADT/ilist Wed Feb 20 05:08:44 2008
@@ -40,6 +40,7 @@
 
 #include "llvm/ADT/iterator"
 #include <cassert>
+#include <cstdlib>
 
 namespace llvm {
 

Modified: llvm/trunk/include/llvm/Analysis/LoopInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopInfo.h?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopInfo.h Wed Feb 20 05:08:44 2008
@@ -404,13 +404,14 @@
     if (BranchInst *BI = dyn_cast<BranchInst>(BackedgeBlock->getTerminator()))
       if (BI->isConditional()) {
         if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition())) {
-          if (ICI->getOperand(0) == Inc)
+          if (ICI->getOperand(0) == Inc) {
             if (BI->getSuccessor(0) == getHeader()) {
               if (ICI->getPredicate() == ICmpInst::ICMP_NE)
                 return ICI->getOperand(1);
             } else if (ICI->getPredicate() == ICmpInst::ICMP_EQ) {
               return ICI->getOperand(1);
             }
+          }
         }
       }
 

Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h Wed Feb 20 05:08:44 2008
@@ -253,11 +253,12 @@
     virtual bool hasComputableLoopEvolution(const Loop *L) const {
       bool HasVarying = false;
       for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
-        if (!getOperand(i)->isLoopInvariant(L))
+        if (!getOperand(i)->isLoopInvariant(L)) {
           if (getOperand(i)->hasComputableLoopEvolution(L))
             HasVarying = true;
           else
             return false;
+        }
       return HasVarying;
     }
 

Modified: llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h Wed Feb 20 05:08:44 2008
@@ -211,8 +211,8 @@
       // If the first node isn't one we're interested in, advance to one that
       // we are interested in.
       if (op) {
-        if (!ReturnUses && op->isUse() || 
-            !ReturnDefs && op->isDef())
+        if ((!ReturnUses && op->isUse()) ||
+            (!ReturnDefs && op->isDef()))
           ++*this;
       }
     }
@@ -240,8 +240,8 @@
       Op = Op->getNextOperandForReg();
       
       // If this is an operand we don't care about, skip it.
-      while (Op && (!ReturnUses && Op->isUse() || 
-                    !ReturnDefs && Op->isDef()))
+      while (Op && ((!ReturnUses && Op->isUse()) || 
+                    (!ReturnDefs && Op->isDef())))
         Op = Op->getNextOperandForReg();
       
       return *this;

Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Wed Feb 20 05:08:44 2008
@@ -843,8 +843,8 @@
   static inline SDOperand getEmptyKey() { return SDOperand((SDNode*)-1, -1U); }
   static inline SDOperand getTombstoneKey() { return SDOperand((SDNode*)-1, 0);}
   static unsigned getHashValue(const SDOperand &Val) {
-    return (unsigned)((uintptr_t)Val.Val >> 4) ^
-           (unsigned)((uintptr_t)Val.Val >> 9) + Val.ResNo;
+    return ((unsigned)((uintptr_t)Val.Val >> 4) ^
+            (unsigned)((uintptr_t)Val.Val >> 9)) + Val.ResNo;
   }
   static bool isEqual(const SDOperand &LHS, const SDOperand &RHS) {
     return LHS == RHS;

Modified: llvm/trunk/include/llvm/Target/SubtargetFeature.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/SubtargetFeature.h?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Target/SubtargetFeature.h (original)
+++ llvm/trunk/include/llvm/Target/SubtargetFeature.h Wed Feb 20 05:08:44 2008
@@ -21,6 +21,7 @@
 #include <string>
 #include <vector>
 #include <iosfwd>
+#include <cstring>
 #include "llvm/Support/DataTypes.h"
 
 namespace llvm {

Modified: llvm/trunk/include/llvm/Target/TargetJITInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetJITInfo.h?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Target/TargetJITInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetJITInfo.h Wed Feb 20 05:08:44 2008
@@ -17,8 +17,9 @@
 #ifndef LLVM_TARGET_TARGETJITINFO_H
 #define LLVM_TARGET_TARGETJITINFO_H
 
-#include <cassert>
 #include <vector>
+#include <cassert>
+#include "llvm/Support/DataTypes.h"
 
 namespace llvm {
   class Function;

Modified: llvm/trunk/lib/Analysis/Analysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/Analysis.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/Analysis.cpp (original)
+++ llvm/trunk/lib/Analysis/Analysis.cpp Wed Feb 20 05:08:44 2008
@@ -10,6 +10,7 @@
 #include "llvm-c/Analysis.h"
 #include "llvm/Analysis/Verifier.h"
 #include <fstream>
+#include <cstring>
 
 using namespace llvm;
 

Modified: llvm/trunk/lib/Analysis/IPA/Andersens.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/Andersens.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/IPA/Andersens.cpp (original)
+++ llvm/trunk/lib/Analysis/IPA/Andersens.cpp Wed Feb 20 05:08:44 2008
@@ -139,7 +139,7 @@
 
       Constraint(ConstraintType Ty, unsigned D, unsigned S, unsigned O = 0)
         : Type(Ty), Dest(D), Src(S), Offset(O) {
-        assert(Offset == 0 || Ty != AddressOf &&
+        assert((Offset == 0 || Ty != AddressOf) &&
                "Offset is illegal on addressof constraints");
       }
 
@@ -1931,7 +1931,7 @@
 
     C.Src = FindEquivalentNode(RHSNode, RHSLabel);
     C.Dest = FindEquivalentNode(FindNode(LHSNode), LHSLabel);
-    if (C.Src == C.Dest && C.Type == Constraint::Copy
+    if ((C.Src == C.Dest && C.Type == Constraint::Copy)
         || Seen.count(C))
       continue;
 

Modified: llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp (original)
+++ llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp Wed Feb 20 05:08:44 2008
@@ -115,11 +115,12 @@
     /// case the most generic behavior of this function should be returned.
     virtual ModRefBehavior getModRefBehavior(Function *F, CallSite CS,
                                          std::vector<PointerAccessInfo> *Info) {
-      if (FunctionRecord *FR = getFunctionInfo(F))
+      if (FunctionRecord *FR = getFunctionInfo(F)) {
         if (FR->FunctionEffect == 0)
           return DoesNotAccessMemory;
         else if ((FR->FunctionEffect & Mod) == 0)
           return OnlyReadsMemory;
+      }
       return AliasAnalysis::getModRefBehavior(F, CS, Info);
     }
 

Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Wed Feb 20 05:08:44 2008
@@ -2145,13 +2145,14 @@
   Instruction *I = dyn_cast<Instruction>(V);
   if (I == 0 || !L->contains(I->getParent())) return 0;
 
-  if (PHINode *PN = dyn_cast<PHINode>(I))
+  if (PHINode *PN = dyn_cast<PHINode>(I)) {
     if (L->getHeader() == I->getParent())
       return PN;
     else
       // We don't currently keep track of the control flow needed to evaluate
       // PHIs, so we cannot handle PHIs inside of loops.
       return 0;
+  }
 
   // If we won't be able to constant fold this expression even if the operands
   // are constants, return early.

Modified: llvm/trunk/lib/Archive/Archive.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Archive/Archive.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Archive/Archive.cpp (original)
+++ llvm/trunk/lib/Archive/Archive.cpp Wed Feb 20 05:08:44 2008
@@ -18,6 +18,8 @@
 #include "llvm/Module.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/System/Process.h"
+#include <memory>
+#include <cstring>
 using namespace llvm;
 
 // getMemberSize - compute the actual physical size of the file member as seen

Modified: llvm/trunk/lib/Archive/ArchiveInternals.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Archive/ArchiveInternals.h?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Archive/ArchiveInternals.h (original)
+++ llvm/trunk/lib/Archive/ArchiveInternals.h Wed Feb 20 05:08:44 2008
@@ -18,6 +18,8 @@
 #include "llvm/System/TimeValue.h"
 #include "llvm/ADT/StringExtras.h"
 
+#include <cstring>
+
 #define ARFILE_MAGIC "!<arch>\n"                   ///< magic string
 #define ARFILE_MAGIC_LEN (sizeof(ARFILE_MAGIC)-1)  ///< length of magic string
 #define ARFILE_SVR4_SYMTAB_NAME "/               " ///< SVR4 symtab entry name

Modified: llvm/trunk/lib/AsmParser/LLLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLLexer.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/AsmParser/LLLexer.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLLexer.cpp Wed Feb 20 05:08:44 2008
@@ -18,6 +18,8 @@
 
 #include <list>
 #include "llvmAsmParser.h"
+
+#include <cstring>
 using namespace llvm;
 
 //===----------------------------------------------------------------------===//

Modified: llvm/trunk/lib/AsmParser/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/Parser.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/AsmParser/Parser.cpp (original)
+++ llvm/trunk/lib/AsmParser/Parser.cpp Wed Feb 20 05:08:44 2008
@@ -14,6 +14,7 @@
 #include "ParserInternals.h"
 #include "llvm/Module.h"
 #include "llvm/Support/MemoryBuffer.h"
+#include <cstring>
 using namespace llvm;
 
 

Modified: llvm/trunk/lib/Bitcode/Reader/BitReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitReader.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitReader.cpp Wed Feb 20 05:08:44 2008
@@ -11,6 +11,7 @@
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include <string>
+#include <cstring>
 
 using namespace llvm;
 

Modified: llvm/trunk/lib/CodeGen/MachOWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachOWriter.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachOWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachOWriter.cpp Wed Feb 20 05:08:44 2008
@@ -38,6 +38,7 @@
 #include "llvm/Support/OutputBuffer.h"
 #include "llvm/Support/Streams.h"
 #include <algorithm>
+#include <cstring>
 using namespace llvm;
 
 /// AddMachOWriter - Concrete function to add the Mach-O writer to the function

Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Wed Feb 20 05:08:44 2008
@@ -26,7 +26,8 @@
 #include "llvm/System/DynamicLibrary.h"
 #include "llvm/System/Host.h"
 #include "llvm/Target/TargetData.h"
-#include <math.h>
+#include <cmath>
+#include <cstring>
 using namespace llvm;
 
 STATISTIC(NumInitBytes, "Number of bytes of global vars initialized");

Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp Wed Feb 20 05:08:44 2008
@@ -15,6 +15,7 @@
 #include "llvm-c/ExecutionEngine.h"
 #include "llvm/ExecutionEngine/GenericValue.h"
 #include "llvm/ExecutionEngine/ExecutionEngine.h"
+#include <cstring>
 
 using namespace llvm;
 

Modified: llvm/trunk/lib/ExecutionEngine/Interpreter/Execution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/Execution.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Interpreter/Execution.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Interpreter/Execution.cpp Wed Feb 20 05:08:44 2008
@@ -23,8 +23,9 @@
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/MathExtras.h"
-#include <cmath>
 #include <algorithm>
+#include <cmath>
+#include <cstring>
 using namespace llvm;
 
 STATISTIC(NumDynamicInsts, "Number of dynamic instructions executed");

Modified: llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Wed Feb 20 05:08:44 2008
@@ -29,6 +29,7 @@
 #include <csignal>
 #include <map>
 #include <cmath>
+#include <cstring>
 
 #ifdef __linux__
 #include <cxxabi.h>

Modified: llvm/trunk/lib/ExecutionEngine/Interpreter/Interpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/Interpreter.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Interpreter/Interpreter.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Interpreter/Interpreter.cpp Wed Feb 20 05:08:44 2008
@@ -18,6 +18,7 @@
 #include "llvm/DerivedTypes.h"
 #include "llvm/Module.h"
 #include "llvm/ModuleProvider.h"
+#include <cstring>
 using namespace llvm;
 
 static struct RegisterInterp {

Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JITMemoryManager.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/JITMemoryManager.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/JITMemoryManager.cpp Wed Feb 20 05:08:44 2008
@@ -17,6 +17,8 @@
 #include <map>
 #include <vector>
 #include <cassert>
+#include <cstdlib>
+#include <cstring>
 using namespace llvm;
 
 

Modified: llvm/trunk/lib/Support/CommandLine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Support/CommandLine.cpp (original)
+++ llvm/trunk/lib/Support/CommandLine.cpp Wed Feb 20 05:08:44 2008
@@ -29,6 +29,7 @@
 #include <cstdlib>
 #include <cerrno>
 #include <cstring>
+#include <climits>
 using namespace llvm;
 using namespace cl;
 

Modified: llvm/trunk/lib/Support/FileUtilities.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/FileUtilities.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Support/FileUtilities.cpp (original)
+++ llvm/trunk/lib/Support/FileUtilities.cpp Wed Feb 20 05:08:44 2008
@@ -16,6 +16,7 @@
 #include "llvm/System/Path.h"
 #include "llvm/System/MappedFile.h"
 #include "llvm/ADT/StringExtras.h"
+#include <cstdlib>
 #include <cstring>
 #include <cctype>
 using namespace llvm;

Modified: llvm/trunk/lib/Support/FoldingSet.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/FoldingSet.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Support/FoldingSet.cpp (original)
+++ llvm/trunk/lib/Support/FoldingSet.cpp Wed Feb 20 05:08:44 2008
@@ -17,6 +17,7 @@
 #include "llvm/ADT/FoldingSet.h"
 #include "llvm/Support/MathExtras.h"
 #include <cassert>
+#include <cstring>
 using namespace llvm;
 
 //===----------------------------------------------------------------------===//

Modified: llvm/trunk/lib/Support/Statistic.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Statistic.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Support/Statistic.cpp (original)
+++ llvm/trunk/lib/Support/Statistic.cpp Wed Feb 20 05:08:44 2008
@@ -28,6 +28,7 @@
 #include "llvm/ADT/StringExtras.h"
 #include <algorithm>
 #include <ostream>
+#include <cstring>
 using namespace llvm;
 
 // GetLibSupportInfoOutputFile - Return a file stream to print our output on.

Modified: llvm/trunk/lib/Support/StringExtras.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/StringExtras.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Support/StringExtras.cpp (original)
+++ llvm/trunk/lib/Support/StringExtras.cpp Wed Feb 20 05:08:44 2008
@@ -12,6 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/ADT/StringExtras.h"
+#include <cstring>
 using namespace llvm;
 
 /// getToken - This function extracts one token from source, ignoring any

Modified: llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp Wed Feb 20 05:08:44 2008
@@ -31,6 +31,7 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/MathExtras.h"
 #include <cctype>
+#include <cstring>
 using namespace llvm;
 
 STATISTIC(EmittedInsts, "Number of machine instrs printed");

Modified: llvm/trunk/lib/Target/X86/X86JITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86JITInfo.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86JITInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86JITInfo.cpp Wed Feb 20 05:08:44 2008
@@ -18,6 +18,7 @@
 #include "llvm/CodeGen/MachineCodeEmitter.h"
 #include "llvm/Config/alloca.h"
 #include <cstdlib>
+#include <cstring>
 using namespace llvm;
 
 #ifdef _MSC_VER

Modified: llvm/trunk/lib/Transforms/IPO/SimplifyLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/SimplifyLibCalls.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/IPO/SimplifyLibCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/SimplifyLibCalls.cpp Wed Feb 20 05:08:44 2008
@@ -30,6 +30,7 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Transforms/IPO.h"
+#include <cstring>
 using namespace llvm;
 
 /// This statistic keeps track of the total number of library calls that have

Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp Wed Feb 20 05:08:44 2008
@@ -36,8 +36,9 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/IntrinsicInst.h"
-#include <cstdio>
 #include <algorithm>
+#include <climits>
+#include <cstdio>
 using namespace llvm;
 
 STATISTIC(NumCompletelyUnrolled, "Number of loops completely unrolled");

Modified: llvm/trunk/lib/VMCore/AutoUpgrade.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AutoUpgrade.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/AutoUpgrade.cpp (original)
+++ llvm/trunk/lib/VMCore/AutoUpgrade.cpp Wed Feb 20 05:08:44 2008
@@ -18,6 +18,7 @@
 #include "llvm/Instructions.h"
 #include "llvm/ParameterAttributes.h"
 #include "llvm/Intrinsics.h"
+#include <cstring>
 using namespace llvm;
 
 

Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/ConstantFold.cpp (original)
+++ llvm/trunk/lib/VMCore/ConstantFold.cpp Wed Feb 20 05:08:44 2008
@@ -660,25 +660,28 @@
       case Instruction::Xor:
         return ConstantInt::get(C1V ^ C2V);
       case Instruction::Shl:
-        if (uint32_t shiftAmt = C2V.getZExtValue())
+        if (uint32_t shiftAmt = C2V.getZExtValue()) {
           if (shiftAmt < C1V.getBitWidth())
             return ConstantInt::get(C1V.shl(shiftAmt));
           else
             return UndefValue::get(C1->getType()); // too big shift is undef
+        }
         return const_cast<ConstantInt*>(CI1); // Zero shift is identity
       case Instruction::LShr:
-        if (uint32_t shiftAmt = C2V.getZExtValue())
+        if (uint32_t shiftAmt = C2V.getZExtValue()) {
           if (shiftAmt < C1V.getBitWidth())
             return ConstantInt::get(C1V.lshr(shiftAmt));
           else
             return UndefValue::get(C1->getType()); // too big shift is undef
+        }
         return const_cast<ConstantInt*>(CI1); // Zero shift is identity
       case Instruction::AShr:
-        if (uint32_t shiftAmt = C2V.getZExtValue())
+        if (uint32_t shiftAmt = C2V.getZExtValue()) {
           if (shiftAmt < C1V.getBitWidth())
             return ConstantInt::get(C1V.ashr(shiftAmt));
           else
             return UndefValue::get(C1->getType()); // too big shift is undef
+        }
         return const_cast<ConstantInt*>(CI1); // Zero shift is identity
       }
     }
@@ -1083,18 +1086,20 @@
             // Ok, we ran out of things they have in common.  If any leftovers
             // are non-zero then we have a difference, otherwise we are equal.
             for (; i < CE1->getNumOperands(); ++i)
-              if (!CE1->getOperand(i)->isNullValue())
+              if (!CE1->getOperand(i)->isNullValue()) {
                 if (isa<ConstantInt>(CE1->getOperand(i)))
                   return isSigned ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT;
                 else
                   return ICmpInst::BAD_ICMP_PREDICATE; // Might be equal.
+              }
 
             for (; i < CE2->getNumOperands(); ++i)
-              if (!CE2->getOperand(i)->isNullValue())
+              if (!CE2->getOperand(i)->isNullValue()) {
                 if (isa<ConstantInt>(CE2->getOperand(i)))
                   return isSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT;
                 else
                   return ICmpInst::BAD_ICMP_PREDICATE; // Might be equal.
+              }
             return ICmpInst::ICMP_EQ;
           }
         }
@@ -1123,20 +1128,22 @@
   if (C1->isNullValue()) {
     if (const GlobalValue *GV = dyn_cast<GlobalValue>(C2))
       // Don't try to evaluate aliases.  External weak GV can be null.
-      if (!isa<GlobalAlias>(GV) && !GV->hasExternalWeakLinkage())
+      if (!isa<GlobalAlias>(GV) && !GV->hasExternalWeakLinkage()) {
         if (pred == ICmpInst::ICMP_EQ)
           return ConstantInt::getFalse();
         else if (pred == ICmpInst::ICMP_NE)
           return ConstantInt::getTrue();
+      }
   // icmp eq/ne(GV,null) -> false/true
   } else if (C2->isNullValue()) {
     if (const GlobalValue *GV = dyn_cast<GlobalValue>(C1))
       // Don't try to evaluate aliases.  External weak GV can be null.
-      if (!isa<GlobalAlias>(GV) && !GV->hasExternalWeakLinkage())
+      if (!isa<GlobalAlias>(GV) && !GV->hasExternalWeakLinkage()) {
         if (pred == ICmpInst::ICMP_EQ)
           return ConstantInt::getFalse();
         else if (pred == ICmpInst::ICMP_NE)
           return ConstantInt::getTrue();
+      }
   }
 
   if (isa<ConstantInt>(C1) && isa<ConstantInt>(C2)) {

Modified: llvm/trunk/lib/VMCore/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Core.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Core.cpp (original)
+++ llvm/trunk/lib/VMCore/Core.cpp Wed Feb 20 05:08:44 2008
@@ -22,6 +22,7 @@
 #include "llvm/Support/MemoryBuffer.h"
 #include <cassert>
 #include <cstdlib>
+#include <cstring>
 
 using namespace llvm;
 

Modified: llvm/trunk/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Wed Feb 20 05:08:44 2008
@@ -186,11 +186,12 @@
 ///
 Value *PHINode::hasConstantValue(bool AllowNonDominatingInstruction) const {
   // If the PHI node only has one incoming value, eliminate the PHI node...
-  if (getNumIncomingValues() == 1)
+  if (getNumIncomingValues() == 1) {
     if (getIncomingValue(0) != this)   // not  X = phi X
       return getIncomingValue(0);
     else
       return UndefValue::get(getType());  // Self cycle is dead.
+  }
       
   // Otherwise if all of the incoming values are the same for the PHI, replace
   // the PHI node with the incoming value.
@@ -198,13 +199,14 @@
   Value *InVal = 0;
   bool HasUndefInput = false;
   for (unsigned i = 0, e = getNumIncomingValues(); i != e; ++i)
-    if (isa<UndefValue>(getIncomingValue(i)))
+    if (isa<UndefValue>(getIncomingValue(i))) {
       HasUndefInput = true;
-    else if (getIncomingValue(i) != this)  // Not the PHI node itself...
+    } else if (getIncomingValue(i) != this) { // Not the PHI node itself...
       if (InVal && getIncomingValue(i) != InVal)
         return 0;  // Not the same, bail out.
       else
         InVal = getIncomingValue(i);
+    }
   
   // The only case that could cause InVal to be null is if we have a PHI node
   // that only has entries for itself.  In this case, there is no entry into the
@@ -451,8 +453,8 @@
     cast<FunctionType>(cast<PointerType>(Fn->getType())->getElementType());
   FTy = FTy;  // silence warning.
 
-  assert((NumArgs == FTy->getNumParams()) ||
-         (FTy->isVarArg() && NumArgs > FTy->getNumParams()) &&
+  assert(((NumArgs == FTy->getNumParams()) ||
+          (FTy->isVarArg() && NumArgs > FTy->getNumParams())) &&
          "Calling a function with bad signature");
 
   for (unsigned i = 0, e = NumArgs; i != e; i++) {
@@ -1037,12 +1039,13 @@
   if (!isa<PointerType>(Ptr)) return 0;   // Type isn't a pointer type!
 
   // Handle the special case of the empty set index set...
-  if (NumIdx == 0)
+  if (NumIdx == 0) {
     if (AllowCompositeLeaf ||
         cast<PointerType>(Ptr)->getElementType()->isFirstClassType())
       return cast<PointerType>(Ptr)->getElementType();
     else
       return 0;
+  }
 
   unsigned CurIdx = 0;
   while (const CompositeType *CT = dyn_cast<CompositeType>(Ptr)) {
@@ -2329,7 +2332,7 @@
     assert(Op0Ty == Op1Ty &&
           "Both operands to ICmp instruction are not of the same type!");
     // Check that the operands are the right type
-    assert(Op0Ty->isInteger() || isa<PointerType>(Op0Ty) &&
+    assert((Op0Ty->isInteger() || isa<PointerType>(Op0Ty)) &&
            "Invalid operand types for ICmp instruction");
     return;
   }

Modified: llvm/trunk/lib/VMCore/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Value.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Value.cpp (original)
+++ llvm/trunk/lib/VMCore/Value.cpp Wed Feb 20 05:08:44 2008
@@ -307,7 +307,7 @@
 void User::replaceUsesOfWith(Value *From, Value *To) {
   if (From == To) return;   // Duh what?
 
-  assert(!isa<Constant>(this) || isa<GlobalValue>(this) &&
+  assert((!isa<Constant>(this) || isa<GlobalValue>(this)) &&
          "Cannot call User::replaceUsesofWith on a constant!");
 
   for (unsigned i = 0, E = getNumOperands(); i != E; ++i)

Modified: llvm/trunk/tools/llvm-ld/llvm-ld.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ld/llvm-ld.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/tools/llvm-ld/llvm-ld.cpp (original)
+++ llvm/trunk/tools/llvm-ld/llvm-ld.cpp Wed Feb 20 05:08:44 2008
@@ -38,6 +38,7 @@
 #include "llvm/System/Signals.h"
 #include <fstream>
 #include <memory>
+#include <cstring>
 using namespace llvm;
 
 // Input/Output Options

Modified: llvm/trunk/tools/llvm-upgrade/UpgradeInternals.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-upgrade/UpgradeInternals.h?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/tools/llvm-upgrade/UpgradeInternals.h (original)
+++ llvm/trunk/tools/llvm-upgrade/UpgradeInternals.h Wed Feb 20 05:08:44 2008
@@ -22,7 +22,7 @@
 #include "llvm/ADT/StringExtras.h"
 #include <list>
 #include <iostream>
-
+#include <cstring>
 
 // Global variables exported from the lexer.
 extern int yydebug;

Modified: llvm/trunk/tools/llvmc/llvmc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/llvmc.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/tools/llvmc/llvmc.cpp (original)
+++ llvm/trunk/tools/llvmc/llvmc.cpp Wed Feb 20 05:08:44 2008
@@ -21,6 +21,7 @@
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/System/Signals.h"
 #include <iostream>
+#include <cstring>
 using namespace llvm;
 
 //===----------------------------------------------------------------------===//

Modified: llvm/trunk/utils/PerfectShuffle/PerfectShuffle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/PerfectShuffle/PerfectShuffle.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/utils/PerfectShuffle/PerfectShuffle.cpp (original)
+++ llvm/trunk/utils/PerfectShuffle/PerfectShuffle.cpp Wed Feb 20 05:08:44 2008
@@ -17,7 +17,7 @@
 #include <iostream>
 #include <vector>
 #include <cassert>
-
+#include <cstdlib>
 struct Operator;
 
 // Masks are 4-nibble hex numbers.  Values 0-7 in any nibble means that it takes

Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Wed Feb 20 05:08:44 2008
@@ -242,11 +242,12 @@
 
   unsigned MismatchOperand = ~0U;
   for (unsigned i = 0, e = Operands.size(); i != e; ++i) {
-    if (Operands[i] != Other.Operands[i])
+    if (Operands[i] != Other.Operands[i]) {
       if (MismatchOperand != ~0U)  // Already have one mismatch?
         return ~1U;
       else
         MismatchOperand = i;
+    }
   }
   return MismatchOperand;
 }

Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Wed Feb 20 05:08:44 2008
@@ -1342,14 +1342,14 @@
         while (TPN->ApplyTypeConstraints(P, false))
           /* Resolve all types */;
       
-        if (TPN->ContainsUnresolvedType())
+        if (TPN->ContainsUnresolvedType()) {
           if (iter == 0)
             throw "Value #" + utostr(i) + " of PredicateOperand '" +
               DefaultOps[iter][i]->getName() + "' doesn't have a concrete type!";
           else
             throw "Value #" + utostr(i) + " of OptionalDefOperand '" +
               DefaultOps[iter][i]->getName() + "' doesn't have a concrete type!";
-      
+        }
         DefaultOpInfo.DefaultOps.push_back(TPN);
       }
 

Modified: llvm/trunk/utils/TableGen/CodeGenRegisters.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenRegisters.h?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenRegisters.h (original)
+++ llvm/trunk/utils/TableGen/CodeGenRegisters.h Wed Feb 20 05:08:44 2008
@@ -15,9 +15,10 @@
 #ifndef CODEGEN_REGISTERS_H
 #define CODEGEN_REGISTERS_H
 
+#include "llvm/CodeGen/ValueTypes.h"
 #include <string>
 #include <vector>
-#include "llvm/CodeGen/ValueTypes.h"
+#include <cstdlib>
 
 namespace llvm {
   class Record;

Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Wed Feb 20 05:08:44 2008
@@ -1123,7 +1123,7 @@
           Code += "), 0";
         emitCode(Code2 + Code + ");");
 
-        if (NodeHasChain)
+        if (NodeHasChain) {
           // Remember which op produces the chain.
           if (!isRoot)
             emitCode(ChainName + " = SDOperand(" + NodeName +
@@ -1131,6 +1131,7 @@
           else
             emitCode(ChainName + " = SDOperand(" + NodeName +
                      ", " + utostr(NumResults+NumDstRegs) + ");");
+        }
 
         if (!isRoot) {
           NodeOps.push_back("Tmp" + utostr(ResNo));

Modified: llvm/trunk/utils/TableGen/TGLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/TGLexer.cpp?rev=47367&r1=47366&r2=47367&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/TGLexer.cpp (original)
+++ llvm/trunk/utils/TableGen/TGLexer.cpp Wed Feb 20 05:08:44 2008
@@ -17,6 +17,8 @@
 #include <ostream>
 #include "llvm/Config/config.h"
 #include <cctype>
+#include <cstdlib>
+#include <cstring>
 using namespace llvm;
 
 TGLexer::TGLexer(MemoryBuffer *StartBuf) : CurLineNo(1), CurBuf(StartBuf) {





More information about the llvm-commits mailing list