Skip to content

Commit f5af778

Browse files
committedApr 3, 2017
Bitcode: Remove reader support for MODULE_CODE_PURGEVALS.
Support for writing this module code was removed in r73220, which was well before the LLVM 3.0 release, so we do not need to be able to understand it for backwards compatibility. Differential Revision: https://reviews.llvm.org/D31563 llvm-svn: 299370
1 parent 8698fc0 commit f5af778

File tree

4 files changed

+0
-21
lines changed

4 files changed

+0
-21
lines changed
 

‎llvm/docs/BitCodeFormat.rst

-10
Original file line numberDiff line numberDiff line change
@@ -839,16 +839,6 @@ fields are
839839
* *unnamed_addr*: If present, an encoding of the
840840
:ref:`unnamed_addr<bcunnamedaddr>` attribute of this alias
841841

842-
MODULE_CODE_PURGEVALS Record
843-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
844-
845-
``[PURGEVALS, numvals]``
846-
847-
The ``PURGEVALS`` record (code 10) resets the module-level value list to the
848-
size given by the single operand value. Module-level value list items are added
849-
by ``GLOBALVAR``, ``FUNCTION``, and ``ALIAS`` records. After a ``PURGEVALS``
850-
record is seen, new value indices will start from the given *numvals* value.
851-
852842
.. _MODULE_CODE_GCNAME:
853843

854844
MODULE_CODE_GCNAME Record

‎llvm/include/llvm/Bitcode/LLVMBitCodes.h

-3
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ enum ModuleCodes {
9292
// ALIAS: [alias type, aliasee val#, linkage, visibility]
9393
MODULE_CODE_ALIAS_OLD = 9,
9494

95-
// MODULE_CODE_PURGEVALS: [numvals]
96-
MODULE_CODE_PURGEVALS = 10,
97-
9895
MODULE_CODE_GCNAME = 11, // GCNAME: [strchr x N]
9996
MODULE_CODE_COMDAT = 12, // COMDAT: [selection_kind, name]
10097

‎llvm/lib/Bitcode/Reader/BitcodeReader.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -3060,13 +3060,6 @@ Error BitcodeReader::parseModule(uint64_t ResumeBit,
30603060
IndirectSymbolInits.push_back(std::make_pair(NewGA, Val));
30613061
break;
30623062
}
3063-
/// MODULE_CODE_PURGEVALS: [numvals]
3064-
case bitc::MODULE_CODE_PURGEVALS:
3065-
// Trim down the value list to the specified size.
3066-
if (Record.size() < 1 || Record[0] > ValueList.size())
3067-
return error("Invalid record");
3068-
ValueList.shrinkTo(Record[0]);
3069-
break;
30703063
/// MODULE_CODE_VSTOFFSET: [offset]
30713064
case bitc::MODULE_CODE_VSTOFFSET:
30723065
if (Record.size() < 1)

‎llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID,
171171
STRINGIFY_CODE(MODULE_CODE, GLOBALVAR)
172172
STRINGIFY_CODE(MODULE_CODE, FUNCTION)
173173
STRINGIFY_CODE(MODULE_CODE, ALIAS)
174-
STRINGIFY_CODE(MODULE_CODE, PURGEVALS)
175174
STRINGIFY_CODE(MODULE_CODE, GCNAME)
176175
STRINGIFY_CODE(MODULE_CODE, VSTOFFSET)
177176
STRINGIFY_CODE(MODULE_CODE, METADATA_VALUES_UNUSED)

0 commit comments

Comments
 (0)
Please sign in to comment.