diff --git a/llvm/lib/Target/AVR/HarvardCheck/HarvardCheck.cpp b/llvm/lib/Target/AVR/HarvardCheck/HarvardCheck.cpp --- a/llvm/lib/Target/AVR/HarvardCheck/HarvardCheck.cpp +++ b/llvm/lib/Target/AVR/HarvardCheck/HarvardCheck.cpp @@ -6,10 +6,13 @@ // //===----------------------------------------------------------------------===// /// -/// \file Function pass to verify all functions are in program memory +/// \file +/// Function pass to verify all functions are in program memory /// /// Visits all functions in a module and reports those that are not in the -/// program memory address space. +/// program memory address space as defined by the targets DataLayout. This +/// helps to find transformations that accidentially place functions in data +/// space because they assume a von Neumann architecture. /// /// Usage: /// \code @@ -17,7 +20,7 @@ /// \endcode /// /// \param --harvard-abort-on-error -/// \param --harvard-program-address-space N +/// \param --harvard-program-address-space NUMBER /// //===----------------------------------------------------------------------===// @@ -41,7 +44,8 @@ namespace { -struct HarvardCheck : FunctionPass { +class HarvardCheck : public FunctionPass { +public: static char ID; HarvardCheck() : FunctionPass(ID), ProgramAddressSpace(), ErrorCount() {} @@ -69,7 +73,7 @@ bool doFinalization(Module &) override { if (ErrorCount != 0 && AbortOnErrorOption) { - errs() << "not all functions are in program memory. Aborting\n"; + errs() << "error: not all functions are in program memory. Aborting\n"; exit(1); } return false;