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

Unified Diff: src/IceAssemblerX8632.h

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.h
diff --git a/src/IceAssemblerX8632.h b/src/IceAssemblerX8632.h
index 48a5f0a2f6e8c7f56e158ebe33df30c7efec2eb0..782cab6b01218c10f9aec060bebf7d15fab8366e 100644
--- a/src/IceAssemblerX8632.h
+++ b/src/IceAssemblerX8632.h
@@ -252,11 +252,11 @@ class Label {
public:
Label() {
-#ifndef NDEBUG
- for (int i = 0; i < kMaxUnresolvedBranches; i++) {
- unresolved_near_positions_[i] = -1;
+ if (buildAllowsAsserts()) {
+ for (int i = 0; i < kMaxUnresolvedBranches; i++) {
John 2015/06/23 22:28:30 optional: s/i/I/
Jim Stichnoth 2015/06/24 21:27:27 Even LLVM violates its own written rules in cases
+ unresolved_near_positions_[i] = -1;
+ }
}
-#endif // !NDEBUG
}
~Label() = default;

Powered by Google App Engine
This is Rietveld 408576698