[Lldb-commits] [lldb] r138136 - in /lldb/tags/lldb-74: llvm.zip scripts/build-llvm.pl scripts/llvm.isreg.diff scripts/llvm.operand-leak.diff test/lang/c/function_types/TestFunctionTypes.py

Sean Callanan scallanan at apple.com
Fri Aug 19 16:10:19 PDT 2011


Author: spyffe
Date: Fri Aug 19 18:10:19 2011
New Revision: 138136

URL: http://llvm.org/viewvc/llvm-project?rev=138136&view=rev
Log:
Added the patches necessary to stabilize the ARM
disassembler to lldb-74.

Added:
    lldb/tags/lldb-74/scripts/llvm.isreg.diff
    lldb/tags/lldb-74/scripts/llvm.operand-leak.diff
Modified:
    lldb/tags/lldb-74/llvm.zip
    lldb/tags/lldb-74/scripts/build-llvm.pl
    lldb/tags/lldb-74/test/lang/c/function_types/TestFunctionTypes.py

Modified: lldb/tags/lldb-74/llvm.zip
URL: http://llvm.org/viewvc/llvm-project/lldb/tags/lldb-74/llvm.zip?rev=138136&r1=138135&r2=138136&view=diff
==============================================================================
Binary files - no diff available.

Modified: lldb/tags/lldb-74/scripts/build-llvm.pl
URL: http://llvm.org/viewvc/llvm-project/lldb/tags/lldb-74/scripts/build-llvm.pl?rev=138136&r1=138135&r2=138136&view=diff
==============================================================================
--- lldb/tags/lldb-74/scripts/build-llvm.pl (original)
+++ lldb/tags/lldb-74/scripts/build-llvm.pl Fri Aug 19 18:10:19 2011
@@ -22,7 +22,9 @@
 
 our $llvm_configuration = $ENV{LLVM_CONFIGURATION};
 
-our $llvm_revision = "137311";
+our $llvm_revision = "137143";
+our $clang_revision = "137143";
+
 our $llvm_source_dir = "$ENV{SRCROOT}";
 our @archs = split (/\s+/, $ENV{ARCHS});
 
@@ -139,22 +141,31 @@
 sub build_llvm
 {
 	#my $extra_svn_options = $debug ? "" : "--quiet";
-	my $svn_options = "--quiet --revision $llvm_revision";
+	my $svn_options = "--quiet";
 	if (-d "$llvm_source_dir/llvm")
 	{
 		print "Using existing llvm sources in: '$llvm_source_dir/llvm'\n";
 		# print "Updating llvm to revision $llvm_revision\n";
-		# do_command ("cd '$llvm_source_dir/llvm' && svn update $svn_options", "updating llvm from repository", 1);
+		# do_command ("cd '$llvm_source_dir/llvm' && svn update $svn_options --revision $llvm_revision", "updating llvm from repository", 1);
 		# print "Updating clang to revision $llvm_revision\n";
-		# do_command ("cd '$llvm_source_dir/llvm/tools/clang' && svn update $svn_options", "updating clang from repository", 1);
+		# do_command ("cd '$llvm_source_dir/llvm/tools/clang' && svn update $svn_options --revision $clang_revision", "updating clang from repository", 1);
 	}
 	else
 	{
 		print "Checking out llvm sources from revision $llvm_revision...\n";
-		do_command ("cd '$llvm_source_dir' && svn co $svn_options http://llvm.org/svn/llvm-project/llvm/trunk llvm", "checking out llvm from repository", 1); 
-		print "Checking out clang sources from revision $llvm_revision...\n";
-		do_command ("cd '$llvm_source_dir/llvm/tools' && svn co $svn_options http://llvm.org/svn/llvm-project/cfe/trunk clang", "checking out clang from repository", 1);
-		print "Removing the llvm/test directory...\n";
+		do_command ("cd '$llvm_source_dir' && svn co $svn_options --revision $llvm_revision http://llvm.org/svn/llvm-project/llvm/trunk llvm", "checking out llvm from repository", 1); 
+		print "Checking out clang sources from revision $clang_revision...\n";
+		do_command ("cd '$llvm_source_dir/llvm/tools' && svn co $svn_options --revision $clang_revision http://llvm.org/svn/llvm-project/cfe/trunk clang", "checking out clang from repository", 1);
+        print "Applying any local patches to LLVM...";
+        
+        my @llvm_patches = bsd_glob("$ENV{SRCROOT}/scripts/llvm.*.diff");
+        
+        foreach my $patch (@llvm_patches)
+        {
+            do_command ("cd '$llvm_source_dir/llvm' && patch -p0 < $patch");
+        }
+		
+        print "Removing the llvm/test directory...\n";
 		do_command ("cd '$llvm_source_dir' && rm -rf llvm/test", "removing test directory", 1); 
 	}
 

Added: lldb/tags/lldb-74/scripts/llvm.isreg.diff
URL: http://llvm.org/viewvc/llvm-project/lldb/tags/lldb-74/scripts/llvm.isreg.diff?rev=138136&view=auto
==============================================================================
--- lldb/tags/lldb-74/scripts/llvm.isreg.diff (added)
+++ lldb/tags/lldb-74/scripts/llvm.isreg.diff Fri Aug 19 18:10:19 2011
@@ -0,0 +1,12 @@
+Index: lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+===================================================================
+--- lib/Target/ARM/AsmParser/ARMAsmParser.cpp	(revision 137143)
++++ lib/Target/ARM/AsmParser/ARMAsmParser.cpp	(working copy)
+@@ -2619,6 +2619,7 @@
+   if (Mnemonic == "mov" && Operands.size() > 4 &&
+       !static_cast<ARMOperand*>(Operands[4])->isARMSOImm() &&
+       static_cast<ARMOperand*>(Operands[4])->isImm0_65535Expr() &&
++      static_cast<ARMOperand*>(Operands[1])->isReg() &&
+       static_cast<ARMOperand*>(Operands[1])->getReg() == 0) {
+     ARMOperand *Op = static_cast<ARMOperand*>(Operands[1]);
+     Operands.erase(Operands.begin() + 1);

Added: lldb/tags/lldb-74/scripts/llvm.operand-leak.diff
URL: http://llvm.org/viewvc/llvm-project/lldb/tags/lldb-74/scripts/llvm.operand-leak.diff?rev=138136&view=auto
==============================================================================
--- lldb/tags/lldb-74/scripts/llvm.operand-leak.diff (added)
+++ lldb/tags/lldb-74/scripts/llvm.operand-leak.diff Fri Aug 19 18:10:19 2011
@@ -0,0 +1,18 @@
+Index: lib/MC/MCDisassembler/EDToken.cpp
+===================================================================
+--- lib/MC/MCDisassembler/EDToken.cpp	(revision 137143)
++++ lib/MC/MCDisassembler/EDToken.cpp	(working copy)
+@@ -93,8 +93,12 @@
+   SmallVector<AsmToken, 10> asmTokens;
+   
+   if (disassembler.parseInst(parsedOperands, asmTokens, str))
++  {
++    for (unsigned i = 0, e = parsedOperands.size(); i != e; ++i)
++      delete parsedOperands[i];
+     return -1;
+-  
++  }
++      
+   SmallVectorImpl<MCParsedAsmOperand*>::iterator operandIterator;
+   unsigned int operandIndex;
+   SmallVectorImpl<AsmToken>::iterator tokenIterator;

Modified: lldb/tags/lldb-74/test/lang/c/function_types/TestFunctionTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/tags/lldb-74/test/lang/c/function_types/TestFunctionTypes.py?rev=138136&r1=138135&r2=138136&view=diff
==============================================================================
--- lldb/tags/lldb-74/test/lang/c/function_types/TestFunctionTypes.py (original)
+++ lldb/tags/lldb-74/test/lang/c/function_types/TestFunctionTypes.py Fri Aug 19 18:10:19 2011
@@ -24,12 +24,12 @@
     def test_pointers_with_dsym(self):
         """Test that a function pointer to 'printf' works and can be called."""
         self.buildDsym()
-        self.function_pointers()
+        #self.function_pointers() # ROLLED BACK
     
     def test_pointers_with_dwarf(self):
         """Test that a function pointer to 'printf' works and can be called."""
         self.buildDwarf()
-        self.function_pointers()
+        #self.function_pointers() # ROLLED BACK
 
     def setUp(self):
         # Call super's setUp().





More information about the lldb-commits mailing list