diff --git a/llvm/include/llvm/IR/Statepoint.h b/llvm/include/llvm/IR/Statepoint.h index a27c43b1e1e0..5e83972943ce 100644 --- a/llvm/include/llvm/IR/Statepoint.h +++ b/llvm/include/llvm/IR/Statepoint.h @@ -409,6 +409,8 @@ StatepointBase::getRelocates() struct StatepointDirectives { Optional NumPatchBytes; Optional StatepointID; + + static const uint64_t DefaultStatepointID = 0xABCDEF00; }; /// Parse out statepoint directives from the function attributes present in \p diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 85aaf62fb3cb..0ebc80fef39a 100644 --- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -1318,7 +1318,7 @@ makeStatepointExplicitImpl(const CallSite CS, /* to replace */ IRBuilder<> Builder(InsertBefore); ArrayRef GCArgs(LiveVariables); - uint64_t StatepointID = 0xABCDEF00; + uint64_t StatepointID = StatepointDirectives::DefaultStatepointID; uint32_t NumPatchBytes = 0; uint32_t Flags = uint32_t(StatepointFlags::None);