summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-05-09 19:59:29 +0000
committerReid Kleckner <rnk@google.com>2017-05-09 19:59:29 +0000
commitb5fced732416c1d9a2ffa1980ca1af88c06edd83 (patch)
treebe7f854f4fcb5399e43b0ae77e0a09b625dfbb66 /llvm/include
parentdfa7f613ed7ca025d6d4d2ea85073f6ddaa9f712 (diff)
downloadbcm5719-llvm-b5fced732416c1d9a2ffa1980ca1af88c06edd83.tar.gz
bcm5719-llvm-b5fced732416c1d9a2ffa1980ca1af88c06edd83.zip
[codeview] Check for a DIExpression offset for local variables
Fixes inalloca parameters, which previously all pointed to the same offset. Extend the test to use llvm-readobj so that we can test the offset in a readable way. llvm-svn: 302578
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/IR/DebugInfoMetadata.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/DebugInfoMetadata.h b/llvm/include/llvm/IR/DebugInfoMetadata.h
index 0331d5229e7..36bc5ce91b6 100644
--- a/llvm/include/llvm/IR/DebugInfoMetadata.h
+++ b/llvm/include/llvm/IR/DebugInfoMetadata.h
@@ -2276,6 +2276,10 @@ public:
/// Append \p Ops with operations to apply the \p Offset.
static void appendOffset(SmallVectorImpl<uint64_t> &Ops, int64_t Offset);
+ /// If this is a constant offset, extract it. If there is no expression,
+ /// return true with an offset of zero.
+ bool extractIfOffset(int64_t &Offset) const;
+
/// Constants for DIExpression::prepend.
enum { NoDeref = false, WithDeref = true, WithStackValue = true };
OpenPOWER on IntegriCloud