aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-03-04 18:25:50 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-03-04 18:25:50 +0000
commit1dda0966cc880e12302298fb005bacb5fb294b93 (patch)
tree31417c788dc0bd8e9bde15ee809cc0ed449b9bef
parent7b0060e4423605afe08a9888c47d634442c613a6 (diff)
downloadsrc-1dda0966cc880e12302298fb005bacb5fb294b93.tar.gz
src-1dda0966cc880e12302298fb005bacb5fb294b93.zip
Vendor import of clang release_80 branch r355313:vendor/clang/clang-release_80-r355313
Notes
Notes: svn path=/vendor/clang/dist-release_80/; revision=344767 svn path=/vendor/clang/clang-release_80-r355313/; revision=344768; tag=vendor/clang/clang-release_80-r355313
-rw-r--r--docs/AttributeReference.rst50
-rw-r--r--docs/ReleaseNotes.rst117
-rw-r--r--include/clang/Basic/AttrDocs.td10
-rw-r--r--lib/Driver/ToolChains/OpenBSD.cpp4
-rw-r--r--lib/Frontend/InitHeaderSearch.cpp8
5 files changed, 64 insertions, 125 deletions
diff --git a/docs/AttributeReference.rst b/docs/AttributeReference.rst
index 01938f64f56c..ce7a0f3cca86 100644
--- a/docs/AttributeReference.rst
+++ b/docs/AttributeReference.rst
@@ -1274,13 +1274,13 @@ The ``gnu_inline`` changes the meaning of ``extern inline`` to use GNU inline
semantics, meaning:
* If any declaration that is declared ``inline`` is not declared ``extern``,
-then the ``inline`` keyword is just a hint. In particular, an out-of-line
-definition is still emitted for a function with external linkage, even if all
-call sites are inlined, unlike in C99 and C++ inline semantics.
+ then the ``inline`` keyword is just a hint. In particular, an out-of-line
+ definition is still emitted for a function with external linkage, even if all
+ call sites are inlined, unlike in C99 and C++ inline semantics.
* If all declarations that are declared ``inline`` are also declared
-``extern``, then the function body is present only for inlining and no
-out-of-line version is emitted.
+ ``extern``, then the function body is present only for inlining and no
+ out-of-line version is emitted.
Some important consequences: ``static inline`` emits an out-of-line
version if needed, a plain ``inline`` definition emits an out-of-line version
@@ -1317,6 +1317,46 @@ The ``ifunc`` attribute may only be used on a function declaration. A function
Not all targets support this attribute. ELF target support depends on both the linker and runtime linker, and is available in at least lld 4.0 and later, binutils 2.20.1 and later, glibc v2.11.1 and later, and FreeBSD 9.1 and later. Non-ELF targets currently do not support this attribute.
+import_module
+-------------
+.. csv-table:: Supported Syntaxes
+ :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
+
+ "``import_module``","``clang::import_module``","``clang::import_module``","","","","Yes"
+
+Clang supports the ``__attribute__((import_module(<module_name>)))``
+attribute for the WebAssembly target. This attribute may be attached to a
+function declaration, where it modifies how the symbol is to be imported
+within the WebAssembly linking environment.
+
+WebAssembly imports use a two-level namespace scheme, consisting of a module
+name, which typically identifies a module from which to import, and a field
+name, which typically identifies a field from that module to import. By
+default, module names for C/C++ symbols are assigned automatically by the
+linker. This attribute can be used to override the default behavior, and
+reuqest a specific module name be used instead.
+
+
+import_name
+-----------
+.. csv-table:: Supported Syntaxes
+ :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
+
+ "``import_name``","``clang::import_name``","``clang::import_name``","","","","Yes"
+
+Clang supports the ``__attribute__((import_name(<name>)))``
+attribute for the WebAssembly target. This attribute may be attached to a
+function declaration, where it modifies how the symbol is to be imported
+within the WebAssembly linking environment.
+
+WebAssembly imports use a two-level namespace scheme, consisting of a module
+name, which typically identifies a module from which to import, and a field
+name, which typically identifies a field from that module to import. By
+default, field names for C/C++ symbols are the same as their C/C++ symbol
+names. This attribute can be used to override the default behavior, and
+reuqest a specific field name be used instead.
+
+
internal_linkage
----------------
.. csv-table:: Supported Syntaxes
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index bdf4bcf70b8b..e6892203f457 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -17,8 +17,8 @@ describe the status of Clang in some detail, including major
improvements from the previous release and new feature work. For the
general LLVM release notes, see `the LLVM
documentation <https://llvm.org/docs/ReleaseNotes.html>`_. All LLVM
-releases may be downloaded from the `LLVM releases web
-site <https://llvm.org/releases/>`_.
+releases may be downloaded
+from the `LLVM releases web site <https://releases.llvm.org/>`_.
For more information about Clang or LLVM, including information about the
latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or the
@@ -175,23 +175,13 @@ New Compiler Flags
be controlled by the ``-mrelax-pic-calls`` and ``-mno-relax-pic-calls``
options.
-- ...
-
-Deprecated Compiler Flags
--------------------------
-
-The following options are deprecated and ignored. They will be removed in
-future versions of Clang.
-
-- ...
-
Modified Compiler Flags
-----------------------
-- As of clang 8, `alignof` and `_Alignof` return the ABI alignment of a type,
- as opposed to the preferred alignment. `__alignof` still returns the
- preferred alignment. `-fclang-abi-compat=7` (and previous) will make
- `alignof` and `_Alignof` return preferred alignment again.
+- As of clang 8, ``alignof`` and ``_Alignof`` return the ABI alignment of a type,
+ as opposed to the preferred alignment. ``__alignof`` still returns the
+ preferred alignment. ``-fclang-abi-compat=7`` (and previous) will make
+ ``alignof`` and ``_Alignof`` return preferred alignment again.
New Pragmas in Clang
@@ -210,7 +200,7 @@ Attribute Changes in Clang
Windows Support
---------------
-- clang-cl now supports the use of the precompiled header options /Yc and /Yu
+- clang-cl now supports the use of the precompiled header options ``/Yc`` and ``/Yu``
without the filename argument. When these options are used without the
filename, a `#pragma hdrstop` inside the source marks the end of the
precompiled code.
@@ -229,35 +219,9 @@ Windows Support
- Allow using Address Sanitizer and Undefined Behaviour Sanitizer on MinGW.
-- ...
-
-
-C Language Changes in Clang
----------------------------
-
-- ...
-
-...
-
-C11 Feature Support
-^^^^^^^^^^^^^^^^^^^
-
-...
-
-C++ Language Changes in Clang
------------------------------
+- Structured Exception Handling support for ARM64 Windows. The ARM64 Windows
+ target is in pretty good shape now.
-- ...
-
-C++1z Feature Support
-^^^^^^^^^^^^^^^^^^^^^
-
-...
-
-Objective-C Language Changes in Clang
--------------------------------------
-
-...
OpenCL Kernel Language Changes in Clang
---------------------------------------
@@ -317,17 +281,17 @@ C++ for OpenCL:
ABI Changes in Clang
--------------------
-- `_Alignof` and `alignof` now return the ABI alignment of a type, as opposed
+- ``_Alignof`` and ``alignof`` now return the ABI alignment of a type, as opposed
to the preferred alignment.
- This is more in keeping with the language of the standards, as well as
being compatible with gcc
- - `__alignof` and `__alignof__` still return the preferred alignment of
+ - ``__alignof`` and ``__alignof__`` still return the preferred alignment of
a type
- This shouldn't break any ABI except for things that explicitly ask for
- `alignas(alignof(T))`.
+ ``alignas(alignof(T))``.
- If you have interfaces that break with this change, you may wish to switch
- to `alignas(__alignof(T))`, instead of using the `-fclang-abi-compat`
+ to ``alignas(__alignof(T))``, instead of using the ``-fclang-abi-compat``
switch.
OpenMP Support in Clang
@@ -364,42 +328,6 @@ New features supported for Cuda devices:
- General performance improvement.
-CUDA Support in Clang
----------------------
-
-
-Internal API Changes
---------------------
-
-These are major API changes that have happened since the 7.0.0 release of
-Clang. If upgrading an external codebase that uses Clang as a library,
-this section should help get you past the largest hurdles of upgrading.
-
-- ...
-
-AST Matchers
-------------
-
-- ...
-
-clang-format
-------------
-
-
-- ...
-
-libclang
---------
-
-...
-
-
-Static Analyzer
----------------
-
-- ...
-
-...
.. _release-notes-ubsan:
@@ -476,25 +404,6 @@ Undefined Behavior Sanitizer (UBSan)
data[x] *= data[x];
}
-Core Analysis Improvements
-==========================
-
-- ...
-
-New Issues Found
-================
-
-- ...
-
-Python Binding Changes
-----------------------
-
-The following methods have been added:
-
-- ...
-
-Significant Known Problems
-==========================
Additional Information
======================
diff --git a/include/clang/Basic/AttrDocs.td b/include/clang/Basic/AttrDocs.td
index 94c8343d2368..ff1905f685d7 100644
--- a/include/clang/Basic/AttrDocs.td
+++ b/include/clang/Basic/AttrDocs.td
@@ -3821,13 +3821,13 @@ The ``gnu_inline`` changes the meaning of ``extern inline`` to use GNU inline
semantics, meaning:
* If any declaration that is declared ``inline`` is not declared ``extern``,
-then the ``inline`` keyword is just a hint. In particular, an out-of-line
-definition is still emitted for a function with external linkage, even if all
-call sites are inlined, unlike in C99 and C++ inline semantics.
+ then the ``inline`` keyword is just a hint. In particular, an out-of-line
+ definition is still emitted for a function with external linkage, even if all
+ call sites are inlined, unlike in C99 and C++ inline semantics.
* If all declarations that are declared ``inline`` are also declared
-``extern``, then the function body is present only for inlining and no
-out-of-line version is emitted.
+ ``extern``, then the function body is present only for inlining and no
+ out-of-line version is emitted.
Some important consequences: ``static inline`` emits an out-of-line
version if needed, a plain ``inline`` definition emits an out-of-line version
diff --git a/lib/Driver/ToolChains/OpenBSD.cpp b/lib/Driver/ToolChains/OpenBSD.cpp
index 3d35d37b7db3..6b02e68965df 100644
--- a/lib/Driver/ToolChains/OpenBSD.cpp
+++ b/lib/Driver/ToolChains/OpenBSD.cpp
@@ -227,9 +227,7 @@ void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(crtend)));
}
- const char *Exec = Args.MakeArgString(
- !NeedsSanitizerDeps ? ToolChain.GetLinkerPath()
- : ToolChain.GetProgramPath("ld.lld"));
+ const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index ac3bb713ddcc..67842b5dca29 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -433,14 +433,6 @@ void InitHeaderSearch::AddDefaultCPlusPlusIncludePaths(
case llvm::Triple::DragonFly:
AddPath("/usr/include/c++/5.0", CXXSystem, false);
break;
- case llvm::Triple::OpenBSD: {
- std::string t = triple.getTriple();
- if (t.substr(0, 6) == "x86_64")
- t.replace(0, 6, "amd64");
- AddGnuCPlusPlusIncludePaths("/usr/include/g++",
- t, "", "", triple);
- break;
- }
case llvm::Triple::Minix:
AddGnuCPlusPlusIncludePaths("/usr/gnu/include/c++/4.4.3",
"", "", "", triple);