[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.

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 13 14:06:37 PST 2016


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


More information about the llvm-commits mailing list