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

Unified Diff: src/IceConverter.cpp

Issue 952953002: Subzero: Improve class definition hygiene. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix typo Created 5 years, 10 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
« no previous file with comments | « src/IceConverter.h ('k') | src/IceELFObjectWriter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceConverter.cpp
diff --git a/src/IceConverter.cpp b/src/IceConverter.cpp
index cc523fa541b0a2d185765cc0e3924107354df6b4..111a52b37fc31988c642cd1d294aff9888ccb265 100644
--- a/src/IceConverter.cpp
+++ b/src/IceConverter.cpp
@@ -53,11 +53,12 @@ template <typename T> static std::string LLVMObjectAsString(const T *O) {
// respect to Translator. In particular, the unique_ptr ownership
// rules in LLVM2ICEFunctionConverter.
class LLVM2ICEConverter {
+ LLVM2ICEConverter() = delete;
LLVM2ICEConverter(const LLVM2ICEConverter &) = delete;
LLVM2ICEConverter &operator=(const LLVM2ICEConverter &) = delete;
public:
- LLVM2ICEConverter(Ice::Converter &Converter)
+ explicit LLVM2ICEConverter(Ice::Converter &Converter)
: Converter(Converter), Ctx(Converter.getContext()),
TypeConverter(Converter.getModule()->getContext()) {}
@@ -75,12 +76,13 @@ protected:
// Note: this currently assumes that the given IR was verified to be
// valid PNaCl bitcode. Otherwise, the behavior is undefined.
class LLVM2ICEFunctionConverter : LLVM2ICEConverter {
+ LLVM2ICEFunctionConverter() = delete;
LLVM2ICEFunctionConverter(const LLVM2ICEFunctionConverter &) = delete;
LLVM2ICEFunctionConverter &
operator=(const LLVM2ICEFunctionConverter &) = delete;
public:
- LLVM2ICEFunctionConverter(Ice::Converter &Converter)
+ explicit LLVM2ICEFunctionConverter(Ice::Converter &Converter)
: LLVM2ICEConverter(Converter), Func(nullptr) {}
void convertFunction(const Function *F) {
@@ -651,12 +653,13 @@ private:
// Note: this currently assumes that the given IR was verified to be
// valid PNaCl bitcode. Othewise, the behavior is undefined.
class LLVM2ICEGlobalsConverter : public LLVM2ICEConverter {
+ LLVM2ICEGlobalsConverter() = delete;
LLVM2ICEGlobalsConverter(const LLVM2ICEGlobalsConverter &) = delete;
LLVM2ICEGlobalsConverter &
operator-(const LLVM2ICEGlobalsConverter &) = delete;
public:
- LLVM2ICEGlobalsConverter(Ice::Converter &Converter)
+ explicit LLVM2ICEGlobalsConverter(Ice::Converter &Converter)
: LLVM2ICEConverter(Converter) {}
/// Converts global variables, and their initializers into ICE
« no previous file with comments | « src/IceConverter.h ('k') | src/IceELFObjectWriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698