summaryrefslogtreecommitdiff
path: root/source/slang/source-loc.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/source-loc.h')
-rw-r--r--source/slang/source-loc.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/slang/source-loc.h b/source/slang/source-loc.h
index 83ad87633..88ec6b62a 100644
--- a/source/slang/source-loc.h
+++ b/source/slang/source-loc.h
@@ -3,6 +3,9 @@
#define SLANG_SOURCE_LOC_H_INCLUDED
#include "../core/basic.h"
+#include "../core/slang-com-ptr.h"
+
+#include "../../slang.h"
namespace Slang {
@@ -73,8 +76,11 @@ public:
// The logical file path to report for locations inside this span.
String path;
- // The actual contents of the file.
- String content;
+ /// A blob that owns the storage for the file contents
+ ComPtr<ISlangBlob> contentBlob;
+
+ /// The actual contents of the file.
+ UnownedStringSlice content;
// The range of source locations that the span covers
SourceRange sourceRange;
@@ -134,6 +140,10 @@ struct SourceManager
SourceFile* allocateSourceFile(
String const& path,
+ ISlangBlob* content);
+
+ SourceFile* allocateSourceFile(
+ String const& path,
String const& content);
SourceLoc allocateSourceFileForLineDirective(