From a98a28534e48e59d5f7d69adae121589e298dd43 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 24 Feb 2012 22:40:36 +0000 Subject: For the purposes of building LLVM types, a forward-declared enumeration type with a fixed underlying type is complete. Fixes . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151403 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGenCXX/forward-enum.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/CodeGenCXX/forward-enum.cpp (limited to 'test/CodeGenCXX/forward-enum.cpp') diff --git a/test/CodeGenCXX/forward-enum.cpp b/test/CodeGenCXX/forward-enum.cpp new file mode 100644 index 0000000000..c1169e0139 --- /dev/null +++ b/test/CodeGenCXX/forward-enum.cpp @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin11.0.0 -emit-llvm -o - %s | FileCheck %s + +enum MyEnum : char; +void bar(MyEnum value) { } + +// CHECK: define void @_Z3foo6MyEnum +void foo(MyEnum value) +{ + // CHECK: call void @_Z3bar6MyEnum(i8 signext + bar(value); +} -- cgit v1.2.3-70-g09d2