[llvm] ae74387 - [MasmParser] Remove unused method emitStructValue to silence warning
Mikael Holmen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 16 01:15:59 PDT 2020
Author: Mikael Holmen
Date: 2020-07-16T09:36:17+02:00
New Revision: ae74387fc0fd0866766dad877c844e35a3932a51
URL: https://github.com/llvm/llvm-project/commit/ae74387fc0fd0866766dad877c844e35a3932a51
DIFF: https://github.com/llvm/llvm-project/commit/ae74387fc0fd0866766dad877c844e35a3932a51.diff
LOG: [MasmParser] Remove unused method emitStructValue to silence warning
The method was added in bc8e262afe83 and has been unused ever since so
remove it to silence a gcc warning.
Added:
Modified:
llvm/lib/MC/MCParser/MasmParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/MC/MCParser/MasmParser.cpp b/llvm/lib/MC/MCParser/MasmParser.cpp
index 58c22b2ccef2..3ed9623e4d5a 100644
--- a/llvm/lib/MC/MCParser/MasmParser.cpp
+++ b/llvm/lib/MC/MCParser/MasmParser.cpp
@@ -794,8 +794,6 @@ class MasmParser : public MCAsmParser {
bool emitFieldValue(const FieldInfo &Field, const RealFieldInfo &Contents);
bool emitFieldValue(const FieldInfo &Field, const StructFieldInfo &Contents);
- bool emitStructValue(const StructInfo &Structure);
-
bool emitFieldInitializer(const FieldInfo &Field,
const FieldInitializer &Initializer);
bool emitFieldInitializer(const FieldInfo &Field,
@@ -3833,20 +3831,6 @@ bool MasmParser::emitFieldValue(const FieldInfo &Field) {
llvm_unreachable("Unhandled FieldType enum");
}
-bool MasmParser::emitStructValue(const StructInfo &Structure) {
- size_t Offset = 0;
- for (const auto &Field : Structure.Fields) {
- getStreamer().emitZeros(Field.Offset - Offset);
- if (emitFieldValue(Field))
- return true;
- Offset = Field.Offset + Field.SizeOf;
- }
- // Add final padding.
- if (Offset != Structure.Size)
- getStreamer().emitZeros(Structure.Size - Offset);
- return false;
-}
-
bool MasmParser::emitFieldInitializer(const FieldInfo &Field,
const IntFieldInfo &Contents,
const IntFieldInfo &Initializer) {
More information about the llvm-commits
mailing list