aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-11-10 23:06:00 +0000
committerDevang Patel <dpatel@apple.com>2009-11-10 23:06:00 +0000
commit90a0fe3bd6043f897285b967b196f6ab26dfdcae (patch)
treeda1c22d550cacf9263985ed306c596630b357e25 /include/llvm
parentd2df0e391758a9c98d063c8e44c0cf1021383a02 (diff)
downloadexternal_llvm-90a0fe3bd6043f897285b967b196f6ab26dfdcae.tar.gz
external_llvm-90a0fe3bd6043f897285b967b196f6ab26dfdcae.tar.bz2
external_llvm-90a0fe3bd6043f897285b967b196f6ab26dfdcae.zip
Implement support to debug inlined functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Analysis/DebugInfo.h6
-rw-r--r--include/llvm/CodeGen/DwarfWriter.h10
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h7
-rw-r--r--include/llvm/Transforms/Utils/Cloning.h4
4 files changed, 9 insertions, 18 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h
index 0a8e197c65..8c3c792da2 100644
--- a/include/llvm/Analysis/DebugInfo.h
+++ b/include/llvm/Analysis/DebugInfo.h
@@ -693,12 +693,6 @@ bool getLocationInfo(const Value *V, std::string &DisplayName,
DebugLoc ExtractDebugLocation(DbgFuncStartInst &FSI,
DebugLocTracker &DebugLocInfo);
- /// isInlinedFnStart - Return true if FSI is starting an inlined function.
- bool isInlinedFnStart(DbgFuncStartInst &FSI, const Function *CurrentFn);
-
- /// isInlinedFnEnd - Return true if REI is ending an inlined function.
- bool isInlinedFnEnd(DbgRegionEndInst &REI, const Function *CurrentFn);
- /// DebugInfoFinder - This object collects DebugInfo from a module.
class DebugInfoFinder {
public:
diff --git a/include/llvm/CodeGen/DwarfWriter.h b/include/llvm/CodeGen/DwarfWriter.h
index e7a2f664eb..cca4e36a76 100644
--- a/include/llvm/CodeGen/DwarfWriter.h
+++ b/include/llvm/CodeGen/DwarfWriter.h
@@ -104,14 +104,8 @@ public:
/// be emitted.
bool ShouldEmitDwarfDebug() const;
- //// RecordInlinedFnStart - Indicate the start of a inlined function.
- unsigned RecordInlinedFnStart(DISubprogram SP, DICompileUnit CU,
- unsigned Line, unsigned Col);
-
- /// RecordInlinedFnEnd - Indicate the end of inlined subroutine.
- unsigned RecordInlinedFnEnd(DISubprogram SP);
- void SetDbgScopeBeginLabels(const MachineInstr *MI, unsigned L);
- void SetDbgScopeEndLabels(const MachineInstr *MI, unsigned L);
+ void BeginScope(const MachineInstr *MI, unsigned Label);
+ void EndScope(const MachineInstr *MI);
};
} // end llvm namespace
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index f2b027bbbe..5f0a5ed51f 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -150,7 +150,8 @@ class MachineModuleInfo : public ImmutablePass {
public:
static char ID; // Pass identification, replacement for typeid
- typedef SmallVector< std::pair<TrackingVH<MDNode>, unsigned>, 4 >
+ typedef std::pair<unsigned, TrackingVH<MDNode> > UnsignedAndMDNodePair;
+ typedef SmallVector< std::pair<TrackingVH<MDNode>, UnsignedAndMDNodePair>, 4>
VariableDbgInfoMapTy;
VariableDbgInfoMapTy VariableDbgInfo;
@@ -336,8 +337,8 @@ public:
/// setVariableDbgInfo - Collect information used to emit debugging information
/// of a variable.
- void setVariableDbgInfo(MDNode *N, unsigned S) {
- VariableDbgInfo.push_back(std::make_pair(N, S));
+ void setVariableDbgInfo(MDNode *N, unsigned Slot, MDNode *Scope) {
+ VariableDbgInfo.push_back(std::make_pair(N, std::make_pair(Slot, Scope)));
}
VariableDbgInfoMapTy &getVariableDbgInfo() { return VariableDbgInfo; }
diff --git a/include/llvm/Transforms/Utils/Cloning.h b/include/llvm/Transforms/Utils/Cloning.h
index 5b15b5b871..e9099f878b 100644
--- a/include/llvm/Transforms/Utils/Cloning.h
+++ b/include/llvm/Transforms/Utils/Cloning.h
@@ -24,6 +24,7 @@ namespace llvm {
class Module;
class Function;
+class Instruction;
class Pass;
class LPPassManager;
class BasicBlock;
@@ -154,7 +155,8 @@ void CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
SmallVectorImpl<ReturnInst*> &Returns,
const char *NameSuffix = "",
ClonedCodeInfo *CodeInfo = 0,
- const TargetData *TD = 0);
+ const TargetData *TD = 0,
+ Instruction *TheCall = 0);
/// InlineFunction - This function inlines the called function into the basic
/// block of the caller. This returns false if it is not possible to inline