summaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-10-09 22:42:28 +0000
committerDevang Patel <dpatel@apple.com>2009-10-09 22:42:28 +0000
commitac1ceb3dd33cb79ecb0dbd64b6abafa7ce067c5f (patch)
treeaddcad4adb847b585dd7fbaf70c16e9bdeb9300d /include/llvm
parentc89d27a440370455336202b2a8f25eb9c73e67bc (diff)
downloadexternal_llvm-ac1ceb3dd33cb79ecb0dbd64b6abafa7ce067c5f.zip
external_llvm-ac1ceb3dd33cb79ecb0dbd64b6abafa7ce067c5f.tar.gz
external_llvm-ac1ceb3dd33cb79ecb0dbd64b6abafa7ce067c5f.tar.bz2
Extract scope information from the variable itself, instead of relying on alloca or llvm.dbg.declare location.
While recording beginning of a function, use scope info from the first location entry instead of just relying on first location entry itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index b7b9019..3544074 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -42,6 +42,7 @@
#include "llvm/CodeGen/MachineLocation.h"
#include "llvm/GlobalValue.h"
#include "llvm/Pass.h"
+#include "llvm/Metadata.h"
namespace llvm {
@@ -147,7 +148,7 @@ class MachineModuleInfo : public ImmutablePass {
public:
static char ID; // Pass identification, replacement for typeid
- typedef DenseMap<MDNode *, std::pair<MDNode *, unsigned> > VariableDbgInfoMapTy;
+ typedef SmallVector< std::pair< WeakMetadataVH, unsigned>, 4 > VariableDbgInfoMapTy;
VariableDbgInfoMapTy VariableDbgInfo;
MachineModuleInfo();
@@ -332,9 +333,8 @@ public:
/// setVariableDbgInfo - Collect information used to emit debugging information
/// of a variable.
- void setVariableDbgInfo(MDNode *N, MDNode *L, unsigned S) {
- if (N && L)
- VariableDbgInfo[N] = std::make_pair(L, S);
+ void setVariableDbgInfo(MDNode *N, unsigned S) {
+ VariableDbgInfo.push_back(std::make_pair(N, S));
}
VariableDbgInfoMapTy &getVariableDbgInfo() { return VariableDbgInfo; }