mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 04:36:07 +00:00

Generate nuw GEPs for struct member accesses, as inbounds + non-negative implies nuw. Regression tests are updated using update scripts where possible, and by find + replace where not.
12 lines
313 B
C++
12 lines
313 B
C++
// RUN: %clang_cc1 -triple i686-unknown-windows-msvc -fblocks -emit-llvm -o - %s | FileCheck %s
|
|
|
|
struct S {
|
|
S(const struct S &) {}
|
|
};
|
|
|
|
void (^b)(S) = ^(S) {};
|
|
|
|
// CHECK: [[DESCRIPTOR:%.*]] = getelementptr inbounds nuw <{ ptr, %struct.S, [3 x i8] }>, ptr %0, i32 0, i32 0
|
|
// CHECK: load ptr, ptr [[DESCRIPTOR]]
|
|
|