]> granicus.if.org Git - llvm/commitdiff
[LTO] Only expose the dataLayout string instead of the whole module.
authorDavide Italiano <davide@freebsd.org>
Tue, 13 Sep 2016 06:29:17 +0000 (06:29 +0000)
committerDavide Italiano <davide@freebsd.org>
Tue, 13 Sep 2016 06:29:17 +0000 (06:29 +0000)
Differential Revision: https://reviews.llvm.org/D24494

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281296 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/LTO/LTO.h

index ace632444a88ff7d1bc4f7624320eea86a316767..3a5b5eca909f92ee2427a1db75bbbd163227eeca 100644 (file)
@@ -227,6 +227,10 @@ public:
                             symbol_iterator(Obj->symbol_end()));
   }
 
+  StringRef getDataLayoutStr() const {
+    return Obj->getModule().getDataLayoutStr();
+  }
+
   StringRef getSourceFileName() const {
     return Obj->getModule().getSourceFileName();
   }
@@ -234,10 +238,6 @@ public:
   MemoryBufferRef getMemoryBufferRef() const {
     return Obj->getMemoryBufferRef();
   }
-
-  Module &getModule() const {
-    return Obj->getModule();
-  }
 };
 
 /// A ThinBackend defines what happens after the thin-link phase during ThinLTO.