diff options
author | Devang Patel <dpatel@apple.com> | 2010-05-07 22:04:20 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-05-07 22:04:20 +0000 |
commit | 02f0dbd97a9bc01528aa12c2f260d928683ab411 (patch) | |
tree | 3b9c5d8152d60e01d68483b27dc74f61b118804f /lib/Analysis/DebugInfo.cpp | |
parent | 6e5ce287b0e53c264af0ba37169ad964e19b5bb7 (diff) |
Verify variable directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103305 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index 56bf580493..56c9b21022 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -32,42 +32,6 @@ using namespace llvm::dwarf; // DIDescriptor //===----------------------------------------------------------------------===// -/// ValidDebugInfo - Return true if V represents valid debug info value. -/// FIXME : Add DIDescriptor.isValid() -bool DIDescriptor::ValidDebugInfo(const MDNode *N, unsigned OptLevel) { - if (!N) - return false; - - DIDescriptor DI(N); - - // Check current version. Allow Version7 for now. - unsigned Version = DI.getVersion(); - if (Version != LLVMDebugVersion && Version != LLVMDebugVersion7) - return false; - - switch (DI.getTag()) { - case DW_TAG_variable: - assert(DIVariable(N).Verify() && "Invalid DebugInfo value"); - break; - case DW_TAG_compile_unit: - assert(DICompileUnit(N).Verify() && "Invalid DebugInfo value"); - break; - case DW_TAG_subprogram: - assert(DISubprogram(N).Verify() && "Invalid DebugInfo value"); - break; - case DW_TAG_lexical_block: - // FIXME: This interfers with the quality of generated code during - // optimization. - if (OptLevel != CodeGenOpt::None) - return false; - // FALLTHROUGH - default: - break; - } - - return true; -} - StringRef DIDescriptor::getStringField(unsigned Elt) const { if (DbgNode == 0) |