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

Unified Diff: src/IceAssemblerX8632.h

Issue 1211863004: Enables llvm dyn_cast for Assemblers. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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 132e72d610267b374ceb894350e20a7e43713ac7..8b13fc62ead65acadd912b65a5873b9eb64ff46c 100644
--- a/src/IceAssemblerX8632.h
+++ b/src/IceAssemblerX8632.h
@@ -337,7 +337,8 @@ class AssemblerX8632 : public Assembler {
AssemblerX8632 &operator=(const AssemblerX8632 &) = delete;
public:
- explicit AssemblerX8632(bool use_far_branches = false) : Assembler() {
+ explicit AssemblerX8632(bool use_far_branches = false)
+ : Assembler(Asm_X8632) {
// This mode is only needed and implemented for MIPS and ARM.
assert(!use_far_branches);
(void)use_far_branches;
@@ -377,6 +378,10 @@ public:
return Kind == llvm::ELF::R_386_PC32;
}
+ static bool classof(const Assembler *Asm) {
+ return Asm->getKind() == Asm_X8632;
+ }
+
// Operations to emit GPR instructions (and dispatch on operand type).
typedef void (AssemblerX8632::*TypedEmitGPR)(Type, GPRRegister);
typedef void (AssemblerX8632::*TypedEmitAddr)(Type, const Address &);

Powered by Google App Engine
This is Rietveld 408576698