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

Unified Diff: src/IceASanInstrumentation.cpp

Issue 2064613006: Finished small fixups. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fixed ordering Created 4 years, 6 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
« no previous file with comments | « Makefile.standalone ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceASanInstrumentation.cpp
diff --git a/src/IceASanInstrumentation.cpp b/src/IceASanInstrumentation.cpp
index c0b87dc3a17c6269dd56405c9d64ae44e67104e7..45ec038f4ed91c596e7a5f9a7ee242096441973f 100644
--- a/src/IceASanInstrumentation.cpp
+++ b/src/IceASanInstrumentation.cpp
@@ -28,11 +28,11 @@ const llvm::NaClBitcodeRecord::RecordVector RzContents =
llvm::NaClBitcodeRecord::RecordVector(RzSize, 'R');
} // end of anonymous namespace
-// Create redzones between all global variables, ensuring that the initializer
+// Create redzones around all global variables, ensuring that the initializer
// types of the redzones and their associated globals match so that they are
// laid out together in memory.
void ASanInstrumentation::instrumentGlobals(VariableDeclarationList &Globals) {
- if (BuildDefs::minimal() || DidInsertRedZones)
+ if (DidInsertRedZones)
return;
VariableDeclarationList NewGlobals;
@@ -50,8 +50,10 @@ void ASanInstrumentation::instrumentGlobals(VariableDeclarationList &Globals) {
NewGlobals.push_back(RzArraySizeVar);
for (VariableDeclaration *Global : Globals) {
- VariableDeclaration *RzLeft = createRz(&NewGlobals, RzArray, RzArraySize, Global);
- VariableDeclaration *RzRight = createRz(&NewGlobals, RzArray, RzArraySize, Global);
+ VariableDeclaration *RzLeft =
+ createRz(&NewGlobals, RzArray, RzArraySize, Global);
+ VariableDeclaration *RzRight =
+ createRz(&NewGlobals, RzArray, RzArraySize, Global);
NewGlobals.push_back(RzLeft);
NewGlobals.push_back(Global);
NewGlobals.push_back(RzRight);
@@ -82,8 +84,6 @@ void ASanInstrumentation::instrumentGlobals(VariableDeclarationList &Globals) {
}
std::string ASanInstrumentation::nextRzName() {
- if (BuildDefs::minimal())
- return "";
std::stringstream Name;
Name << RzPrefix << RzNum++;
return Name.str();
@@ -93,8 +93,6 @@ VariableDeclaration *
ASanInstrumentation::createRz(VariableDeclarationList *List,
VariableDeclaration *RzArray, SizeT &RzArraySize,
VariableDeclaration *Global) {
- if (BuildDefs::minimal())
- return nullptr;
auto *Rz = VariableDeclaration::create(List);
Rz->setName(Ctx, nextRzName());
if (Global->hasNonzeroInitializer()) {
« no previous file with comments | « Makefile.standalone ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698