Add stubs for switch and case output
BUG=angle:921
Change-Id: I58bd645a8d53ef5bad9b680e54c8948d50932fca
Reviewed-on: https://chromium-review.googlesource.com/251525
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/Intermediate.cpp b/src/compiler/translator/Intermediate.cpp
index e5dc968..b8398e7 100644
--- a/src/compiler/translator/Intermediate.cpp
+++ b/src/compiler/translator/Intermediate.cpp
@@ -461,17 +461,19 @@
TIntermSwitch *TIntermediate::addSwitch(
TIntermTyped *init, TIntermAggregate *statementList, const TSourceLoc &line)
{
- mInfoSink.info.message(EPrefixInternalError, line,
- "Switch statements are disabled for now");
- return nullptr;
+ TIntermSwitch *node = new TIntermSwitch(init, statementList);
+ node->setLine(line);
+
+ return node;
}
TIntermCase *TIntermediate::addCase(
TIntermTyped *condition, const TSourceLoc &line)
{
- mInfoSink.info.message(EPrefixInternalError, line,
- "Case labels and default labels are disabled for now");
- return nullptr;
+ TIntermCase *node = new TIntermCase(condition);
+ node->setLine(line);
+
+ return node;
}
//