[llvm] r174235 - [Dwarf] avoid emitting multiple AT_const_value for static memebers.

Eric Christopher echristo at gmail.com
Tue Feb 26 10:56:39 PST 2013


-  else if (const ConstantExpr *CE =
> getMergedGlobalExpr(N->getOperand(11))) {
> +             dyn_cast_or_null<ConstantInt>(GV.getConstant())) {
> +    // AT_const_value was added when the static memeber was created. To
> avoid
> +    // emitting AT_const_value multiple times, we only add AT_const_value
> when
> +    // it is not a static member.
> +    if (!IsStaticMember)
> +      addConstantValue(VariableDIE, CI, GTy.isUnsignedDIType());
> +  } else if (const ConstantExpr *CE =
> getMergedGlobalExpr(N->getOperand(11))) {
>


No need for the parens anymore I don't think?

Also, if you can add into the testcase where you reduced it from if you
can't provide C source.

Thanks!

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130226/95572b93/attachment.html>


More information about the llvm-commits mailing list