diff options
| author | Dan Gohman <gohman@apple.com> | 2010-07-16 17:54:27 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-07-16 17:54:27 +0000 |
| commit | b2c1c2be5dbabbbcf75ef4868c57426a64b8db6a (patch) | |
| tree | dc52f63c85eda229440c7052f78a452e56635806 /lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
| parent | 160fe2680efe1d42179ec4907e7eabc70a4d643c (diff) | |
| download | external_llvm-b2c1c2be5dbabbbcf75ef4868c57426a64b8db6a.zip external_llvm-b2c1c2be5dbabbbcf75ef4868c57426a64b8db6a.tar.gz external_llvm-b2c1c2be5dbabbbcf75ef4868c57426a64b8db6a.tar.bz2 | |
Revert r108369, sorting llvm.dbg.declare information by source position,
since it doesn't work for front-ends which don't emit column information
(which includes llvm-gcc in its present configuration), and doesn't
work for clang for K&R style variables where the variables are declared
in a different order from the parameter list.
Instead, make a separate pass through the instructions to collect the
llvm.dbg.declare instructions in order. This ensures that the debug
information for variables is emitted in this order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108538 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
| -rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index ac4e709..4a0004a 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -4009,20 +4009,6 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) { if (const BitCastInst *BCI = dyn_cast<BitCastInst>(Address)) Address = BCI->getOperand(0); const AllocaInst *AI = dyn_cast<AllocaInst>(Address); - if (AI) { - // Don't handle byval arguments or VLAs, for example. - // Non-byval arguments are handled here (they refer to the stack temporary - // alloca at this point). - DenseMap<const AllocaInst*, int>::iterator SI = - FuncInfo.StaticAllocaMap.find(AI); - if (SI == FuncInfo.StaticAllocaMap.end()) - return 0; // VLAs. - int FI = SI->second; - - MachineModuleInfo &MMI = DAG.getMachineFunction().getMMI(); - if (!DI.getDebugLoc().isUnknown() && MMI.hasDebugInfo()) - MMI.setVariableDbgInfo(Variable, FI, DI.getDebugLoc()); - } // Build an entry in DbgOrdering. Debug info input nodes get an SDNodeOrder // but do not always have a corresponding SDNode built. The SDNodeOrder |
