summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-07-01 23:19:01 +0000
committerDevang Patel <dpatel@apple.com>2009-07-01 23:19:01 +0000
commitceddbe8e30a46f99a98033c4618c807bf058499a (patch)
tree54a6f1c7dfc774e1228123091a49a9b8212f6708 /lib/CodeGen/SelectionDAG
parent8b024a5eb5b64b482f7d92aad7a3f0e6cac93f12 (diff)
downloadexternal_llvm-ceddbe8e30a46f99a98033c4618c807bf058499a.zip
external_llvm-ceddbe8e30a46f99a98033c4618c807bf058499a.tar.gz
external_llvm-ceddbe8e30a46f99a98033c4618c807bf058499a.tar.bz2
Refactor. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74659 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index 48ebd0f..f3cb2b6 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
@@ -3955,13 +3955,15 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
if (!DIDescriptor::ValidDebugInfo(SP, OptLevel))
return 0;
+ DISubprogram Subprogram(cast<GlobalVariable>(SP));
+ DICompileUnit CompileUnit = Subprogram.getCompileUnit();
+ unsigned Line = Subprogram.getLineNumber();
+
MachineFunction &MF = DAG.getMachineFunction();
if (OptLevel == CodeGenOpt::None) {
// llvm.dbg.func.start implicitly defines a dbg_stoppoint which is what
// (most?) gdb expects.
DebugLoc PrevLoc = CurDebugLoc;
- DISubprogram Subprogram(cast<GlobalVariable>(SP));
- DICompileUnit CompileUnit = Subprogram.getCompileUnit();
if (!Subprogram.describes(MF.getFunction())) {
// This is a beginning of an inlined function.
@@ -3973,7 +3975,6 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
return 0;
// Record the source line.
- unsigned Line = Subprogram.getLineNumber();
setCurDebugLoc(DebugLoc::get(
MF.getOrCreateDebugLocID(CompileUnit.getGV(), Line, 0)));
@@ -3997,8 +3998,6 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
}
}
} else {
- DISubprogram Subprogram(cast<GlobalVariable>(SP));
-
std::string SPName;
Subprogram.getLinkageName(SPName);
if (!SPName.empty()
@@ -4008,14 +4007,9 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
return 0;
}
- // llvm.dbg.func.start implicitly defines a dbg_stoppoint which is
- // what (most?) gdb expects.
- DICompileUnit CompileUnit = Subprogram.getCompileUnit();
-
// Record the source line but does not create a label for the normal
// function start. It will be emitted at asm emission time. However,
// create a label if this is a beginning of inlined function.
- unsigned Line = Subprogram.getLineNumber();
setCurDebugLoc(DebugLoc::get(
MF.getOrCreateDebugLocID(CompileUnit.getGV(), Line, 0)));
// FIXME - Start new region because llvm.dbg.func_start also defines