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

Unified Diff: src/IceInstMIPS32.h

Issue 1732233002: Subzero: Fix ODR errors in the g++ build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstMIPS32.h
diff --git a/src/IceInstMIPS32.h b/src/IceInstMIPS32.h
index 3037167ade4a9960735fca7ea58c4845b59f8182..25b48b5057e865bfd4eb2808f10706426c438eae 100644
--- a/src/IceInstMIPS32.h
+++ b/src/IceInstMIPS32.h
@@ -514,6 +514,17 @@ private:
Variable *DestHi = nullptr;
};
+// Declare partial template specializations of emit() methods that already have
+// default implementations. Without this, there is the possibility of ODR
+// violations and link errors.
+
+template <> void InstMIPS32Mflo::emit(const Cfg *Func) const;
+template <> void InstMIPS32Mfhi::emit(const Cfg *Func) const;
+template <> void InstMIPS32Mtlo::emit(const Cfg *Func) const;
+template <> void InstMIPS32Mthi::emit(const Cfg *Func) const;
+template <> void InstMIPS32Mult::emit(const Cfg *Func) const;
+template <> void InstMIPS32Multu::emit(const Cfg *Func) const;
+
} // end of namespace MIPS32
} // end of namespace Ice
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698