I’ve been debugging SAFECode source code files, and line 170 in ArrayBoundCheckLocal.cpp has been causing the following compilation error:
In file included from /Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/ArrayBoundChecks/ArrayBoundCheckLocal.cpp:18:
In file included from /Users/peterfinn/Desktop/build/projects/safecode/…/…/…/llvm_trunk_2/projects/safecode/include/safecode/ArrayBoundsCheck.h:17:
In file included from /Users/peterfinn/Desktop/build/projects/safecode/…/…/…/llvm_trunk_2/projects/safecode/include/safecode/AllocatorInfo.h:21:
In file included from /Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/Module.h:20:
In file included from /Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DataLayout.h:27:
In file included from /Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/Pass.h:378:
/Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/PassAnalysisSupport.h:201:53: error: no member named ‘ID’ in ‘llvm::DataLayout’
return getAnalysisID(&AnalysisType::ID);
~~~~~~~~~~~~~~^
/Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/ArrayBoundChecks/ArrayBoundCheckLocal.cpp:170:9: note: in instantiation of function template specialization
‘llvm::Pass::getAnalysisllvm::DataLayout’ requested here
TD = &getAnalysis();
^
1 error generated.
make[2]: *** [/Users/peterfinn/Desktop/build/projects/safecode/lib/ArrayBoundChecks/Debug+Asserts/ArrayBoundCheckLocal.o] Error 1
make[1]: *** [ArrayBoundChecks/.makeall] Error 2
make: *** [all] Error 1
I assume I need to obtain a DataLayout reference from the argument of the function “runOnFunction”. Is this correct? If so, how do I do this? If not, what is supposed to be done instead?
Thanks,
Peter Finn