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

Unified Diff: src/IceAssemblerX8632.cpp

Issue 1197863003: Subzero: Reduce the amount of #ifdef'd code. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Use constexpr inline functions instead of macros Created 5 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
Index: src/IceAssemblerX8632.cpp
diff --git a/src/IceAssemblerX8632.cpp b/src/IceAssemblerX8632.cpp
index ecb6c5b794093de758509d0dcd329717ae59473b..933436d6ebf3b399711f16fccd78ad5aa4ed498a 100644
--- a/src/IceAssemblerX8632.cpp
+++ b/src/IceAssemblerX8632.cpp
@@ -32,14 +32,14 @@ Address Address::ofConstPool(Assembler *Asm, const Constant *Imm) {
}
AssemblerX8632::~AssemblerX8632() {
-#ifndef NDEBUG
- for (const Label *Label : CfgNodeLabels) {
- Label->FinalCheck();
- }
- for (const Label *Label : LocalLabels) {
- Label->FinalCheck();
+ if (buildAllowsAsserts()) {
+ for (const Label *Label : CfgNodeLabels) {
John 2015/06/23 22:28:30 optional: perhaps a good case for auto?
+ Label->FinalCheck();
+ }
+ for (const Label *Label : LocalLabels) {
+ Label->FinalCheck();
+ }
}
-#endif
}
void AssemblerX8632::alignFunction() {

Powered by Google App Engine
This is Rietveld 408576698