diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-08-27 06:28:16 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-08-27 06:28:16 +0000 |
commit | 3cb91b2ad1d704eaf97f91bcc49cfd500d545d1c (patch) | |
tree | 7368b77b7ae221c756ee9fdf05d3f2a1ebb05725 /clang/lib/CodeGen | |
parent | 9fee0b7c0b3a1a72d68e23f120c5b72c0900ea43 (diff) | |
download | bcm5719-llvm-3cb91b2ad1d704eaf97f91bcc49cfd500d545d1c.tar.gz bcm5719-llvm-3cb91b2ad1d704eaf97f91bcc49cfd500d545d1c.zip |
Fix some cases were ArrayRefs were being passed by reference.
llvm-svn: 216527
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 10 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index d8681d480f4..9400b383485 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -573,7 +573,7 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) { void CodeGenFunction::EmitCondBrHints(llvm::LLVMContext &Context, llvm::BranchInst *CondBr, - const ArrayRef<const Attr *> &Attrs) { + ArrayRef<const Attr *> Attrs) { // Return if there are no hints. if (Attrs.empty()) return; @@ -656,7 +656,7 @@ void CodeGenFunction::EmitCondBrHints(llvm::LLVMContext &Context, } void CodeGenFunction::EmitWhileStmt(const WhileStmt &S, - const ArrayRef<const Attr *> &WhileAttrs) { + ArrayRef<const Attr *> WhileAttrs) { RegionCounter Cnt = getPGORegionCounter(&S); // Emit the header for the loop, which will also become @@ -746,7 +746,7 @@ void CodeGenFunction::EmitWhileStmt(const WhileStmt &S, } void CodeGenFunction::EmitDoStmt(const DoStmt &S, - const ArrayRef<const Attr *> &DoAttrs) { + ArrayRef<const Attr *> DoAttrs) { JumpDest LoopExit = getJumpDestInCurrentScope("do.end"); JumpDest LoopCond = getJumpDestInCurrentScope("do.cond"); @@ -807,7 +807,7 @@ void CodeGenFunction::EmitDoStmt(const DoStmt &S, } void CodeGenFunction::EmitForStmt(const ForStmt &S, - const ArrayRef<const Attr *> &ForAttrs) { + ArrayRef<const Attr *> ForAttrs) { JumpDest LoopExit = getJumpDestInCurrentScope("for.end"); LexicalScope ForScope(*this, S.getSourceRange()); @@ -908,7 +908,7 @@ void CodeGenFunction::EmitForStmt(const ForStmt &S, void CodeGenFunction::EmitCXXForRangeStmt(const CXXForRangeStmt &S, - const ArrayRef<const Attr *> &ForAttrs) { + ArrayRef<const Attr *> ForAttrs) { JumpDest LoopExit = getJumpDestInCurrentScope("for.end"); LexicalScope ForScope(*this, S.getSourceRange()); diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 9c62631dbba..3281f0b5171 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -1893,12 +1893,12 @@ public: void EmitIfStmt(const IfStmt &S); void EmitCondBrHints(llvm::LLVMContext &Context, llvm::BranchInst *CondBr, - const ArrayRef<const Attr *> &Attrs); + ArrayRef<const Attr *> Attrs); void EmitWhileStmt(const WhileStmt &S, - const ArrayRef<const Attr *> &Attrs = None); - void EmitDoStmt(const DoStmt &S, const ArrayRef<const Attr *> &Attrs = None); + ArrayRef<const Attr *> Attrs = None); + void EmitDoStmt(const DoStmt &S, ArrayRef<const Attr *> Attrs = None); void EmitForStmt(const ForStmt &S, - const ArrayRef<const Attr *> &Attrs = None); + ArrayRef<const Attr *> Attrs = None); void EmitReturnStmt(const ReturnStmt &S); void EmitDeclStmt(const DeclStmt &S); void EmitBreakStmt(const BreakStmt &S); @@ -1922,7 +1922,7 @@ public: void EmitSEHTryStmt(const SEHTryStmt &S); void EmitSEHLeaveStmt(const SEHLeaveStmt &S); void EmitCXXForRangeStmt(const CXXForRangeStmt &S, - const ArrayRef<const Attr *> &Attrs = None); + ArrayRef<const Attr *> Attrs = None); llvm::Function *EmitCapturedStmt(const CapturedStmt &S, CapturedRegionKind K); llvm::Function *GenerateCapturedStmtFunction(const CapturedStmt &S); |