[clang] [codegen] Emit missing cleanups for stmt-expr and coro suspensions [take-2] (PR #85398)
Alexander Yermolovich via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 12 17:31:20 PDT 2024
ayermolo wrote:
I think this commit is causing build failure when building clangd in debug mode with clang built in release mode.
```
Instruction does not dominate all uses!
%K1104 = getelementptr inbounds %"struct.llvm::json::Object::KV", ptr %arrayinit.begin1100, i32 0, i32 0, !dbg !93928
call void @_ZN4llvm4json9ObjectKeyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %K1104) #21, !dbg !93937
fatal error: error in backend: Broken module found, compilation aborted!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /home/ayermolo/local/llvm-build-upstream-release/bin/clang++ -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/tools/extra/clangd -I/home/ayermolo/local/upstream-llvm/llvm-project/clang-tools-extra/clangd -I/home/ayermolo/local/upstream-llvm/llvm-project/clang-tools-extra/clangd/../include-cleaner/include -Itools/clang/tools/extra/clangd/../clang-tidy -I/home/ayermolo/local/upstream-llvm/llvm-project/clang/include -Itools/clang/include -Iinclude -I/home/ayermolo/local/upstream-llvm/llvm-project/llvm/include -I/home/ayermolo/local/upstream-llvm/llvm-project/clang-tools-extra/pseudo/lib/../include -isystem/home/ayermolo/local/llvm-build-upstream-llvm/build/lib/clang/19/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -fno-common -Woverloaded-virtual -Wno-nested-anon-types -g -std=c++17 -MD -MT /home/ayermolo/local/llvm-build-upstream-debug/tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/ClangdLSPServer.cpp.o -MF /home/ayermolo/local/llvm-build-upstream-debug/tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/ClangdLSPServer.cpp.o.d -o /home/ayermolo/local/llvm-build-upstream-debug/tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/ClangdLSPServer.cpp.o -c /home/ayermolo/local/upstream-llvm/llvm-project/clang-tools-extra/clangd/ClangdLSPServer.cpp
```
Dropping this commit and running above clang build command makes it pass.
build command for easier reading:
```
COMP=/home/ayermolo/local/llvm-build-upstream-release/bin
$COMP/clang++ -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS \
-Itools/clang/tools/extra/clangd \
-I/home/ayermolo/local/upstream-llvm/llvm-project/clang-tools-extra/clangd \
-I/home/ayermolo/local/upstream-llvm/llvm-project/clang-tools-extra/clangd/../include-cleaner/include \
-Itools/clang/tools/extra/clangd/../clang-tidy \
-I/home/ayermolo/local/upstream-llvm/llvm-project/clang/include \
-Itools/clang/include \
-Iinclude \
-I/home/ayermolo/local/upstream-llvm/llvm-project/llvm/include \
-I/home/ayermolo/local/upstream-llvm/llvm-project/clang-tools-extra/pseudo/lib/../include \
-isystem/home/ayermolo/local/llvm-build-upstream-llvm/build/lib/clang/19/include \
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra \
-Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi \
-Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override \
-Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -fno-common -Woverloaded-virtual \
-Wno-nested-anon-types -g -std=c++17 -MD \
-MT /home/ayermolo/local/llvm-build-upstream-debug/tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/ClangdLSPServer.cpp.o \
-MF /home/ayermolo/local/llvm-build-upstream-debug/tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/ClangdLSPServer.cpp.o.d \
-o /home/ayermolo/local/llvm-build-upstream-debug/tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/ClangdLSPServer.cpp.o \
-c /home/ayermolo/local/upstream-llvm/llvm-project/clang-tools-extra/clangd/ClangdLSPServer.cpp
```
https://github.com/llvm/llvm-project/pull/85398
More information about the cfe-commits
mailing list