From 972bd3c4c24b06501c52127416afb763a066b8ad Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 29 Apr 2021 09:01:46 -0400 Subject: Support for escaped paths in tools (#1823) * #include an absolute path didn't work - because paths were taken to always be relative. * Split out StringEscapeUtil. * Added StringEscapeUtil. * Fix typo in unix quoting type. * Small comment improvements. * Try to fix linux linking issue. * Fix typo. * Attempt to fix linux link issue. * Update VS proj even though nothing really changed. * Fix another typo issue. * Fix for windows issue. Fixed bug. * Make separate Utils for escaping. * Fix typo. * Split out into StringEscapeHandler. * Windows shell does handle removing quotes (so remove code to remove them). * Handle unescaping if not initiating using the shell. * Slight improvement around shell like decoding. * Simplify command extraction. * Add shared-library category type. * Fix bug in command extraction. * Typo in transcendental category. * Enable unit-test on in smoke test category. * Make parsing failing output as a failing test. * Fixes for transcendental tests. Disable tests that do not work. * Changed category parsing. * Removed the TestResult parameter from _gatherTestsForFile. Made testsList only output. * Remove testing if all tests were disabled. * Fix typo. * Disable path canonical test on linux because CI issue. --- source/compiler-core/slang-source-loc.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/compiler-core/slang-source-loc.cpp') diff --git a/source/compiler-core/slang-source-loc.cpp b/source/compiler-core/slang-source-loc.cpp index 4b589fbf3..29fc0465a 100644 --- a/source/compiler-core/slang-source-loc.cpp +++ b/source/compiler-core/slang-source-loc.cpp @@ -2,6 +2,7 @@ #include "slang-source-loc.h" #include "../core/slang-string-util.h" +#include "../core/slang-string-escape-util.h" namespace Slang { @@ -66,10 +67,7 @@ void PathInfo::appendDisplayName(StringBuilder& out) const case Type::FromString: case Type::FoundPath: { - - out.appendChar('"'); - StringUtil::appendEscaped(foundPath.getUnownedSlice(), out); - out.appendChar('"'); + StringEscapeUtil::appendQuoted(StringEscapeUtil::getHandler(StringEscapeUtil::Style::Cpp), foundPath.getUnownedSlice(), out); break; } default: break; -- cgit v1.2.3