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

Side by Side Diff: src/IceAssembler.h

Issue 1741733003: Fix clang warning "has virtual functions but non-virtual destructor". (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/IceFixups.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceAssembler.h - Integrated assembler --------*- C++ -*-===// 1 //===- subzero/src/IceAssembler.h - Integrated assembler --------*- C++ -*-===//
2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 // 5 //
6 // Modified by the Subzero authors. 6 // Modified by the Subzero authors.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // The Subzero Code Generator 10 // The Subzero Code Generator
(...skipping 28 matching lines...) Expand all
39 /// A Label can be in one of three states: 39 /// A Label can be in one of three states:
40 /// - Unused. 40 /// - Unused.
41 /// - Linked, unplaced and tracking the position of branches to the label. 41 /// - Linked, unplaced and tracking the position of branches to the label.
42 /// - Bound, placed and tracking its position. 42 /// - Bound, placed and tracking its position.
43 class Label { 43 class Label {
44 Label(const Label &) = delete; 44 Label(const Label &) = delete;
45 Label &operator=(const Label &) = delete; 45 Label &operator=(const Label &) = delete;
46 46
47 public: 47 public:
48 Label() = default; 48 Label() = default;
49 ~Label() = default; 49 virtual ~Label() = default;
50 50
51 virtual void finalCheck() const { 51 virtual void finalCheck() const {
52 // Assert if label is being destroyed with unresolved branches pending. 52 // Assert if label is being destroyed with unresolved branches pending.
53 assert(!isLinked()); 53 assert(!isLinked());
54 } 54 }
55 55
56 /// Returns the encoded position stored in the label. 56 /// Returns the encoded position stored in the label.
57 intptr_t getEncodedPosition() const { return Position; } 57 intptr_t getEncodedPosition() const { return Position; }
58 58
59 /// Returns the position for bound labels (branches that come after this are 59 /// Returns the position for bound labels (branches that come after this are
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 protected: 361 protected:
362 // Buffer's constructor uses the Allocator, so it needs to appear after it. 362 // Buffer's constructor uses the Allocator, so it needs to appear after it.
363 // TODO(jpp): dependencies on construction order are a nice way of shooting 363 // TODO(jpp): dependencies on construction order are a nice way of shooting
364 // yourself in the foot. Fix this. 364 // yourself in the foot. Fix this.
365 AssemblerBuffer Buffer; 365 AssemblerBuffer Buffer;
366 }; 366 };
367 367
368 } // end of namespace Ice 368 } // end of namespace Ice
369 369
370 #endif // SUBZERO_SRC_ICEASSEMBLER_H_ 370 #endif // SUBZERO_SRC_ICEASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/IceFixups.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698