diff options
| author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2013-05-15 21:40:27 +0200 |
|---|---|---|
| committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2013-05-15 21:40:27 +0200 |
| commit | b0274c7c30af17c0255846bcd53cac4f7d76ddea (patch) | |
| tree | 4243e33459039a96c26557de48f989e85c925a4c /lib/CodeGen/CGBuiltin.cpp | |
| parent | 38f7a3147aad1e25d0738356519cf9235f5c80b7 (diff) | |
| parent | cce70c7c5f0f4c1a41658fbed845f8b3a565c99c (diff) | |
| download | clang-embtk-support-master.tar.gz clang-embtk-support-master.tar.bz2 clang-embtk-support-master.tar.xz | |
Merge branch 'master' into embtk-support-masterembtk-support-master
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'lib/CodeGen/CGBuiltin.cpp')
| -rw-r--r-- | lib/CodeGen/CGBuiltin.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index d18767897f..bd5afb6d17 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -1645,11 +1645,10 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID, Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID, const CallExpr *E) { if (BuiltinID == ARM::BI__clear_cache) { + assert(E->getNumArgs() == 2 && "__clear_cache takes 2 arguments"); const FunctionDecl *FD = E->getDirectCallee(); - // Oddly people write this call without args on occasion and gcc accepts - // it - it's also marked as varargs in the description file. SmallVector<Value*, 2> Ops; - for (unsigned i = 0; i < E->getNumArgs(); i++) + for (unsigned i = 0; i < 2; i++) Ops.push_back(EmitScalarExpr(E->getArg(i))); llvm::Type *Ty = CGM.getTypes().ConvertType(FD->getType()); llvm::FunctionType *FTy = cast<llvm::FunctionType>(Ty); |
