Closed ivanmurashko closed 1 month ago
@bcardosolopes, could you look at the patch?
@bcardosolopes could you look at the test I created?
I used the following command to created the test data for LLVM-IR
bin/clang -cc1 -triple aarch64-none-linux-android21 -emit-llvm ../clang/test/CIR/CodeGen/string-literals.c -o /tmp/test.ll
I.e. the check data were created without Clang-IR involvement
The patch resolves issue #248. It can be considered a subsequent patch to #373, where the case of empty strings was processed.
The new patch adds processing for non-empty strings that may contain trailing zeros, such as:
That is converted to
It's worth noting that ordinary strings that are terminated with a single zero also get the trailing zeros, for instance
Is converted to