From a7a87cec8c98872299e5dbe4c47a852a954b692b Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 12 Oct 2018 22:02:09 -0400 Subject: Feature/source loc review (#672) * Fixes/improvements based around review comments. * SourceUnit -> SourceView * * Removed the HumaneSourceLoc as it's POD-like ness seemed to make that unnecessary * Made exposed member variables in SourceManager protected - so make clear where/how can be accesed * Improved description about SourceLoc and associated structures * Changed SourceLocType to 'Actual' and 'Nominal'. * Improved a comment. --- source/slang/emit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/slang/emit.cpp') diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 9411c6fdf..00bc2556b 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -578,8 +578,8 @@ struct EmitVisitor if(shouldUseGLSLStyleLineDirective) { - auto path = sourceLocation.getPath(); - + auto path = sourceLocation.path; + // GLSL doesn't support the traditional form of a `#line` directive without // an extension. Rather than depend on that extension we will output // a directive in the traditional GLSL fashion. @@ -609,7 +609,7 @@ struct EmitVisitor // in a module that tracks source files. emitRawText("\""); - for(auto c : sourceLocation.getPath()) + for(auto c : sourceLocation.path) { char charBuffer[] = { c, 0 }; switch(c) -- cgit v1.2.3