Skip to content

Commit bc54eb7

Browse files
remove uthe updateSectionPrefix helper method and unit test
1 parent 39fe9af commit bc54eb7

File tree

4 files changed

+0
-73
lines changed

4 files changed

+0
-73
lines changed

llvm/include/llvm/IR/GlobalObject.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,6 @@ class GlobalObject : public GlobalValue {
127127
/// Set the section prefix for this global object.
128128
void setSectionPrefix(StringRef Prefix);
129129

130-
/// Update the section prefix, unless the existing prefix is the same as
131-
/// `KeepPrefix`.
132-
void updateSectionPrefix(StringRef Prefix,
133-
std::optional<StringRef> KeepPrefix = std::nullopt);
134-
135130
/// Get the section prefix for this global object.
136131
std::optional<StringRef> getSectionPrefix() const;
137132

llvm/lib/IR/Globals.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -293,17 +293,6 @@ void GlobalObject::setSectionPrefix(StringRef Prefix) {
293293
MDB.createGlobalObjectSectionPrefix(Prefix));
294294
}
295295

296-
void GlobalObject::updateSectionPrefix(StringRef Prefix,
297-
std::optional<StringRef> KeepPrefix) {
298-
auto SectionPrefix = getSectionPrefix();
299-
if (SectionPrefix && (*SectionPrefix == Prefix ||
300-
(KeepPrefix && *SectionPrefix == *KeepPrefix)))
301-
return;
302-
303-
setSectionPrefix(Prefix);
304-
return;
305-
}
306-
307296
std::optional<StringRef> GlobalObject::getSectionPrefix() const {
308297
if (MDNode *MD = getMetadata(LLVMContext::MD_section_prefix)) {
309298
[[maybe_unused]] StringRef MDName =

llvm/unittests/IR/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ add_llvm_unittest(IRTests
2828
DominatorTreeBatchUpdatesTest.cpp
2929
DroppedVariableStatsIRTest.cpp
3030
FunctionTest.cpp
31-
GlobalObjectTest.cpp
3231
PassBuilderCallbacksTest.cpp
3332
IRBuilderTest.cpp
3433
InstructionsTest.cpp

llvm/unittests/IR/GlobalObjectTest.cpp

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)