llvm-6502/lib/IR
David Blaikie a42211335a DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself.
Originally committed in r211723, reverted in r211724 due to failure
cases found and fixed (ArgumentPromotion: r211872, Inlining: r212065),
committed again in r212085 and reverted again in r212089 after fixing
some other cases, such as debug info subprogram lists not keeping track
of the function they represent (r212128) and then short-circuiting
things like LiveDebugVariables that build LexicalScopes for functions
that might not have full debug info.

And again, I believe the invariant actually holds for some reasonable
amount of code (but I'll keep an eye on the buildbots and see what
happens... ).

Original commit message:

PR20038: DebugInfo: Inlined call sites where the caller has debug info
but the call itself has no debug location.

This situation does bad things when inlined, so I've fixed Clang not to
produce inlinable call sites without locations when the caller has debug
info (in the one case where I could find that this occurred). This
updates the PR20038 test case to be what clang now produces, and readds
the assertion that had to be removed due to this bug.

I've also beefed up the debug info verifier to help diagnose these
issues in the future, and I hope to add checks to the inliner to just
assert-fail if it encounters this situation. If, in the future, we
decide we have to cope with this situation, the right thing to do is
probably to just remove all the DebugLocs from the inlined instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212205 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-02 18:32:05 +00:00
..
AsmWriter.cpp IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
AsmWriter.h IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
AttributeImpl.h
Attributes.cpp Add a new attribute called 'jumptable' that creates jump-instruction tables for functions marked with this attribute. 2014-06-05 19:29:43 +00:00
AutoUpgrade.cpp Rename loop unrolling and loop vectorizer metadata to have a common prefix. 2014-06-25 15:41:00 +00:00
BasicBlock.cpp
CMakeLists.txt IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
Comdat.cpp IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
ConstantFold.cpp Canonicalize addrspacecast ConstExpr between different pointer types 2014-06-15 21:40:57 +00:00
ConstantFold.h
ConstantRange.cpp
Constants.cpp InstCombine: Don't turn -(x/INT_MIN) -> x/INT_MIN 2014-07-02 06:07:09 +00:00
ConstantsContext.h
Core.cpp Re-apply r211287: Remove support for LLVM runtime multi-threading. 2014-06-27 15:13:01 +00:00
DataLayout.cpp Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
DebugInfo.cpp DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself. 2014-07-02 18:32:05 +00:00
DebugLoc.cpp Add missing const specifier to a const method. 2014-06-05 14:32:15 +00:00
DiagnosticInfo.cpp Simply test for available locations in optimization remarks. 2014-06-18 18:46:58 +00:00
DiagnosticPrinter.cpp
DIBuilder.cpp Debug info: split out complex DIVariable address expressions into a 2014-06-30 17:17:35 +00:00
Dominators.cpp
Function.cpp
GCOV.cpp Remove 'using std::errro_code' from lib. 2014-06-13 02:24:39 +00:00
Globals.cpp IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
Instructions.cpp IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
IntrinsicInst.cpp
IRBuilder.cpp
IRPrintingPasses.cpp
LeakDetector.cpp
LeaksContext.h
LegacyPassManager.cpp
LLVMBuild.txt
LLVMContext.cpp Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
LLVMContextImpl.cpp
LLVMContextImpl.h
Makefile
Mangler.cpp
MDBuilder.cpp
Metadata.cpp The count() function for STL datatypes returns unsigned, even where it's 2014-06-20 10:26:56 +00:00
Module.cpp IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
module.modulemap
Pass.cpp Remove pimpl class from PassRegistry. 2014-06-12 16:06:51 +00:00
PassManager.cpp
PassRegistry.cpp Remove pimpl class from PassRegistry. 2014-06-12 16:06:51 +00:00
SymbolTableListTraitsImpl.h
Type.cpp
TypeFinder.cpp
Use.cpp
User.cpp
Value.cpp Convert StringMapEntry::Create to use StringRef instead of start/end pointers. Simpliies all in tree call sites. No functional change. 2014-06-11 05:35:56 +00:00
ValueSymbolTable.cpp
ValueTypes.cpp
Verifier.cpp Verifier: Update assert message to reflect LangRef 2014-06-28 06:24:49 +00:00