projects
/
platform
/
upstream
/
SPIRV-Tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ca6b59
)
Remove TODO: Strings are always little-endian
author
David Neto
<dneto@google.com>
Thu, 5 Nov 2015 22:37:48 +0000
(17:37 -0500)
committer
David Neto
<dneto@google.com>
Tue, 10 Nov 2015 20:57:42 +0000
(15:57 -0500)
SPIR-V strings are UTF-8 encoded, and always byte-addressed.
source/disassemble.cpp
patch
|
blob
|
history
diff --git
a/source/disassemble.cpp
b/source/disassemble.cpp
index
accaaf1
..
e036982
100644
(file)
--- a/
source/disassemble.cpp
+++ b/
source/disassemble.cpp
@@
-204,8
+204,7
@@
void Disassembler::EmitOperand(const spv_parsed_instruction_t& inst,
}
} break;
case SPV_OPERAND_TYPE_LITERAL_STRING: {
- // Assumes little-endian.
- // TODO(dneto): Make and use spvFixString(&words_[index], endian_);
+ // Strings are always little-endian.
const std::string string(reinterpret_cast<const char*>(&words_[index]));
stream_ << "\"";
SetGreen();