forked from OSchip/llvm-project
Add missing code for compound literals of complex type. <rdar://problem/10938628>
llvm-svn: 151549
This commit is contained in:
parent
91d0098dc8
commit
afa84ae85b
|
@ -261,6 +261,10 @@ public:
|
|||
|
||||
ComplexPairTy VisitInitListExpr(InitListExpr *E);
|
||||
|
||||
ComplexPairTy VisitCompoundLiteralExpr(CompoundLiteralExpr *E) {
|
||||
return EmitLoadOfLValue(E);
|
||||
}
|
||||
|
||||
ComplexPairTy VisitVAArgExpr(VAArgExpr *E);
|
||||
|
||||
ComplexPairTy VisitAtomicExpr(AtomicExpr *E) {
|
||||
|
|
|
@ -9,4 +9,10 @@ _Complex float x = { 1.0f, 1.0f/0.0f };
|
|||
|
||||
_Complex float f(float x, float y) { _Complex float z = { x, y }; return z; }
|
||||
// CHECK: define <2 x float> @f
|
||||
// CHECK: alloca { float, float }
|
||||
// CHECK: alloca { float, float }
|
||||
// CHECK: alloca { float, float }
|
||||
|
||||
_Complex float f2(float x, float y) { return (_Complex float){ x, y }; }
|
||||
// CHECK: define <2 x float> @f2
|
||||
// CHECK: alloca { float, float }
|
||||
// CHECK: alloca { float, float }
|
||||
|
|
Loading…
Reference in New Issue