From d0f70eb55746b7423cfc5a17737bbe1d2398150a Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Tue, 13 Sep 2016 06:29:17 +0000 Subject: [PATCH] [LTO] Only expose the dataLayout string instead of the whole module. Differential Revision: https://reviews.llvm.org/D24494 llvm-svn: 281296 --- llvm/include/llvm/LTO/LTO.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/include/llvm/LTO/LTO.h b/llvm/include/llvm/LTO/LTO.h index ace6324..3a5b5ec 100644 --- a/llvm/include/llvm/LTO/LTO.h +++ b/llvm/include/llvm/LTO/LTO.h @@ -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. -- 2.7.4