llvm.org GIT mirror llvm / e4b3fee
Fix some more errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305368 91177308-0d34-0410-b5e6-96231b3b80d8 Zachary Turner 3 years ago
3 changed file(s) with 11 addition(s) and 38 deletion(s). Raw diff Collapse all Expand all
398398 for (const auto &CS : Checksums) {
399399 Result->addChecksum(CS.FileName, CS.Kind, CS.ChecksumBytes.Bytes);
400400 }
401 return std::move(Result);
401 return Result;
402402 }
403403
404404 std::shared_ptr YAMLLinesSubsection::toCodeViewSubsection(
428428 }
429429 }
430430 }
431 return std::move(Result);
431 return Result;
432432 }
433433
434434 std::shared_ptr
449449 Result->addExtraFile(EF);
450450 }
451451 }
452 return std::move(Result);
452 return Result;
453453 }
454454
455455 std::shared_ptr
459459 auto Result = std::make_shared();
460460 for (const auto &M : Exports)
461461 Result->addMapping(M.Local, M.Global);
462 return std::move(Result);
462 return Result;
463463 }
464464
465465 std::shared_ptr
474474 for (const auto Id : M.ImportIds)
475475 Result->addImport(M.ModuleName, Id);
476476 }
477 return std::move(Result);
477 return Result;
478478 }
479479
480480 std::shared_ptr YAMLSymbolsSubsection::toCodeViewSubsection(
484484 for (const auto &Sym : Symbols)
485485 Result->addSymbol(
486486 Sym.toCodeViewSymbol(Allocator, CodeViewContainer::ObjectFile));
487 return std::move(Result);
487 return Result;
488488 }
489489
490490 std::shared_ptr
494494 auto Result = std::make_shared();
495495 for (const auto &Str : this->Strings)
496496 Result->insert(Str);
497 return std::move(Result);
497 return Result;
498498 }
499499
500500 std::shared_ptr YAMLFrameDataSubsection::toCodeViewSubsection(
516516 F.FrameFunc = SC.strings()->insert(YF.FrameFunc);
517517 Result->addFrameData(F);
518518 }
519 return std::move(Result);
519 return Result;
520520 }
521521
522522 std::shared_ptr
526526 auto Result = llvm::make_unique();
527527 for (const auto &RVA : RVAs)
528528 Result->addRVA(RVA);
529 return std::move(Result);
529 return Result;
530530 }
531531
532532 static Expected
906906 auto YamlSS = Err(YAMLDebugSubsection::fromCodeViewSubection(SC, SS));
907907 Result.push_back(YamlSS);
908908 }
909 return std::move(Result);
909 return Result;
910910 }
911911
912912 void llvm::CodeViewYAML::initializeStringsAndChecksums(
730730 auto CVT = Err(LeafRecord::fromCodeViewRecord(T));
731731 Result.push_back(CVT);
732732 }
733 return std::move(Result);
733 return Result;
734734 }
735735
736736 ArrayRef llvm::CodeViewYAML::toDebugT(ArrayRef Leafs,
2727 #include
2828
2929 using namespace llvm;
30
31 namespace {
32 template struct WeakishPtr {
33 public:
34 WeakishPtr() : Ref(nullptr) {}
35
36 WeakishPtr(std::unique_ptr Value)
37 : Ref(Value.get()), UniquePtr(std::move(Value)) {}
38
39 WeakishPtr(std::unique_ptr &&Value)
40 : Ref(Value.get()), UniquePtr(std::move(Value)) {}
41
42 WeakishPtr &operator=(std::unique_ptr &&Value) {
43 Owned = std::move(Value);
44 Ref = Owned.get();
45 return *this;
46 }
47
48 T *get() { return Ref; }
49 T &operator*() { return *Ref; }
50
51 operator bool() const { return Ref != nullptr; }
52
53 T *Ref;
54 std::unique_ptr Owned;
55 };
56 } // namespace
5730
5831 /// This parses a yaml stream that represents a COFF object file.
5932 /// See docs/yaml2obj for the yaml scheema.