Don't allocate name strings for empty symbols

This removes unnecessary memory allocations.

BUG=angleproject:2267
TEST=angle_unittests

Change-Id: Ide575ea19ab2f8e9fc93092490f1352efa6024a3
Reviewed-on: https://chromium-review.googlesource.com/817415
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/compiler/translator/UtilsHLSL.cpp b/src/compiler/translator/UtilsHLSL.cpp
index f6c7497..1569225 100644
--- a/src/compiler/translator/UtilsHLSL.cpp
+++ b/src/compiler/translator/UtilsHLSL.cpp
@@ -855,10 +855,10 @@
     // translation so that we can link between shader stages.
     if (structure.atGlobalScope())
     {
-        return Decorate(structure.name());
+        return Decorate(*structure.name());
     }
 
-    return "ss" + str(structure.uniqueId().get()) + "_" + structure.name();
+    return "ss" + str(structure.uniqueId().get()) + "_" + *structure.name();
 }
 
 TString QualifiedStructNameString(const TStructure &structure,