Hello community,

here is the log from the commit of package llvm for openSUSE:12.2 checked in at 
2012-07-15 12:05:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.2/llvm (Old)
 and      /work/SRC/openSUSE:12.2/.llvm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "llvm", Maintainer is "mh...@novell.com"

Changes:
--------
--- /work/SRC/openSUSE:12.2/llvm/llvm.changes   2012-06-25 15:45:40.000000000 
+0200
+++ /work/SRC/openSUSE:12.2/.llvm.new/llvm.changes      2012-07-15 
12:05:56.000000000 +0200
@@ -1,0 +2,16 @@
+Fri Jul 13 21:03:40 UTC 2012 - llu...@suse.com
+
+- change rewrite-includes patch to use options to match upstream
+  changed option names
+
+-------------------------------------------------------------------
+Fri Jul 13 10:14:15 UTC 2012 - llu...@suse.com
+
+- fix debuginfo generation (PR#13303)
+
+-------------------------------------------------------------------
+Mon Jun 18 20:26:51 UTC 2012 - llu...@suse.com
+
+- Do not reject PCH because of -DFOO duplication (PR#13141)
+
+-------------------------------------------------------------------

New:
----
  pr12463.patch
  pr13141.patch
  pr13303.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ llvm.spec ++++++
--- /var/tmp/diff_new_pack.Jsg8Ac/_old  2012-07-15 12:05:56.000000000 +0200
+++ /var/tmp/diff_new_pack.Jsg8Ac/_new  2012-07-15 12:05:56.000000000 +0200
@@ -39,6 +39,9 @@
 Patch4:         default-to-i586.patch
 Patch5:         clang-fix-mips-test.patch
 Patch6:         rewrite-includes.patch
+Patch7:         pr12463.patch
+Patch8:         pr13141.patch
+Patch9:         pr13303.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  autoconf
 BuildRequires:  automake
@@ -138,6 +141,9 @@
 %patch6 -p0
 # sle11 patch cannot create empty files
 touch tools/clang/test/Frontend/Inputs/rewrite-includes9.h
+%patch7 -p0
+%patch8 -p0
+%patch9 -p1
 
 # We hardcode i586
 rm tools/clang/test/Driver/x86_features.c

++++++ pr12463.patch ++++++
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index fea0fe1..1046972 100644
--- tools/clang/lib/Sema/SemaExpr.cpp
+++ tools/clang/lib/Sema/SemaExpr.cpp
@@ -6577,23 +6577,29 @@ QualType Sema::CheckCompareOperands(ExprResult &LHS, 
ExprResult &RHS,
   checkEnumComparison(*this, Loc, LHS, RHS);
 
   if (!LHSType->hasFloatingRepresentation() &&
-      !(LHSType->isBlockPointerType() && IsRelational) &&
-      !LHS.get()->getLocStart().isMacroID() &&
-      !RHS.get()->getLocStart().isMacroID()) {
+      !(LHSType->isBlockPointerType() && IsRelational)) {
     // For non-floating point types, check for self-comparisons of the form
     // x == x, x != x, x < x, etc.  These always evaluate to a constant, and
     // often indicate logic errors in the program.
     //
-    // NOTE: Don't warn about comparison expressions resulting from macro
-    // expansion. Also don't warn about comparisons which are only self
+    // NOTE: Don't warn about self-comparison expressions resulting from macro
+    // expansion, unless they don't make sense at all.
+    // Also don't warn about comparisons which are only self
     // comparisons within a template specialization. The warnings should catch
     // obvious cases in the definition of the template anyways. The idea is to
     // warn when the typed comparison operator will always evaluate to the same
     // result.
+    bool InMacro = LHS.get()->getLocStart().isMacroID() ||
+                   RHS.get()->getLocStart().isMacroID();
     if (DeclRefExpr* DRL = dyn_cast<DeclRefExpr>(LHSStripped)) {
       if (DeclRefExpr* DRR = dyn_cast<DeclRefExpr>(RHSStripped)) {
+        if (isa<CastExpr>(LHSStripped))
+          LHSStripped = LHSStripped->IgnoreParenCasts();
         if (DRL->getDecl() == DRR->getDecl() &&
-            !IsWithinTemplateSpecialization(DRL->getDecl())) {
+            !IsWithinTemplateSpecialization(DRL->getDecl()) &&
+            !InMacro &&
+            !isa<StringLiteral>(LHSStripped) &&
+            !isa<ObjCEncodeExpr>(LHSStripped)) {
           DiagRuntimeBehavior(Loc, 0, PDiag(diag::warn_comparison_always)
                               << 0 // self-
                               << (Opc == BO_EQ
@@ -6602,23 +6608,26 @@ QualType Sema::CheckCompareOperands(ExprResult &LHS, 
ExprResult &RHS,
         } else if (LHSType->isArrayType() && RHSType->isArrayType() &&
                    !DRL->getDecl()->getType()->isReferenceType() &&
                    !DRR->getDecl()->getType()->isReferenceType()) {
-            // what is it always going to eval to?
-            char always_evals_to;
             switch(Opc) {
             case BO_EQ: // e.g. array1 == array2
-              always_evals_to = 0; // false
+              if (!InMacro)
+                DiagRuntimeBehavior(Loc, 0, PDiag(diag::warn_comparison_always)
+                                    << 1 // array
+                                    << 0 /* evaluates to false */ );
               break;
             case BO_NE: // e.g. array1 != array2
-              always_evals_to = 1; // true
+              if (!InMacro)
+                DiagRuntimeBehavior(Loc, 0, PDiag(diag::warn_comparison_always)
+                                    << 1 // array
+                                    << 1 /* evaluates to true */ );
               break;
-            default:
+            default: // e.g. array1 <= array2
               // best we can say is 'a constant'
-              always_evals_to = 2; // e.g. array1 <= array2
+              DiagRuntimeBehavior(Loc, 0, PDiag(diag::warn_comparison_always)
+                                  << 1 // array
+                                  << 2 /* evaluates to constant */ );
               break;
             }
-            DiagRuntimeBehavior(Loc, 0, PDiag(diag::warn_comparison_always)
-                                << 1 // array
-                                << always_evals_to);
         }
       }
     }
diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c
index 72cff65..b17b6ec 100644
--- tools/clang/test/Sema/exprs.c
+++ tools/clang/test/Sema/exprs.c
@@ -125,6 +125,12 @@ int test12b(const char *X) {
   return sizeof(X == "foo"); // no-warning
 }
 
+// PR12463
+#define FOO_LITERAL "foo"
+int test12c(const char *X) {
+  return X == FOO_LITERAL;  // expected-warning {{comparison against a string 
literal is unspecified (use strncmp instead)}}
+}
+
 // rdar://6719156
 void test13(
             void (^P)()) { // expected-error {{blocks support disabled - 
compile with -fblocks}}
diff --git a/test/Sema/self-comparison.c b/test/Sema/self-comparison.c
index edb3a6a..8679a3f 100644
--- tools/clang/test/Sema/self-comparison.c
+++ tools/clang/test/Sema/self-comparison.c
@@ -72,6 +72,13 @@ int array_comparisons() {
   return array1 <= array2; // expected-warning{{array comparison always 
evaluates to a constant}}
   return array1 > array2; // expected-warning{{array comparison always 
evaluates to a constant}}
   return array1 >= array2; // expected-warning{{array comparison always 
evaluates to a constant}}
+  // Issue a warning for this even if macro expansion is involved (PR12463)
+#define ARRAY1 array1
+#define ARRAY2 array2
+  return ARRAY1 < ARRAY2; // expected-warning{{array comparison always 
evaluates to a constant}}
+  return ARRAY1 <= ARRAY2; // expected-warning{{array comparison always 
evaluates to a constant}}
+  return ARRAY1 > ARRAY2; // expected-warning{{array comparison always 
evaluates to a constant}}
+  return ARRAY1 >= ARRAY2; // expected-warning{{array comparison always 
evaluates to a constant}}
 
 }
 
++++++ pr13141.patch ++++++
>From e9ddb0fd37e4245392af7e8f1e2c86a44d4339ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lu...@suse.cz>
Date: Mon, 18 Jun 2012 22:23:37 +0200
Subject: [PATCH] do not reject PCH because of -DFOO -DFOO duplication

---
 lib/Serialization/ASTReader.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp
index f224056..d176ee3 100644
--- tools/clang/lib/Serialization/ASTReader.cpp
+++ tools/clang/lib/Serialization/ASTReader.cpp
@@ -259,6 +259,11 @@ bool PCHValidator::ReadPredefinesBuffer(const 
PCHPredefinesBlocks &Buffers,
   // definitions and they may appear at any point in the output.
   std::sort(CmdLineLines.begin(), CmdLineLines.end());
   std::sort(PCHLines.begin(), PCHLines.end());
+  // And remove duplicated definitions.
+  CmdLineLines.resize(
+    std::unique(CmdLineLines.begin(), 
CmdLineLines.end())-CmdLineLines.begin());
+  PCHLines.resize(
+    std::unique(PCHLines.begin(), PCHLines.end())-PCHLines.begin());
 
   // Determine which predefines that were used to build the PCH file are 
missing
   // from the command line.
-- 
1.7.7

++++++ pr13303.patch ++++++
commit 5cf55e1c6a22ae066db5066fdc69f99564ace8ea
Author: Eric Christopher <echri...@apple.com>
Date:   Thu Jul 12 23:30:25 2012 +0000

    The end of the prologue should be marked with is_stmt.
    Fixes PR13303.
    
    Patch by Paul Robinson!
    
    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160148 
91177308-0d34-0410-b5e6-96231b3b80d8

diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp 
b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 038792b..649684a 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1382,7 +1382,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) 
{
                                        MF->getFunction()->getContext());
     recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(),
                      FnStartDL.getScope(MF->getFunction()->getContext()),
-                     0);
+                     DWARF2_LINE_DEFAULT_IS_STMT ? DWARF2_FLAG_IS_STMT : 0);
   }
 }
 
diff --git a/test/DebugInfo/X86/pr13303.ll b/test/DebugInfo/X86/pr13303.ll
new file mode 100644
index 0000000..e820cb5
--- /dev/null
+++ b/test/DebugInfo/X86/pr13303.ll
@@ -0,0 +1,28 @@
+; RUN: llc %s -o %t -filetype=obj -mtriple=x86_64-unknown-linux-gnu
+; RUN: llvm-dwarfdump %t | FileCheck %s
+; PR13303
+
+; Check that the prologue ends with is_stmt here.
+; CHECK: 0x0000000000000000 {{.*}} is_stmt
+
+define i32 @main() nounwind uwtable {
+entry:
+  %retval = alloca i32, align 4
+  store i32 0, i32* %retval
+  ret i32 0, !dbg !10
+}
+
+!llvm.dbg.cu = !{!0}
+
+!0 = metadata !{i32 786449, i32 0, i32 12, metadata !"PR13303.c", metadata 
!"/home/probinson", metadata !"clang version 3.2 (trunk 160143)", i1 true, i1 
false, metadata !"", i32 0, metadata !1, metadata !1, metadata !3, metadata !1} 
; [ DW_TAG_compile_unit ] [/home/probinson/PR13303.c] [DW_LANG_C99]
+!1 = metadata !{metadata !2}
+!2 = metadata !{i32 0}
+!3 = metadata !{metadata !4}
+!4 = metadata !{metadata !5}
+!5 = metadata !{i32 786478, i32 0, metadata !6, metadata !"main", metadata 
!"main", metadata !"", metadata !6, i32 1, metadata !7, i1 false, i1 true, i32 
0, i32 0, null, i32 0, i1 false, i32 ()* @main, null, null, metadata !1, i32 1} 
; [ DW_TAG_subprogram ] [line 1] [def] [main]
+!6 = metadata !{i32 786473, metadata !"PR13303.c", metadata 
!"/home/probinson", null} ; [ DW_TAG_file_type ]
+!7 = metadata !{i32 786453, i32 0, metadata !"", i32 0, i32 0, i64 0, i64 0, 
i64 0, i32 0, null, metadata !8, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] 
[line 0, size 0, align 0, offset 0] [from ]
+!8 = metadata !{metadata !9}
+!9 = metadata !{i32 786468, null, metadata !"int", null, i32 0, i64 32, i64 
32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 
32, offset 0, enc DW_ATE_signed]
+!10 = metadata !{i32 1, i32 14, metadata !11, null}
+!11 = metadata !{i32 786443, metadata !5, i32 1, i32 12, metadata !6, i32 0} ; 
[ DW_TAG_lexical_block ] [/home/probinson/PR13303.c]
++++++ rewrite-includes.patch ++++++
++++ 949 lines (skipped)
++++ between /work/SRC/openSUSE:12.2/llvm/rewrite-includes.patch
++++ and /work/SRC/openSUSE:12.2/.llvm.new/rewrite-includes.patch

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to