diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-05-12 23:53:03 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-05-12 23:53:03 +0000 |
commit | 47290de5dbab6a784afbbea16dd3dc895e262ccb (patch) | |
tree | 4d626ecc0529a4cc80b06d3753410ea9419d0d96 /include | |
parent | 5a5a0640d8654558eb49fd485a124a4e4e52e494 (diff) | |
download | llvm-47290de5dbab6a784afbbea16dd3dc895e262ccb.tar.gz llvm-47290de5dbab6a784afbbea16dd3dc895e262ccb.tar.bz2 llvm-47290de5dbab6a784afbbea16dd3dc895e262ccb.tar.xz |
Revert "DebugInfo: Include lexical scopes in inlined subroutines."
This reverts commit r208506.
Some inlined subroutine scopes appear to be missing with this change.
Reverting while I investigate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/STLExtras.h | 7 | ||||
-rw-r--r-- | include/llvm/CodeGen/LexicalScopes.h | 9 |
2 files changed, 4 insertions, 12 deletions
diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h index 5b7b88b900..807ec59061 100644 --- a/include/llvm/ADT/STLExtras.h +++ b/include/llvm/ADT/STLExtras.h @@ -530,13 +530,6 @@ make_unique(size_t n) { #endif -template<typename First, typename Second> -struct pair_hash { - size_t operator()(const std::pair<First, Second> &P) const { - return std::hash<First>()(P.first) * 31 + std::hash<Second>()(P.second); - } -}; - } // End llvm namespace #endif diff --git a/include/llvm/CodeGen/LexicalScopes.h b/include/llvm/CodeGen/LexicalScopes.h index 31d6872674..31d40ff588 100644 --- a/include/llvm/CodeGen/LexicalScopes.h +++ b/include/llvm/CodeGen/LexicalScopes.h @@ -21,7 +21,6 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/IR/DebugLoc.h" #include "llvm/IR/Metadata.h" #include "llvm/IR/ValueHandle.h" @@ -186,7 +185,9 @@ public: /// findInlinedScope - Find an inlined scope for the given DebugLoc or return /// NULL. - LexicalScope *findInlinedScope(DebugLoc DL); + LexicalScope *findInlinedScope(DebugLoc DL) { + return InlinedLexicalScopeMap.lookup(DL); + } /// findLexicalScope - Find regular lexical scope or return null. LexicalScope *findLexicalScope(const MDNode *N) { @@ -229,9 +230,7 @@ private: /// InlinedLexicalScopeMap - Tracks inlined function scopes in current /// function. - std::unordered_map<std::pair<const MDNode *, const MDNode *>, LexicalScope, - pair_hash<const MDNode *, const MDNode *>> - InlinedLexicalScopeMap; + DenseMap<DebugLoc, LexicalScope *> InlinedLexicalScopeMap; /// AbstractScopeMap - These scopes are not included LexicalScopeMap. // Use an unordered_map to ensure value pointer validity over insertion. |