svn commit: r314161 - in vendor/clang/dist: . docs lib/Driver test/Driver

Dimitry Andric dim at FreeBSD.org
Thu Feb 23 19:02:14 UTC 2017


Author: dim
Date: Thu Feb 23 19:02:12 2017
New Revision: 314161
URL: https://svnweb.freebsd.org/changeset/base/314161

Log:
  Vendor import of clang release_40 branch r295910:
  https://llvm.org/svn/llvm-project/cfe/branches/release_40@295910

Modified:
  vendor/clang/dist/CMakeLists.txt
  vendor/clang/dist/docs/ReleaseNotes.rst
  vendor/clang/dist/lib/Driver/Tools.cpp
  vendor/clang/dist/test/Driver/openbsd.c

Modified: vendor/clang/dist/CMakeLists.txt
==============================================================================
--- vendor/clang/dist/CMakeLists.txt	Thu Feb 23 19:02:07 2017	(r314160)
+++ vendor/clang/dist/CMakeLists.txt	Thu Feb 23 19:02:12 2017	(r314161)
@@ -42,7 +42,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
   list(GET CONFIG_OUTPUT 3 INCLUDE_DIR)
   list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT)
   list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR)
-  list(GET CONFIG_OUTPUT 6 LLVM_CMAKE_PATH)
+  list(GET CONFIG_OUTPUT 6 LLVM_CONFIG_CMAKE_PATH)
 
   if(NOT MSVC_IDE)
     set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS}
@@ -57,6 +57,10 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
   set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
   set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
 
+  # Normalize LLVM_CMAKE_PATH. --cmakedir might contain backslashes.
+  # CMake assumes slashes as PATH.
+  file(TO_CMAKE_PATH ${LLVM_CONFIG_CMAKE_PATH} LLVM_CMAKE_PATH)
+
   find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
     NO_DEFAULT_PATH)
 

Modified: vendor/clang/dist/docs/ReleaseNotes.rst
==============================================================================
--- vendor/clang/dist/docs/ReleaseNotes.rst	Thu Feb 23 19:02:07 2017	(r314160)
+++ vendor/clang/dist/docs/ReleaseNotes.rst	Thu Feb 23 19:02:12 2017	(r314161)
@@ -241,17 +241,27 @@ show the description of the defects.
 Static Analyzer
 ---------------
 
-...
+With the option --show-description, scan-build's list of defects will also
+show the description of the defects.
 
-Core Analysis Improvements
-==========================
+The analyzer now provides better support of code that uses gtest.
 
-- ...
+Several new checks were added:
 
-New Issues Found
-================
+- The analyzer warns when virtual calls are made from constructors or
+  destructors. This check is off by default but can be enabled by passing the
+  following command to scan-build: -enable-checker optin.cplusplus.VirtualCall.
+- The analyzer checks for synthesized copy properties of mutable types in
+  Objective C, such as NSMutableArray. Calling the setter for these properties
+  will store an immutable copy of the value.
+- The analyzer checks for calls to dispatch_once() that use an Objective-C
+  instance variable as the predicate. Using an instance variable as a predicate
+  may result in the passed-in block being executed multiple times or not at all.
+  These calls should be rewritten either to use a lock or to store the predicate
+  in a global or static variable.
+- The analyzer checks for unintended comparisons of NSNumber, CFNumberRef, and
+  other Cocoa number objects to scalar values.
 
-- ...
 
 Python Binding Changes
 ----------------------

Modified: vendor/clang/dist/lib/Driver/Tools.cpp
==============================================================================
--- vendor/clang/dist/lib/Driver/Tools.cpp	Thu Feb 23 19:02:07 2017	(r314160)
+++ vendor/clang/dist/lib/Driver/Tools.cpp	Thu Feb 23 19:02:12 2017	(r314161)
@@ -8937,6 +8937,10 @@ void openbsd::Linker::ConstructJob(Compi
       if (Args.hasArg(options::OPT_pg))
         CmdArgs.push_back(
             Args.MakeArgString(getToolChain().GetFilePath("gcrt0.o")));
+      else if (Args.hasArg(options::OPT_static) &&
+               !Args.hasArg(options::OPT_nopie))
+        CmdArgs.push_back(
+            Args.MakeArgString(getToolChain().GetFilePath("rcrt0.o")));
       else
         CmdArgs.push_back(
             Args.MakeArgString(getToolChain().GetFilePath("crt0.o")));

Modified: vendor/clang/dist/test/Driver/openbsd.c
==============================================================================
--- vendor/clang/dist/test/Driver/openbsd.c	Thu Feb 23 19:02:07 2017	(r314160)
+++ vendor/clang/dist/test/Driver/openbsd.c	Thu Feb 23 19:02:12 2017	(r314161)
@@ -67,3 +67,26 @@
 // CHECK-MIPS64-PIC: as{{.*}}" "-mabi" "64" "-EB" "-KPIC"
 // CHECK-MIPS64EL: as{{.*}}" "-mabi" "64" "-EL"
 // CHECK-MIPS64EL-PIC: as{{.*}}" "-mabi" "64" "-EL" "-KPIC"
+
+// Check linking against correct startup code when (not) using PIE
+// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd %s -### 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-PIE %s
+// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd %s -fno-pie %s -### 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-PIE %s
+// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -static %s -### 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-STATIC-PIE %s
+// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -static -fno-pie %s -### 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-STATIC-PIE %s
+// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -nopie %s -### 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-NOPIE %s
+// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -fno-pie -nopie %s -### 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-NOPIE %s
+// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -static -nopie %s -### 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-NOPIE %s
+// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -fno-pie -static -nopie %s -### 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-NOPIE %s
+// CHECK-PIE: "{{.*}}crt0.o"
+// CHECK-PIE-NOT: "-nopie"
+// CHECK-STATIC-PIE: "{{.*}}rcrt0.o"
+// CHECK-STATIC-PIE-NOT: "-nopie"
+// CHECK-NOPIE: "-nopie" "{{.*}}crt0.o"


More information about the svn-src-all mailing list