}
void InlineAsm::destroyConstant() {
+ getRawType()->getContext().pImpl->InlineAsms.remove(this);
delete this;
}
///Default constructor.
InlineAsm::ConstraintInfo::ConstraintInfo() :
- isMultipleAlternative(false),
Type(isInput), isEarlyClobber(false),
MatchingInput(-1), isCommutative(false),
- isIndirect(false), currentAlternativeIndex(0) {
+ isIndirect(false), isMultipleAlternative(false),
+ currentAlternativeIndex(0) {
}
/// Copy constructor.
InlineAsm::ConstraintInfo::ConstraintInfo(const ConstraintInfo &other) :
- isMultipleAlternative(other.isMultipleAlternative),
Type(other.Type), isEarlyClobber(other.isEarlyClobber),
MatchingInput(other.MatchingInput), isCommutative(other.isCommutative),
isIndirect(other.isIndirect), Codes(other.Codes),
+ isMultipleAlternative(other.isMultipleAlternative),
multipleAlternatives(other.multipleAlternatives),
currentAlternativeIndex(other.currentAlternativeIndex) {
}
/// fields in this structure. If the constraint string is not understood,
/// return true, otherwise return false.
bool InlineAsm::ConstraintInfo::Parse(StringRef Str,
- std::vector<InlineAsm::ConstraintInfo> &ConstraintsSoFar) {
+ InlineAsm::ConstraintInfoVector &ConstraintsSoFar) {
StringRef::iterator I = Str.begin(), E = Str.end();
unsigned multipleAlternativeCount = Str.count('|') + 1;
unsigned multipleAlternativeIndex = 0;
- std::vector<std::string> *pCodes = &Codes;
+ ConstraintCodeVector *pCodes = &Codes;
// Initialize
isMultipleAlternative = (multipleAlternativeCount > 1 ? true : false);
}
}
-std::vector<InlineAsm::ConstraintInfo>
+InlineAsm::ConstraintInfoVector
InlineAsm::ParseConstraints(StringRef Constraints) {
- std::vector<ConstraintInfo> Result;
+ ConstraintInfoVector Result;
// Scan the constraints string.
for (StringRef::iterator I = Constraints.begin(),
bool InlineAsm::Verify(const FunctionType *Ty, StringRef ConstStr) {
if (Ty->isVarArg()) return false;
- std::vector<ConstraintInfo> Constraints = ParseConstraints(ConstStr);
+ ConstraintInfoVector Constraints = ParseConstraints(ConstStr);
// Error parsing constraints.
if (Constraints.empty() && !ConstStr.empty()) return false;