aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-10-03 15:29:22 +0000
committerVedant Kumar <vsk@apple.com>2016-10-03 15:29:22 +0000
commit30914f3d1cc9f0c24248b9da0f11eec4fb56131f (patch)
tree150b4d8585e4286cab8c95ff25ba21c731161561 /clang/lib/CodeGen/CGCall.cpp
parentf7df85af8723a7fb2d8b5f14b491fc448caf1bef (diff)
downloadllvm-30914f3d1cc9f0c24248b9da0f11eec4fb56131f.zip
llvm-30914f3d1cc9f0c24248b9da0f11eec4fb56131f.tar.gz
llvm-30914f3d1cc9f0c24248b9da0f11eec4fb56131f.tar.bz2
[ARC] Ignore qualifiers in copy-restore expressions
When ARC is enabled, an ObjCIndirectCopyRestoreExpr models the passing of a function argument s.t: * The argument is copied into a temporary, * The temporary is passed into the function, and * After the function call completes, the temporary is move-assigned back to the original location of the argument. The argument type and the parameter type must agree "except possibly in qualification". This commit weakens an assertion in EmitCallArg() to actually reflect that. llvm-svn: 283116
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 233f6c1..2c40854 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -3269,7 +3269,7 @@ void CodeGenFunction::EmitCallArg(CallArgList &args, const Expr *E,
if (const ObjCIndirectCopyRestoreExpr *CRE
= dyn_cast<ObjCIndirectCopyRestoreExpr>(E)) {
assert(getLangOpts().ObjCAutoRefCount);
- assert(getContext().hasSameType(E->getType(), type));
+ assert(getContext().hasSameUnqualifiedType(E->getType(), type));
return emitWritebackArg(*this, args, CRE);
}