[LLVMdev] llvm::Type as llvm::Value in metadata

Eli Friedman eli.friedman at gmail.com
Mon Mar 26 16:55:31 PDT 2012


On Mon, Mar 26, 2012 at 3:08 PM, Marcus Frenkel
<marcus.frenkel at fernuni-hagen.de> wrote:
> Hi all,
>
> I've a question about something that's bothering me for quite some time now: why is a llvm::Function seen as a llvm::Value (in a sense that llvm::Function is a subclass of llvm::Value), but llvm::Type is not? Should they not - technically seen - be equal?

llvm::Function is a subclass of llvm::Value because you can use a
llvm::Function as a value (of type pointer-to-function).  The same is
not true for llvm::Type.

-Eli




More information about the llvm-dev mailing list