diff options
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Analysis/DebugInfo.h | 3 | ||||
-rw-r--r-- | include/llvm/IntrinsicInst.h | 8 | ||||
-rw-r--r-- | include/llvm/Intrinsics.td | 2 |
3 files changed, 4 insertions, 9 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h index cc9514c..c626b12 100644 --- a/include/llvm/Analysis/DebugInfo.h +++ b/include/llvm/Analysis/DebugInfo.h @@ -491,6 +491,7 @@ namespace llvm { Module &M; LLVMContext& VMContext; + const Type *EmptyStructPtr; // "{}*". Function *DeclareFn; // llvm.dbg.declare Function *ValueFn; // llvm.dbg.value @@ -658,7 +659,7 @@ namespace llvm { /// Finds the dbg.declare intrinsic corresponding to this value if any. /// It looks through pointer casts too. - const DbgDeclareInst *findDbgDeclare(const Value *V); + const DbgDeclareInst *findDbgDeclare(const Value *V, bool stripCasts = true); /// Find the debug info descriptor corresponding to this global variable. Value *findDbgGlobalDeclare(GlobalVariable *V); diff --git a/include/llvm/IntrinsicInst.h b/include/llvm/IntrinsicInst.h index f40e8cc..151e434 100644 --- a/include/llvm/IntrinsicInst.h +++ b/include/llvm/IntrinsicInst.h @@ -25,7 +25,6 @@ #define LLVM_INTRINSICINST_H #include "llvm/Constants.h" -#include "llvm/Metadata.h" #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/Intrinsics.h" @@ -83,12 +82,7 @@ namespace llvm { /// class DbgDeclareInst : public DbgInfoIntrinsic { public: - Value *getAddress() const { - if (MDNode* MD = dyn_cast<MDNode>(getOperand(1))) - return MD->getOperand(0); - else - return NULL; - } + Value *getAddress() const { return getOperand(1); } MDNode *getVariable() const { return cast<MDNode>(getOperand(2)); } // Methods for support type inquiry through isa, cast, and dyn_cast: diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td index 684f872..0cec567 100644 --- a/include/llvm/Intrinsics.td +++ b/include/llvm/Intrinsics.td @@ -283,7 +283,7 @@ let Properties = [IntrNoMem] in { // places. let Properties = [IntrNoMem] in { def int_dbg_declare : Intrinsic<[llvm_void_ty], - [llvm_metadata_ty, llvm_metadata_ty]>; + [llvm_descriptor_ty, llvm_metadata_ty]>; def int_dbg_value : Intrinsic<[llvm_void_ty], [llvm_metadata_ty, llvm_i64_ty, llvm_metadata_ty]>; |