aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2012-10-04 20:46:14 +0000
committerEric Christopher <echristo@gmail.com>2012-10-04 20:46:14 +0000
commit0313ced016f3777e806ca2e42a746d3162174c47 (patch)
treead50cded88cbbad21c2cb950ebec00674e12234f /lib/CodeGen
parent726b88fb6a3242bbbe6c6c486a18dfa6f6ed11a6 (diff)
downloadexternal_llvm-0313ced016f3777e806ca2e42a746d3162174c47.zip
external_llvm-0313ced016f3777e806ca2e42a746d3162174c47.tar.gz
external_llvm-0313ced016f3777e806ca2e42a746d3162174c47.tar.bz2
Update this a bit more to represent how the prologue should work:
a) frame setup instructions define the prologue b) we shouldn't change our location mid-stream Add a test to make sure that the stack adjustment stays within the prologue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165250 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-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 f79854d..fd2fd24 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.