staticafi/sbt-instrumentation

Build for LLVM 3.8 fails in predator plugin

mchalupa opened this issue · 1 comments

n ‘void PredatorPlugin::runPredator(llvm::Module*)’:
/home/marek/src/symbiotic/sbt-instrumentation/analyses/predator_plugin.cpp:76:34: error: invalid initialization of reference of type ‘const llvm::Module&’ from expression of type ‘llvm::Module*’
   76 |         llvm::WriteBitcodeToFile(mod, ostream);
      |                                  ^~~
In file included from /home/marek/src/symbiotic/sbt-instrumentation/analyses/predator_plugin.cpp:3:
/usr/include/llvm/Bitcode/BitcodeWriter.h:129:41: note: in passing argument 1 of ‘void llvm::WriteBitcodeToFile(const llvm::Module&, llvm::raw_ostream&, bool, const llvm::ModuleSummaryIndex*, bool, llvm::ModuleHash*)’
  129 |   void WriteBitcodeToFile(const Module &M, raw_ostream &Out,
      |                           ~~~~~~~~~~~~~~^
/home/marek/src/symbiotic/sbt-instrumentation/analyses/predator_plugin.cpp: In member function ‘void PredatorPlugin::addReportsForLineErrors(llvm::Module*)’:
/home/marek/src/symbiotic/sbt-instrumentation/analyses/predator_plugin.cpp:166:37: error: ‘DIGlobalVariableExpression’ is not a member of ‘llvm’; did you mean ‘DIGlobalVariableArray’?
  166 |             llvm::SmallVector<llvm::DIGlobalVariableExpression *, 8> exprs;
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                     DIGlobalVariableArray
/home/marek/src/symbiotic/sbt-instrumentation/analyses/predator_plugin.cpp:166:37: error: ‘DIGlobalVariableExpression’ is not a member of ‘llvm’; did you mean ‘DIGlobalVariableArray’?
  166 |             llvm::SmallVector<llvm::DIGlobalVariableExpression *, 8> exprs;
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                     DIGlobalVariableArray
/home/marek/src/symbiotic/sbt-instrumentation/analyses/predator_plugin.cpp:166:68: error: template argument 1 is invalid
  166 |             llvm::SmallVector<llvm::DIGlobalVariableExpression *, 8> exprs;
      |                                                                    ^
/home/marek/src/symbiotic/sbt-instrumentation/analyses/predator_plugin.cpp:166:68: error: template argument 2 is invalid
/home/marek/src/symbiotic/sbt-instrumentation/analyses/predator_plugin.cpp:167:17: error: ‘class llvm::GlobalVariable’ has no member named ‘getDebugInfo’
  167 |             var.getDebugInfo(exprs);
      |                 ^~~~~~~~~~~~
/home/marek/src/symbiotic/sbt-instrumentation/analyses/predator_plugin.cpp:169:28: error: ‘begin’ was not declared in this scope; did you mean ‘std::begin’?
  169 |             for (auto* e : exprs) {
      |                            ^~~~~
      |                            std::begin
In file included from /usr/include/c++/10.1.0/array:41,
                 from /usr/include/c++/10.1.0/tuple:39,
                 from /usr/include/c++/10.1.0/bits/hashtable_policy.h:34,
                 from /usr/include/c++/10.1.0/bits/hashtable.h:35,
                 from /usr/include/c++/10.1.0/unordered_map:46,
                 from /home/marek/src/symbiotic/sbt-instrumentation/analyses/predator_plugin.hpp:4,
                 from /home/marek/src/symbiotic/sbt-instrumentation/analyses/predator_plugin.cpp:1:
/usr/include/c++/10.1.0/bits/range_access.h:90:5: note: ‘std::begin’ declared here
   90 |     begin(_Tp (&__arr)[_Nm])
      |     ^~~~~
/home/marek/src/symbiotic/sbt-instrumentation/analyses/predator_plugin.cpp:169:28: error: ‘end’ was not declared in this scope; did you mean ‘std::end’?
  169 |             for (auto* e : exprs) {
      |                            ^~~~~
      |                            std::end

This issue can be closed as LLVM 3.8 is not supported.