diff options
Diffstat (limited to 'llvm/lib/VMCore/InlineAsm.cpp')
| -rw-r--r-- | llvm/lib/VMCore/InlineAsm.cpp | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/llvm/lib/VMCore/InlineAsm.cpp b/llvm/lib/VMCore/InlineAsm.cpp index 1eed8941bea..00842bb3244 100644 --- a/llvm/lib/VMCore/InlineAsm.cpp +++ b/llvm/lib/VMCore/InlineAsm.cpp @@ -18,33 +18,15 @@ using namespace llvm; InlineAsm::InlineAsm(const FunctionType *Ty, const std::string &asmString, - const std::string &constraints, bool hasSideEffects, - const std::string &name, Module *ParentModule) - : Value(PointerType::get(Ty), Value::InlineAsmVal, name), - Parent(0), AsmString(asmString), Constraints(constraints), - AsmHasSideEffects(hasSideEffects) { + const std::string &constraints, bool hasSideEffects) + : Value(PointerType::get(Ty), Value::InlineAsmVal), AsmString(asmString), + Constraints(constraints), HasSideEffects(hasSideEffects) { LeakDetector::addGarbageObject(this); - if (ParentModule) - ParentModule->getInlineAsmList().push_back(this); + // FIXME: do various checks on the constraint string and type. + } const FunctionType *InlineAsm::getFunctionType() const { return cast<FunctionType>(getType()->getElementType()); } - -void InlineAsm::setParent(Module *parent) { - if (getParent()) - LeakDetector::addGarbageObject(this); - Parent = parent; - if (getParent()) - LeakDetector::removeGarbageObject(this); -} - -void InlineAsm::removeFromParent() { - getParent()->getInlineAsmList().remove(this); -} - -void InlineAsm::eraseFromParent() { - getParent()->getInlineAsmList().erase(this); -} |

