Commit 7f0ab860 by Thomas Lively
parent 9c2c093f
...@@ -282,9 +282,7 @@ SB_LDFLAGS := $(LINKOPTLEVEL) $(LD_EXTRA) ...@@ -282,9 +282,7 @@ SB_LDFLAGS := $(LINKOPTLEVEL) $(LD_EXTRA)
# List the target-specific source files first, which generally take longer to # List the target-specific source files first, which generally take longer to
# compile, in the hope of improving parallel build time. # compile, in the hope of improving parallel build time.
SRCS = \ SRCS = \
IceASanInstrumentation.cpp \
IceAssemblerARM32.cpp \ IceAssemblerARM32.cpp \
IceInstrumentation.cpp \
IceInstARM32.cpp \ IceInstARM32.cpp \
IceInstMIPS32.cpp \ IceInstMIPS32.cpp \
IceInstX8632.cpp \ IceInstX8632.cpp \
...@@ -328,7 +326,9 @@ SRCS = \ ...@@ -328,7 +326,9 @@ SRCS = \
ifndef MINIMAL ifndef MINIMAL
SRCS += \ SRCS += \
IceASanInstrumentation.cpp \
IceConverter.cpp \ IceConverter.cpp \
IceInstrumentation.cpp \
IceTypeConverter.cpp IceTypeConverter.cpp
endif endif
......
...@@ -28,11 +28,11 @@ const llvm::NaClBitcodeRecord::RecordVector RzContents = ...@@ -28,11 +28,11 @@ const llvm::NaClBitcodeRecord::RecordVector RzContents =
llvm::NaClBitcodeRecord::RecordVector(RzSize, 'R'); llvm::NaClBitcodeRecord::RecordVector(RzSize, 'R');
} // end of anonymous namespace } // 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 // types of the redzones and their associated globals match so that they are
// laid out together in memory. // laid out together in memory.
void ASanInstrumentation::instrumentGlobals(VariableDeclarationList &Globals) { void ASanInstrumentation::instrumentGlobals(VariableDeclarationList &Globals) {
if (BuildDefs::minimal() || DidInsertRedZones) if (DidInsertRedZones)
return; return;
VariableDeclarationList NewGlobals; VariableDeclarationList NewGlobals;
...@@ -50,8 +50,10 @@ void ASanInstrumentation::instrumentGlobals(VariableDeclarationList &Globals) { ...@@ -50,8 +50,10 @@ void ASanInstrumentation::instrumentGlobals(VariableDeclarationList &Globals) {
NewGlobals.push_back(RzArraySizeVar); NewGlobals.push_back(RzArraySizeVar);
for (VariableDeclaration *Global : Globals) { for (VariableDeclaration *Global : Globals) {
VariableDeclaration *RzLeft = createRz(&NewGlobals, RzArray, RzArraySize, Global); VariableDeclaration *RzLeft =
VariableDeclaration *RzRight = createRz(&NewGlobals, RzArray, RzArraySize, Global); createRz(&NewGlobals, RzArray, RzArraySize, Global);
VariableDeclaration *RzRight =
createRz(&NewGlobals, RzArray, RzArraySize, Global);
NewGlobals.push_back(RzLeft); NewGlobals.push_back(RzLeft);
NewGlobals.push_back(Global); NewGlobals.push_back(Global);
NewGlobals.push_back(RzRight); NewGlobals.push_back(RzRight);
...@@ -82,8 +84,6 @@ void ASanInstrumentation::instrumentGlobals(VariableDeclarationList &Globals) { ...@@ -82,8 +84,6 @@ void ASanInstrumentation::instrumentGlobals(VariableDeclarationList &Globals) {
} }
std::string ASanInstrumentation::nextRzName() { std::string ASanInstrumentation::nextRzName() {
if (BuildDefs::minimal())
return "";
std::stringstream Name; std::stringstream Name;
Name << RzPrefix << RzNum++; Name << RzPrefix << RzNum++;
return Name.str(); return Name.str();
...@@ -93,8 +93,6 @@ VariableDeclaration * ...@@ -93,8 +93,6 @@ VariableDeclaration *
ASanInstrumentation::createRz(VariableDeclarationList *List, ASanInstrumentation::createRz(VariableDeclarationList *List,
VariableDeclaration *RzArray, SizeT &RzArraySize, VariableDeclaration *RzArray, SizeT &RzArraySize,
VariableDeclaration *Global) { VariableDeclaration *Global) {
if (BuildDefs::minimal())
return nullptr;
auto *Rz = VariableDeclaration::create(List); auto *Rz = VariableDeclaration::create(List);
Rz->setName(Ctx, nextRzName()); Rz->setName(Ctx, nextRzName());
if (Global->hasNonzeroInitializer()) { if (Global->hasNonzeroInitializer()) {
......
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