diff options
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Function.cpp | 6 | ||||
-rw-r--r-- | lib/VMCore/Instructions.cpp | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index 9f7eefe..49e69e1 100644 --- a/lib/VMCore/Function.cpp +++ b/lib/VMCore/Function.cpp @@ -240,6 +240,12 @@ void Function::setDoesNotThrow(bool doesNotThrow) { setParamAttrs(PAL); } +void Function::addParamAttr(unsigned i, ParameterAttributes attr) { + PAListPtr PAL = getParamAttrs(); + PAL = PAL.addAttr(i, attr); + setParamAttrs(PAL); +} + // Maintain the collector name for each function in an on-the-side table. This // saves allocating an additional word in Function for programs which do not use // GC (i.e., most programs) at the cost of increased overhead for clients which diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index ff3b8b5..40eea13 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -373,6 +373,12 @@ CallInst::CallInst(const CallInst &CI) OL[i].init(InOL[i], this); } +void CallInst::addParamAttr(unsigned i, ParameterAttributes attr) { + PAListPtr PAL = getParamAttrs(); + PAL = PAL.addAttr(i, attr); + setParamAttrs(PAL); +} + bool CallInst::paramHasAttr(unsigned i, ParameterAttributes attr) const { if (ParamAttrs.paramHasAttr(i, attr)) return true; @@ -449,6 +455,12 @@ bool InvokeInst::paramHasAttr(unsigned i, ParameterAttributes attr) const { return false; } +void InvokeInst::addParamAttr(unsigned i, ParameterAttributes attr) { + PAListPtr PAL = getParamAttrs(); + PAL = PAL.addAttr(i, attr); + setParamAttrs(PAL); +} + void InvokeInst::setDoesNotThrow(bool doesNotThrow) { PAListPtr PAL = getParamAttrs(); if (doesNotThrow) |