[cfe-dev] A function which has anonymous enum parameter is not code-generated

Jaemin Park jm.j.park at samsung.com
Wed May 2 22:10:13 PDT 2012


Hello, 

 

A function which has anonymous enum parameters is not code-generated. 

 

This is a sample code. 

 

amespace {

enum _TestEnum {

  ENUM_ZERO = 0,

};

}

 

bool foo(_TestEnum val)

{

  if (val == ENUM_ZERO)

    return true;

  return false;

}

 

This is the output from the latest clang at trunk. 

 

; ModuleID = 'anonymous_namespace_test.cpp'

target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-
i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-
n8:16:32-S128"

target triple = "i386-pc-linux-gnu"

 

I attach the sample code. 

 

Sincerely yours, 

Jaemin Park. 

 

---

Jaemin Park

 

Service Platform Group.

Samsung Electronics Co.

jm.j.park at samsung.com 

 

"God is Love

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120503/f1d3bc68/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: anonymous_namespace_test.cpp
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120503/f1d3bc68/attachment.ksh>


More information about the cfe-dev mailing list