Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Dec 2012 07:40:52 -0500
From:      "Sam Fourman Jr." <sfourman@gmail.com>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        FreeBSD Current <Current@freebsd.org>
Subject:   Re: Clang/LLVM revision 169451
Message-ID:  <CAOFF%2BZ114b4324JzhJ=Rg=QODVbrSMzgx4=w8h59EJ8AYXj6cw@mail.gmail.com>
In-Reply-To: <50CF0715.7060300@FreeBSD.org>
References:  <CAOFF%2BZ2ZyHkOnkNKTaQcS179D1-G36nDxwK37pt4gSihHTTaow@mail.gmail.com> <50CE2E29.4030906@FreeBSD.org> <CAOFF%2BZ1vzDyVGBieegV9ZeB2Ub=Fst5DKX4aAiG0_TB1gV4wuA@mail.gmail.com> <50CF0715.7060300@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 17, 2012 at 6:50 AM, Dimitry Andric <dim@freebsd.org> wrote:
> On 2012-12-17 09:36, Sam Fourman Jr. wrote:
>>>
>>> No, there is no one-click merge script, it needs humanoid help, I'm
>>> afraid. :-)  Is there any reason you cannot just install the port, or
>>> if that is too outdated, just checkout from llvm.org directly and build
>>> it?
>>
>>
>> is it currently possible to build FreeBSD world, without clang and
>> then build clang from ports?
>
>
> There is no real need, as you can just put /usr/local/bin before
> /usr/bin in your PATH, but if you really want to do so, you can put the
> following in /etc/src.conf:
>
> CC=gcc
> CXX=g++
> CPP=gcpp
> WITHOUT_CLANG=
>
> From then on, you build world with gcc, which will also be installed as
> /usr/bin/cc again.


I ended up generating and applying this patch, and rebuilt world again

root@www:/root # cat clang-169451.patch

Index: contrib/llvm/tools/clang/include/clang/Sema/Scope.h
===================================================================
--- contrib/llvm/tools/clang/include/clang/Sema/Scope.h (revision 244350)
+++ contrib/llvm/tools/clang/include/clang/Sema/Scope.h (working copy)
@@ -84,11 +84,18 @@
     /// TryScope - This is the scope of a C++ try statement.
     TryScope = 0x1000,

+    /// CatchScope - This is the scope of a C++ catch statement.
+    CatchScope = 0x2000,
+
+    /// FnTryCatchScope - This is the scope for a function-level C++ try or
+    /// catch scope.
+    FnTryCatchScope = 0x4000,
+
     /// FnTryScope - This is the scope of a function-level C++ try scope.
-    FnTryScope = 0x3000,
+    FnTryScope = TryScope | FnTryCatchScope,

     /// FnCatchScope - This is the scope of a function-level C++ catch scope.
-    FnCatchScope = 0x4000
+    FnCatchScope = CatchScope | FnTryCatchScope
   };
 private:
   /// The parent scope for this scope.  This is null for the translation-unit
Index: contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp
===================================================================
--- contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp    (revision 244350)
+++ contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp    (working copy)
@@ -2197,7 +2197,7 @@
   // The name in a catch exception-declaration is local to the handler and
   // shall not be redeclared in the outermost block of the handler.
   ParseScope CatchScope(this, Scope::DeclScope | Scope::ControlScope |
-                          (FnCatch ? Scope::FnCatchScope : 0));
+                          (FnCatch ? Scope::FnCatchScope : Scope::CatchScope));

   // exception-declaration is equivalent to '...' or a parameter-declaration
   // without default arguments.
Index: contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp
===================================================================
--- contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp
(revision 244350)
+++ contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp    (working copy)
@@ -135,16 +135,13 @@
       // of the controlled statement.
       //
       assert(S->getParent() && "No TUScope?");
-      if (S->getFlags() & Scope::FnTryScope)
-        return S->getParent()->isDeclScope(D);
       if (S->getParent()->getFlags() & Scope::ControlScope) {
-        if (S->getParent()->getFlags() & Scope::FnCatchScope) {
-          S = S->getParent();
-          if (S->isDeclScope(D))
-            return true;
-        }
+        S = S->getParent();
+        if (S->isDeclScope(D))
+          return true;
+      }
+      if (S->getFlags() & Scope::FnTryCatchScope)
         return S->getParent()->isDeclScope(D);
-      }
     }
     return false;
   }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOFF%2BZ114b4324JzhJ=Rg=QODVbrSMzgx4=w8h59EJ8AYXj6cw>