reference to %llvm.dbg.variable in source level debug docs

Hello
I'm reading http://llvm.org/docs/SourceLevelDebugging.html and some
things aren't clear.

There are a couple of references made to %llvm.dbg.variable, which
isn't defined anywhere. It it an intrinsic? A global? Could it be a
relic from the old debug info docs (where it *is* defined?). The same
goes for llvm.dbg.derivedtype and llvm.dbg.subrange which are also
referenced but not defined.

Additionally, there's this definition:

"""
void %llvm.dbg.declare(metadata, metadata)

This intrinsic provides information about a local element (ex.
variable.) The first argument is metadata holding alloca for the
variable.. The second argument is the %llvm.dbg.variable containing
the description of the variable.
"""

I see all uses of llvm.dbg.declare having values/types as first
argument, not metadata. What am I missing?
Thanks in advance,
Eli

Hello
I'm reading http://llvm.org/docs/SourceLevelDebugging.html and some
things aren't clear.

There are a couple of references made to %llvm.dbg.variable, which
isn't defined anywhere. It it an intrinsic? A global? Could it be a
relic from the old debug info docs (where it *is* defined?). The same
goes for llvm.dbg.derivedtype and llvm.dbg.subrange which are also
referenced but not defined.

It was a stale reference. I fixed the docs.

Additionally, there's this definition:

"""
void %llvm.dbg.declare(metadata, metadata)

This intrinsic provides information about a local element (ex.
variable.) The first argument is metadata holding alloca for the
variable.. The second argument is the %llvm.dbg.variable containing
the description of the variable.
"""

I see all uses of llvm.dbg.declare having values/types as first
argument, not metadata. What am I missing?

I am seeing
  call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !12), !dbg !13

?

There are a couple of references made to %llvm.dbg.variable, which
isn't defined anywhere. It it an intrinsic? A global? Could it be a
relic from the old debug info docs (where it *is* defined?). The same
goes for llvm.dbg.derivedtype and llvm.dbg.subrange which are also
referenced but not defined.

It was a stale reference. I fixed the docs.

Thanks. Is llvm.dbg.derivedtype.type also a stale reference? It's
mentioned in "Derived type descriptors" but isn't described or defined
anywhere.

Additionally, there's this definition:

"""
void %llvm.dbg.declare(metadata, metadata)

This intrinsic provides information about a local element (ex.
variable.) The first argument is metadata holding alloca for the
variable.. The second argument is the %llvm.dbg.variable containing
the description of the variable.
"""

I see all uses of llvm.dbg.declare having values/types as first
argument, not metadata. What am I missing?

I am seeing
call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !12), !dbg !13

In the example IR of http://llvm.org/docs/SourceLevelDebugging.html,
section "Object lifetimes and scoping", there is:

call void @llvm.dbg.declare({}* %2, metadata !12), !dbg !14

Which isn't exactly like the llvm.dbg.declare intrinsic is defined -
in the definition the first argument is also metadata.
Indeed, generating IR from C files using trunk clang, I also see:

call void @llvm.dbg.declare(metadata !{i32* %a.addr}, metadata !22), !dbg !23

Which is different from what
http://llvm.org/docs/SourceLevelDebugging.html shows.

Eli

Thanks Eli for finding these. I have fixed these stale references. Please let me know if you find anything else.