#include "llvm/CodeGen/MachineLocation.h"
#include "llvm/Analysis/DebugInfo.h"
#include "llvm/Support/raw_ostream.h"
-#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/ValueMap.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringMap.h"
DbgScope *FunctionDbgScope;
/// DbgScopeMap - Tracks the scopes in the current function.
- DenseMap<MDNode *, DbgScope *> DbgScopeMap;
+ ValueMap<MDNode *, DbgScope *> DbgScopeMap;
/// ScopedGVs - Tracks global variables that are not at file scope.
/// For example void f() { static int b = 42; }
/// DbgAbstractScopeMap - Tracks abstract instance scopes in the current
/// function.
- DenseMap<MDNode *, DbgScope *> DbgAbstractScopeMap;
+ ValueMap<MDNode *, DbgScope *> DbgAbstractScopeMap;
/// DbgConcreteScopeMap - Tracks concrete instance scopes in the current
/// function.
- DenseMap<MDNode *,
+ ValueMap<MDNode *,
SmallVector<DbgScope *, 8> > DbgConcreteScopeMap;
/// InlineInfo - Keep track of inlined functions and their location. This
/// information is used to populate debug_inlined section.
- DenseMap<MDNode *, SmallVector<unsigned, 4> > InlineInfo;
+ ValueMap<MDNode *, SmallVector<unsigned, 4> > InlineInfo;
/// AbstractInstanceRootMap - Map of abstract instance roots of inlined
/// functions. These are subroutine entries that contain a DW_AT_inline
/// getDbgScope - Returns the scope associated with the given descriptor.
///
DbgScope *getOrCreateScope(MDNode *N);
- DbgScope *getDbgScope(MDNode *N, const MachineInstr *MI);
+ DbgScope *getDbgScope(MDNode *N, const MachineInstr *MI, MDNode *InlinedAt);
/// ConstructDbgScope - Construct the components of a scope.
///
///
void EndFunction(MachineFunction *MF);
- /// RecordSourceLine - Records location information and associates it with a
- /// label. Returns a unique label ID used to generate a label and provide
- /// correspondence to the source line list.
- unsigned RecordSourceLine(Value *V, unsigned Line, unsigned Col);
-
/// RecordSourceLine - Records location information and associates it with a
/// label. Returns a unique label ID used to generate a label and provide
/// correspondence to the source line list.
/// CollectVariableInfo - Populate DbgScope entries with variables' info.
void CollectVariableInfo();
- void SetDbgScopeLabels(const MachineInstr *MI, unsigned Label);
+ /// SetDbgScopeBeginLabels - Update DbgScope begin labels for the scopes that
+ /// start with this machine instruction.
+ void SetDbgScopeBeginLabels(const MachineInstr *MI, unsigned Label);
+
+ /// SetDbgScopeEndLabels - Update DbgScope end labels for the scopes that
+ /// end with this machine instruction.
+ void SetDbgScopeEndLabels(const MachineInstr *MI, unsigned Label);
};
} // End of namespace llvm