summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-26 17:19:08 +0000
committerChris Lattner <sabre@nondot.org>2009-04-26 17:19:08 +0000
commitc3f4c7b1c5e78ba5deb850914681b298567eaeb3 (patch)
tree5c0d4ac4db64024c614bf6ef8574e233f4c6dac0 /clang/lib/CodeGen/CGStmt.cpp
parent8d319047c53a3b6cb99ff653dd5a8a39a5663373 (diff)
downloadbcm5719-llvm-c3f4c7b1c5e78ba5deb850914681b298567eaeb3.tar.gz
bcm5719-llvm-c3f4c7b1c5e78ba5deb850914681b298567eaeb3.zip
pull the constraint string into the ConstraintInfo struct
instead of passing it around in addition to it. llvm-svn: 70135
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index 6fc4a08dd53..4d36207b54f 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -798,9 +798,8 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
for (unsigned i = 0, e = S.getNumOutputs(); i != e; i++) {
std::string OutputConstraint(S.getOutputConstraint(i));
- TargetInfo::ConstraintInfo Info;
- bool result = Target.validateOutputConstraint(OutputConstraint.c_str(),
- Info);
+ TargetInfo::ConstraintInfo Info(OutputConstraint);
+ bool result = Target.validateOutputConstraint(Info);
assert(result && "Failed to parse output constraint"); result=result;
OutputConstraintInfos.push_back(Info);
@@ -853,9 +852,8 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
std::string InputConstraint(S.getInputConstraint(i));
- TargetInfo::ConstraintInfo Info;
- bool result = Target.validateInputConstraint(InputConstraint.c_str(),
- S.begin_output_names(),
+ TargetInfo::ConstraintInfo Info(InputConstraint);
+ bool result = Target.validateInputConstraint(S.begin_output_names(),
S.end_output_names(),
&OutputConstraintInfos[0],
Info); result=result;
OpenPOWER on IntegriCloud