Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:25

0001 //===- Argument.h -----------------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_SANDBOXIR_ARGUMENT_H
0010 #define LLVM_SANDBOXIR_ARGUMENT_H
0011 
0012 #include "llvm/IR/Argument.h"
0013 #include "llvm/SandboxIR/Value.h"
0014 
0015 namespace llvm::sandboxir {
0016 
0017 /// Argument of a sandboxir::Function.
0018 class Argument : public sandboxir::Value {
0019   Argument(llvm::Argument *Arg, sandboxir::Context &Ctx)
0020       : Value(ClassID::Argument, Arg, Ctx) {}
0021   friend class Context; // For constructor.
0022 
0023 public:
0024   static bool classof(const sandboxir::Value *From) {
0025     return From->getSubclassID() == ClassID::Argument;
0026   }
0027 #ifndef NDEBUG
0028   void verify() const final {
0029     assert(isa<llvm::Argument>(Val) && "Expected Argument!");
0030   }
0031   void printAsOperand(raw_ostream &OS) const;
0032   void dumpOS(raw_ostream &OS) const final;
0033 #endif
0034 };
0035 
0036 } // namespace llvm::sandboxir
0037 
0038 #endif // LLVM_SANDBOXIR_ARGUMENT_H