diff options
| author | Andy Kaylor <akaylor@nvidia.com> | 2025-05-30 13:36:48 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-30 13:36:48 -0700 |
| commit | 0e90a846d6dd48c0097ade8e0fa2221a8a6aef6c (patch) | |
| tree | 0a45df3c457955c1666ed1d1fb0bec7494647177 /clang/test/CIR/CodeGen/struct.cpp | |
| parent | 397fdb172a515f5cd75aa6bf9ef530ac6eb4dd25 (diff) | |
[CIR] Add support for global linkage and visibility (#141973)
This change adds support for the CIRGlobalValueInterface and attributes
for visibility and comdat to GlobalOp.
The comdat attribute isn't correctly calculated yet, but it was required
for the CIRGlobalValueInterface interface. There are also some cases
where dso_local isn't set correctly, but it is better than it was before
this change. Those issues will be addressed in a future patch.
Diffstat (limited to 'clang/test/CIR/CodeGen/struct.cpp')
| -rw-r--r-- | clang/test/CIR/CodeGen/struct.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CIR/CodeGen/struct.cpp b/clang/test/CIR/CodeGen/struct.cpp index 5948d1423d44..8b9c51bebf97 100644 --- a/clang/test/CIR/CodeGen/struct.cpp +++ b/clang/test/CIR/CodeGen/struct.cpp @@ -9,7 +9,7 @@ struct IncompleteS; IncompleteS *p; // CIR: cir.global external @p = #cir.ptr<null> : !cir.ptr<!rec_IncompleteS> -// LLVM: @p = dso_local global ptr null +// LLVM: @p = global ptr null // OGCG: @p = global ptr null, align 8 struct CompleteS { @@ -20,7 +20,7 @@ struct CompleteS { CompleteS cs; // CIR: cir.global external @cs = #cir.zero : !rec_CompleteS -// LLVM-DAG: @cs = dso_local global %struct.CompleteS zeroinitializer +// LLVM-DAG: @cs = global %struct.CompleteS zeroinitializer // OGCG-DAG: @cs = global %struct.CompleteS zeroinitializer, align 4 void f(void) { |
