[PATCH] D135906: Fix llvm/lib/ObjCopy, llvm/llvm-ifs: c++20 compatibility
Angelo Matni via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 13 12:12:21 PDT 2022
angelomatnigoogle updated this revision to Diff 467563.
angelomatnigoogle added a comment.
Clean up commit message body
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135906/new/
https://reviews.llvm.org/D135906
Files:
llvm/lib/ObjCopy/MachO/MachOObject.cpp
llvm/lib/ObjCopy/MachO/MachOObject.h
llvm/tools/llvm-ifs/ErrorCollector.h
Index: llvm/tools/llvm-ifs/ErrorCollector.h
===================================================================
--- llvm/tools/llvm-ifs/ErrorCollector.h
+++ llvm/tools/llvm-ifs/ErrorCollector.h
@@ -21,13 +21,12 @@
#ifndef LLVM_TOOLS_LLVM_IFS_ERRORCOLLECTOR_H
#define LLVM_TOOLS_LLVM_IFS_ERRORCOLLECTOR_H
+#include "llvm/Support/Error.h"
#include "llvm/Support/raw_ostream.h"
#include <vector>
namespace llvm {
-class Error;
-
namespace ifs {
class ErrorCollector {
Index: llvm/lib/ObjCopy/MachO/MachOObject.h
===================================================================
--- llvm/lib/ObjCopy/MachO/MachOObject.h
+++ llvm/lib/ObjCopy/MachO/MachOObject.h
@@ -57,14 +57,9 @@
StringRef Content;
std::vector<RelocationInfo> Relocations;
- Section(StringRef SegName, StringRef SectName)
- : Segname(std::string(SegName)), Sectname(std::string(SectName)),
- CanonicalName((Twine(SegName) + Twine(',') + SectName).str()) {}
-
- Section(StringRef SegName, StringRef SectName, StringRef Content)
- : Segname(std::string(SegName)), Sectname(std::string(SectName)),
- CanonicalName((Twine(SegName) + Twine(',') + SectName).str()),
- Content(Content) {}
+ Section(StringRef SegName, StringRef SectName);
+
+ Section(StringRef SegName, StringRef SectName, StringRef Content);
MachO::SectionType getType() const {
return static_cast<MachO::SectionType>(Flags & MachO::SECTION_TYPE);
Index: llvm/lib/ObjCopy/MachO/MachOObject.cpp
===================================================================
--- llvm/lib/ObjCopy/MachO/MachOObject.cpp
+++ llvm/lib/ObjCopy/MachO/MachOObject.cpp
@@ -13,6 +13,15 @@
using namespace llvm;
using namespace llvm::objcopy::macho;
+Section::Section(StringRef SegName, StringRef SectName)
+ : Segname(std::string(SegName)), Sectname(std::string(SectName)),
+ CanonicalName((Twine(SegName) + Twine(',') + SectName).str()) {}
+
+Section::Section(StringRef SegName, StringRef SectName, StringRef Content)
+ : Segname(std::string(SegName)), Sectname(std::string(SectName)),
+ CanonicalName((Twine(SegName) + Twine(',') + SectName).str()),
+ Content(Content) {}
+
const SymbolEntry *SymbolTable::getSymbolByIndex(uint32_t Index) const {
assert(Index < Symbols.size() && "invalid symbol index");
return Symbols[Index].get();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135906.467563.patch
Type: text/x-patch
Size: 2340 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221013/7ced3116/attachment.bin>
More information about the llvm-commits
mailing list