[PATCH] D45978: dllexport const variables must have external linkage.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 11 10:32:40 PST 2019


aaron.ballman added inline comments.


================
Comment at: test/Sema/dllexport-1.c:1-4
+// RUN: %clang_cc1 -triple i686-win32 -emit-llvm -fms-extensions -std=c99 < %s| FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-win32 -emit-llvm -fms-extensions -std=c11 < %s | FileCheck %s
+// RUN: %clang_cc1 -triple i686-mingw32 -emit-llvm -fms-extensions -std=c11 < %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-mingw32 -emit-llvm -fms-extensions -std=c11 < %s | FileCheck %s
----------------
This test should live in CodeGen not Sema.


================
Comment at: test/Sema/dllexport-1.c:8
+
+// CHECK: @y = common dso_local dllexport global i32 0, align 4
+
----------------
Are x and z also exported as expected?


================
Comment at: test/Sema/dllexport-1.cpp:4
+
+// CHECK: @"?x@@3HB" = dso_local dllexport constant i32 3, align 4
+
----------------
This test has no FileCheck line.

The goal here is for the tests in Sema to test the semantic behavior (that warnings are issued when expected and not issued when not expected) and to add tests in CodeGen to test the generated code (are things properly exported, are things we don't expect to be exported not exported, etc). I think you should split your tests accordingly rather than try to verify too much at once.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D45978/new/

https://reviews.llvm.org/D45978





More information about the cfe-commits mailing list