Don't add barriers to clinit methods.

Change-Id: I13e6c008feb8c19e452d6e2f88b2bbbcac997de5
diff --git a/compiler/dex/dex_to_dex_compiler.cc b/compiler/dex/dex_to_dex_compiler.cc
index 1ee29cb..60e638c 100644
--- a/compiler/dex/dex_to_dex_compiler.cc
+++ b/compiler/dex/dex_to_dex_compiler.cc
@@ -209,8 +209,8 @@
 
 void DexCompiler::CompileReturnVoid(Instruction* inst, uint32_t dex_pc) {
   DCHECK(inst->Opcode() == Instruction::RETURN_VOID);
-  // Are we compiling a constructor ?
-  if ((unit_.GetAccessFlags() & kAccConstructor) == 0) {
+  // Are we compiling a non-clinit constructor?
+  if (!unit_.IsConstructor() || unit_.IsStatic()) {
     return;
   }
   // Do we need a constructor barrier ?