aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVictor Hernandez <vhernandez@apple.com>2010-01-15 19:04:09 +0000
committerVictor Hernandez <vhernandez@apple.com>2010-01-15 19:04:09 +0000
commit3a32865d58f015e7058444eab7085195c34da95a (patch)
tree4f6fd059942b2a5290ec3380adb686cca69f58c9 /include
parent3752d2fe34a8d576203f8034baeabb02e65c87bc (diff)
downloadexternal_llvm-3a32865d58f015e7058444eab7085195c34da95a.zip
external_llvm-3a32865d58f015e7058444eab7085195c34da95a.tar.gz
external_llvm-3a32865d58f015e7058444eab7085195c34da95a.tar.bz2
Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare. It also strips old llvm.dbg.declare intrinsics that did not pass metadata as the first argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93531 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/DebugInfo.h3
-rw-r--r--include/llvm/IntrinsicInst.h2
-rw-r--r--include/llvm/Intrinsics.td2
3 files changed, 3 insertions, 4 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h
index c626b12..cc9514c 100644
--- a/include/llvm/Analysis/DebugInfo.h
+++ b/include/llvm/Analysis/DebugInfo.h
@@ -491,7 +491,6 @@ namespace llvm {
Module &M;
LLVMContext& VMContext;
- const Type *EmptyStructPtr; // "{}*".
Function *DeclareFn; // llvm.dbg.declare
Function *ValueFn; // llvm.dbg.value
@@ -659,7 +658,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, bool stripCasts = true);
+ const DbgDeclareInst *findDbgDeclare(const Value *V);
/// 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 151e434..d86b33e 100644
--- a/include/llvm/IntrinsicInst.h
+++ b/include/llvm/IntrinsicInst.h
@@ -82,7 +82,7 @@ namespace llvm {
///
class DbgDeclareInst : public DbgInfoIntrinsic {
public:
- Value *getAddress() const { return getOperand(1); }
+ Value *getAddress() const;
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 0cec567..684f872 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_descriptor_ty, llvm_metadata_ty]>;
+ [llvm_metadata_ty, llvm_metadata_ty]>;
def int_dbg_value : Intrinsic<[llvm_void_ty],
[llvm_metadata_ty, llvm_i64_ty,
llvm_metadata_ty]>;