summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Stmt.cpp
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2019-05-30 15:38:02 +0000
committerErich Keane <erich.keane@intel.com>2019-05-30 15:38:02 +0000
commitd0f34fd19850c79f8741301c3bfe0312ca24324c (patch)
treed11a14843235915243dc65478eb97f80753ceb8c /clang/lib/AST/Stmt.cpp
parente6ddde57e27e03054fd0a7cd627ce7917559a690 (diff)
downloadbcm5719-llvm-d0f34fd19850c79f8741301c3bfe0312ca24324c.tar.gz
bcm5719-llvm-d0f34fd19850c79f8741301c3bfe0312ca24324c.zip
Revert "clang support gnu asm goto."
This reverts commit 954ec09aed4f2be04bb5f4e10dbb4ea8bd19ef9a. Reverting due to test failures as requested by Jennifer Yu. Conflicts: clang/test/CodeGen/asm-goto.c llvm-svn: 362106
Diffstat (limited to 'clang/lib/AST/Stmt.cpp')
-rw-r--r--clang/lib/AST/Stmt.cpp29
1 files changed, 6 insertions, 23 deletions
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp
index 0a4d403106b..68a5a2d6ab0 100644
--- a/clang/lib/AST/Stmt.cpp
+++ b/clang/lib/AST/Stmt.cpp
@@ -444,14 +444,6 @@ void GCCAsmStmt::setInputExpr(unsigned i, Expr *E) {
Exprs[i + NumOutputs] = E;
}
-AddrLabelExpr *GCCAsmStmt::getLabelExpr(unsigned i) const {
- return cast<AddrLabelExpr>(Exprs[i + NumInputs]);
-}
-
-StringRef GCCAsmStmt::getLabelName(unsigned i) const {
- return getLabelExpr(i)->getLabel()->getName();
-}
-
/// getInputConstraint - Return the specified input constraint. Unlike output
/// constraints, these can be empty.
StringRef GCCAsmStmt::getInputConstraint(unsigned i) const {
@@ -464,16 +456,13 @@ void GCCAsmStmt::setOutputsAndInputsAndClobbers(const ASTContext &C,
Stmt **Exprs,
unsigned NumOutputs,
unsigned NumInputs,
- unsigned NumLabels,
StringLiteral **Clobbers,
unsigned NumClobbers) {
this->NumOutputs = NumOutputs;
this->NumInputs = NumInputs;
this->NumClobbers = NumClobbers;
- this->NumLabels = NumLabels;
- assert(!(NumOutputs && NumLabels) && "asm goto cannot have outputs");
- unsigned NumExprs = NumOutputs + NumInputs + NumLabels;
+ unsigned NumExprs = NumOutputs + NumInputs;
C.Deallocate(this->Names);
this->Names = new (C) IdentifierInfo*[NumExprs];
@@ -509,10 +498,6 @@ int GCCAsmStmt::getNamedOperand(StringRef SymbolicName) const {
if (getInputName(i) == SymbolicName)
return getNumOutputs() + NumPlusOperands + i;
- for (unsigned i = 0, e = getNumLabels(); i != e; ++i)
- if (getLabelName(i) == SymbolicName)
- return i + getNumInputs();
-
// Not found.
return -1;
}
@@ -630,8 +615,8 @@ unsigned GCCAsmStmt::AnalyzeAsmString(SmallVectorImpl<AsmStringPiece>&Pieces,
while (CurPtr != StrEnd && isDigit(*CurPtr))
N = N*10 + ((*CurPtr++)-'0');
- unsigned NumOperands = getNumOutputs() + getNumPlusOperands() +
- getNumInputs() + getNumLabels();
+ unsigned NumOperands =
+ getNumOutputs() + getNumPlusOperands() + getNumInputs();
if (N >= NumOperands) {
DiagOffs = CurPtr-StrStart-1;
return diag::err_asm_invalid_operand_number;
@@ -744,12 +729,10 @@ GCCAsmStmt::GCCAsmStmt(const ASTContext &C, SourceLocation asmloc,
unsigned numinputs, IdentifierInfo **names,
StringLiteral **constraints, Expr **exprs,
StringLiteral *asmstr, unsigned numclobbers,
- StringLiteral **clobbers, unsigned numlabels,
- SourceLocation rparenloc)
+ StringLiteral **clobbers, SourceLocation rparenloc)
: AsmStmt(GCCAsmStmtClass, asmloc, issimple, isvolatile, numoutputs,
- numinputs, numclobbers),
- RParenLoc(rparenloc), AsmStr(asmstr), NumLabels(numlabels) {
- unsigned NumExprs = NumOutputs + NumInputs + NumLabels;
+ numinputs, numclobbers), RParenLoc(rparenloc), AsmStr(asmstr) {
+ unsigned NumExprs = NumOutputs + NumInputs;
Names = new (C) IdentifierInfo*[NumExprs];
std::copy(names, names + NumExprs, Names);
OpenPOWER on IntegriCloud