diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-02-24 22:40:36 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-02-24 22:40:36 +0000 |
commit | 4f283c8b2022ae575349a0f3ce2da9b076826a45 (patch) | |
tree | c69ec77894747003465c3574e8492b7ff6e6bd33 /clang/test/CodeGenCXX/forward-enum.cpp | |
parent | b049aef2d13d9c49a1c4909f7d16e01fe1e88bf9 (diff) | |
download | bcm5719-llvm-4f283c8b2022ae575349a0f3ce2da9b076826a45.tar.gz bcm5719-llvm-4f283c8b2022ae575349a0f3ce2da9b076826a45.zip |
For the purposes of building LLVM types, a forward-declared
enumeration type with a fixed underlying type is complete. Fixes
<rdar://problem/10916155>.
llvm-svn: 151403
Diffstat (limited to 'clang/test/CodeGenCXX/forward-enum.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/forward-enum.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/forward-enum.cpp b/clang/test/CodeGenCXX/forward-enum.cpp new file mode 100644 index 00000000000..c1169e01399 --- /dev/null +++ b/clang/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); +} |