[llvm-commits] [llvm-gcc-4.2] r40428 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Duncan Sands baldrick at free.fr
Mon Jul 23 01:18:47 PDT 2007


Author: baldrick
Date: Mon Jul 23 03:18:47 2007
New Revision: 40428

URL: http://llvm.org/viewvc/llvm-project?rev=40428&view=rev
Log:
Forward port of r40427.

Cleanup fallout from the elimination of signed and unsigned
types in LLVM.

Modified:
    llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=40428&r1=40427&r2=40428&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon Jul 23 03:18:47 2007
@@ -5536,27 +5536,15 @@
   
   std::vector<Constant*> Elts;
   if (ElTy == Type::Int8Ty) {
-    const signed char *InStr = (const signed char *)TREE_STRING_POINTER(exp);
-    for (unsigned i = 0; i != Len; ++i)
-      Elts.push_back(ConstantInt::get(Type::Int8Ty, InStr[i]));
-  } else if (ElTy == Type::Int8Ty) {
     const unsigned char *InStr =(const unsigned char *)TREE_STRING_POINTER(exp);
     for (unsigned i = 0; i != Len; ++i)
       Elts.push_back(ConstantInt::get(Type::Int8Ty, InStr[i]));
   } else if (ElTy == Type::Int16Ty) {
-    const signed short *InStr = (const signed short *)TREE_STRING_POINTER(exp);
-    for (unsigned i = 0; i != Len; ++i)
-      Elts.push_back(ConstantInt::get(Type::Int16Ty, InStr[i]));
-  } else if (ElTy == Type::Int16Ty) {
     const unsigned short *InStr =
       (const unsigned short *)TREE_STRING_POINTER(exp);
     for (unsigned i = 0; i != Len; ++i)
       Elts.push_back(ConstantInt::get(Type::Int16Ty, InStr[i]));
   } else if (ElTy == Type::Int32Ty) {
-    const signed *InStr = (const signed *)TREE_STRING_POINTER(exp);
-    for (unsigned i = 0; i != Len; ++i)
-      Elts.push_back(ConstantInt::get(Type::Int32Ty, InStr[i]));
-  } else if (ElTy == Type::Int32Ty) {
     const unsigned *InStr = (const unsigned *)TREE_STRING_POINTER(exp);
     for (unsigned i = 0; i != Len; ++i)
       Elts.push_back(ConstantInt::get(Type::Int32Ty, InStr[i]));





More information about the llvm-commits mailing list