|
1 | 1 | Auto generated patch. Do not edit or delete it, even if empty. |
2 | | -diff -ruN --strip-trailing-cr a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp |
3 | | ---- a/clang/lib/Driver/ToolChains/Clang.cpp |
4 | | -+++ b/clang/lib/Driver/ToolChains/Clang.cpp |
5 | | -@@ -1065,10 +1065,6 @@ |
6 | | - A->render(Args, CmdArgs); |
7 | | - } |
8 | | - |
9 | | -- Args.addAllArgs(CmdArgs, |
10 | | -- {options::OPT_D, options::OPT_U, options::OPT_I_Group, |
11 | | -- options::OPT_F, options::OPT_embed_dir_EQ}); |
12 | | -- |
13 | | - if (C.isOffloadingHostKind(Action::OFK_Cuda) || |
14 | | - JA.isDeviceOffloading(Action::OFK_Cuda)) { |
15 | | - // Collect all enabled NVPTX architectures. |
16 | | -@@ -1091,6 +1087,10 @@ |
17 | | - } |
18 | | - } |
19 | | - |
20 | | -+ Args.addAllArgs(CmdArgs, |
21 | | -+ {options::OPT_D, options::OPT_U, options::OPT_I_Group, |
22 | | -+ options::OPT_F, options::OPT_embed_dir_EQ}); |
23 | | -+ |
24 | | - // Add -Wp, and -Xpreprocessor if using the preprocessor. |
25 | | - |
26 | | - // FIXME: There is a very unfortunate problem here, some troubled |
27 | | -diff -ruN --strip-trailing-cr a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp |
28 | | ---- a/clang/lib/Serialization/ASTReaderDecl.cpp |
29 | | -+++ b/clang/lib/Serialization/ASTReaderDecl.cpp |
30 | | -@@ -3642,9 +3642,23 @@ |
31 | | - void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader, |
32 | | - Redeclarable<VarDecl> *D, |
33 | | - Decl *Previous, Decl *Canon) { |
34 | | -+ auto *VD = static_cast<VarDecl *>(D); |
35 | | - auto *PrevVD = cast<VarDecl>(Previous); |
36 | | - D->RedeclLink.setPrevious(PrevVD); |
37 | | - D->First = PrevVD->First; |
38 | | -+ |
39 | | -+ // We should keep at most one definition on the chain. |
40 | | -+ // FIXME: Cache the definition once we've found it. Building a chain with |
41 | | -+ // N definitions currently takes O(N^2) time here. |
42 | | -+ if (VD->isThisDeclarationADefinition() == VarDecl::Definition) { |
43 | | -+ for (VarDecl *CurD = PrevVD; CurD; CurD = CurD->getPreviousDecl()) { |
44 | | -+ if (CurD->isThisDeclarationADefinition() == VarDecl::Definition) { |
45 | | -+ Reader.mergeDefinitionVisibility(CurD, VD); |
46 | | -+ VD->demoteThisDefinitionToDeclaration(); |
47 | | -+ break; |
48 | | -+ } |
49 | | -+ } |
50 | | -+ } |
| 2 | +diff -ruN --strip-trailing-cr a/libc/src/__support/wchar/character_converter.h b/libc/src/__support/wchar/character_converter.h |
| 3 | +--- a/libc/src/__support/wchar/character_converter.h |
| 4 | ++++ b/libc/src/__support/wchar/character_converter.h |
| 5 | +@@ -77,7 +77,8 @@ |
51 | 6 | } |
52 | 7 |
|
53 | | - static bool isUndeducedReturnType(QualType T) { |
54 | | -diff -ruN --strip-trailing-cr a/clang/test/Driver/cuda-arch-list.cu b/clang/test/Driver/cuda-arch-list.cu |
55 | | ---- a/clang/test/Driver/cuda-arch-list.cu |
56 | | -+++ b/clang/test/Driver/cuda-arch-list.cu |
57 | | -@@ -23,6 +23,11 @@ |
58 | | - // RUN: --offload-arch=sm_60 --offload-arch=sm_70 --no-offload-arch=sm_60 %s 2>&1 \ |
59 | | - // RUN: | FileCheck -check-prefixes=DEVICE70-ONLY,HOST70-ONLY %s |
| 8 | + LIBC_INLINE int CharacterConverter::push(char8_t utf8_byte) { |
| 9 | +- uint8_t num_ones = static_cast<uint8_t>(cpp::countl_one(utf8_byte)); |
| 10 | ++ uint8_t num_ones = |
| 11 | ++ static_cast<uint8_t>(cpp::countl_one(static_cast<uint8_t>(utf8_byte))); |
| 12 | + // Checking the first byte if first push |
| 13 | + if (isEmpty()) { |
| 14 | + // UTF-8 char has 1 byte total |
| 15 | +diff -ruN --strip-trailing-cr a/llvm/lib/Transforms/Instrumentation/MemProfUse.cpp b/llvm/lib/Transforms/Instrumentation/MemProfUse.cpp |
| 16 | +--- a/llvm/lib/Transforms/Instrumentation/MemProfUse.cpp |
| 17 | ++++ b/llvm/lib/Transforms/Instrumentation/MemProfUse.cpp |
| 18 | +@@ -910,11 +910,8 @@ |
60 | 19 |
|
61 | | -+// Verify that user-specified -D__CUDA_ARCH_LIST__ overrides the driver-generated one |
62 | | -+// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nocudainc -nocudalib \ |
63 | | -+// RUN: --offload-arch=sm_60 -D__CUDA_ARCH_LIST__=999 %s 2>&1 \ |
64 | | -+// RUN: | FileCheck -check-prefixes=DEVICE-OVERRIDE,HOST-OVERRIDE %s |
65 | | -+ |
66 | | - // DEVICE60: "-cc1" "-triple" "nvptx64-nvidia-cuda" |
67 | | - // DEVICE60-SAME: "-target-cpu" "sm_60" |
68 | | - // DEVICE60-SAME: "-D__CUDA_ARCH_LIST__=600" |
69 | | -@@ -54,3 +59,12 @@ |
70 | | - |
71 | | - // HOST70-ONLY: "-cc1" "-triple" "x86_64-unknown-linux-gnu" |
72 | | - // HOST70-ONLY-SAME: "-D__CUDA_ARCH_LIST__=700" |
| 20 | + if (!DataAccessProf) { |
| 21 | + M.addModuleFlag(Module::Warning, "EnableDataAccessProf", 0U); |
| 22 | +- M.getContext().diagnose(DiagnosticInfoPGOProfile( |
| 23 | +- MemoryProfileFileName.data(), |
| 24 | +- StringRef("Data access profiles not found in memprof. Ignore " |
| 25 | +- "-memprof-annotate-static-data-prefix."), |
| 26 | +- DS_Warning)); |
| 27 | ++ // FIXME: Add a diagnostic message without failing the compilation when |
| 28 | ++ // data access profile payload is not available. |
| 29 | + return false; |
| 30 | + } |
| 31 | + M.addModuleFlag(Module::Warning, "EnableDataAccessProf", 1U); |
| 32 | +diff -ruN --strip-trailing-cr a/llvm/test/CodeGen/AArch64/fptoi-256.ll b/llvm/test/CodeGen/AArch64/fptoi-256.ll |
| 33 | +--- a/llvm/test/CodeGen/AArch64/fptoi-256.ll |
| 34 | ++++ b/llvm/test/CodeGen/AArch64/fptoi-256.ll |
| 35 | +@@ -0,0 +1,11 @@ |
| 36 | ++; RUN: llc -mtriple=aarch64 < %s |
73 | 37 | + |
74 | | -+// DEVICE-OVERRIDE: "-cc1" "-triple" "nvptx64-nvidia-cuda" |
75 | | -+// DEVICE-OVERRIDE-SAME: "-target-cpu" "sm_60" |
76 | | -+// DEVICE-OVERRIDE-SAME: "-D__CUDA_ARCH_LIST__=600" |
77 | | -+// DEVICE-OVERRIDE-SAME: "-D" "__CUDA_ARCH_LIST__=999" |
| 38 | ++define i256 @doubletosi256(double %a) { |
| 39 | ++ %conv = fptosi double %a to i256 |
| 40 | ++ ret i256 %conv |
| 41 | ++} |
78 | 42 | + |
79 | | -+// HOST-OVERRIDE: "-cc1" "-triple" "x86_64-unknown-linux-gnu" |
80 | | -+// HOST-OVERRIDE-SAME: "-D__CUDA_ARCH_LIST__=600" |
81 | | -+// HOST-OVERRIDE-SAME: "-D" "__CUDA_ARCH_LIST__=999" |
82 | | -diff -ruN --strip-trailing-cr a/clang/test/Modules/pr149404-02.cppm b/clang/test/Modules/pr149404-02.cppm |
83 | | ---- a/clang/test/Modules/pr149404-02.cppm |
84 | | -+++ b/clang/test/Modules/pr149404-02.cppm |
85 | | -@@ -1,104 +0,0 @@ |
86 | | --// RUN: rm -rf %t |
87 | | --// RUN: mkdir -p %t |
88 | | --// RUN: split-file %s %t |
89 | | -- |
90 | | --// RUN: %clang_cc1 -std=c++20 -emit-module-interface -o %t/format.pcm %t/format.cppm |
91 | | --// RUN: %clang_cc1 -std=c++20 -emit-module-interface -o %t/includes_in_gmf.pcm %t/includes_in_gmf.cppm |
92 | | --// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/test.cpp -verify -fsyntax-only |
93 | | -- |
94 | | --// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface -o %t/format.pcm %t/format.cppm |
95 | | --// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface -o %t/includes_in_gmf.pcm %t/includes_in_gmf.cppm |
96 | | --// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/test.cpp -verify -fsyntax-only |
97 | | -- |
98 | | --//--- format.h |
99 | | --#pragma once |
100 | | -- |
101 | | --namespace test { |
102 | | -- |
103 | | --template <class _Tp> |
104 | | --struct type_identity { |
105 | | -- typedef _Tp type; |
106 | | --}; |
107 | | -- |
108 | | --template <class _Tp> |
109 | | --using type_identity_t = typename type_identity<_Tp>::type; |
110 | | -- |
111 | | -- |
112 | | --template <class _Tp, class _CharT> |
113 | | --struct formatter |
114 | | --{ |
115 | | -- formatter() = delete; |
116 | | --}; |
117 | | -- |
118 | | --template <> |
119 | | --struct formatter<char, char> |
120 | | --{}; |
121 | | -- |
122 | | --template <class _CharT, class... _Args> |
123 | | --struct basic_format_string { |
124 | | -- static inline const int __handles_{ [] { |
125 | | -- formatter<char, _CharT> f; |
126 | | -- (void)f; |
127 | | -- return 0; |
128 | | -- }() }; |
129 | | -- |
130 | | -- consteval basic_format_string(const _CharT*) { |
131 | | -- (void)__handles_; |
132 | | -- } |
133 | | --}; |
134 | | -- |
135 | | --template <class... _Args> |
136 | | --using wformat_string = basic_format_string<wchar_t, type_identity_t<_Args>...>; |
137 | | -- |
138 | | --template <class... _Args> |
139 | | --using format_string = basic_format_string<char, type_identity_t<_Args>...>; |
140 | | -- |
141 | | --template <class... _Args> |
142 | | --void format(format_string<_Args...> __fmt, _Args&&... __args) {} |
143 | | -- |
144 | | --template <class... _Args> |
145 | | --void format(wformat_string<_Args...> __fmt, _Args&&... __args) {} |
146 | | -- |
147 | | --} |
148 | | -- |
149 | | --//--- format.cppm |
150 | | --module; |
151 | | --#include "format.h" |
152 | | --export module format; |
153 | | -- |
154 | | --export namespace test { |
155 | | -- using test::format; |
156 | | -- using test::formatter; |
157 | | -- using test::format_string; |
158 | | --} |
159 | | -- |
160 | | --auto something() -> void |
161 | | --{ |
162 | | -- auto a = 'a'; |
163 | | -- test::format("{}", a); |
164 | | --} |
165 | | -- |
166 | | --//--- includes_in_gmf.cppm |
167 | | --module; |
168 | | --#include "format.h" |
169 | | --export module includes_in_gmf; |
170 | | -- |
171 | | --namespace test { |
172 | | -- using test::format; |
173 | | -- using test::formatter; |
174 | | -- using test::format_string; |
| 43 | ++define double @si256todouble(i256 %a) { |
| 44 | ++ %conv = sitofp i256 %a to double |
| 45 | ++ ret double %conv |
| 46 | ++} |
| 47 | +diff -ruN --strip-trailing-cr a/llvm/test/CodeGen/fptoi-256.ll b/llvm/test/CodeGen/fptoi-256.ll |
| 48 | +--- a/llvm/test/CodeGen/fptoi-256.ll |
| 49 | ++++ b/llvm/test/CodeGen/fptoi-256.ll |
| 50 | +@@ -1,12 +0,0 @@ |
| 51 | +-; REQUIRES: aarch64-registered-target |
| 52 | +-; RUN: llc -mtriple=aarch64 < %s |
| 53 | +- |
| 54 | +-define i256 @doubletosi256(double %a) { |
| 55 | +- %conv = fptosi double %a to i256 |
| 56 | +- ret i256 %conv |
175 | 57 | -} |
176 | 58 | - |
177 | | --//--- test.cpp |
178 | | --// expected-no-diagnostics |
179 | | --import format; |
180 | | --import includes_in_gmf; |
181 | | -- |
182 | | --auto what() -> void |
183 | | --{ |
184 | | -- auto a = 'a'; |
185 | | -- test::format("{}", a); |
186 | | -- |
187 | | -- constexpr auto fs = "{}"; // test::format_string<char>{ "{}" }; // <- same result even passing exact param type |
188 | | -- test::format(fs, 'r'); |
| 59 | +-define double @si256todouble(i256 %a) { |
| 60 | +- %conv = sitofp i256 %a to double |
| 61 | +- ret double %conv |
189 | 62 | -} |
190 | | -diff -ruN --strip-trailing-cr a/clang/test/Modules/pr172241.cppm b/clang/test/Modules/pr172241.cppm |
191 | | ---- a/clang/test/Modules/pr172241.cppm |
192 | | -+++ b/clang/test/Modules/pr172241.cppm |
193 | | -@@ -1,47 +0,0 @@ |
194 | | --// RUN: rm -rf %t |
195 | | --// RUN: mkdir -p %t |
196 | | --// RUN: split-file %s %t |
197 | | --// |
198 | | --// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/m.cppm -emit-module-interface -o %t/m.pcm |
199 | | --// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/use.cpp -fmodule-file=m=%t/m.pcm -emit-llvm -o - | FileCheck %t/use.cpp |
200 | | --// |
201 | | --// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/m.cppm -emit-reduced-module-interface -o %t/m.pcm |
202 | | --// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/use.cpp -fmodule-file=m=%t/m.pcm -emit-llvm -o - | FileCheck %t/use.cpp |
203 | | -- |
204 | | --//--- header.h |
205 | | --#pragma once |
206 | | -- |
207 | | --template <unsigned T> |
208 | | --class Templ { |
209 | | --public: |
210 | | -- void lock() { __set_locked_bit(); } |
211 | | -- |
212 | | --private: |
213 | | -- static constexpr auto __set_locked_bit = [](){}; |
214 | | --}; |
215 | | -- |
216 | | --class JT { |
217 | | --public: |
218 | | -- ~JT() { |
219 | | -- Templ<4> state; |
220 | | -- state.lock(); |
221 | | -- } |
222 | | --}; |
223 | | -- |
224 | | --//--- m.cppm |
225 | | --module; |
226 | | --#include "header.h" |
227 | | --export module m; |
228 | | --export struct M { |
229 | | -- JT jt; |
230 | | --}; |
231 | | --//--- use.cpp |
232 | | --#include "header.h" |
233 | | --import m; |
234 | | -- |
235 | | --int main() { |
236 | | -- M m; |
237 | | -- return 0; |
238 | | --} |
239 | | -- |
240 | | --// CHECK: @_ZN5TemplILj4EE16__set_locked_bitE = {{.*}}linkonce_odr |
0 commit comments