llvm.org GIT mirror llvm / ce7d2f5
Remove some leftover DWARFContextInMemory. Not sure how I missed these on the previous commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308550 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 2 years ago
4 changed file(s) with 3 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
782782 return InliningInfo;
783783 }
784784
785 /// DWARFContextInMemory is the simplest possible implementation of a
786 /// DWARFContext. It assumes all content is available in memory and stores
787 /// pointers to it.
788 class DWARFContextInMemory : public DWARFContext {
789 public:
790 DWARFContextInMemory(
791 const object::ObjectFile &Obj, const LoadedObjectInfo *L = nullptr,
792 function_ref HandleError = defaultErrorHandler);
793
794 DWARFContextInMemory(const StringMap> &Sections,
795 uint8_t AddrSize,
796 bool isLittleEndian = sys::IsLittleEndianHost);
797 };
798
799785 std::shared_ptr
800786 DWARFContext::getDWOContext(StringRef AbsolutePath) {
801787 if (auto S = DWP.lock()) {
103103
104104 // Get the address of the object image for use as a unique identifier
105105 const void* ObjData = DebugObj.getData().data();
106 DIContext* Context = new DWARFContextInMemory(DebugObj);
106 std::unique_ptr Context = DWARFContext::create(DebugObj);
107107 MethodAddressVector Functions;
108108
109109 // Use symbol info to iterate functions in the object.
3030 return;
3131 }
3232 ObjectFile &Obj = *ObjOrErr.get();
33 std::unique_ptr DICtx(new DWARFContextInMemory(Obj));
33 std::unique_ptr DICtx = DWARFContext::create(Obj);
3434 DICtx->dump(nulls(), DIDT_All);
3535 }
21682168 EXPECT_TRUE((bool)Obj);
21692169
21702170 // Case 1: error handler handles all errors. That allows
2171 // DWARFContextInMemory
2172 // to parse whole file and find both two errors we know about.
2171 // DWARFContext to parse whole file and find both two errors we know about.
21732172 int Errors = 0;
21742173 std::unique_ptr Ctx1 =
21752174 DWARFContext::create(**Obj, nullptr, [&](Error E) {