[PATCH] Fix line numbers for code inlined from __nodebug__ functions.
Chandler Carruth
chandlerc at gmail.com
Mon Jun 2 11:17:02 PDT 2014
I'll defer to Dave for getting the actual test case into a form he's happy with, but I think this is the *exact* right change to behavior. __always_inlin__,__nodebug__ functions should behave as-if their contents were written in the place they are called, and this gives us that behavior.
Among other things this should fix is stepping through a long sequence of _mm_...() calls.
================
Comment at: lib/Transforms/Utils/InlineFunction.cpp:472-473
@@ +471,4 @@
+ // originates from the call location. This covers the case of
+ // ((__always_inline__, __nodebug__)) functions in *intrin.h missing
+ // line numbers after inlining.
+ BI->setDebugLoc(TheCallDL);
----------------
Rather than mentioning *intrin.h functions, I would just say that this is important for ((__always_inline__, __nodebug__)) functions to at least have *some* location after inlining.
http://reviews.llvm.org/D3988
More information about the llvm-commits
mailing list