diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-01-21 16:41:54 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-21 16:41:54 -0500 |
| commit | bd815f02d846a50e16dab67e6512db2a6215c41f (patch) | |
| tree | 01e391757bdb8f2d15bdc010227d522bddac3936 /source/slang/diagnostics.h | |
| parent | 0a3ef7b4ae02983ea3f986ba8211e7c6af9d254b (diff) | |
Feature/file unique identity (#789)
* * Fix memory bug around expanding va_args - needed buffer to have space for terminating 0
* Fix problem with FileWriter defaults being globals, as memory they allocate, will only be freed after return from main - work around by making StdWriters RefObject derived, and kept in scope such the writers are destroyed before checks for leaks is found
* Added SimplifyPathAndHash mode for CacheFileSystem - will simplify the path and see if simplified path is in cache before reading file (limiting amout of underlying file requests)
* * Added calcReplaceChar
* Renamed DefaultFileSystem to OSFileSystem
* Made OSFileSystem convert windows \ to / on linux
* Simplified logic for caching in CacheFileSystem.
* Added pragma-once-c to add extra test, but also so there is an 'include' directory in preprocessor tests.
* Small fixes in pragma once test.
* Simplified cache handling path, so that paths/simplified paths area always added.
* Improve naming of methods for different caches.
* Removed references to 'canonicalPath' and made 'uniqueIdentity'
* * Re-add support for canonicalPath to ISlangFileSystem -> not for uniqueIdentifier but as a way to display 'canonicalPath'
* Added peliminary support for being able to display verbose paths in a diagnostic
* Added 'clearCache' support
* Added verbose path support to SourceManager (now needs a ISlangFileSystemExt to do this)
* Added support for '-verbose-path' option to slangc and slang-test.
Diffstat (limited to 'source/slang/diagnostics.h')
| -rw-r--r-- | source/slang/diagnostics.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/slang/diagnostics.h b/source/slang/diagnostics.h index 8e5bbcb64..fed492bc7 100644 --- a/source/slang/diagnostics.h +++ b/source/slang/diagnostics.h @@ -141,12 +141,23 @@ namespace Slang // The source manager to use when mapping source locations to file+line info SourceManager* sourceManager; + struct Flag + { + enum Enum: uint32_t + { + VerbosePath = 0x1, ///< Will try and display a + }; + }; + typedef uint32_t Flags; + StringBuilder outputBuffer; // List<Diagnostic> diagnostics; int errorCount = 0; - ISlangWriter* writer = nullptr; + ISlangWriter* writer = nullptr; + Flags flags = 0; + /* void Error(int id, const String & msg, const SourceLoc & pos) { @@ -163,7 +174,7 @@ namespace Slang void diagnoseDispatch(SourceLoc const& pos, DiagnosticInfo const& info) { - diagnoseImpl(pos, info, 0, NULL); + diagnoseImpl(pos, info, 0, nullptr); } void diagnoseDispatch(SourceLoc const& pos, DiagnosticInfo const& info, DiagnosticArg const& arg0) |
