Commit 6f946f4e by Antonio Maiorano

Subzero: fix assert when dumping unnamed constant

This is for debugging, when ALLOW_DUMP=1. Bug: b/130459196 Change-Id: I734d73b6996e4c3e53e38f65e47fa7f1b04bfe67 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38869Reviewed-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
parent dee5b5f3
......@@ -617,7 +617,7 @@ void ConstantRelocatable::dump(const Cfg *, Ostream &Str) const {
Str << EmitString;
return;
}
Str << "@" << Name;
Str << "@" << (Name.hasStdString() ? Name.toString() : "<Unnamed>") ;
const RelocOffsetT Offset = getOffset();
if (Offset) {
if (Offset >= 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment