Index: include/llvm/IR/NaClAsm.h |
diff --git a/include/llvm/IR/NaClAsm.h b/include/llvm/IR/NaClAsm.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..951469e86c1e4d8fbdbdadfeee4dfe32eb293410 |
--- /dev/null |
+++ b/include/llvm/IR/NaClAsm.h |
@@ -0,0 +1,32 @@ |
+//===-- llvm/IR/NaClAsm.h - NaCl Assembly Handling --------------*- C++ -*-===// |
+// |
+// The LLVM Compiler Infrastructure |
+// |
+// This file is distributed under the University of Illinois Open Source |
+// License. See LICENSE.TXT for details. |
+// |
+//===----------------------------------------------------------------------===// |
+// |
+// This file provides utilities for NaCl's handling of assembly. |
+// |
+//===----------------------------------------------------------------------===// |
+ |
+#ifndef LLVM_IR_NACL_ASSEMBLY_H |
+#define LLVM_IR_NACL_ASSEMBLY_H |
+ |
+#include "llvm/IR/Instruction.h" |
+ |
+namespace llvm { |
+ |
+namespace NaCl { |
+ |
+/// Returns true if the Instruction corresponds to ``asm("":::"memory")``, |
+/// This is often used as a compiler barrier and NaCl tries to handle it |
+/// gracefully. |
+bool isAsmMemory(const Instruction *I); |
+ |
+} // End NaCl namespace |
+ |
+} // End llvm namespace |
+ |
+#endif |