[llvm-commits] [llvm] r86914 - in /llvm/trunk: include/llvm/Analysis/DebugInfo.h include/llvm/Metadata.h lib/Analysis/DebugInfo.cpp lib/VMCore/Metadata.cpp

Devang Patel devang.patel at gmail.com
Mon Nov 23 09:46:27 PST 2009


On Sun, Nov 22, 2009 at 10:06 AM, Daniel Dunbar <daniel at zuster.org> wrote:
> As Jeffrey points out, if debug info is already ignoring "" then it
> would "just work" by using .empty(), on null stringrefs.

Another wrinkle here is the one of the client, llvm-gcc, does not use
StringRef to access its tree nodes. Which means when llvm-gcc need to
check for NULL to pass IDENTIFIER_POINTER(DECL_ASSEMBLER_NAME(Node))
through debug info API. And DwarfWriter will have to again check for
null or empty string.

> StringRef() equals StringRef(0).

IIRC, this is not true. StringRef(0) does not work.

> StringRef is a "ref", so you get what
> you put in. (StringRef(p).data() == p).

-
Devang



More information about the llvm-commits mailing list