[llvm] r307242 - [DWARF] - Provide default implementation for getSectionLoadAddress() method of LoadedObjectInfo

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 6 01:46:01 PDT 2017


Author: grimar
Date: Thu Jul  6 01:46:01 2017
New Revision: 307242

URL: http://llvm.org/viewvc/llvm-project?rev=307242&view=rev
Log:
[DWARF] - Provide default implementation for getSectionLoadAddress() method of LoadedObjectInfo

It is a bit unconvinent that client should implement this method
even if not use it. Patch provides default implementation.

Differential revision: https://reviews.llvm.org/D35009

Modified:
    llvm/trunk/include/llvm/DebugInfo/DIContext.h

Modified: llvm/trunk/include/llvm/DebugInfo/DIContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DIContext.h?rev=307242&r1=307241&r2=307242&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/DIContext.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/DIContext.h Thu Jul  6 01:46:01 2017
@@ -204,7 +204,9 @@ public:
   /// need to be consistent with the addresses used to query the DIContext and
   /// the output of this function should be deterministic, i.e. repeated calls with
   /// the same Sec should give the same address.
-  virtual uint64_t getSectionLoadAddress(const object::SectionRef &Sec) const = 0;
+  virtual uint64_t getSectionLoadAddress(const object::SectionRef &Sec) const {
+    return 0;
+  }
 
   /// If conveniently available, return the content of the given Section.
   ///




More information about the llvm-commits mailing list