From 653fe976af88fcf86162ca5bb1b46d4378864572 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 19 Sep 2018 15:27:50 -0400 Subject: Support for IRStringLit (#645) * * Added support for strings in IR with IRStringLit - with storage of chars after it * Added kIRDecorationOp_Transitory - can be used for detecting instructions constructed on stack * Made IRConstant hashing work off type * Fix comment that is out of date about how an instruction is determines to hold a transitory string. --- source/core/slang-string.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/core/slang-string.h') diff --git a/source/core/slang-string.h b/source/core/slang-string.h index 2609b37ab..df1055795 100644 --- a/source/core/slang-string.h +++ b/source/core/slang-string.h @@ -717,6 +717,11 @@ namespace Slang { return Slang::GetHashCode((const char*)begin()); } + + UnownedStringSlice getUnownedSlice() const + { + return StringRepresentation::asSlice(buffer); + } }; class StringBuilder : public String -- cgit v1.2.3