[LLVMdev] Replacement Function for addRequired<DataLayout>()

Peter Finn peterdfinn at icloud.com
Sun Jun 21 11:28:08 PDT 2015


I’m debugging SAFECode source code files, trying to get them to compile, and in AllocatorInfo.h, the function addRequired<DataLayout>() is preventing compilation and giving me the following error message:

In file included from /Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/Support/AllocatorInfo.cpp:26:
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:56:37: error: 
      no member named 'ID' in 'llvm::DataLayout'
    return addRequiredID(PassClass::ID);
                                    ^
/Users/peterfinn/Desktop/build/projects/safecode/../../../llvm_trunk_2/projects/safecode/include/safecode/AllocatorInfo.h:219:10: note: 
      in instantiation of function template specialization
      'llvm::AnalysisUsage::addRequired<llvm::DataLayout>' requested here
      AU.addRequired<DataLayout>();
         ^
2 errors generated.
make[2]: *** [/Users/peterfinn/Desktop/build/projects/safecode/lib/Support/Debug+Asserts/AllocatorInfo.o] Error 1
make[1]: *** [Support/.makeall] Error 2
make: *** [all] Error 1

I understand this has something to do with the fact that DataLayout is no longer a Pass, and that it’s now just a class of its own.  Is there a way I can fix the code so that it accomplishes what it’s supposed to?  Is there a function I can call instead of what’s there?

Thank you,
Peter Finn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150621/70a3b03c/attachment.html>


More information about the llvm-dev mailing list