Print InlineAsm objects

llvm-svn: 25617
diff --git a/llvm/lib/VMCore/InlineAsm.cpp b/llvm/lib/VMCore/InlineAsm.cpp
index 00842bb..cc817e3 100644
--- a/llvm/lib/VMCore/InlineAsm.cpp
+++ b/llvm/lib/VMCore/InlineAsm.cpp
@@ -13,20 +13,30 @@
 
 #include "llvm/InlineAsm.h"
 #include "llvm/DerivedTypes.h"
-#include "llvm/Module.h"
-#include "llvm/Support/LeakDetector.h"
 using namespace llvm;
 
+// NOTE: when memoizing the function type, we have to be careful to handle the
+// case when the type gets refined.
+
+InlineAsm *InlineAsm::get(const FunctionType *Ty, const std::string &AsmString,
+                          const std::string &Constraints, bool hasSideEffects) {
+  // FIXME: memoize!
+  return new InlineAsm(Ty, AsmString, Constraints, hasSideEffects);  
+}
+
 InlineAsm::InlineAsm(const FunctionType *Ty, const std::string &asmString,
                      const std::string &constraints, bool hasSideEffects)
   : Value(PointerType::get(Ty), Value::InlineAsmVal), AsmString(asmString), 
     Constraints(constraints), HasSideEffects(hasSideEffects) {
-  LeakDetector::addGarbageObject(this);
 
-  // FIXME: do various checks on the constraint string and type.
-      
+  // Do various checks on the constraint string and type.
+  assert(Verify(Ty, constraints) && "Function type not legal for constraints!");
 }
 
 const FunctionType *InlineAsm::getFunctionType() const {
   return cast<FunctionType>(getType()->getElementType());
 }
+
+bool InlineAsm::Verify(const FunctionType *Ty, const std::string &Constraints) {
+  return true;
+}