[llvm] r220536 - Make getDISubprogram(const Function *F) available in LLVM

Diego Novillo dnovillo at google.com
Fri Oct 24 14:17:38 PDT 2014


On Fri Oct 24 2014 at 4:59:25 PM David Blaikie <dblaikie at gmail.com> wrote:

> On Fri, Oct 24, 2014 at 1:52 PM, David Majnemer <david.majnemer at gmail.com>
> wrote:
>
>> On Fri, Oct 24, 2014 at 12:05 PM, David Blaikie <dblaikie at gmail.com>
>> wrote:
>> I think it's a bit more clear when written like:
>> DISubprogram llvm::getDISubprogram(const Function *F) {
>>   // We look for the first instr that has a debug annotation leading back
>> to F.
>>   for (auto &BB : *F) {
>>     auto Inst = std::find_if(BB.begin(), BB.end(), [](const Instruction
>> &Inst) {
>>       return !Inst.getDebugLoc().isUnknown();
>>     });
>>
>
> & I here I had been trying to figure out a way to use STL algorithms here
> just to mess with Diego.
>

Hm? Context?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141024/08f063bb/attachment.html>


More information about the llvm-commits mailing list