Skip to content

Commit

Permalink
Print which builtins call errorcall/error.
Browse files Browse the repository at this point in the history
  • Loading branch information
kalibera committed Apr 10, 2017
1 parent 94f2d03 commit c265531
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/einfo.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

#include "dofunc.h"
#include "ftable.h"
#include "call.h"

#include <llvm/IR/Constants.h>
#include <llvm/IR/DebugInfo.h>
Expand Down Expand Up @@ -165,6 +166,13 @@ int main(int argc, char* argv[]) {
errs() << nfo.str() << " " << dumpFunctionArities(uniqueFunctionArities(fun, funtab), nfo.effectiveArity) <<
(e.isSpecial() ? " SPECIAL" : " BUILTIN") << " " << (e.isPrimitive() ? "PRIMITIVE" : "INTERNAL");

if (1) {
if (!e.isPrimitive()) {
if (mayCall(fun, m->getFunction("Rf_errorcall"), m->getFunction("Rf_error"))) errs() << "!!!errorcall";
} else {
if (mayCall(fun, m->getFunction("Rf_error"), m->getFunction("Rf_errorcall"))) errs() << "!!!error";
}
}
errs() << " " << funLocation(fun) << "\n";

if (0) {
Expand Down

0 comments on commit c265531

Please sign in to comment.