[llvm-commits] [llvm] r80414 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp

Duncan Sands baldrick at free.fr
Sat Aug 29 02:21:02 PDT 2009


Hi Eric,

> +      bool is4Byte = TD->getPointerSize() == sizeof(int32_t);

the RHS of this is equal to 4, I don't see the point of the
sizeof.  32 bits is always going to be 4 bytes.

> +
> +      Asm->EmitULEB128Bytes(is4Byte ? 4 : 8);

Why not just output TD->getPointerSize()?  This will handle future
16 byte pointers automatically :)

> +        EmitReference("exception", EHFrameInfo.Number, true, false);
> +      else {
> +	if (is4Byte)

Funny indentation (maybe due to using tabs rather than spaces?).

> +	  Asm->EmitInt32((int)0);
> +	else
> +	  Asm->EmitInt64((int)0);
> +      }

It would be nice to be able to instead do: EmitPointer(0).

Ciao,

Duncan.



More information about the llvm-commits mailing list