summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-03 21:52:23 +0000
committerChris Lattner <sabre@nondot.org>2010-03-03 21:52:23 +0000
commit576def7fbe757b62742de5dbe9787a82983ffb8e (patch)
treecadb3ec0913fd00c2b8fda9fa98f8641259407d5 /clang/lib/CodeGen/CGStmt.cpp
parent0dd0c47b7ebe75cca1ee5d6fa79f95359f5be720 (diff)
downloadbcm5719-llvm-576def7fbe757b62742de5dbe9787a82983ffb8e.tar.gz
bcm5719-llvm-576def7fbe757b62742de5dbe9787a82983ffb8e.zip
fix PR6475, we were doing side-effecting stuff in an assert.
llvm-svn: 97669
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index 008a480b9c1..a889e55a9e8 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -915,18 +915,17 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
for (unsigned i = 0, e = S.getNumOutputs(); i != e; i++) {
TargetInfo::ConstraintInfo Info(S.getOutputConstraint(i),
S.getOutputName(i));
- assert(Target.validateOutputConstraint(Info) &&
- "Failed to parse output constraint");
+ bool IsValid = Target.validateOutputConstraint(Info); (void)IsValid;
+ assert(IsValid && "Failed to parse output constraint");
OutputConstraintInfos.push_back(Info);
}
for (unsigned i = 0, e = S.getNumInputs(); i != e; i++) {
TargetInfo::ConstraintInfo Info(S.getInputConstraint(i),
S.getInputName(i));
- assert(Target.validateInputConstraint(OutputConstraintInfos.data(),
- S.getNumOutputs(),
- Info) &&
- "Failed to parse input constraint");
+ bool IsValid = Target.validateInputConstraint(OutputConstraintInfos.data(),
+ S.getNumOutputs(), Info);
+ assert(IsValid && "Failed to parse input constraint"); (void)IsValid;
InputConstraintInfos.push_back(Info);
}
OpenPOWER on IntegriCloud