Fix const-ness of inspector constructor.

This was changed originally, but we no longer need the module to be
non-const for the Inspector. Set it back to const to fix the Chrome
roll.

Change-Id: I68166a7a687249cab5c344167386144554b7d175
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/37221
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
dan sinclair
2021-01-11 20:01:12 +00:00
committed by Commit Bot service account
parent e86fd505e4
commit c3c70f848a
6 changed files with 12 additions and 12 deletions

View File

@@ -46,9 +46,9 @@ namespace inspector {
Inspector::Inspector(ast::Module& module, Namer* namer)
: module_(module), namer_(namer), namer_is_owned_(false) {}
Inspector::Inspector(ast::Module& module)
Inspector::Inspector(const ast::Module& module)
: module_(module),
namer_(new MangleNamer(&module)),
namer_(new MangleNamer(&module_)),
namer_is_owned_(true) {}
Inspector::~Inspector() {

View File

@@ -77,7 +77,7 @@ class Inspector {
Inspector(ast::Module& module, Namer* namer);
/// Constructor
/// @param module Shader module to extract information from.
explicit Inspector(ast::Module& module);
explicit Inspector(const ast::Module& module);
~Inspector();
/// @returns error messages from the Inspector