summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/const-init-cxx11.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2012-03-02 16:24:25 +0000
committerDaniel Dunbar <daniel@zuster.org>2012-03-02 16:24:25 +0000
commitd01281fe0d14d65be578c5302319e386890c18ca (patch)
tree3b2cd5905ec7a2e9a050694769bbaa1e71473c49 /clang/test/CodeGenCXX/const-init-cxx11.cpp
parent9370ecff74f35a6f352e072520dc6a2136083c5c (diff)
downloadbcm5719-llvm-d01281fe0d14d65be578c5302319e386890c18ca.tar.gz
bcm5719-llvm-d01281fe0d14d65be578c5302319e386890c18ca.zip
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. llvm-svn: 151922
Diffstat (limited to 'clang/test/CodeGenCXX/const-init-cxx11.cpp')
-rw-r--r--clang/test/CodeGenCXX/const-init-cxx11.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/clang/test/CodeGenCXX/const-init-cxx11.cpp b/clang/test/CodeGenCXX/const-init-cxx11.cpp
index e2a11c295f0..5366d6d4855 100644
--- a/clang/test/CodeGenCXX/const-init-cxx11.cpp
+++ b/clang/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)
-}
OpenPOWER on IntegriCloud