summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-10-02 21:17:00 +0000
committerEric Christopher <echristo@apple.com>2012-10-02 21:17:00 +0000
commit9fd304672cec6cd31b1978408a0a0dc375f96969 (patch)
tree796678075470745362c52fd8477c1435113f65a4 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent138f2061465a3e79cfc09b6bca1c3fba960b83cb (diff)
downloadllvm-9fd304672cec6cd31b1978408a0a0dc375f96969.tar.gz
llvm-9fd304672cec6cd31b1978408a0a0dc375f96969.tar.bz2
llvm-9fd304672cec6cd31b1978408a0a0dc375f96969.tar.xz
Don't use a debug location for frame setup instructions in the
prologue. Also skip frame setup instructions when looking for the first location. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 52b10d7ca6..0682694ebe 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1355,9 +1355,10 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
if (!MI->isLabel())
AtBlockEntry = false;
- // First known non DBG_VALUE location marks beginning of function
- // body.
- if (PrologEndLoc.isUnknown() && !MI->getDebugLoc().isUnknown())
+ // First known non-DBG_VALUE and non-frame setup location marks
+ // the beginning of the function body.
+ if (!MI->getFlag(MachineInstr::FrameSetup) &&
+ (PrologEndLoc.isUnknown() && !MI->getDebugLoc().isUnknown()))
PrologEndLoc = MI->getDebugLoc();
// Check if the instruction clobbers any registers with debug vars.