[cfe-commits] [PATCH] llvm.annotation support

Chris Lattner clattner at apple.com
Fri Jun 17 21:45:51 PDT 2011


On Jun 17, 2011, at 4:57 PM, John McCall wrote:

> As a general note, this looks pretty good;  I just have a few organizational
> and data-structure comments.
> 
> diff --git a/lib/CodeGen/CGAnnotations.cpp b/lib/CodeGen/CGAnnotations.cpp
> 
> +static const char *AnnotationSection = "llvm.metadata";
> 
> This should be a #define;  every single place you use this in the file ends up having to call strlen completely unnecessarily.

FYI, the optimizer folds strlen of constant strings.  This would be preferred though:

static const char * const AnnotationSection = "llvm.metadata";

-Chris



More information about the cfe-commits mailing list