[llvm] f34418c - [HWASAN] Remove DW_OP_LLVM_tag_offset from DIExpression::isImplicit (#79816)

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 02:29:12 PST 2024


Author: Orlando Cazalet-Hyams
Date: 2024-02-01T10:29:08Z
New Revision: f34418c73b718abb24cd5b921b5a2846011e7d0c

URL: https://github.com/llvm/llvm-project/commit/f34418c73b718abb24cd5b921b5a2846011e7d0c
DIFF: https://github.com/llvm/llvm-project/commit/f34418c73b718abb24cd5b921b5a2846011e7d0c.diff

LOG: [HWASAN] Remove DW_OP_LLVM_tag_offset from DIExpression::isImplicit (#79816)

According to its doc-comment `isImplicit` is meant to return true if the
expression is an implicit location description (describes an object or part of
an object which has no location by computing the value from available program
state).

There's a brief entry for `DW_OP_LLVM_tag_offset` in the LangRef and there's
some info in the original commit fb9ce100d19be130d004d03088ccd4af295f3435.

>From what I can tell it doesn't look like `DW_OP_LLVM_tag_offset` affects
whether or not the location is implicit; the opcode doesn't get included in the
final location description but instead is added as an attribute to the variable.

This was tripping an assertion in the latest application of the fix to #76545,
#78606, where an expression containing a `DW_OP_LLVM_tag_offset` is split into
a fragment (i.e., describe a part of the whole variable).

Added: 
    

Modified: 
    llvm/lib/IR/DebugInfoMetadata.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp
index 51950fc937f0a..28f96653d815b 100644
--- a/llvm/lib/IR/DebugInfoMetadata.cpp
+++ b/llvm/lib/IR/DebugInfoMetadata.cpp
@@ -1512,7 +1512,6 @@ bool DIExpression::isImplicit() const {
     default:
       break;
     case dwarf::DW_OP_stack_value:
-    case dwarf::DW_OP_LLVM_tag_offset:
       return true;
     }
   }


        


More information about the llvm-commits mailing list