[LLVMdev] Replacement Function for addRequired<DataLayout>()
Daniel Berlin
dberlin at dberlin.org
Sun Jun 21 11:43:47 PDT 2015
Remove the line.
It's no longer needed.
Anywhere that wants datalayout can just grab it (IE any like that has
DL = getAnalysis<DataLayout> can now just be DL =
F->getParent()->getDataLayout()" or something similar.
On Sun, Jun 21, 2015 at 11:28 AM, Peter Finn <peterdfinn at icloud.com> wrote:
> 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
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list