[llvm] 9e85937 - [SandboxIR][NFC] Rename SandboxIRValues.def to Values.def (#110538)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 30 11:24:58 PDT 2024
Author: vporpo
Date: 2024-09-30T11:24:55-07:00
New Revision: 9e85937b835e82846ab8db53586f0844e6783804
URL: https://github.com/llvm/llvm-project/commit/9e85937b835e82846ab8db53586f0844e6783804
DIFF: https://github.com/llvm/llvm-project/commit/9e85937b835e82846ab8db53586f0844e6783804.diff
LOG: [SandboxIR][NFC] Rename SandboxIRValues.def to Values.def (#110538)
Added:
llvm/include/llvm/SandboxIR/Values.def
Modified:
llvm/include/llvm/SandboxIR/Constant.h
llvm/include/llvm/SandboxIR/Context.h
llvm/include/llvm/SandboxIR/Instruction.h
llvm/include/llvm/SandboxIR/Type.h
llvm/include/llvm/SandboxIR/User.h
llvm/include/llvm/SandboxIR/Value.h
llvm/lib/SandboxIR/Instruction.cpp
llvm/lib/SandboxIR/User.cpp
llvm/unittests/SandboxIR/SandboxIRTest.cpp
Removed:
llvm/include/llvm/SandboxIR/SandboxIRValues.def
################################################################################
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
diff erence_type = std::ptr
diff _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