[llvm] r281289 - [lib/LTO] Expose getModule() in lto::InputFile.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 19:49:46 PDT 2016


We shouldn't expose the module here because we will eventually want this
class to wrap the bitcode symbol table rather than the module.

Is there something more minimal you can expose here to achieve the same
goal?

Peter

On Mon, Sep 12, 2016 at 7:22 PM, Davide Italiano via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: davide
> Date: Mon Sep 12 21:22:02 2016
> New Revision: 281289
>
> URL: http://llvm.org/viewvc/llvm-project?rev=281289&view=rev
> Log:
> [lib/LTO] Expose getModule() in lto::InputFile.
>
> lld will use this to get the datalayout string and emit a
> diagnostic if empty.
>
> Modified:
>     llvm/trunk/include/llvm/LTO/LTO.h
>
> Modified: llvm/trunk/include/llvm/LTO/LTO.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/
> llvm/LTO/LTO.h?rev=281289&r1=281288&r2=281289&view=diff
> ============================================================
> ==================
> --- llvm/trunk/include/llvm/LTO/LTO.h (original)
> +++ llvm/trunk/include/llvm/LTO/LTO.h Mon Sep 12 21:22:02 2016
> @@ -234,6 +234,10 @@ 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.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>



-- 
-- 
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160912/81340624/attachment.html>


More information about the llvm-commits mailing list