LLVM 20.0.0git
Argument.h
Go to the documentation of this file.
1//===- Argument.h -----------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_SANDBOXIR_ARGUMENT_H
10#define LLVM_SANDBOXIR_ARGUMENT_H
11
12#include "llvm/IR/Argument.h"
14
15namespace llvm::sandboxir {
16
17/// Argument of a sandboxir::Function.
18class Argument : public sandboxir::Value {
20 : Value(ClassID::Argument, Arg, Ctx) {}
21 friend class Context; // For constructor.
22
23public:
24 static bool classof(const sandboxir::Value *From) {
25 return From->getSubclassID() == ClassID::Argument;
26 }
27#ifndef NDEBUG
28 void verify() const final {
29 assert(isa<llvm::Argument>(Val) && "Expected Argument!");
30 }
31 void printAsOperand(raw_ostream &OS) const;
32 void dumpOS(raw_ostream &OS) const final;
33#endif
34};
35
36} // namespace llvm::sandboxir
37
38#endif // LLVM_SANDBOXIR_ARGUMENT_H
aarch64 promote const
BlockVerifier::State From
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
raw_pwrite_stream & OS
This class represents an incoming formal argument to a Function.
Definition: Argument.h:31
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
Argument of a sandboxir::Function.
Definition: Argument.h:18
void dumpOS(raw_ostream &OS) const final
Definition: Argument.cpp:17
void printAsOperand(raw_ostream &OS) const
Definition: Argument.cpp:14
void verify() const final
Should crash if there is something wrong with the instruction.
Definition: Argument.h:28
static bool classof(const sandboxir::Value *From)
Definition: Argument.h:24
A SandboxIR Value has users. This is the base class.
Definition: Value.h:63
llvm::Value * Val
The LLVM Value that corresponds to this SandboxIR Value.
Definition: Value.h:103
Context & Ctx
All values point to the context.
Definition: Value.h:172