diff options
| author | Renato Golin <renato.golin@linaro.org> | 2014-05-27 16:46:27 +0000 |
|---|---|---|
| committer | Renato Golin <renato.golin@linaro.org> | 2014-05-27 16:46:27 +0000 |
| commit | e7b3d5dcb47b6f5d432686778d00878c76303600 (patch) | |
| tree | 18e890bf1b6b559eb2a2e34cd88b1b6bd191eab6 /clang/test/CodeGen | |
| parent | 71dddd51d928945d5ceb7e84322f2fe8244054d2 (diff) | |
| download | bcm5719-llvm-e7b3d5dcb47b6f5d432686778d00878c76303600.tar.gz bcm5719-llvm-e7b3d5dcb47b6f5d432686778d00878c76303600.zip | |
Revert small change to EmitDeclRefLValue
That small change, although it looked harmless, it made emitting the LValue
on the PHI node without the proper cast. Reverting it fixes PR19841.
llvm-svn: 209663
Diffstat (limited to 'clang/test/CodeGen')
| -rw-r--r-- | clang/test/CodeGen/pr19841.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/clang/test/CodeGen/pr19841.cpp b/clang/test/CodeGen/pr19841.cpp new file mode 100644 index 00000000000..4350625d182 --- /dev/null +++ b/clang/test/CodeGen/pr19841.cpp @@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s + +namespace Common { +enum RenderMode { + kRenderEGA, + kRenderCGA +}; +class C; +class A { + A(); + C *_vm; + unsigned char _highlightColorTableVGA[]; + static const unsigned char b[]; +}; +class B { +public: + Common::RenderMode _configRenderMode; +}; +class C : public B {}; +A::A() { + 0 == Common::kRenderCGA || _vm->_configRenderMode == Common::kRenderEGA + ? b + : _highlightColorTableVGA; +// Make sure the PHI value is casted correctly to the PHI type +// CHECK: %cond-lvalue = phi [0 x i8]* [ bitcast ([1 x i8]* @_ZN6Common1A1bE to [0 x i8]*), %cond.true ], [ %_highlightColorTableVGA, %cond.false ] +} +const unsigned char A::b[] = { 0 }; +} |

