[llvm] [SandboxIR][NFC] Rename SandboxIRValues.def to Values.def (PR #110538)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 30 10:17:44 PDT 2024
https://github.com/vporpo created https://github.com/llvm/llvm-project/pull/110538
None
>From a3af13aa5ce4fe446c92266636749c14ae106572 Mon Sep 17 00:00:00 2001
From: Vasileios Porpodas <vporpodas at google.com>
Date: Mon, 30 Sep 2024 09:14:05 -0700
Subject: [PATCH] [SandboxIR][NFC] Rename SandboxIRValues.def to Values.def
---
llvm/include/llvm/SandboxIR/Constant.h | 2 +-
llvm/include/llvm/SandboxIR/Context.h | 2 +-
llvm/include/llvm/SandboxIR/Instruction.h | 4 ++--
llvm/include/llvm/SandboxIR/Type.h | 4 ++--
llvm/include/llvm/SandboxIR/User.h | 2 +-
llvm/include/llvm/SandboxIR/Value.h | 6 +++---
.../llvm/SandboxIR/{SandboxIRValues.def => Values.def} | 2 +-
llvm/lib/SandboxIR/Instruction.cpp | 4 ++--
llvm/lib/SandboxIR/User.cpp | 2 +-
llvm/unittests/SandboxIR/SandboxIRTest.cpp | 2 +-
10 files changed, 15 insertions(+), 15 deletions(-)
rename llvm/include/llvm/SandboxIR/{SandboxIRValues.def => Values.def} (98%)
diff --git a/llvm/include/llvm/SandboxIR/Constant.h b/llvm/include/llvm/SandboxIR/Constant.h
index 7965f947e31b82..6eafdefde60262 100644
--- a/llvm/include/llvm/SandboxIR/Constant.h
+++ b/llvm/include/llvm/SandboxIR/Constant.h
@@ -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;
diff --git a/llvm/include/llvm/SandboxIR/Context.h b/llvm/include/llvm/SandboxIR/Context.h
index acfffd9ccd4a79..77924fbcd5acea 100644
--- a/llvm/include/llvm/SandboxIR/Context.h
+++ b/llvm/include/llvm/SandboxIR/Context.h
@@ -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.
diff --git a/llvm/include/llvm/SandboxIR/Instruction.h b/llvm/include/llvm/SandboxIR/Instruction.h
index f5f5bb5c4443c2..a34573a0bc1b01 100644
--- a/llvm/include/llvm/SandboxIR/Instruction.h
+++ b/llvm/include/llvm/SandboxIR/Instruction.h
@@ -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:
@@ -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;
diff --git a/llvm/include/llvm/SandboxIR/Type.h b/llvm/include/llvm/SandboxIR/Type.h
index 94ea4652c72c86..8094f66567fb8c 100644
--- a/llvm/include/llvm/SandboxIR/Type.h
+++ b/llvm/include/llvm/SandboxIR/Type.h
@@ -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.
@@ -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) {}
diff --git a/llvm/include/llvm/SandboxIR/User.h b/llvm/include/llvm/SandboxIR/User.h
index 5e47ba5e727f4f..80e672de349056 100644
--- a/llvm/include/llvm/SandboxIR/User.h
+++ b/llvm/include/llvm/SandboxIR/User.h
@@ -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;
diff --git a/llvm/include/llvm/SandboxIR/Value.h b/llvm/include/llvm/SandboxIR/Value.h
index e7d516f38156c8..b28f0e664f80be 100644
--- a/llvm/include/llvm/SandboxIR/Value.h
+++ b/llvm/include/llvm/SandboxIR/Value.h
@@ -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;
@@ -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:
@@ -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");
}
diff --git a/llvm/include/llvm/SandboxIR/SandboxIRValues.def b/llvm/include/llvm/SandboxIR/Values.def
similarity index 98%
rename from llvm/include/llvm/SandboxIR/SandboxIRValues.def
rename to llvm/include/llvm/SandboxIR/Values.def
index 2a9ca6d3d73ce6..3d8ad6ce197f43 100644
--- a/llvm/include/llvm/SandboxIR/SandboxIRValues.def
+++ b/llvm/include/llvm/SandboxIR/Values.def
@@ -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.
diff --git a/llvm/lib/SandboxIR/Instruction.cpp b/llvm/lib/SandboxIR/Instruction.cpp
index b492af893794f1..276c4f0872b109 100644
--- a/llvm/lib/SandboxIR/Instruction.cpp
+++ b/llvm/lib/SandboxIR/Instruction.cpp
@@ -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");
}
@@ -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;
}
diff --git a/llvm/lib/SandboxIR/User.cpp b/llvm/lib/SandboxIR/User.cpp
index 148d75199439aa..d7e4656e6e90ed 100644
--- a/llvm/lib/SandboxIR/User.cpp
+++ b/llvm/lib/SandboxIR/User.cpp
@@ -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;
}
diff --git a/llvm/unittests/SandboxIR/SandboxIRTest.cpp b/llvm/unittests/SandboxIR/SandboxIRTest.cpp
index 3bd520f3174c26..7206ee34d36e3a 100644
--- a/llvm/unittests/SandboxIR/SandboxIRTest.cpp
+++ b/llvm/unittests/SandboxIR/SandboxIRTest.cpp
@@ -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"
}
More information about the llvm-commits
mailing list