diff options
author | Daniel Dunbar <daniel@zuster.org> | 2012-03-02 16:24:25 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2012-03-02 16:24:25 +0000 |
commit | c169e08f3ad678df4ffb87cbbe5096208f6bf40a (patch) | |
tree | 9b76f7a4f425cacc7419422470ad95db795caf76 /test/CodeGenCXX/const-init-cxx11.cpp | |
parent | edd1caec02d5a698594ed4070574974b6b2b49e8 (diff) |
Revert r151879, r151880, "PR12145: Avoid emitting loads of constexpr variables in contexts where there" and "Fix buildbot: make this test less dependent on the value names in the produced IR."
They broke bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151922 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/const-init-cxx11.cpp')
-rw-r--r-- | test/CodeGenCXX/const-init-cxx11.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/test/CodeGenCXX/const-init-cxx11.cpp b/test/CodeGenCXX/const-init-cxx11.cpp index e2a11c295f..5366d6d485 100644 --- a/test/CodeGenCXX/const-init-cxx11.cpp +++ b/test/CodeGenCXX/const-init-cxx11.cpp @@ -337,30 +337,3 @@ namespace VirtualBase { X<D> x; // CHECK: call {{.*}}@_ZN11VirtualBase1XINS_1DEEC1Ev } - -// PR12145 -namespace Unreferenced { - int n; - constexpr int *p = &n; - // We must not emit a load of 'p' here, since it's not odr-used. - int q = *p; - // CHECK-NOT: _ZN12Unreferenced1pE - // CHECK: = load i32* @_ZN12Unreferenced1nE - // CHECK-NEXT: store i32 {{.*}}, i32* @_ZN12Unreferenced1qE - // CHECK-NOT: _ZN12Unreferenced1pE - - // Technically, we are not required to substitute variables of reference types - // initialized by constant expressions, because the special case for odr-use - // of variables in [basic.def.odr]p2 only applies to objects. But we do so - // anyway. - - constexpr int &r = n; - // CHECK-NOT: _ZN12Unreferenced1rE - int s = r; - - const int t = 1; - const int &rt = t; - int f(int); - int u = f(rt); - // CHECK: call i32 @_ZN12Unreferenced1fEi(i32 1) -} |