Clean up #if directives.
Change-Id: Ib0a4699331c00c7ef8d82dd4894f7f641062878a
diff --git a/lib/ExecutionEngine/Compiler.cpp b/lib/ExecutionEngine/Compiler.cpp
index b8ecc0f..7a6f8f2 100644
--- a/lib/ExecutionEngine/Compiler.cpp
+++ b/lib/ExecutionEngine/Compiler.cpp
@@ -109,9 +109,6 @@
}; // namespace anonymous
-#define DEBUG_MCJIT REFLECT 0
-#define DEBUG_MCJIT_DISASSEMBLE 0
-
namespace bcc {
//////////////////////////////////////////////////////////////////////////////
@@ -457,9 +454,10 @@
PragmaName.size()),
std::string(PragmaValue.data(),
PragmaValue.size())));
-#if DEBUG_MCJIT_REFLECT
- LOGD("compile(): Pragma: %s -> %s\n", pragmaList.back().first.c_str(),
- pragmaList.back().second.c_str());
+#if DEBUG_BCC_REFLECT
+ LOGD("compile(): Pragma: %s -> %s\n",
+ pragmaList.back().first.c_str(),
+ pragmaList.back().second.c_str());
#endif
}
}
@@ -483,7 +481,7 @@
goto on_bcc_compile_error;
}
objectSlotList.push_back(USlot);
-#if DEBUG_MCJIT_REFLECT
+#if DEBUG_BCC_REFLECT
LOGD("compile(): RefCount Slot: %s @ %u\n", Slot.str().c_str(), USlot);
#endif
}
@@ -583,7 +581,7 @@
continue;
if (ExportVarName == I->first->getName()) {
varList.push_back(I->second);
-#if DEBUG_MCJIT_REFLECT
+#if DEBUG_BCC_REFLECT
LOGD("runCodeGen(): Exported VAR: %s @ %p\n", ExportVarName.str().c_str(), I->second);
#endif
break;
@@ -592,7 +590,7 @@
if (I != mCodeEmitter->global_address_end())
continue; // found
-#if DEBUG_MCJIT_REFLECT
+#if DEBUG_BCC_REFLECT
LOGD("runCodeGen(): Exported VAR: %s @ %p\n",
ExportVarName.str().c_str(), (void *)0);
#endif
@@ -618,7 +616,7 @@
llvm::StringRef ExportFuncName =
static_cast<llvm::MDString*>(ExportFuncNameMDS)->getString();
funcList.push_back(mpResult->lookup(ExportFuncName.str().c_str()));
-#if DEBUG_MCJIT_REFLECT
+#if DEBUG_BCC_REFLECT
LOGD("runCodeGen(): Exported Func: %s @ %p\n", ExportFuncName.str().c_str(),
funcList.back());
#endif
diff --git a/lib/ExecutionEngine/bcc.cpp b/lib/ExecutionEngine/bcc.cpp
index f0501cf..fd79e94 100644
--- a/lib/ExecutionEngine/bcc.cpp
+++ b/lib/ExecutionEngine/bcc.cpp
@@ -122,7 +122,7 @@
void *addr = unwrap(script)->lookup(funcname);
-#if USE_DISASSEMBLER_FILE
+#if DEBUG_BCC_REFLECT
LOGD("Function Address: %s --> %p\n", funcname, addr);
#endif
@@ -144,7 +144,7 @@
if (varList) {
unwrap(script)->getExportVarList(varListSize, varList);
-#if USE_DISASSEMBLER_FILE
+#if DEBUG_BCC_REFLECT
size_t count = unwrap(script)->getExportVarCount();
LOGD("ExportVarCount = %lu\n", (unsigned long)count);
@@ -174,7 +174,7 @@
if (funcList) {
unwrap(script)->getExportFuncList(funcListSize, funcList);
-#if USE_DISASSEMBLER_FILE
+#if DEBUG_BCC_REFLECT
size_t count = unwrap(script)->getExportFuncCount();
LOGD("ExportFuncCount = %lu\n", (unsigned long)count);
@@ -203,7 +203,7 @@
BCC_FUNC_LOGGER();
unwrap(script)->getPragmaList(pragmaListSize, keyList, valueList);
-#if USE_DISASSEMBLER_FILE
+#if DEBUG_BCC_REFLECT
if (keyList && valueList) {
size_t count = unwrap(script)->getPragmaCount();
LOGD("PragmaCount = %lu\n", (unsigned long)count);
@@ -251,7 +251,7 @@
if (objectSlotList) {
unwrap(script)->getObjectSlotList(objectSlotListSize, objectSlotList);
-#if USE_DISASSEMBLER_FILE
+#if DEBUG_BCC_REFLECT
size_t count = unwrap(script)->getObjectSlotCount();
LOGD("ObjectSlotCount = %lu\n", (unsigned long)count);