From 879ec1b385d290a4375682ec613a9e7a1967fc7d Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 10 Oct 2018 13:56:25 -0400 Subject: Feature/source loc refactor (#668) * * Remove the need for IRHighLevelDecoration in Emit * Use the IRLayoutDecoration for GeometryShaderPrimitiveTypeModifier * Initial look at at variable byte encoding, and simple unit test. * Fixing problems with comparison due to naming differences with slang/fxc. * * More tests and perf improvements for byte encoding. * Mechanism to detect processor and processor features in main slang header. * Split out cpu based defines into slang-cpu-defines.h so do not polute slang.h * Support for variable byte encoding on serialization. * Removed unused flag. * Fix warning. * Fix calcMsByte32 for 0 values without using intrinsic. * Fix a mistake in calculating maximum instruction size. * Introduced the idea of SourceUnit. * Small improvements around naming. Add more functionality - including getting the HumaneLoc. * Add support for #line default * Compiling with new SourceLoc handling. * Fix off by one on #line directives. * Can use 32bits for SourceLoc. Fix serialize to use that. * Small fixes and comment on usage. * Premake run. * Fix signed warning. * Fix typo on StringSlicePool::has found in review. --- source/slang/diagnostics.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/slang/diagnostics.cpp') diff --git a/source/slang/diagnostics.cpp b/source/slang/diagnostics.cpp index 77473b95f..24019e4aa 100644 --- a/source/slang/diagnostics.cpp +++ b/source/slang/diagnostics.cpp @@ -169,8 +169,7 @@ static void formatDiagnostic( { auto sourceManager = sink->sourceManager; - auto expandedLoc = sourceManager->expandSourceLoc(diagnostic.loc); - auto humaneLoc = getHumaneLoc(expandedLoc); + auto humaneLoc = sourceManager->getHumaneLoc(diagnostic.loc); sb << humaneLoc.getPath(); sb << "("; -- cgit v1.2.3