[OPENMP] Require valid SourceLocation in function call, NFC.

Removed default empty SourceLocation argument from `emitCall` function
and require valid location.

llvm-svn: 325812
This commit is contained in:
Alexey Bataev 2018-02-22 18:33:31 +00:00
parent 8831f6e57d
commit 7ef47a67a5
2 changed files with 7 additions and 8 deletions

View File

@ -8057,9 +8057,10 @@ void CGOpenMPRuntime::emitDoacrossOrdered(CodeGenFunction &CGF,
CGF.EmitRuntimeCall(RTLFn, Args);
}
void CGOpenMPRuntime::emitCall(CodeGenFunction &CGF, llvm::Value *Callee,
ArrayRef<llvm::Value *> Args,
SourceLocation Loc) const {
void CGOpenMPRuntime::emitCall(CodeGenFunction &CGF, SourceLocation Loc,
llvm::Value *Callee,
ArrayRef<llvm::Value *> Args) const {
assert(Loc.isValid() && "Outlined function call location must be valid.");
auto DL = ApplyDebugLocation::CreateDefaultArtificial(CGF, Loc);
if (auto *Fn = dyn_cast<llvm::Function>(Callee)) {
@ -8074,8 +8075,7 @@ void CGOpenMPRuntime::emitCall(CodeGenFunction &CGF, llvm::Value *Callee,
void CGOpenMPRuntime::emitOutlinedFunctionCall(
CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *OutlinedFn,
ArrayRef<llvm::Value *> Args) const {
assert(Loc.isValid() && "Outlined function call location must be valid.");
emitCall(CGF, OutlinedFn, Args, Loc);
emitCall(CGF, Loc, OutlinedFn, Args);
}
Address CGOpenMPRuntime::getParameterAddress(CodeGenFunction &CGF,

View File

@ -251,9 +251,8 @@ protected:
virtual StringRef getOutlinedHelperName() const { return ".omp_outlined."; }
/// Emits \p Callee function call with arguments \p Args with location \p Loc.
void emitCall(CodeGenFunction &CGF, llvm::Value *Callee,
ArrayRef<llvm::Value *> Args = llvm::None,
SourceLocation Loc = SourceLocation()) const;
void emitCall(CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *Callee,
ArrayRef<llvm::Value *> Args = llvm::None) const;
private:
/// \brief Default const ident_t object used for initialization of all other