mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
Add comment on how tagged pointers are
distinguished from normal (untagged) ones as per review comment. I am sufficiently unaquainted with doxygen to defer the markup to someone with more experience. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57676 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -29,6 +29,13 @@ class User;
|
||||
// Generic Tagging Functions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// We adhere to the following convention: The type of a tagged pointer
|
||||
// to T is T volatile*. This means that functions that superpose a tag
|
||||
// on a pointer will be supplied a T* (or T const*) and will return a
|
||||
// tagged one: T volatile*. Untagging functions do it the other way
|
||||
// 'round. While this scheme does not prevent dereferencing of tagged
|
||||
// pointers, proper type annotations do catch most inappropriate uses.
|
||||
|
||||
/// Tag - generic tag type for (at least 32 bit) pointers
|
||||
enum Tag { noTag, tagOne, tagTwo, tagThree };
|
||||
|
||||
|
Reference in New Issue
Block a user