Introduce CppCompileActionTemplate, which expands into a list of CppCompileActions that to be executed at execution time.

--
PiperOrigin-RevId: 147163077
MOS_MIGRATED_REVID=147163077
diff --git a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
index 8072b3a..29b9902 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
@@ -508,6 +508,10 @@
           "The parent of TreeFileArtifact (parent-relative path: %s) is not a TreeArtifact: %s",
           parentRelativePath,
           parent);
+      Preconditions.checkState(
+          parentRelativePath.isNormalized() && !parentRelativePath.isAbsolute(),
+          "%s is not a proper normalized relative path",
+          parentRelativePath);
       this.parentTreeArtifact = parent;
       this.parentRelativePath = parentRelativePath;
     }