[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 28 10:39:06 PST 2025


gulfemsavrun wrote:

This recently added tests failed on Windows like `extend-variable-liveness-except.cpp`, and https://github.com/llvm/llvm-project/commit/8ad9e1ecb7e565c2f99b4ef67517d1f37d1c80d0 did not fix this issue. Could you please revert while investigating?
```
FAIL: Clang :: CodeGen/extend-variable-liveness-except.cpp (7227 of 21842)
******************** TEST 'Clang :: CodeGen/extend-variable-liveness-except.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\b\s\w\ir\x\w\llvm_build\bin\clang.exe -cc1 -internal-isystem C:\b\s\w\ir\x\w\llvm_build\lib\clang\20\include -nostdsysteminc C:\b\s\w\ir\x\w\llvm-llvm-project\clang\test\CodeGen\extend-variable-liveness-except.cpp -emit-llvm -fextend-variable-liveness -fcxx-exceptions -fexceptions -o - | c:\b\s\w\ir\x\w\llvm_build\bin\filecheck.exe C:\b\s\w\ir\x\w\llvm-llvm-project\clang\test\CodeGen\extend-variable-liveness-except.cpp
# executed command: 'c:\b\s\w\ir\x\w\llvm_build\bin\clang.exe' -cc1 -internal-isystem 'C:\b\s\w\ir\x\w\llvm_build\lib\clang\20\include' -nostdsysteminc 'C:\b\s\w\ir\x\w\llvm-llvm-project\clang\test\CodeGen\extend-variable-liveness-except.cpp' -emit-llvm -fextend-variable-liveness -fcxx-exceptions -fexceptions -o -
# executed command: 'c:\b\s\w\ir\x\w\llvm_build\bin\filecheck.exe' 'C:\b\s\w\ir\x\w\llvm-llvm-project\clang\test\CodeGen\extend-variable-liveness-except.cpp'
# .---command stderr------------
# | C:\b\s\w\ir\x\w\llvm-llvm-project\clang\test\CodeGen\extend-variable-liveness-except.cpp:15:11: error: CHECK: expected string not found in input
# | // CHECK: [[CATCH_PTR:%[a-zA-Z0-9\.]+]] = call ptr @__cxa_begin_catch(
# |           ^
# | <stdin>:1:1: note: scanning from here
# | ; ModuleID = 'C:\b\s\w\ir\x\w\llvm-llvm-project\clang\test\CodeGen\extend-variable-liveness-except.cpp'
# | ^
# | <stdin>:25:1: note: possible intended match here
# | catch: ; preds = %catch.dispatch
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\b\s\w\ir\x\w\llvm-llvm-project\clang\test\CodeGen\extend-variable-liveness-except.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: ; ModuleID = 'C:\b\s\w\ir\x\w\llvm-llvm-project\clang\test\CodeGen\extend-variable-liveness-except.cpp' 
# | check:15'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |             2: source_filename = "C:\\b\\s\\w\\ir\\x\\w\\llvm-llvm-project\\clang\\test\\CodeGen\\extend-variable-liveness-except.cpp" 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             3: target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             4: target triple = "x86_64-pc-windows-msvc" 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             5:  
# | check:15'0     ~
# |             6: %rtti.TypeDescriptor2 = type { ptr, ptr, [3 x i8] } 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# |            20:  to label %invoke.cont unwind label %catch.dispatch 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            21:  
# | check:15'0     ~
# |            22: catch.dispatch: ; preds = %entry 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            23:  %0 = catchswitch within none [label %catch] unwind to caller 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            24:  
# | check:15'0     ~
# |            25: catch: ; preds = %catch.dispatch 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:15'1     ?                                 possible intended match
# |            26:  %1 = catchpad within %0 [ptr @"??_R0H at 8", i32 0, ptr %l] 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            27:  store i32 8, ptr %m, align 4 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            28:  %fake.use1 = load i32, ptr %m, align 4 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            29:  notail call void (...) @llvm.fake.use(i32 %fake.use1) #2 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            30:  catchret from %1 to label %catchret.dest 
# | check:15'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--
```
https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-windows-x64/b8724497761651154417/overview

https://github.com/llvm/llvm-project/pull/110102


More information about the cfe-commits mailing list