[llvm] r234904 - DebugInfo: Add implicit conversion from DISubprogram to DIScope
Sean Silva
chisophugis at gmail.com
Thu Apr 16 06:13:34 PDT 2015
On Tue, Apr 14, 2015 at 5:19 PM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:
> Author: dexonsmith
> Date: Tue Apr 14 11:19:44 2015
> New Revision: 234904
>
> URL: http://llvm.org/viewvc/llvm-project?rev=234904&view=rev
> Log:
> DebugInfo: Add implicit conversion from DISubprogram to DIScope
>
> As a follow-up to r234850, add an implicit conversion from
> `DISubprogram` to `DIScope` to support Kaleidoscope Ch. 8. This also
> reverts that band-aid from r234890.
>
> (/me learns *again* to build Kaleidoscope before commit...)
>
There is also http://llvm.org/docs/tutorial/LangImpl8.html
(llvm/docs/tutorial/LangImpl8.rst)
-- Sean Silva
>
> Modified:
> llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp
> llvm/trunk/include/llvm/IR/DebugInfo.h
>
> Modified: llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp?rev=234904&r1=234903&r2=234904&view=diff
>
> ==============================================================================
> --- llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp (original)
> +++ llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp Tue Apr 14 11:19:44
> 2015
> @@ -1234,7 +1234,7 @@ Function *PrototypeAST::Codegen() {
> CreateFunctionType(Args.size(), Unit), false /* internal linkage */,
> true /* definition */, ScopeLine, DIDescriptor::FlagPrototyped,
> false, F);
>
> - KSDbgInfo.FnScopeMap[this] = (DIScope)SP;
> + KSDbgInfo.FnScopeMap[this] = SP;
> return F;
> }
>
>
> Modified: llvm/trunk/include/llvm/IR/DebugInfo.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=234904&r1=234903&r2=234904&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/IR/DebugInfo.h (original)
> +++ llvm/trunk/include/llvm/IR/DebugInfo.h Tue Apr 14 11:19:44 2015
> @@ -437,6 +437,7 @@ public:
> : N(const_cast<MDSubprogram *>(N)) {}
>
> operator DIDescriptor() const { return N; }
> + operator DIScope() const { return N; }
> operator MDSubprogram *() const { return N; }
> MDSubprogram *operator->() const { return N; }
> MDSubprogram &operator*() const { return *N; }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150416/540c51ad/attachment.html>
More information about the llvm-commits
mailing list