Skip to content

Commit e41d780

Browse files
authored
chore: bump LLVM commit hash to dd7a3d4 (#728)
1 parent 0e36580 commit e41d780

File tree

7 files changed

+280
-164
lines changed

7 files changed

+280
-164
lines changed

.github/workflows/ci.yml

+76-96
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
clang: git build-essential pkg-config python3 curl openjdk-11-jdk pkg-config libncurses-dev libxml2-utils libxml2-dev
6464
msvc: ''
6565
extra-values: |
66-
llvm-hash: e1065370aaacb1b1cb48e77d37d376bf024f4a39
66+
llvm-hash: dd7a3d4d798e30dfe53b5bbbbcd9a23c24ea1af9
6767
llvm-id: {{ substr llvm-hash 0 7 }}
6868
llvm-build-preset-prefix: {{#if optimized-debug}}debwithopt{{else}}{{lowercase build-type}}{{/if}}
6969
llvm-build-preset-suffix: {{#if (ieq os 'windows') }}win{{else}}unix{{/if}}
@@ -74,10 +74,6 @@ jobs:
7474
llvm-archive-basename: llvm-{{ os }}-{{ llvm-build-preset-prefix }}-{{ llvm-id }}
7575
llvm-archive-extension: {{#if (ieq os 'windows') }}7z{{else}}tar.bz2{{/if}}
7676
llvm-archive-filename: {{ llvm-archive-basename }}.{{ llvm-archive-extension }}
77-
libcxx-runtimes: libcxx;libcxxabi{{#if (ine os 'windows') }};libunwind{{/if}}
78-
libcxx-targets: cxx {{#if (ine os 'windows') }}cxxabi unwind{{/if}} install-cxx {{#if (ine os 'windows') }}install-cxxabi install-unwind{{/if}}
79-
libcxx-cxxflags: {{#if (ieq os 'windows') }}-D__ORDER_LITTLE_ENDIAN__=1234 -D__ORDER_BIG_ENDIAN__=4321 -D__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__{{/if}}
80-
libcxx-cmake-args: -D LLVM_ENABLE_RUNTIMES="{{ libcxx-runtimes }}" {{#if (ieq os 'windows') }}-D LIBCXXABI_USE_LLVM_UNWINDER=OFF -D LIBCXXABI_ENABLE_SHARED=OFF -D LIBCXXABI_ENABLE_STATIC=ON -D LIBCXX_ENABLE_SHARED=OFF -D LIBCXX_NO_VCRUNTIME=ON{{/if}} {{#if (ieq os 'macos') }}-D CMAKE_OSX_ARCHITECTURES=""{{/if}}
8177
mrdocs-ccflags: {{ ccflags }} {{#if (eq compiler 'gcc') }}-static{{/if}} {{#if asan }}-static-libasan{{/if}} {{#if tsan }}-static-libtsan{{/if}}
8278
mrdocs-cxxflags: {{ cxxflags }} {{#if (eq compiler 'gcc') }}-static{{/if}} {{#if asan }}-static-libasan{{/if}} {{#if tsan }}-static-libtsan{{/if}}
8379
mrdocs-package-generators: {{#if (ieq os 'windows') }}7Z ZIP WIX{{else}}TGZ TXZ{{/if}}
@@ -178,6 +174,81 @@ jobs:
178174
with:
179175
apt-get: ${{ matrix.install }}
180176

177+
- name: Resolve LLVM Root
178+
id: resolve-llvm-root
179+
run: |
180+
set -x
181+
cd ..
182+
llvm_root=$(pwd)/third-party/llvm-project/install
183+
if [[ ${{ runner.os }} == 'Windows' ]]; then
184+
llvm_root=$(echo "$llvm_root" | sed 's/\\/\//g')
185+
llvm_root=$(echo $llvm_root | sed 's|^/d/|D:/|')
186+
echo "$llvm_root"
187+
fi
188+
echo -E "llvm-root=$llvm_root" >> $GITHUB_OUTPUT
189+
190+
- name: Cached LLVM Binaries
191+
id: llvm-cache
192+
uses: actions/cache@v4
193+
with:
194+
path: ${{ steps.resolve-llvm-root.outputs.llvm-root }}
195+
key: ${{ matrix.llvm-cache-key }}
196+
197+
- name: Download LLVM Binaries
198+
id: llvm-download
199+
if: steps.llvm-cache.outputs.cache-hit != 'true'
200+
run: |
201+
set -x
202+
url=https://mrdocs.com/llvm+clang/${{ matrix.llvm-archive-filename }}
203+
http_status=$(curl -s -o /dev/null -w "%{http_code}" -I "$url")
204+
if [ "$http_status" -eq 200 ]; then
205+
found="true"
206+
echo "found=$found" >> $GITHUB_OUTPUT
207+
curl -L -o ${{ matrix.llvm-archive-filename }} "$url"
208+
install_prefix=$(pwd)/../third-party/llvm-project/install
209+
mkdir -p $install_prefix
210+
if [[ ${{ matrix.llvm-archive-extension }} == '7z' ]]; then
211+
7z x ${{ matrix.llvm-archive-filename }} -o$install_prefix
212+
else
213+
tar -xjf ${{ matrix.llvm-archive-filename }} -C $install_prefix
214+
fi
215+
if [[ $(ls -1 $install_prefix | wc -l) -eq 1 ]]; then
216+
single_dir=$(ls -1 $install_prefix)
217+
if [[ -d $install_prefix/$single_dir ]]; then
218+
mv $install_prefix/$single_dir/* $install_prefix/
219+
rmdir $install_prefix/$single_dir
220+
fi
221+
fi
222+
else
223+
found="false"
224+
echo "found=$found" >> $GITHUB_OUTPUT
225+
fi
226+
227+
- name: Install LLVM
228+
uses: alandefreitas/cpp-actions/[email protected]
229+
if: steps.llvm-cache.outputs.cache-hit != 'true' && steps.llvm-download.outputs.found != 'true'
230+
with:
231+
cmake-version: '>=3.26'
232+
source-dir: ../third-party/llvm-project/llvm
233+
git-repository: https://github.com/llvm/llvm-project.git
234+
git-tag: ${{ matrix.llvm-hash }}
235+
download-dir: ../third-party/llvm-project
236+
patches: |
237+
./third-party/llvm/CMakePresets.json
238+
./third-party/llvm/CMakeUserPresets.json
239+
build-dir: ${sourceDir}/llvm/build
240+
preset: ${{ matrix.llvm-build-preset }}
241+
build-type: ${{ matrix.build-type }}
242+
extra-args: |
243+
${{ runner.os == 'Windows' && '-DLLVM_ENABLE_RUNTIMES=libcxx' || '-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;libunwind' }}
244+
cc: ${{ steps.setup-cpp.outputs.cc }}
245+
cxx: ${{ steps.setup-cpp.outputs.cxx }}
246+
generator: Ninja
247+
install: true
248+
install-prefix: ${sourceDir}/../install
249+
run-tests: false
250+
trace-commands: true
251+
181252
- name: Install Duktape
182253
uses: alandefreitas/cpp-actions/[email protected]
183254
with:
@@ -270,97 +341,6 @@ jobs:
270341
run-tests: false
271342
trace-commands: true
272343

273-
- name: Resolve LLVM Root
274-
id: resolve-llvm-root
275-
run: |
276-
set -x
277-
cd ..
278-
llvm_root=$(pwd)/third-party/llvm-project/install
279-
if [[ ${{ runner.os }} == 'Windows' ]]; then
280-
llvm_root=$(echo "$llvm_root" | sed 's/\\/\//g')
281-
llvm_root=$(echo $llvm_root | sed 's|^/d/|D:/|')
282-
echo "$llvm_root"
283-
fi
284-
echo -E "llvm-root=$llvm_root" >> $GITHUB_OUTPUT
285-
286-
- name: Cached LLVM Binaries
287-
id: llvm-cache
288-
uses: actions/cache@v4
289-
with:
290-
path: ${{ steps.resolve-llvm-root.outputs.llvm-root }}
291-
key: ${{ matrix.llvm-cache-key }}
292-
293-
- name: Download LLVM Binaries
294-
id: llvm-download
295-
if: steps.llvm-cache.outputs.cache-hit != 'true'
296-
run: |
297-
set -x
298-
url=https://mrdocs.com/llvm+clang/${{ matrix.llvm-archive-filename }}
299-
http_status=$(curl -s -o /dev/null -w "%{http_code}" -I "$url")
300-
if [ "$http_status" -eq 200 ]; then
301-
found="true"
302-
echo "found=$found" >> $GITHUB_OUTPUT
303-
curl -L -o ${{ matrix.llvm-archive-filename }} "$url"
304-
install_prefix=$(pwd)/../third-party/llvm-project/install
305-
mkdir -p $install_prefix
306-
if [[ ${{ matrix.llvm-archive-extension }} == '7z' ]]; then
307-
7z x ${{ matrix.llvm-archive-filename }} -o$install_prefix
308-
else
309-
tar -xjf ${{ matrix.llvm-archive-filename }} -C $install_prefix
310-
fi
311-
if [[ $(ls -1 $install_prefix | wc -l) -eq 1 ]]; then
312-
single_dir=$(ls -1 $install_prefix)
313-
if [[ -d $install_prefix/$single_dir ]]; then
314-
mv $install_prefix/$single_dir/* $install_prefix/
315-
rmdir $install_prefix/$single_dir
316-
fi
317-
fi
318-
else
319-
found="false"
320-
echo "found=$found" >> $GITHUB_OUTPUT
321-
fi
322-
323-
- name: Install LLVM
324-
uses: alandefreitas/cpp-actions/[email protected]
325-
if: steps.llvm-cache.outputs.cache-hit != 'true' && steps.llvm-download.outputs.found != 'true'
326-
with:
327-
cmake-version: '>=3.26'
328-
source-dir: ../third-party/llvm-project/llvm
329-
git-repository: https://github.com/llvm/llvm-project.git
330-
git-tag: ${{ matrix.llvm-hash }}
331-
download-dir: ../third-party/llvm-project
332-
patches: |
333-
./third-party/llvm/CMakePresets.json
334-
./third-party/llvm/CMakeUserPresets.json
335-
build-dir: ${sourceDir}/llvm/build
336-
preset: ${{ matrix.llvm-build-preset }}
337-
build-type: ${{ matrix.build-type }}
338-
cc: ${{ steps.setup-cpp.outputs.cc }}
339-
cxx: ${{ steps.setup-cpp.outputs.cxx }}
340-
install: true
341-
install-prefix: ${sourceDir}/../install
342-
run-tests: false
343-
trace-commands: true
344-
345-
- name: Install LibC++
346-
uses: alandefreitas/cpp-actions/[email protected]
347-
if: steps.llvm-cache.outputs.cache-hit != 'true' && steps.llvm-download.outputs.found != 'true'
348-
with:
349-
cmake-version: '>=3.26'
350-
source-dir: ../third-party/llvm-project/runtimes
351-
build-dir: ${sourceDir}/build-libcxx
352-
build-target: ${{ matrix.libcxx-targets }}
353-
# MrDocs will only use the LibC++ headers: any compiler that works in this workflow will do
354-
cc: ${{ runner.os == 'macOS' && steps.setup-cpp.outputs.cc || '../third-party/llvm-project/install/bin/clang' }}
355-
cxx: ${{ runner.os == 'macOS' && steps.setup-cpp.outputs.cxx || '../third-party/llvm-project/install/bin/clang++' }}
356-
cxxflags: ${{ matrix.libcxx-cxxflags }}
357-
generator: Ninja
358-
extra-args: ${{ matrix.libcxx-cmake-args }}
359-
install: true
360-
install-prefix: ${sourceDir}/../install
361-
run-tests: false
362-
trace-commands: true
363-
364344
- name: Install Node.js
365345
uses: actions/setup-node@v4
366346
with:

docs/modules/ROOT/pages/install.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ NOTE: These examples assume VcPkg is already installed in the `third-party/vcpkg
297297
=== LLVM
298298

299299
MrDocs uses LLVM to parse C++ code and extract documentation from it.
300-
It depends on a recent version of LLVM: https://github.com/llvm/llvm-project/tree/e1065370aaacb1b1cb48e77d37d376bf024f4a39[e1065370]
300+
It depends on a recent version of LLVM: https://github.com/llvm/llvm-project/tree/dd7a3d4d798e30dfe53b5bbbbcd9a23c24ea1af9[dd7a3d4]
301301

302302
**Download**:
303303

@@ -310,7 +310,7 @@ mkdir -p llvm-project <.>
310310
cd llvm-project
311311
git init <.>
312312
git remote add origin https://github.com/llvm/llvm-project.git <.>
313-
git fetch --depth 1 origin e1065370aaacb1b1cb48e77d37d376bf024f4a39 <.>
313+
git fetch --depth 1 origin dd7a3d4d798e30dfe53b5bbbbcd9a23c24ea1af9 <.>
314314
git checkout FETCH_HEAD <.>
315315
----
316316

src/lib/AST/ASTVisitor.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1697,15 +1697,15 @@ class ASTVisitor
16971697
template_params, sfinae_info->Arguments, param_idx);
16981698
if(! param_arg)
16991699
return std::nullopt;
1700-
unsigned ParamIdx = FindParam(ATD->getInjectedTemplateArgs(), *param_arg);
1700+
unsigned ParamIdx = FindParam(ATD->getInjectedTemplateArgs(context_), *param_arg);
17011701
return std::make_tuple(ATD->getTemplateParameters(), std::move(controlling_params), ParamIdx);
17021702
}
17031703

17041704
auto* CTD = dyn_cast<ClassTemplateDecl>(TD);
17051705
if(! CTD)
17061706
return std::nullopt;
17071707

1708-
auto PrimaryArgs = CTD->getInjectedTemplateArgs();
1708+
auto PrimaryArgs = CTD->getInjectedTemplateArgs(context_);
17091709
llvm::SmallBitVector ControllingParams(PrimaryArgs.size());
17101710

17111711
QualType MemberType;

0 commit comments

Comments
 (0)