Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Unified Diff: src/IceGlobalInits.h

Issue 874353006: Write out global initializers and data rel directly to ELF file. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: tweak comment Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/IceGlobalInits.h
diff --git a/src/IceGlobalInits.h b/src/IceGlobalInits.h
index 3478a983699239e365ab5d6d4570bd9b4bd3f50f..36d46129fbdb00122514dc7ea8b59ef6dd3393d4 100644
--- a/src/IceGlobalInits.h
+++ b/src/IceGlobalInits.h
@@ -157,7 +157,7 @@ public:
};
// Models the data in a data initializer.
- typedef std::vector<uint8_t> DataVecType;
+ typedef std::vector<char> DataVecType;
/// Defines a sequence of byte values as a data initializer.
class DataInitializer : public Initializer {
@@ -170,14 +170,14 @@ public:
: Initializer(DataInitializerKind), Contents(Values.size()) {
size_t i = 0;
for (auto &V : Values) {
- Contents[i] = static_cast<uint8_t>(V);
+ Contents[i] = static_cast<int8_t>(V);
++i;
}
}
DataInitializer(const char *Str, size_t StrLen)
: Initializer(DataInitializerKind), Contents(StrLen) {
for (size_t i = 0; i < StrLen; ++i)
- Contents[i] = static_cast<uint8_t>(Str[i]);
+ Contents[i] = Str[i];
}
~DataInitializer() override {}
const DataVecType &getContents() const { return Contents; }
« src/IceELFObjectWriter.cpp ('K') | « src/IceELFSection.cpp ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698