[PATCH] D78861: [Attributor] [WIP] Track AA dependency using dependency graph

Kuter Dinel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 18:50:31 PDT 2020


kuter added a comment.



> What do you mean by "put the `GraphTraits` in llvm namespace"?

If I do not put your graph traits declarations inside `namespace llvm {`
the error that I get is:

  FAILED: lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/Attributor.cpp.o
  /usr/bin/c++   -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Transforms/IPO -I/home/user/llvm-project/llvm/lib/Transforms/IPO -Iinclude -I/home/user/llv
  m-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wd
  elete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3     -fno-exceptions -fno-rtti -UNDEBUG -std=c++14 -MD -MT lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/Attributor.cpp.o -MF lib/Tra
  nsforms/IPO/CMakeFiles/LLVMipo.dir/Attributor.cpp.o.d -o lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/Attributor.cpp.o -c /home/user/llvm-project/llvm/lib/Transforms/IPO/Attributor.cpp
  /home/user/llvm-project/llvm/lib/Transforms/IPO/Attributor.cpp:2122:26: error: specialization of ‘template<class GraphType> struct llvm::GraphTraits’ in different namespace [-fpermissive]
   template <> struct llvm::GraphTraits<AbstractAttribute *> {
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  In file included from /home/user/llvm-project/llvm/include/llvm/Transforms/IPO/Attributor.h:100:0,
                   from /home/user/llvm-project/llvm/lib/Transforms/IPO/Attributor.cpp:16:
  /home/user/llvm-project/llvm/include/llvm/ADT/GraphTraits.h:35:8: error:   from definition of ‘template<class GraphType> struct llvm::GraphTraits’ [-fpermissive]
   struct GraphTraits {
          ^~~~~~~~~~~
  /home/user/llvm-project/llvm/lib/Transforms/IPO/Attributor.cpp:2152:14: error: specialization of ‘template<class GraphType> struct llvm::GraphTraits’ in different namespace [-fpermissive]
   struct llvm::GraphTraits<AADepGraph *>
                ^~~~~~~~~~~~~~~~~~~~~~~~~
  In file included from /home/user/llvm-project/llvm/include/llvm/Transforms/IPO/Attributor.h:100:0,
                   from /home/user/llvm-project/llvm/lib/Transforms/IPO/Attributor.cpp:16:
  /home/user/llvm-project/llvm/include/llvm/ADT/GraphTraits.h:35:8: error:   from definition of ‘template<class GraphType> struct llvm::GraphTraits’ [-fpermissive]
   struct GraphTraits {
          ^~~~~~~~~~~
  /home/user/llvm-project/llvm/lib/Transforms/IPO/Attributor.cpp:2164:14: error: specialization of ‘template<class Ty> struct llvm::DOTGraphTraits’ in different namespace [-fpermissive]
   struct llvm::DOTGraphTraits<AADepGraph *> : public DefaultDOTGraphTraits {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  In file included from /home/user/llvm-project/llvm/include/llvm/Transforms/IPO/Attributor.h:121:0,
                   from /home/user/llvm-project/llvm/lib/Transforms/IPO/Attributor.cpp:16:
  /home/user/llvm-project/llvm/include/llvm/Support/DOTGraphTraits.h:160:8: error:   from definition of ‘template<class Ty> struct llvm::DOTGraphTraits’ [-fpermissive]
   struct DOTGraphTraits : public DefaultDOTGraphTraits {


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78861/new/

https://reviews.llvm.org/D78861





More information about the llvm-commits mailing list