aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-31 03:02:08 +0000
committerChris Lattner <sabre@nondot.org>2009-12-31 03:02:08 +0000
commitf0908a351ab123a1ad7b145a5e4bc28430be0d94 (patch)
treeb11b59f7d7c69a969638e809767eaa5864fd3867 /include/llvm/Analysis
parent6e7f3b39efdcd023e4763695907daafd6a6f609a (diff)
downloadexternal_llvm-f0908a351ab123a1ad7b145a5e4bc28430be0d94.zip
external_llvm-f0908a351ab123a1ad7b145a5e4bc28430be0d94.tar.gz
external_llvm-f0908a351ab123a1ad7b145a5e4bc28430be0d94.tar.bz2
fix Analysis/DebugInfo.h to not include Metadata.h. Do this
by moving one method out of line and eliminating redundant checks from other methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92337 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r--include/llvm/Analysis/DebugInfo.h22
1 files changed, 7 insertions, 15 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h
index f3d1b59..291610d 100644
--- a/include/llvm/Analysis/DebugInfo.h
+++ b/include/llvm/Analysis/DebugInfo.h
@@ -17,9 +17,9 @@
#ifndef LLVM_ANALYSIS_DEBUGINFO_H
#define LLVM_ANALYSIS_DEBUGINFO_H
-#include "llvm/Metadata.h" // FIXME: Should not need this.
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Dwarf.h" // FIXME: Should not need this.
namespace llvm {
@@ -38,6 +38,8 @@ namespace llvm {
class DebugLoc;
struct DebugLocTracker;
class Instruction;
+ class MDNode;
+ class LLVMContext;
/// DIDescriptor - A thin wraper around MDNode to access encoded debug info.
/// This should not be stored in a container, because underly MDNode may
@@ -368,20 +370,10 @@ namespace llvm {
unsigned isLocalToUnit() const { return getUnsignedField(9); }
unsigned isDefinition() const { return getUnsignedField(10); }
- unsigned getVirtuality() const {
- if (DbgNode->getNumOperands() < 14)
- return 0;
- return getUnsignedField(11);
- }
-
- unsigned getVirtualIndex() const {
- if (DbgNode->getNumOperands() < 14)
- return 0;
- return getUnsignedField(12);
- }
+ unsigned getVirtuality() const { return getUnsignedField(11); }
+ unsigned getVirtualIndex() const { return getUnsignedField(12); }
DICompositeType getContainingType() const {
- assert (DbgNode->getNumOperands() >= 14 && "Invalid type!");
return getFieldAs<DICompositeType>(13);
}
@@ -439,8 +431,8 @@ namespace llvm {
return getNumAddrElements() > 0;
}
- unsigned getNumAddrElements() const { return DbgNode->getNumOperands()-6; }
-
+ unsigned getNumAddrElements() const;
+
uint64_t getAddrElement(unsigned Idx) const {
return getUInt64Field(Idx+6);
}