[llvm] r256406 - [IR] Mark the Type subclass helper methods 'inline' and move their definitions to DerivedTypes.h so they can be inlined by the compiler.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 13 14:57:07 PST 2016


Is getArrayElementType() used in any of these files?

On Wed, Jan 13, 2016 at 2:12 PM, Hans Wennborg <hans at chromium.org> wrote:

> No idea, but I'll just copy your fix from r256407. Thanks!
>
> On Wed, Jan 13, 2016 at 2:10 PM, Craig Topper <craig.topper at gmail.com>
> wrote:
> > Yeah that's what it means. It was already true for all code in llvm and
> > clang and I didn't realize lldb was using it until the bots failed. At
> which
> > point i fixed one place in lldb. Why didn't the bots flag this one too?
> >
> > On Wed, Jan 13, 2016 at 2:06 PM, Hans Wennborg <hans at chromium.org>
> wrote:
> >>
> >> I believe this is causing warnings when building LLDB:
> >>
> >> In file included from
> >>
> >>
> /work/llvm-3.8/llvm.src/tools/lldb/source/Target/ThreadPlanCallFunctionUsingABI.cpp:14:
> >> In file included from
> >>
> >>
> /work/llvm-3.8/llvm.src/tools/lldb/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h:23:
> >> /work/llvm-3.8/llvm.src/include/llvm/IR/Type.h:350:16: error: inline
> >> function 'llvm::Type::getSequentialElementType' is not defined
> >> [-Werror,-Wundefined-inline]
> >>   inline Type *getSequentialElementType() const;
> >>                ^
> >> /work/llvm-3.8/llvm.src/include/llvm/IR/Type.h:353:46: note: used here
> >>   Type *getArrayElementType() const { return
> getSequentialElementType(); }
> >>                                              ^
> >> 1 error generated.
> >>
> >> Does your change mean that everyone including Types.h also needs to
> >> include DerivedTypes.h, to get the definitions of those inline
> >> functions?
> >>
> >> On Thu, Dec 24, 2015 at 8:06 PM, Craig Topper via llvm-commits
> >> <llvm-commits at lists.llvm.org> wrote:
> >> > Author: ctopper
> >> > Date: Thu Dec 24 22:06:20 2015
> >> > New Revision: 256406
> >> >
> >> > URL: http://llvm.org/viewvc/llvm-project?rev=256406&view=rev
> >> > Log:
> >> > [IR] Mark the Type subclass helper methods 'inline' and move their
> >> > definitions to DerivedTypes.h so they can be inlined by the compiler.
> >> >
> >> > Modified:
> >> >     llvm/trunk/include/llvm/IR/DerivedTypes.h
> >> >     llvm/trunk/include/llvm/IR/Type.h
> >> >     llvm/trunk/lib/IR/Type.cpp
> >
> >
> >
> >
> > --
> > ~Craig
>



-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160113/deecf00d/attachment.html>


More information about the llvm-commits mailing list