mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 04:09:45 +00:00
Fix some more errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305368 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7eef7f8a9b
commit
e4b3feefd4
@ -399,7 +399,7 @@ std::shared_ptr<DebugSubsection> YAMLChecksumsSubsection::toCodeViewSubsection(
|
|||||||
for (const auto &CS : Checksums) {
|
for (const auto &CS : Checksums) {
|
||||||
Result->addChecksum(CS.FileName, CS.Kind, CS.ChecksumBytes.Bytes);
|
Result->addChecksum(CS.FileName, CS.Kind, CS.ChecksumBytes.Bytes);
|
||||||
}
|
}
|
||||||
return std::move(Result);
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<DebugSubsection> YAMLLinesSubsection::toCodeViewSubsection(
|
std::shared_ptr<DebugSubsection> YAMLLinesSubsection::toCodeViewSubsection(
|
||||||
@ -429,7 +429,7 @@ std::shared_ptr<DebugSubsection> YAMLLinesSubsection::toCodeViewSubsection(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return std::move(Result);
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<DebugSubsection>
|
std::shared_ptr<DebugSubsection>
|
||||||
@ -450,7 +450,7 @@ YAMLInlineeLinesSubsection::toCodeViewSubsection(
|
|||||||
Result->addExtraFile(EF);
|
Result->addExtraFile(EF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return std::move(Result);
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<DebugSubsection>
|
std::shared_ptr<DebugSubsection>
|
||||||
@ -460,7 +460,7 @@ YAMLCrossModuleExportsSubsection::toCodeViewSubsection(
|
|||||||
auto Result = std::make_shared<DebugCrossModuleExportsSubsection>();
|
auto Result = std::make_shared<DebugCrossModuleExportsSubsection>();
|
||||||
for (const auto &M : Exports)
|
for (const auto &M : Exports)
|
||||||
Result->addMapping(M.Local, M.Global);
|
Result->addMapping(M.Local, M.Global);
|
||||||
return std::move(Result);
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<DebugSubsection>
|
std::shared_ptr<DebugSubsection>
|
||||||
@ -475,7 +475,7 @@ YAMLCrossModuleImportsSubsection::toCodeViewSubsection(
|
|||||||
for (const auto Id : M.ImportIds)
|
for (const auto Id : M.ImportIds)
|
||||||
Result->addImport(M.ModuleName, Id);
|
Result->addImport(M.ModuleName, Id);
|
||||||
}
|
}
|
||||||
return std::move(Result);
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<DebugSubsection> YAMLSymbolsSubsection::toCodeViewSubsection(
|
std::shared_ptr<DebugSubsection> YAMLSymbolsSubsection::toCodeViewSubsection(
|
||||||
@ -485,7 +485,7 @@ std::shared_ptr<DebugSubsection> YAMLSymbolsSubsection::toCodeViewSubsection(
|
|||||||
for (const auto &Sym : Symbols)
|
for (const auto &Sym : Symbols)
|
||||||
Result->addSymbol(
|
Result->addSymbol(
|
||||||
Sym.toCodeViewSymbol(Allocator, CodeViewContainer::ObjectFile));
|
Sym.toCodeViewSymbol(Allocator, CodeViewContainer::ObjectFile));
|
||||||
return std::move(Result);
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<DebugSubsection>
|
std::shared_ptr<DebugSubsection>
|
||||||
@ -495,7 +495,7 @@ YAMLStringTableSubsection::toCodeViewSubsection(
|
|||||||
auto Result = std::make_shared<DebugStringTableSubsection>();
|
auto Result = std::make_shared<DebugStringTableSubsection>();
|
||||||
for (const auto &Str : this->Strings)
|
for (const auto &Str : this->Strings)
|
||||||
Result->insert(Str);
|
Result->insert(Str);
|
||||||
return std::move(Result);
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<DebugSubsection> YAMLFrameDataSubsection::toCodeViewSubsection(
|
std::shared_ptr<DebugSubsection> YAMLFrameDataSubsection::toCodeViewSubsection(
|
||||||
@ -517,7 +517,7 @@ std::shared_ptr<DebugSubsection> YAMLFrameDataSubsection::toCodeViewSubsection(
|
|||||||
F.FrameFunc = SC.strings()->insert(YF.FrameFunc);
|
F.FrameFunc = SC.strings()->insert(YF.FrameFunc);
|
||||||
Result->addFrameData(F);
|
Result->addFrameData(F);
|
||||||
}
|
}
|
||||||
return std::move(Result);
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<DebugSubsection>
|
std::shared_ptr<DebugSubsection>
|
||||||
@ -527,7 +527,7 @@ YAMLCoffSymbolRVASubsection::toCodeViewSubsection(
|
|||||||
auto Result = llvm::make_unique<DebugSymbolRVASubsection>();
|
auto Result = llvm::make_unique<DebugSymbolRVASubsection>();
|
||||||
for (const auto &RVA : RVAs)
|
for (const auto &RVA : RVAs)
|
||||||
Result->addRVA(RVA);
|
Result->addRVA(RVA);
|
||||||
return std::move(Result);
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Expected<SourceFileChecksumEntry>
|
static Expected<SourceFileChecksumEntry>
|
||||||
@ -907,7 +907,7 @@ llvm::CodeViewYAML::fromDebugS(ArrayRef<uint8_t> Data,
|
|||||||
auto YamlSS = Err(YAMLDebugSubsection::fromCodeViewSubection(SC, SS));
|
auto YamlSS = Err(YAMLDebugSubsection::fromCodeViewSubection(SC, SS));
|
||||||
Result.push_back(YamlSS);
|
Result.push_back(YamlSS);
|
||||||
}
|
}
|
||||||
return std::move(Result);
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void llvm::CodeViewYAML::initializeStringsAndChecksums(
|
void llvm::CodeViewYAML::initializeStringsAndChecksums(
|
||||||
|
@ -731,7 +731,7 @@ llvm::CodeViewYAML::fromDebugT(ArrayRef<uint8_t> DebugT) {
|
|||||||
auto CVT = Err(LeafRecord::fromCodeViewRecord(T));
|
auto CVT = Err(LeafRecord::fromCodeViewRecord(T));
|
||||||
Result.push_back(CVT);
|
Result.push_back(CVT);
|
||||||
}
|
}
|
||||||
return std::move(Result);
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayRef<uint8_t> llvm::CodeViewYAML::toDebugT(ArrayRef<LeafRecord> Leafs,
|
ArrayRef<uint8_t> llvm::CodeViewYAML::toDebugT(ArrayRef<LeafRecord> Leafs,
|
||||||
|
@ -29,33 +29,6 @@
|
|||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
|
||||||
template <typename T> struct WeakishPtr {
|
|
||||||
public:
|
|
||||||
WeakishPtr() : Ref(nullptr) {}
|
|
||||||
|
|
||||||
WeakishPtr(std::unique_ptr<T> Value)
|
|
||||||
: Ref(Value.get()), UniquePtr(std::move(Value)) {}
|
|
||||||
|
|
||||||
WeakishPtr(std::unique_ptr<T> &&Value)
|
|
||||||
: Ref(Value.get()), UniquePtr(std::move(Value)) {}
|
|
||||||
|
|
||||||
WeakishPtr<T> &operator=(std::unique_ptr<T> &&Value) {
|
|
||||||
Owned = std::move(Value);
|
|
||||||
Ref = Owned.get();
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
T *get() { return Ref; }
|
|
||||||
T &operator*() { return *Ref; }
|
|
||||||
|
|
||||||
operator bool() const { return Ref != nullptr; }
|
|
||||||
|
|
||||||
T *Ref;
|
|
||||||
std::unique_ptr<T> Owned;
|
|
||||||
};
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
/// This parses a yaml stream that represents a COFF object file.
|
/// This parses a yaml stream that represents a COFF object file.
|
||||||
/// See docs/yaml2obj for the yaml scheema.
|
/// See docs/yaml2obj for the yaml scheema.
|
||||||
struct COFFParser {
|
struct COFFParser {
|
||||||
|
Loading…
Reference in New Issue
Block a user