<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 21, 2015, at 11:28 AM, Peter Finn <<a href="mailto:peterdfinn@icloud.com" class="">peterdfinn@icloud.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">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:<div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">In file included from /Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/Support/AllocatorInfo.cpp:26:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">In file included from /Users/peterfinn/Desktop/build/projects/safecode/../../../llvm_trunk_2/projects/safecode/include/safecode/AllocatorInfo.h:21:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">In file included from /Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/Module.h:20:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">In file included from /Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DataLayout.h:27:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">In file included from /Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/Pass.h:378:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/PassAnalysisSupport.h:56:37: </b><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class=""><b class="">error: </b></span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class=""> no member named 'ID' in 'llvm::DataLayout'</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> return addRequiredID(PassClass::ID);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class=""> ^</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/build/projects/safecode/../../../llvm_trunk_2/projects/safecode/include/safecode/AllocatorInfo.h:219:10: note: </b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> in instantiation of function template specialization</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> 'llvm::AnalysisUsage::addRequired<llvm::DataLayout>' requested here</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> AU.addRequired<DataLayout>();</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class=""> ^</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">2 errors generated.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">make[2]: *** [/Users/peterfinn/Desktop/build/projects/safecode/lib/Support/Debug+Asserts/AllocatorInfo.o] Error 1</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">make[1]: *** [Support/.makeall] Error 2</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">make: *** [all] Error 1</div></div><div class=""><br class=""></div><div class="">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?</div></div></div></blockquote><div><br class=""></div><div>DataLayout has never been a Pass AFAIK. There use to be a “DataLayoutPass”, but it has been removed since the Module owns the DataLayout, which is no longer optional. So wherever you have a handle to a Module you always have an associated DataLayout.</div><div><br class=""></div><div>Best,</div><div><br class=""></div><div>Mehdi</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">Thank you,</div><div class="">Peter Finn</div></div>_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:LLVMdev@cs.uiuc.edu" class="">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" class="">http://llvm.cs.uiuc.edu</a><br class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br class=""></div></blockquote></div><br class=""></body></html>