[llvm-commits] [support] r39957 - in /support/trunk: include/llvm/ADT/ include/llvm/Config/ include/llvm/Support/ include/llvm/System/ lib/Support/ lib/System/ lib/System/Unix/ lib/System/Win32/

Reid Spencer rspencer at reidspencer.com
Mon Jul 16 21:50:11 PDT 2007


Author: reid
Date: Mon Jul 16 23:50:10 2007
New Revision: 39957

URL: http://llvm.org/viewvc/llvm-project?rev=39957&view=rev
Log:
Copy the Ssystem, ADT, and Support headers and implementations from the 
corresponding locations in the llvm module to the support modules. Everything
built correctly with the exception of APInt which depended on an LLVM 
header file. It was changed to not do that.

Added:
    support/trunk/include/llvm/ADT/APInt.h
      - copied, changed from r39951, llvm/trunk/include/llvm/ADT/APInt.h
    support/trunk/include/llvm/ADT/APSInt.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/APSInt.h
    support/trunk/include/llvm/ADT/BitVector.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/BitVector.h
    support/trunk/include/llvm/ADT/DenseMap.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/DenseMap.h
    support/trunk/include/llvm/ADT/DepthFirstIterator.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/DepthFirstIterator.h
    support/trunk/include/llvm/ADT/EquivalenceClasses.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/EquivalenceClasses.h
    support/trunk/include/llvm/ADT/FoldingSet.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/FoldingSet.h
    support/trunk/include/llvm/ADT/GraphTraits.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/GraphTraits.h
    support/trunk/include/llvm/ADT/HashExtras.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/HashExtras.h
    support/trunk/include/llvm/ADT/IndexedMap.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/IndexedMap.h
    support/trunk/include/llvm/ADT/PostOrderIterator.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/PostOrderIterator.h
    support/trunk/include/llvm/ADT/SCCIterator.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/SCCIterator.h
    support/trunk/include/llvm/ADT/STLExtras.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/STLExtras.h
    support/trunk/include/llvm/ADT/SetOperations.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/SetOperations.h
    support/trunk/include/llvm/ADT/SetVector.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/SetVector.h
    support/trunk/include/llvm/ADT/SmallPtrSet.h
      - copied unchanged from r39952, llvm/trunk/include/llvm/ADT/SmallPtrSet.h
    support/trunk/include/llvm/ADT/SmallSet.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/SmallSet.h
    support/trunk/include/llvm/ADT/SmallString.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/SmallString.h
    support/trunk/include/llvm/ADT/SmallVector.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/SmallVector.h
    support/trunk/include/llvm/ADT/Statistic.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/Statistic.h
    support/trunk/include/llvm/ADT/StringExtras.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/StringExtras.h
    support/trunk/include/llvm/ADT/StringMap.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/StringMap.h
    support/trunk/include/llvm/ADT/Tree.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/Tree.h
    support/trunk/include/llvm/ADT/UniqueVector.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/UniqueVector.h
    support/trunk/include/llvm/ADT/VectorExtras.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/ADT/VectorExtras.h
    support/trunk/include/llvm/Config/alloca.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Config/alloca.h
    support/trunk/include/llvm/Support/AIXDataTypesFix.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/AIXDataTypesFix.h
    support/trunk/include/llvm/Support/Allocator.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/Allocator.h
    support/trunk/include/llvm/Support/Annotation.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/Annotation.h
    support/trunk/include/llvm/Support/CFG.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/CFG.h
    support/trunk/include/llvm/Support/CallSite.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/CallSite.h
    support/trunk/include/llvm/Support/Casting.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/Casting.h
    support/trunk/include/llvm/Support/CommandLine.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/CommandLine.h
    support/trunk/include/llvm/Support/Compiler.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/Compiler.h
    support/trunk/include/llvm/Support/ConstantRange.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/ConstantRange.h
    support/trunk/include/llvm/Support/DOTGraphTraits.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/DOTGraphTraits.h
    support/trunk/include/llvm/Support/Debug.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/Debug.h
    support/trunk/include/llvm/Support/Dwarf.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/Dwarf.h
    support/trunk/include/llvm/Support/DynamicLinker.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/DynamicLinker.h
    support/trunk/include/llvm/Support/ELF.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/ELF.h
    support/trunk/include/llvm/Support/FileUtilities.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/FileUtilities.h
    support/trunk/include/llvm/Support/GetElementPtrTypeIterator.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/GetElementPtrTypeIterator.h
    support/trunk/include/llvm/Support/GraphWriter.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/GraphWriter.h
    support/trunk/include/llvm/Support/InstIterator.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/InstIterator.h
    support/trunk/include/llvm/Support/InstVisitor.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/InstVisitor.h
    support/trunk/include/llvm/Support/LLVMBuilder.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/LLVMBuilder.h
    support/trunk/include/llvm/Support/LeakDetector.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/LeakDetector.h
    support/trunk/include/llvm/Support/ManagedStatic.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/ManagedStatic.h
    support/trunk/include/llvm/Support/Mangler.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/Mangler.h
    support/trunk/include/llvm/Support/MathExtras.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/MathExtras.h
    support/trunk/include/llvm/Support/MemoryBuffer.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/MemoryBuffer.h
    support/trunk/include/llvm/Support/MutexGuard.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/MutexGuard.h
    support/trunk/include/llvm/Support/OutputBuffer.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/OutputBuffer.h
    support/trunk/include/llvm/Support/PassNameParser.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/PassNameParser.h
    support/trunk/include/llvm/Support/PatternMatch.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/PatternMatch.h
    support/trunk/include/llvm/Support/PluginLoader.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/PluginLoader.h
    support/trunk/include/llvm/Support/SlowOperationInformer.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/SlowOperationInformer.h
    support/trunk/include/llvm/Support/StableBasicBlockNumbering.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/StableBasicBlockNumbering.h
    support/trunk/include/llvm/Support/Streams.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/Streams.h
    support/trunk/include/llvm/Support/SystemUtils.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/SystemUtils.h
    support/trunk/include/llvm/Support/Timer.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/Timer.h
    support/trunk/include/llvm/Support/TypeInfo.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/TypeInfo.h
    support/trunk/include/llvm/Support/type_traits.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/Support/type_traits.h
    support/trunk/include/llvm/System/Alarm.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/System/Alarm.h
    support/trunk/include/llvm/System/Disassembler.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/System/Disassembler.h
    support/trunk/include/llvm/System/DynamicLibrary.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/System/DynamicLibrary.h
    support/trunk/include/llvm/System/IncludeFile.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/System/IncludeFile.h
    support/trunk/include/llvm/System/LICENSE.TXT
      - copied unchanged from r39951, llvm/trunk/include/llvm/System/LICENSE.TXT
    support/trunk/include/llvm/System/MappedFile.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/System/MappedFile.h
    support/trunk/include/llvm/System/Memory.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/System/Memory.h
    support/trunk/include/llvm/System/Mutex.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/System/Mutex.h
    support/trunk/include/llvm/System/Path.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/System/Path.h
    support/trunk/include/llvm/System/Process.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/System/Process.h
    support/trunk/include/llvm/System/Program.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/System/Program.h
    support/trunk/include/llvm/System/Signals.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/System/Signals.h
    support/trunk/include/llvm/System/TimeValue.h
      - copied unchanged from r39951, llvm/trunk/include/llvm/System/TimeValue.h
    support/trunk/lib/Support/APInt.cpp
      - copied, changed from r39951, llvm/trunk/lib/Support/APInt.cpp
    support/trunk/lib/Support/Allocator.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/Allocator.cpp
    support/trunk/lib/Support/Annotation.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/Annotation.cpp
    support/trunk/lib/Support/CommandLine.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/CommandLine.cpp
    support/trunk/lib/Support/ConstantRange.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/ConstantRange.cpp
    support/trunk/lib/Support/Debug.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/Debug.cpp
    support/trunk/lib/Support/Dwarf.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/Dwarf.cpp
    support/trunk/lib/Support/FileUtilities.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/FileUtilities.cpp
    support/trunk/lib/Support/FoldingSet.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/FoldingSet.cpp
    support/trunk/lib/Support/GraphWriter.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/GraphWriter.cpp
    support/trunk/lib/Support/IsInf.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/IsInf.cpp
    support/trunk/lib/Support/IsNAN.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/IsNAN.cpp
    support/trunk/lib/Support/ManagedStatic.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/ManagedStatic.cpp
    support/trunk/lib/Support/MemoryBuffer.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/MemoryBuffer.cpp
    support/trunk/lib/Support/PluginLoader.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/PluginLoader.cpp
    support/trunk/lib/Support/SlowOperationInformer.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/SlowOperationInformer.cpp
    support/trunk/lib/Support/SmallPtrSet.cpp
      - copied unchanged from r39952, llvm/trunk/lib/Support/SmallPtrSet.cpp
    support/trunk/lib/Support/Statistic.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/Statistic.cpp
    support/trunk/lib/Support/Streams.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/Streams.cpp
    support/trunk/lib/Support/StringExtras.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/StringExtras.cpp
    support/trunk/lib/Support/StringMap.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/StringMap.cpp
    support/trunk/lib/Support/SystemUtils.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/SystemUtils.cpp
    support/trunk/lib/Support/Timer.cpp
      - copied unchanged from r39951, llvm/trunk/lib/Support/Timer.cpp
    support/trunk/lib/System/Alarm.cpp
      - copied unchanged from r39951, llvm/trunk/lib/System/Alarm.cpp
    support/trunk/lib/System/Disassembler.cpp
      - copied unchanged from r39951, llvm/trunk/lib/System/Disassembler.cpp
    support/trunk/lib/System/DynamicLibrary.cpp
      - copied unchanged from r39951, llvm/trunk/lib/System/DynamicLibrary.cpp
    support/trunk/lib/System/IncludeFile.cpp
      - copied unchanged from r39951, llvm/trunk/lib/System/IncludeFile.cpp
    support/trunk/lib/System/LICENSE.TXT
      - copied unchanged from r39951, llvm/trunk/lib/System/LICENSE.TXT
    support/trunk/lib/System/MappedFile.cpp
      - copied unchanged from r39951, llvm/trunk/lib/System/MappedFile.cpp
    support/trunk/lib/System/Memory.cpp
      - copied unchanged from r39951, llvm/trunk/lib/System/Memory.cpp
    support/trunk/lib/System/Mutex.cpp
      - copied unchanged from r39951, llvm/trunk/lib/System/Mutex.cpp
    support/trunk/lib/System/Path.cpp
      - copied unchanged from r39951, llvm/trunk/lib/System/Path.cpp
    support/trunk/lib/System/Process.cpp
      - copied unchanged from r39951, llvm/trunk/lib/System/Process.cpp
    support/trunk/lib/System/Program.cpp
      - copied unchanged from r39951, llvm/trunk/lib/System/Program.cpp
    support/trunk/lib/System/README.txt
      - copied unchanged from r39951, llvm/trunk/lib/System/README.txt
    support/trunk/lib/System/Signals.cpp
      - copied unchanged from r39951, llvm/trunk/lib/System/Signals.cpp
    support/trunk/lib/System/TimeValue.cpp
      - copied unchanged from r39951, llvm/trunk/lib/System/TimeValue.cpp
    support/trunk/lib/System/Unix/
      - copied from r39951, llvm/trunk/lib/System/Unix/
    support/trunk/lib/System/Win32/
      - copied from r39951, llvm/trunk/lib/System/Win32/
    support/trunk/lib/System/ltdl.c
      - copied unchanged from r39951, llvm/trunk/lib/System/ltdl.c
    support/trunk/lib/System/ltdl.h
      - copied unchanged from r39951, llvm/trunk/lib/System/ltdl.h

Copied: support/trunk/include/llvm/ADT/APInt.h (from r39951, llvm/trunk/include/llvm/ADT/APInt.h)
URL: http://llvm.org/viewvc/llvm-project/support/trunk/include/llvm/ADT/APInt.h?p2=support/trunk/include/llvm/ADT/APInt.h&p1=llvm/trunk/include/llvm/ADT/APInt.h&r1=39951&r2=39957&rev=39957&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/APInt.h (original)
+++ support/trunk/include/llvm/ADT/APInt.h Mon Jul 16 23:50:10 2007
@@ -52,6 +52,11 @@
 ///
 /// @brief Class for arbitrary precision integers.
 class APInt {
+  /// This enum is just used to hold constants we need for IntegerType.
+  enum {
+    MIN_INT_BITS = 1,     ///< Minimum number of bits that can be specified
+    MAX_INT_BITS = ~0U    ///< Maximum number of bits that can be specified
+  };
 
   uint32_t BitWidth;      ///< The number of bits in this APInt.
 

Copied: support/trunk/lib/Support/APInt.cpp (from r39951, llvm/trunk/lib/Support/APInt.cpp)
URL: http://llvm.org/viewvc/llvm-project/support/trunk/lib/Support/APInt.cpp?p2=support/trunk/lib/Support/APInt.cpp&p1=llvm/trunk/lib/Support/APInt.cpp&r1=39951&r2=39957&rev=39957&view=diff

==============================================================================
--- llvm/trunk/lib/Support/APInt.cpp (original)
+++ support/trunk/lib/Support/APInt.cpp Mon Jul 16 23:50:10 2007
@@ -14,7 +14,6 @@
 
 #define DEBUG_TYPE "apint"
 #include "llvm/ADT/APInt.h"
-#include "llvm/DerivedTypes.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/MathExtras.h"
 #include <math.h>
@@ -46,8 +45,8 @@
 
 APInt::APInt(uint32_t numBits, uint64_t val, bool isSigned) 
   : BitWidth(numBits), VAL(0) {
-  assert(BitWidth >= IntegerType::MIN_INT_BITS && "bitwidth too small");
-  assert(BitWidth <= IntegerType::MAX_INT_BITS && "bitwidth too large");
+  assert(BitWidth >= MIN_INT_BITS && "bitwidth too small");
+  assert(BitWidth <= MAX_INT_BITS && "bitwidth too large");
   if (isSingleWord())
     VAL = val;
   else {
@@ -62,8 +61,8 @@
 
 APInt::APInt(uint32_t numBits, uint32_t numWords, uint64_t bigVal[])
   : BitWidth(numBits), VAL(0)  {
-  assert(BitWidth >= IntegerType::MIN_INT_BITS && "bitwidth too small");
-  assert(BitWidth <= IntegerType::MAX_INT_BITS && "bitwidth too large");
+  assert(BitWidth >= MIN_INT_BITS && "bitwidth too small");
+  assert(BitWidth <= MAX_INT_BITS && "bitwidth too large");
   assert(bigVal && "Null pointer detected!");
   if (isSingleWord())
     VAL = bigVal[0];
@@ -82,23 +81,23 @@
 APInt::APInt(uint32_t numbits, const char StrStart[], uint32_t slen, 
              uint8_t radix) 
   : BitWidth(numbits), VAL(0) {
-  assert(BitWidth >= IntegerType::MIN_INT_BITS && "bitwidth too small");
-  assert(BitWidth <= IntegerType::MAX_INT_BITS && "bitwidth too large");
+  assert(BitWidth >= MIN_INT_BITS && "bitwidth too small");
+  assert(BitWidth <= MAX_INT_BITS && "bitwidth too large");
   fromString(numbits, StrStart, slen, radix);
 }
 
 APInt::APInt(uint32_t numbits, const std::string& Val, uint8_t radix)
   : BitWidth(numbits), VAL(0) {
-  assert(BitWidth >= IntegerType::MIN_INT_BITS && "bitwidth too small");
-  assert(BitWidth <= IntegerType::MAX_INT_BITS && "bitwidth too large");
+  assert(BitWidth >= MIN_INT_BITS && "bitwidth too small");
+  assert(BitWidth <= MAX_INT_BITS && "bitwidth too large");
   assert(!Val.empty() && "String empty?");
   fromString(numbits, Val.c_str(), Val.size(), radix);
 }
 
 APInt::APInt(const APInt& that)
   : BitWidth(that.BitWidth), VAL(0) {
-  assert(BitWidth >= IntegerType::MIN_INT_BITS && "bitwidth too small");
-  assert(BitWidth <= IntegerType::MAX_INT_BITS && "bitwidth too large");
+  assert(BitWidth >= MIN_INT_BITS && "bitwidth too small");
+  assert(BitWidth <= MAX_INT_BITS && "bitwidth too large");
   if (isSingleWord()) 
     VAL = that.VAL;
   else {
@@ -945,7 +944,7 @@
 // Truncate to new width.
 APInt &APInt::trunc(uint32_t width) {
   assert(width < BitWidth && "Invalid APInt Truncate request");
-  assert(width >= IntegerType::MIN_INT_BITS && "Can't truncate to 0 bits");
+  assert(width >= MIN_INT_BITS && "Can't truncate to 0 bits");
   uint32_t wordsBefore = getNumWords();
   BitWidth = width;
   uint32_t wordsAfter = getNumWords();
@@ -968,7 +967,7 @@
 // Sign extend to a new width.
 APInt &APInt::sext(uint32_t width) {
   assert(width > BitWidth && "Invalid APInt SignExtend request");
-  assert(width <= IntegerType::MAX_INT_BITS && "Too many bits");
+  assert(width <= MAX_INT_BITS && "Too many bits");
   // If the sign bit isn't set, this is the same as zext.
   if (!isNegative()) {
     zext(width);
@@ -1016,7 +1015,7 @@
 //  Zero extend to a new width.
 APInt &APInt::zext(uint32_t width) {
   assert(width > BitWidth && "Invalid APInt ZeroExtend request");
-  assert(width <= IntegerType::MAX_INT_BITS && "Too many bits");
+  assert(width <= MAX_INT_BITS && "Too many bits");
   uint32_t wordsBefore = getNumWords();
   BitWidth = width;
   uint32_t wordsAfter = getNumWords();





More information about the llvm-commits mailing list