On Sep 18, 2007, at 04:49, Duncan Sands wrote:

Hi Gordon,

+static bool HasPtrPtrType(Value *Val) {

I think hasPtrPtrType would be more in keeping with the LLVM naming rules (whatever they are).

Do you think so? The convention I had gleaned is that local, private, or static (in the C sense) identifiers were usually distinguished by InitialCaps.

+static Value *StripBitCasts(Value *Val) {

how about using IntrinsicInst::StripPointerCasts instead?

Done. Note that, although there's tantalizing GEP-0 handling in StripPointerCasts, it's still not really possible to use gcroot without bitcasts:

%class.Object = { %vtable* }
%class.Derived = { %class.Object, ... }

declare void @llvm.gcroot(%class.Object* %root, i8* %meta)

define void @look_ma_no_casts() {
entry:
        %x_addr = alloca %class.Derived*
        %tmp0 = getelementptr %x_addr, i32 0, i32 0  ; Invalid! But nice try...
        call void @llvm.gcroot(%class.Obj* %tmp0, i8* null)
        ret void
}

+ "llvm.gcroot parameter #1 must be an alloca (or a bitcast).", &CI);

"(or a bitcast)" -> "(or a bitcast of one)"

Done.

+ "llvm.gcroot parameter #2 must be a constant or global.", &CI);

how about dropping " or global" since it seems redundant.

I agree. The manual used that phrasing, I think for clarity to those not quite so familiar with LLVM's type system. Done.

Thanks Duncan.

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of- Mon-20070917/053633.html

— Gordon

_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to