diff options
author | Eric Christopher <echristo@gmail.com> | 2013-08-02 00:49:44 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-08-02 00:49:44 +0000 |
commit | be9f508aecfd255f47f8ea3cfe4fadbf1382ba10 (patch) | |
tree | a62666eeaba0ec564b9ebe589822332aebfc11cf /lib/IR | |
parent | 7eef3bdd7b6881110397352adca0bdc5671ff48e (diff) | |
download | llvm-be9f508aecfd255f47f8ea3cfe4fadbf1382ba10.tar.gz llvm-be9f508aecfd255f47f8ea3cfe4fadbf1382ba10.tar.bz2 llvm-be9f508aecfd255f47f8ea3cfe4fadbf1382ba10.tar.xz |
Temporarily revert "Debug Info Finder|Verifier: handle DbgLoc attached to
instructions." in an attempt to bring back some bots.
This reverts commit r187609.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187638 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r-- | lib/IR/DebugInfo.cpp | 18 | ||||
-rw-r--r-- | lib/IR/Verifier.cpp | 5 |
2 files changed, 16 insertions, 7 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp index 146f11350f..e8334f5374 100644 --- a/lib/IR/DebugInfo.cpp +++ b/lib/IR/DebugInfo.cpp @@ -908,12 +908,26 @@ void DebugInfoFinder::processModule(const Module &M) { return; } } + if (NamedMDNode *SP_Nodes = M.getNamedMetadata("llvm.dbg.sp")) { + for (unsigned i = 0, e = SP_Nodes->getNumOperands(); i != e; ++i) + processSubprogram(DISubprogram(SP_Nodes->getOperand(i))); + } } /// processLocation - Process DILocation. void DebugInfoFinder::processLocation(DILocation Loc) { - if (!Loc) return; - processScope(Loc.getScope()); + if (!Loc.Verify()) return; + DIDescriptor S(Loc.getScope()); + if (S.isCompileUnit()) + addCompileUnit(DICompileUnit(S)); + else if (S.isSubprogram()) + processSubprogram(DISubprogram(S)); + else if (S.isLexicalBlock()) + processLexicalBlock(DILexicalBlock(S)); + else if (S.isLexicalBlockFile()) { + DILexicalBlockFile DBF = DILexicalBlockFile(S); + processLexicalBlock(DILexicalBlock(DBF.getScope())); + } processLocation(Loc.getOrigLocation()); } diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index 0eda97f128..d523e42823 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -2096,11 +2096,6 @@ void Verifier::visitInstruction(Instruction &I) { MDNode *MD = I.getMetadata(LLVMContext::MD_range); Assert1(!MD || isa<LoadInst>(I), "Ranges are only for loads!", &I); - if (!DisableDebugInfoVerifier) { - MD = I.getMetadata(LLVMContext::MD_dbg); - Finder.processLocation(DILocation(MD)); - } - InstsInThisBlock.insert(&I); } |