Skip to content

[SandboxIR][NFC] Rename SandboxIRValues.def to Values.def #110538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/include/llvm/SandboxIR/Constant.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Constant : public sandboxir::User {
static bool classof(const sandboxir::Value *From) {
switch (From->getSubclassID()) {
#define DEF_CONST(ID, CLASS) case ClassID::ID:
#include "llvm/SandboxIR/SandboxIRValues.def"
#include "llvm/SandboxIR/Values.def"
return true;
default:
return false;
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/SandboxIR/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Context {

// Friends for getOrCreateConstant().
#define DEF_CONST(ID, CLASS) friend class CLASS;
#include "llvm/SandboxIR/SandboxIRValues.def"
#include "llvm/SandboxIR/Values.def"

/// Create a sandboxir::BasicBlock for an existing LLVM IR \p BB. This will
/// also create all contents of the block.
Expand Down
4 changes: 2 additions & 2 deletions llvm/include/llvm/SandboxIR/Instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Instruction : public User {
#define OP(OPC) OPC,
#define OPCODES(...) __VA_ARGS__
#define DEF_INSTR(ID, OPC, CLASS) OPC
#include "llvm/SandboxIR/SandboxIRValues.def"
#include "llvm/SandboxIR/Values.def"
};

protected:
Expand Down Expand Up @@ -365,7 +365,7 @@ template <typename LLVMT> class SingleLLVMInstructionImpl : public Instruction {

// All instructions are friends with this so they can call the constructor.
#define DEF_INSTR(ID, OPC, CLASS) friend class CLASS;
#include "llvm/SandboxIR/SandboxIRValues.def"
#include "llvm/SandboxIR/Values.def"
friend class UnaryInstruction;
friend class CallBase;
friend class FuncletPadInst;
Expand Down
4 changes: 2 additions & 2 deletions llvm/include/llvm/SandboxIR/Type.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class TargetExtType;
class Module;
#define DEF_INSTR(ID, OPCODE, CLASS) class CLASS;
#define DEF_CONST(ID, CLASS) class CLASS;
#include "llvm/SandboxIR/SandboxIRValues.def"
#include "llvm/SandboxIR/Values.def"

/// Just like llvm::Type these are immutable, unique, never get freed and can
/// only be created via static factory methods.
Expand Down Expand Up @@ -65,7 +65,7 @@ class Type {
// Friend all instruction classes because `create()` functions use LLVMTy.
#define DEF_INSTR(ID, OPCODE, CLASS) friend class CLASS;
#define DEF_CONST(ID, CLASS) friend class CLASS;
#include "llvm/SandboxIR/SandboxIRValues.def"
#include "llvm/SandboxIR/Values.def"
Context &Ctx;

Type(llvm::Type *LLVMTy, Context &Ctx) : LLVMTy(LLVMTy), Ctx(Ctx) {}
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/SandboxIR/User.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class OperandUseIterator {
OperandUseIterator(const class Use &Use) : Use(Use) {}
friend class User; // For constructor
#define DEF_INSTR(ID, OPC, CLASS) friend class CLASS; // For constructor
#include "llvm/SandboxIR/SandboxIRValues.def"
#include "llvm/SandboxIR/Values.def"

public:
using difference_type = std::ptrdiff_t;
Expand Down
6 changes: 3 additions & 3 deletions llvm/include/llvm/SandboxIR/Value.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace llvm::sandboxir {
#define DEF_INSTR(ID, OPC, CLASS) class CLASS;
#define DEF_CONST(ID, CLASS) class CLASS;
#define DEF_USER(ID, CLASS) class CLASS;
#include "llvm/SandboxIR/SandboxIRValues.def"
#include "llvm/SandboxIR/Values.def"
class Context;
class FuncletPadInst;
class Type;
Expand Down Expand Up @@ -63,7 +63,7 @@ class Value {
#define DEF_USER(ID, CLASS) ID,
#define DEF_CONST(ID, CLASS) ID,
#define DEF_INSTR(ID, OPC, CLASS) ID,
#include "llvm/SandboxIR/SandboxIRValues.def"
#include "llvm/SandboxIR/Values.def"
};

protected:
Expand All @@ -81,7 +81,7 @@ class Value {
#define DEF_INSTR(ID, OPC, CLASS) \
case ClassID::ID: \
return #ID;
#include "llvm/SandboxIR/SandboxIRValues.def"
#include "llvm/SandboxIR/Values.def"
}
llvm_unreachable("Unimplemented ID");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===- SandboxIRValues.def --------------------------------------*- C++ -*-===//
//===- Values.def -----------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/SandboxIR/Instruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const char *Instruction::getOpcodeName(Opcode Opc) {
return #OPC;
#define OPCODES(...) __VA_ARGS__
#define DEF_INSTR(ID, OPC, CLASS) OPC
#include "llvm/SandboxIR/SandboxIRValues.def"
#include "llvm/SandboxIR/Values.def"
}
llvm_unreachable("Unknown Opcode");
}
Expand Down Expand Up @@ -173,7 +173,7 @@ bool Instruction::classof(const sandboxir::Value *From) {
#define DEF_INSTR(ID, OPC, CLASS) \
case ClassID::ID: \
return true;
#include "llvm/SandboxIR/SandboxIRValues.def"
#include "llvm/SandboxIR/Values.def"
default:
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/SandboxIR/User.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ bool User::classof(const Value *From) {
#define DEF_INSTR(ID, OPC, CLASS) \
case ClassID::ID: \
return true;
#include "llvm/SandboxIR/SandboxIRValues.def"
#include "llvm/SandboxIR/Values.def"
default:
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/SandboxIR/SandboxIRTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6114,5 +6114,5 @@ define void @foo() {
TEST_F(SandboxIRTest, CheckClassof) {
#define DEF_INSTR(ID, OPC, CLASS) \
EXPECT_NE(&sandboxir::CLASS::classof, &sandboxir::Instruction::classof);
#include "llvm/SandboxIR/SandboxIRValues.def"
#include "llvm/SandboxIR/Values.def"
}
Loading