diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-12-11 21:23:03 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-12-11 21:23:03 +0000 |
commit | 20e098b7e7fda6bed1d67441b56cce77cd3aa918 (patch) | |
tree | 69c3d6bbf49d088bc825432c67d6e29456554b09 /test/CodeGenCXX/global-llvm-constant.cpp | |
parent | d8e494faa9f4bc13cd0a136b4d1ee1cfd52860ea (diff) |
Fix for PR5714: make sure globals that will be modified aren't marked const.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91156 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/global-llvm-constant.cpp')
-rw-r--r-- | test/CodeGenCXX/global-llvm-constant.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGenCXX/global-llvm-constant.cpp b/test/CodeGenCXX/global-llvm-constant.cpp new file mode 100644 index 0000000000..bd4319667e --- /dev/null +++ b/test/CodeGenCXX/global-llvm-constant.cpp @@ -0,0 +1,10 @@ +// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s + +struct A { + A() { x = 10; } + int x; +}; + +const A x; + +// CHECK: @x = internal global |